1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

modify: use new components insted of ConfigTab component

This commit is contained in:
sota1235
2016-12-30 13:53:51 +09:00
parent b0978c772e
commit 69e753cc71
3 changed files with 16 additions and 415 deletions

View File

@@ -1,7 +1,8 @@
import React, { PropTypes } from 'react'
import ReactDOM from 'react-dom'
import { connect } from 'react-redux'
import ConfigTab from './ConfigTab'
import HotkeyTab from './HotkeyTab'
import UiTab from './UiTab'
import InfoTab from './InfoTab'
import StoragesTab from './StoragesTab'
import CSSModules from 'browser/lib/CSSModules'
@@ -39,9 +40,16 @@ class Preferences extends React.Component {
switch (this.state.currentTab) {
case 'INFO':
return <InfoTab/>
case 'CONFIG':
case 'HOTKEY':
return (
<ConfigTab
<HotkeyTab
dispatch={dispatch}
config={config}
/>
)
case 'UI':
return (
<UiTab
dispatch={dispatch}
config={config}
/>
@@ -73,9 +81,10 @@ class Preferences extends React.Component {
let content = this.renderContent()
let tabs = [
{target: 'STORAGES', label: 'Storages', icon: 'database'},
{target: 'CONFIG', label: 'Config', icon: 'cogs'},
{target: 'INFO', label: 'Info', icon: 'info-circle'}
{target: 'STORAGES', label: 'Storages'},
{target: 'HOTKEY', label: 'Hotkey'},
{target: 'UI', label: 'UI'},
{target: 'INFO', label: 'Info'}
]
let navButtons = tabs.map((tab) => {