Skip to content

Commit 922ae7a

Browse files
committed
clean old codes
1 parent 2d46d12 commit 922ae7a

5 files changed

Lines changed: 10 additions & 101 deletions

File tree

browser/lib/fetchConfig.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

browser/main/index.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import React from 'react'
55
import ReactDOM from 'react-dom'
66
require('!!style!css!stylus?sourceMap!./global.styl')
77
import activityRecord from 'browser/lib/activityRecord'
8-
import fetchConfig from '../lib/fetchConfig'
98
import { Router, Route, IndexRoute, IndexRedirect, hashHistory } from 'react-router'
109
import { syncHistoryWithStore } from 'react-router-redux'
1110

@@ -14,22 +13,6 @@ const ipc = electron.ipcRenderer
1413
const path = require('path')
1514
const remote = electron.remote
1615

17-
let config = fetchConfig()
18-
applyConfig(config)
19-
20-
ipc.on('config-apply', function (e, newConfig) {
21-
config = newConfig
22-
applyConfig(config)
23-
})
24-
25-
function applyConfig (config) {
26-
let body = document.body
27-
body.setAttribute('data-theme', config['theme-ui'])
28-
29-
let hljsCss = document.getElementById('hljs-css')
30-
hljsCss.setAttribute('href', '../node_modules/highlight.js/styles/' + config['theme-code'] + '.css')
31-
}
32-
3316
if (process.env.NODE_ENV !== 'production') {
3417
window.addEventListener('keydown', function (e) {
3518
if (e.keyCode === 73 && e.metaKey && e.altKey) {

browser/main/lib/queue.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

browser/main/modals/PreferencesModal/ConfigTab.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import React, { PropTypes } from 'react'
22
import CSSModules from 'browser/lib/CSSModules'
33
import styles from './ConfigTab.styl'
4-
import fetchConfig from 'browser/lib/fetchConfig'
54
import hljsTheme from 'browser/lib/hljsThemes'
65
import ConfigManager from 'browser/main/lib/ConfigManager'
76
import store from 'browser/main/store'
87

98
const electron = require('electron')
109
const ipc = electron.ipcRenderer
11-
const remote = electron.remote
1210
const ace = window.ace
1311

1412
const OSX = global.process.platform === 'darwin'

browser/main/modals/PreferencesModal/InfoTab.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import CSSModules from 'browser/lib/CSSModules'
33
import styles from './InfoTab.styl'
44

55
const appVersion = global.process.version
6+
const electron = require('electron')
7+
const { shell } = electron
68

79
class InfoTab extends React.Component {
810
constructor (props) {
@@ -12,6 +14,11 @@ class InfoTab extends React.Component {
1214
}
1315
}
1416

17+
handleLinkClick (e) {
18+
shell.openExternal(e.currentTarget.href)
19+
e.preventDefault()
20+
}
21+
1522
render () {
1623
return (
1724
<div styleName='root'>
@@ -25,7 +32,9 @@ class InfoTab extends React.Component {
2532
- License : GPLv3
2633
</li>
2734
<li>
28-
- Issue Tracker : <a href='https://github.com/BoostIO/Boostnote/issues'>https://github.com/BoostIO/Boostnote/issues</a>
35+
- Issue Tracker : <a href='https://github.com/BoostIO/Boostnote/issues'
36+
onClick={(e) => this.handleLinkClick(e)}
37+
>https://github.com/BoostIO/Boostnote/issues</a>
2938
</li>
3039
</ul>
3140
</div>

0 commit comments

Comments
 (0)