mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
v0.5.6
This commit is contained in:
@@ -231,8 +231,8 @@ export default class ArticleTopBar extends React.Component {
|
|||||||
<ExternalLink className='ArticleTopBar-right-links-button-dropdown-item' href='https://b00st.io'>
|
<ExternalLink className='ArticleTopBar-right-links-button-dropdown-item' href='https://b00st.io'>
|
||||||
<i className='fa fa-fw fa-home'/>Boost official page
|
<i className='fa fa-fw fa-home'/>Boost official page
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
<ExternalLink className='ArticleTopBar-right-links-button-dropdown-item' href='https://github.com/BoostIO/boost-app-discussions/issues'>
|
<ExternalLink className='ArticleTopBar-right-links-button-dropdown-item' href='https://github.com/BoostIO/Boostnote/issues'>
|
||||||
<i className='fa fa-fw fa-bullhorn'/> Discuss
|
<i className='fa fa-fw fa-github'/> Issues
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react'
|
|||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
require('../styles/main/index.styl')
|
require('../styles/main/index.styl')
|
||||||
import { openModal } from 'browser/lib/modal'
|
import { openModal } from 'browser/lib/modal'
|
||||||
import Tutorial from './modal/Tutorial'
|
import OSSAnnounceModal from './modal/OSSAnnounceModal'
|
||||||
import activityRecord from 'browser/lib/activityRecord'
|
import activityRecord from 'browser/lib/activityRecord'
|
||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const ipc = electron.ipcRenderer
|
const ipc = electron.ipcRenderer
|
||||||
@@ -59,9 +59,10 @@ ReactDOM.render((
|
|||||||
loadingCover.parentNode.removeChild(loadingCover)
|
loadingCover.parentNode.removeChild(loadingCover)
|
||||||
let status = JSON.parse(localStorage.getItem('status'))
|
let status = JSON.parse(localStorage.getItem('status'))
|
||||||
if (status == null) status = {}
|
if (status == null) status = {}
|
||||||
if (!status.introWatched) {
|
|
||||||
openModal(Tutorial)
|
if (!status.ossAnnounceWatched) {
|
||||||
status.introWatched = true
|
openModal(OSSAnnounceModal)
|
||||||
|
status.ossAnnounceWatched = true
|
||||||
localStorage.setItem('status', JSON.stringify(status))
|
localStorage.setItem('status', JSON.stringify(status))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
29
browser/main/modal/OSSAnnounceModal.js
Normal file
29
browser/main/modal/OSSAnnounceModal.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import React, { PropTypes } from 'react'
|
||||||
|
import ExternalLink from 'browser/components/ExternalLink'
|
||||||
|
|
||||||
|
export default class OSSAnnounceModal extends React.Component {
|
||||||
|
handleCloseBtnClick (e) {
|
||||||
|
this.props.close()
|
||||||
|
}
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<div className='OSSAnnounceModal modal'>
|
||||||
|
|
||||||
|
<div className='OSSAnnounceModal-title'>Boostnote has been Open-sourced</div>
|
||||||
|
|
||||||
|
<ExternalLink className='OSSAnnounceModal-link' href='https://github.com/BoostIO/Boostnote'>
|
||||||
|
https://github.com/BoostIO/Boostnote
|
||||||
|
</ExternalLink>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className='OSSAnnounceModal-closeBtn'
|
||||||
|
onClick={(e) => this.handleCloseBtnClick(e)}
|
||||||
|
>Close</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OSSAnnounceModal.propTypes = {
|
||||||
|
close: PropTypes.func
|
||||||
|
}
|
||||||
@@ -1,122 +1,26 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import clientKey from 'browser/lib/clientKey'
|
|
||||||
import linkState from 'browser/lib/linkState'
|
import linkState from 'browser/lib/linkState'
|
||||||
import _ from 'lodash'
|
import ExternalLink from 'browser/components/ExternalLink'
|
||||||
import { request, SERVER_URL } from 'browser/lib/api'
|
|
||||||
|
|
||||||
const FORM_MODE = 'FORM_MODE'
|
|
||||||
const DONE_MODE = 'DONE_MODE'
|
|
||||||
|
|
||||||
export default class ContactTab extends React.Component {
|
export default class ContactTab extends React.Component {
|
||||||
constructor (props) {
|
|
||||||
super(props)
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
title: '',
|
|
||||||
content: '',
|
|
||||||
email: '',
|
|
||||||
mode: FORM_MODE,
|
|
||||||
alert: null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
let titleInput = ReactDOM.findDOMNode(this.refs.title)
|
let titleInput = ReactDOM.findDOMNode(this.refs.title)
|
||||||
if (titleInput != null) titleInput.focus()
|
if (titleInput != null) titleInput.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBackButtonClick (e) {
|
|
||||||
this.setState({
|
|
||||||
mode: FORM_MODE
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSendButtonClick (e) {
|
|
||||||
let input = _.pick(this.state, ['title', 'content', 'email'])
|
|
||||||
input.clientKey = clientKey.get()
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
alert: {
|
|
||||||
type: 'info',
|
|
||||||
message: 'Sending...'
|
|
||||||
}
|
|
||||||
}, () => {
|
|
||||||
request.post(SERVER_URL + 'apis/inquiry')
|
|
||||||
.send(input)
|
|
||||||
.then(res => {
|
|
||||||
console.log('sent')
|
|
||||||
this.setState({
|
|
||||||
title: '',
|
|
||||||
content: '',
|
|
||||||
mode: DONE_MODE,
|
|
||||||
alert: null
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
if (err.code === 'ECONNREFUSED') {
|
|
||||||
this.setState({
|
|
||||||
alert: {
|
|
||||||
type: 'error',
|
|
||||||
message: 'Can\'t connect to API server.'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.error(err)
|
|
||||||
this.setState({
|
|
||||||
alert: {
|
|
||||||
type: 'error',
|
|
||||||
message: err.message
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
switch (this.state.mode) {
|
|
||||||
case DONE_MODE:
|
|
||||||
return (
|
return (
|
||||||
<div className='ContactTab content done'>
|
<div className='ContactTab content'>
|
||||||
<div className='message'>
|
<div className='title'>Contact</div>
|
||||||
<i className='checkIcon fa fa-check-circle'/><br/>
|
<p>
|
||||||
Your message has been sent successfully!!
|
- E-mail: <ExternalLink href='mailto:rokt33r@gmail.com?Subject=About%20Boost'>rokt33r@gmail.com</ExternalLink>
|
||||||
</div>
|
</p>
|
||||||
<div className='control'>
|
<p>
|
||||||
<button onClick={e => this.handleBackButtonClick(e)}>Back to Contact form</button>
|
- Issues: <ExternalLink href='https://github.com/BoostIO/Boostnote/issues'>https://github.com/BoostIO/Boostnote/issues</ExternalLink>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
case FORM_MODE:
|
|
||||||
default:
|
|
||||||
let alertElement = this.state.alert != null
|
|
||||||
? (
|
|
||||||
<div className={'alert ' + this.state.alert.type}>{this.state.alert.message}</div>
|
|
||||||
)
|
|
||||||
: null
|
|
||||||
return (
|
|
||||||
<div className='ContactTab content form'>
|
|
||||||
<div className='title'>Contact form</div>
|
|
||||||
<div className='description'>
|
|
||||||
Your feedback is highly appreciated and will help us to improve our app. :D
|
|
||||||
</div>
|
|
||||||
<div className='iptGroup'>
|
|
||||||
<input ref='title' valueLink={this.linkState('title')} placeholder='Title' type='text'/>
|
|
||||||
</div>
|
|
||||||
<div className='iptGroup'>
|
|
||||||
<textarea valueLink={this.linkState('content')} placeholder='Content'/>
|
|
||||||
</div>
|
|
||||||
<div className='iptGroup'>
|
|
||||||
<input valueLink={this.linkState('email')} placeholder='E-mail (Optional)' type='email'/>
|
|
||||||
</div>
|
|
||||||
<div className='formControl'>
|
|
||||||
<button onClick={e => this.handleSendButtonClick(e)} className='primary'>Send</button>
|
|
||||||
{alertElement}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,3 +126,28 @@ textarea.block-input
|
|||||||
margin-left -107px
|
margin-left -107px
|
||||||
&:hover .tooltip
|
&:hover .tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
|
.OSSAnnounceModal
|
||||||
|
height 250
|
||||||
|
text-align center
|
||||||
|
.OSSAnnounceModal-title
|
||||||
|
font-size 32px
|
||||||
|
padding 45px 0
|
||||||
|
|
||||||
|
.OSSAnnounceModal-link
|
||||||
|
display block
|
||||||
|
font-size 20px
|
||||||
|
margin 25px 0 65px
|
||||||
|
.OSSAnnounceModal-closeBtn
|
||||||
|
display block
|
||||||
|
margin 0 auto
|
||||||
|
border none
|
||||||
|
border-radius 5px
|
||||||
|
width 150px
|
||||||
|
height 33px
|
||||||
|
background-color brandColor
|
||||||
|
color white
|
||||||
|
opacity 0.7
|
||||||
|
&:hover
|
||||||
|
opacity 1
|
||||||
|
background-color lighten(brandColor, 10%)
|
||||||
|
|||||||
@@ -177,69 +177,14 @@ iptFocusBorderColor = #369DCD
|
|||||||
color errorTextColor
|
color errorTextColor
|
||||||
background-color errorBackgroundColor
|
background-color errorBackgroundColor
|
||||||
&.ContactTab
|
&.ContactTab
|
||||||
&.done
|
|
||||||
.message
|
|
||||||
margin-top 75px
|
|
||||||
margin-bottom 15px
|
|
||||||
text-align center
|
|
||||||
font-size 22px
|
|
||||||
.checkIcon
|
|
||||||
margin-bottom 15px
|
|
||||||
font-size 144px
|
|
||||||
color brandColor
|
|
||||||
text-align center
|
|
||||||
.control
|
|
||||||
text-align center
|
|
||||||
button
|
|
||||||
border solid 1px borderColor
|
|
||||||
border-radius 5px
|
|
||||||
background-color white
|
|
||||||
padding 15px 15px
|
|
||||||
font-size 14px
|
|
||||||
&:hover
|
|
||||||
background-color darken(white, 10%)
|
|
||||||
&.form
|
|
||||||
padding 10px
|
padding 10px
|
||||||
.title
|
.title
|
||||||
font-size 18px
|
font-size 18px
|
||||||
color brandColor
|
color brandColor
|
||||||
margin-top 10px
|
margin-top 10px
|
||||||
margin-bottom 10px
|
margin-bottom 10px
|
||||||
.description
|
p
|
||||||
margin-bottom 15px
|
line-height 2
|
||||||
.iptGroup
|
|
||||||
margin-bottom 10px
|
|
||||||
input, textarea
|
|
||||||
border-radius 5px
|
|
||||||
border 1px solid borderColor
|
|
||||||
font-size 14px
|
|
||||||
outline none
|
|
||||||
padding 10px 15px
|
|
||||||
width 100%
|
|
||||||
&:focus
|
|
||||||
border-color iptFocusBorderColor
|
|
||||||
textarea
|
|
||||||
resize vertical
|
|
||||||
min-height 150px
|
|
||||||
.formControl
|
|
||||||
clearfix()
|
|
||||||
.alert
|
|
||||||
float right
|
|
||||||
padding 10px 15px
|
|
||||||
margin 0 5px 0
|
|
||||||
font-size 14px
|
|
||||||
line-height normal
|
|
||||||
button
|
|
||||||
padding 10px 15px
|
|
||||||
background-color brandColor
|
|
||||||
color white
|
|
||||||
font-size 14px
|
|
||||||
border-radius 5px
|
|
||||||
border none
|
|
||||||
float right
|
|
||||||
&:hover
|
|
||||||
background-color lighten(brandColor, 10%)
|
|
||||||
|
|
||||||
&.AppSettingTab
|
&.AppSettingTab
|
||||||
.description
|
.description
|
||||||
marked()
|
marked()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"version": "0.5.5",
|
"version": "0.5.6",
|
||||||
"description": "Boostnote",
|
"description": "Boostnote",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user