1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

add preference tab

This commit is contained in:
Baptiste Augrain
2018-11-15 03:15:11 +01:00
parent 2af52c193c
commit 168fe212f5
4 changed files with 181 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ import UiTab from './UiTab'
import InfoTab from './InfoTab'
import Crowdfunding from './Crowdfunding'
import StoragesTab from './StoragesTab'
import ExportTab from './ExportTab'
import SnippetTab from './SnippetTab'
import Blog from './Blog'
import ModalEscButton from 'browser/components/ModalEscButton'
@@ -23,7 +24,8 @@ class Preferences extends React.Component {
currentTab: 'STORAGES',
UIAlert: '',
HotkeyAlert: '',
BlogAlert: ''
BlogAlert: '',
ExportAlert: ''
}
}
@@ -87,6 +89,15 @@ class Preferences extends React.Component {
haveToSave={alert => this.setState({BlogAlert: alert})}
/>
)
case 'EXPORT':
return (
<ExportTab
dispatch={dispatch}
config={config}
data={data}
haveToSave={alert => this.setState({ExportAlert: alert})}
/>
)
case 'SNIPPET':
return (
<SnippetTab
@@ -133,6 +144,7 @@ class Preferences extends React.Component {
{target: 'INFO', label: i18n.__('About')},
{target: 'CROWDFUNDING', label: i18n.__('Crowdfunding')},
{target: 'BLOG', label: i18n.__('Blog'), Blog: this.state.BlogAlert},
{target: 'EXPORT', label: i18n.__('Export'), Export: this.state.ExportAlert},
{target: 'SNIPPET', label: i18n.__('Snippets')}
]