- Discuss
+
+ Issues
)
diff --git a/browser/main/index.js b/browser/main/index.js
index 4763acc2..092f60d6 100644
--- a/browser/main/index.js
+++ b/browser/main/index.js
@@ -5,7 +5,7 @@ import React from 'react'
import ReactDOM from 'react-dom'
require('../styles/main/index.styl')
import { openModal } from 'browser/lib/modal'
-import Tutorial from './modal/Tutorial'
+import OSSAnnounceModal from './modal/OSSAnnounceModal'
import activityRecord from 'browser/lib/activityRecord'
const electron = require('electron')
const ipc = electron.ipcRenderer
@@ -59,9 +59,10 @@ ReactDOM.render((
loadingCover.parentNode.removeChild(loadingCover)
let status = JSON.parse(localStorage.getItem('status'))
if (status == null) status = {}
- if (!status.introWatched) {
- openModal(Tutorial)
- status.introWatched = true
+
+ if (!status.ossAnnounceWatched) {
+ openModal(OSSAnnounceModal)
+ status.ossAnnounceWatched = true
localStorage.setItem('status', JSON.stringify(status))
}
})
diff --git a/browser/main/modal/OSSAnnounceModal.js b/browser/main/modal/OSSAnnounceModal.js
new file mode 100644
index 00000000..0902682e
--- /dev/null
+++ b/browser/main/modal/OSSAnnounceModal.js
@@ -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 (
+
+
+
Boostnote has been Open-sourced
+
+
+ https://github.com/BoostIO/Boostnote
+
+
+
+
+ )
+ }
+}
+
+OSSAnnounceModal.propTypes = {
+ close: PropTypes.func
+}
diff --git a/browser/main/modal/Preference/ContactTab.js b/browser/main/modal/Preference/ContactTab.js
index 1d0d8073..54713cfb 100644
--- a/browser/main/modal/Preference/ContactTab.js
+++ b/browser/main/modal/Preference/ContactTab.js
@@ -1,122 +1,26 @@
import React from 'react'
import ReactDOM from 'react-dom'
-import clientKey from 'browser/lib/clientKey'
import linkState from 'browser/lib/linkState'
-import _ from 'lodash'
-import { request, SERVER_URL } from 'browser/lib/api'
-
-const FORM_MODE = 'FORM_MODE'
-const DONE_MODE = 'DONE_MODE'
+import ExternalLink from 'browser/components/ExternalLink'
export default class ContactTab extends React.Component {
- constructor (props) {
- super(props)
-
- this.state = {
- title: '',
- content: '',
- email: '',
- mode: FORM_MODE,
- alert: null
- }
- }
-
componentDidMount () {
let titleInput = ReactDOM.findDOMNode(this.refs.title)
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 () {
- switch (this.state.mode) {
- case DONE_MODE:
- return (
-
-
-
- Your message has been sent successfully!!
-
-
-
-
-
- )
- case FORM_MODE:
- default:
- let alertElement = this.state.alert != null
- ? (
- {this.state.alert.message}
- )
- : null
- return (
-
-
Contact form
-
- Your feedback is highly appreciated and will help us to improve our app. :D
-
-
-
-
-
-
-
-
-
-
-
-
- {alertElement}
-
-
- )
- }
+ return (
+
+
Contact
+
+ - E-mail: rokt33r@gmail.com
+
+
+ - Issues: https://github.com/BoostIO/Boostnote/issues
+
+
+ )
}
}
diff --git a/browser/styles/main/index.styl b/browser/styles/main/index.styl
index 95e3eac5..8632a13b 100644
--- a/browser/styles/main/index.styl
+++ b/browser/styles/main/index.styl
@@ -126,3 +126,28 @@ textarea.block-input
margin-left -107px
&:hover .tooltip
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%)
diff --git a/browser/styles/main/modal/Preferences.styl b/browser/styles/main/modal/Preferences.styl
index 896e51bc..9688fe0b 100644
--- a/browser/styles/main/modal/Preferences.styl
+++ b/browser/styles/main/modal/Preferences.styl
@@ -177,69 +177,14 @@ iptFocusBorderColor = #369DCD
color errorTextColor
background-color errorBackgroundColor
&.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
- .title
- font-size 18px
- color brandColor
- margin-top 10px
- margin-bottom 10px
- .description
- margin-bottom 15px
- .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%)
-
+ padding 10px
+ .title
+ font-size 18px
+ color brandColor
+ margin-top 10px
+ margin-bottom 10px
+ p
+ line-height 2
&.AppSettingTab
.description
marked()
diff --git a/package.json b/package.json
index 98e6099f..42991933 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "boost",
- "version": "0.5.5",
+ "version": "0.5.6",
"description": "Boostnote",
"main": "index.js",
"scripts": {