Compare commits
183 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
414e0dbc05 | ||
|
|
081a3da9e1 | ||
|
|
626175b2b8 | ||
|
|
54db0c718a | ||
|
|
ae9175d1b1 | ||
|
|
16e1f0f882 | ||
|
|
179b830d14 | ||
|
|
aeb27f7bff | ||
|
|
0b2b89da0f | ||
|
|
804991b300 | ||
|
|
529f271e07 | ||
|
|
402d577ce0 | ||
|
|
4bb28a358e | ||
|
|
200a9275d2 | ||
|
|
9cb086cbd9 | ||
|
|
3a836aaf34 | ||
|
|
e14a6f2374 | ||
|
|
28794bff79 | ||
|
|
ecc9443c9a | ||
|
|
a1c499c026 | ||
|
|
4e8321268c | ||
|
|
8510325732 | ||
|
|
49102be894 | ||
|
|
1a97488dd7 | ||
|
|
b90c7e5318 | ||
|
|
ece1e37c16 | ||
|
|
3a6e3f5cae | ||
|
|
8e502eec80 | ||
|
|
042ebe8316 | ||
|
|
eee47b1f76 | ||
|
|
7978704f1b | ||
|
|
9392ac438c | ||
|
|
cbcfb57e35 | ||
|
|
29fa512a90 | ||
|
|
059d1fb4f2 | ||
|
|
4d3a538213 | ||
|
|
108a0db799 | ||
|
|
04f632570d | ||
|
|
92b919da6c | ||
|
|
4f0f611e52 | ||
|
|
90f7cf0996 | ||
|
|
ce43e80bdf | ||
|
|
c397752b7a | ||
|
|
2470364571 | ||
|
|
cab122ba8b | ||
|
|
56b01b5a85 | ||
|
|
cbcc9fb411 | ||
|
|
5bbc60d48a | ||
|
|
8fb8aab7b8 | ||
|
|
5b76216a64 | ||
|
|
7f5e372bdc | ||
|
|
01913a9a40 | ||
|
|
62f9fcf171 | ||
|
|
34c667f6b2 | ||
|
|
7a6de387e3 | ||
|
|
b6efbcedef | ||
|
|
3c70b2e5a0 | ||
|
|
62e108d460 | ||
|
|
b7f426b03f | ||
|
|
5ca13b70aa | ||
|
|
4644d107c6 | ||
|
|
06013b2a6a | ||
|
|
7380fc8500 | ||
|
|
81b550e66c | ||
|
|
f5972c273b | ||
|
|
c259ec2bed | ||
|
|
86a04b0dcb | ||
|
|
8b7c0c957c | ||
|
|
0cfe971a48 | ||
|
|
8884db858c | ||
|
|
0fe9dd4fbb | ||
|
|
ae57e99173 | ||
|
|
c238e1b5cb | ||
|
|
55ef998c55 | ||
|
|
166815ccbf | ||
|
|
34a16298d4 | ||
|
|
1613e72d47 | ||
|
|
e933ad89dc | ||
|
|
148fb25a15 | ||
|
|
fe0544dbc9 | ||
|
|
0aaea28e74 | ||
|
|
f4764afbf4 | ||
|
|
2a2b662a6f | ||
|
|
deade1f9f8 | ||
|
|
2b73c17cca | ||
|
|
369f8b6093 | ||
|
|
5391ca161d | ||
|
|
5b224d3b54 | ||
|
|
dad6a93944 | ||
|
|
10ec5c1342 | ||
|
|
8edfc15f45 | ||
|
|
792e41f161 | ||
|
|
9fbdf895af | ||
|
|
dbc0fedf43 | ||
|
|
cb298b8cad | ||
|
|
2459a80e15 | ||
|
|
0a973c4db3 | ||
|
|
a84fddd5fa | ||
|
|
1cd26d2e71 | ||
|
|
f88ac891ff | ||
|
|
17aa9ae85f | ||
|
|
bb46a9ba4c | ||
|
|
4a6c16df8d | ||
|
|
95787fafc6 | ||
|
|
c51d79e4d7 | ||
|
|
d5232a1b0e | ||
|
|
e093c7f982 | ||
|
|
3f53bddf7e | ||
|
|
e03d8175e3 | ||
|
|
7ab2e9f6ca | ||
|
|
6316ddc6a6 | ||
|
|
11c46ede5d | ||
|
|
2ec5238d97 | ||
|
|
b7f359f6cf | ||
|
|
8ef485221c | ||
|
|
afddb6fc33 | ||
|
|
f28ee1bc4b | ||
|
|
b997f0a5a7 | ||
|
|
48dc47ce57 | ||
|
|
f1a90f4a11 | ||
|
|
990d7edba4 | ||
|
|
13a1da91be | ||
|
|
930b58d2a8 | ||
|
|
b88b1065ee | ||
|
|
5fbb802b32 | ||
|
|
a40f8d25ef | ||
|
|
0a28798d54 | ||
|
|
6047987c25 | ||
|
|
2ce96186f2 | ||
|
|
26357bd4bc | ||
|
|
e94b45a7e4 | ||
|
|
4be1eb7a28 | ||
|
|
f4bbbb640d | ||
|
|
94b4e70b0f | ||
|
|
b31e3f7783 | ||
|
|
6375ac857a | ||
|
|
5eac08430f | ||
|
|
ef0b109ad4 | ||
|
|
7fbe6c0955 | ||
|
|
c86e43597c | ||
|
|
123a73a5e6 | ||
|
|
706b5d253f | ||
|
|
8fb8c7a40b | ||
|
|
21220f93b1 | ||
|
|
705e64377b | ||
|
|
5c3f0cd060 | ||
|
|
a238be5b7c | ||
|
|
2351bb78da | ||
|
|
6bbc5a91fe | ||
|
|
2f52233bd0 | ||
|
|
92eccb635a | ||
|
|
1f8acc3afc | ||
|
|
f8eaa9e796 | ||
|
|
7c9fecd943 | ||
|
|
3df8cbb357 | ||
|
|
993cb9cb0b | ||
|
|
5bd4a3f761 | ||
|
|
fcad84ced3 | ||
|
|
0bd48981ec | ||
|
|
0bf7e8b705 | ||
|
|
875c451221 | ||
|
|
c8256bea3a | ||
|
|
7d10b951b7 | ||
|
|
34e9238cc4 | ||
|
|
7d97784a58 | ||
|
|
1265e7c4a1 | ||
|
|
44ece2bf34 | ||
|
|
fde2a8055d | ||
|
|
f9643c2503 | ||
|
|
e6a97e5cb3 | ||
|
|
73b5546ae9 | ||
|
|
f98719ee73 | ||
|
|
7666182ae3 | ||
|
|
05af30f336 | ||
|
|
20de08b625 | ||
|
|
e60f4f4a64 | ||
|
|
6af25d932c | ||
|
|
3f49a8a15a | ||
|
|
bfa8db7b55 | ||
|
|
d6f2e7588c | ||
|
|
b9038e254e | ||
|
|
b351e42538 | ||
|
|
b6304a04e6 |
58
Backers.md
@@ -1,39 +1,49 @@
|
|||||||
Dear all,
|
<h1 align="center">Sponsors & Backers</h1>
|
||||||
|
|
||||||
Thanks for your using!
|
Boostnote is an open source project. It's an independent project with its ongoing development made possible entirely thanks to the support by these awesome [backers](https://github.com/BoostIO/Boostnote/blob/master/Backers.md). If you'd like to join them, please consider:
|
||||||
Boostnote is used in about 200 countries and regions, it is a awesome developer community.
|
|
||||||
|
|
||||||
To continue supporting this growth, and to satisfy community expectations,
|
- [Become a backer or sponsor on Open Collective.](https://opencollective.com/boostnoteio)
|
||||||
we would like to invest more time in this project.
|
|
||||||
|
|
||||||
If you like this project and see its potential, you can help!
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Boostnote maintainers.
|
|
||||||
|
|
||||||
### >> [Support via OpenCollective](https://opencollective.com/boostnoteio)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Backers
|
## Backers via OpenCollective
|
||||||
[Kazz](https://twitter.com/kazup_bot) - $65
|
<a href="https://opencollective.com/boostnoteio#backers" target="_blank"><img src="https://opencollective.com/boostnoteio/backers.svg?width=890"></a>
|
||||||
|
|
||||||
Intense Raiden - $45
|
- [Ralph03](https://opencollective.com/ralph03) - $24
|
||||||
|
|
||||||
ravy22 - $25
|
- [Nikolas Dan](https://opencollective.com/nikolas-dan) - $20
|
||||||
|
|
||||||
trentpolack - $20
|
- [tatoosh11](https://twitter.com/ta11) - $10
|
||||||
|
|
||||||
hikariru - $10
|
- [Alexander Borovkov](https://opencollective.com/alexander-borovkov) - $10
|
||||||
|
|
||||||
kolchan11 - $10
|
- [Yeojong Kim](https://twitter.com/yeojoy) - $5
|
||||||
|
|
||||||
RonWalker22 - $10
|
- [Scotia Draven](https://opencollective.com/scotia-draven) - $5
|
||||||
|
|
||||||
hocchuc - $5
|
- [spoonhoop](https://opencollective.com/spoonhoop) - $5
|
||||||
|
|
||||||
Adam - $5
|
## Backers via Bountysource
|
||||||
|
https://salt.bountysource.com/teams/boostnote
|
||||||
|
|
||||||
Steve - $5
|
- Kuzz - $65
|
||||||
|
|
||||||
evmin - $5
|
- Intense Raiden - $45
|
||||||
|
|
||||||
|
- ravy22 - $25
|
||||||
|
|
||||||
|
- trentpolack - $20
|
||||||
|
|
||||||
|
- hikariru - $10
|
||||||
|
|
||||||
|
- kolchan11 - $10
|
||||||
|
|
||||||
|
- RonWalker22 - $10
|
||||||
|
|
||||||
|
- hocchuc - $5
|
||||||
|
|
||||||
|
- Adam - $5
|
||||||
|
|
||||||
|
- Steve - $5
|
||||||
|
|
||||||
|
- evmin - $5
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
Please paste some **screenshots** with the **developer tool** open (console tab) when you report a bug.
|
Please paste some **screenshots** with the **developer tool** open (console tab) when you report a bug.
|
||||||
|
|
||||||
If your issue is regarding boostnote mobile, move to https://github.com/BoostIO/boostnote-mobile.
|
If your issue is regarding boostnote mobile, move to https://github.com/BoostIO/boostnote-mobile.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Love Boostnote? Please consider supporting us via OpenCollective:
|
||||||
|
👉 https://opencollective.com/boostnoteio
|
||||||
|
-->
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
if (cm.somethingSelected()) cm.indentSelection('add')
|
if (cm.somethingSelected()) cm.indentSelection('add')
|
||||||
else {
|
else {
|
||||||
const tabs = cm.getOption('indentWithTabs')
|
const tabs = cm.getOption('indentWithTabs')
|
||||||
if (line.trimLeft() === '- ' || line.trimLeft() === '* ' || line.trimLeft() === '+ ') {
|
if (line.trimLeft().match(/^(-|\*|\+) (\[( |x)\] )?$/)) {
|
||||||
cm.execCommand('goLineStart')
|
cm.execCommand('goLineStart')
|
||||||
if (tabs) {
|
if (tabs) {
|
||||||
cm.execCommand('insertTab')
|
cm.execCommand('insertTab')
|
||||||
@@ -110,6 +110,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
CodeMirror.Vim.defineEx('q!', 'q!', this.quitEditor)
|
CodeMirror.Vim.defineEx('q!', 'q!', this.quitEditor)
|
||||||
CodeMirror.Vim.defineEx('wq', 'wq', this.quitEditor)
|
CodeMirror.Vim.defineEx('wq', 'wq', this.quitEditor)
|
||||||
CodeMirror.Vim.defineEx('qw', 'qw', this.quitEditor)
|
CodeMirror.Vim.defineEx('qw', 'qw', this.quitEditor)
|
||||||
|
CodeMirror.Vim.map('ZZ', ':q', 'normal')
|
||||||
}
|
}
|
||||||
|
|
||||||
quitEditor () {
|
quitEditor () {
|
||||||
@@ -213,9 +214,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
insertImageMd (imageMd) {
|
insertImageMd (imageMd) {
|
||||||
const textarea = this.editor.getInputField()
|
this.editor.replaceSelection(imageMd)
|
||||||
const cm = this.editor
|
|
||||||
cm.replaceSelection(`${textarea.value.substr(0, textarea.selectionStart)}${imageMd}${textarea.value.substr(textarea.selectionEnd)}`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePaste (editor, e) {
|
handlePaste (editor, e) {
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ function buildStyle (fontFamily, fontSize, codeBlockFontFamily, lineNumber) {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
}
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Lato';
|
||||||
|
src: url('${appPath}/resources/fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
|
||||||
|
url('${appPath}/resources/fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */
|
||||||
|
url('${appPath}/resources/fonts/Lato-Black.ttf') format('truetype');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
}
|
||||||
${markdownStyle}
|
${markdownStyle}
|
||||||
body {
|
body {
|
||||||
font-family: '${fontFamily.join("','")}';
|
font-family: '${fontFamily.join("','")}';
|
||||||
@@ -92,7 +101,7 @@ const OSX = global.process.platform === 'darwin'
|
|||||||
|
|
||||||
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
|
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
|
||||||
if (!OSX) {
|
if (!OSX) {
|
||||||
defaultFontFamily.unshift('\'Microsoft YaHei\'')
|
defaultFontFamily.unshift('Microsoft YaHei')
|
||||||
defaultFontFamily.unshift('meiryo')
|
defaultFontFamily.unshift('meiryo')
|
||||||
}
|
}
|
||||||
const defaultCodeBlockFontFamily = ['Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'monospace']
|
const defaultCodeBlockFontFamily = ['Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'monospace']
|
||||||
@@ -185,12 +194,14 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fixDecodedURI (node) {
|
fixDecodedURI (node) {
|
||||||
|
if (node && node.children.length === 1 && typeof node.children[0] === 'string') {
|
||||||
const { innerText, href } = node
|
const { innerText, href } = node
|
||||||
|
|
||||||
node.innerText = mdurl.decode(href) === innerText
|
node.innerText = mdurl.decode(href) === innerText
|
||||||
? href
|
? href
|
||||||
: innerText
|
: innerText
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
this.refs.root.setAttribute('sandbox', 'allow-scripts')
|
this.refs.root.setAttribute('sandbox', 'allow-scripts')
|
||||||
@@ -256,7 +267,9 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
theme = consts.THEMES.some((_theme) => _theme === theme) && theme !== 'default'
|
theme = consts.THEMES.some((_theme) => _theme === theme) && theme !== 'default'
|
||||||
? theme
|
? theme
|
||||||
: 'elegant'
|
: 'elegant'
|
||||||
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
|
this.getWindow().document.getElementById('codeTheme').href = theme.startsWith('solarized')
|
||||||
|
? `${appPath}/node_modules/codemirror/theme/solarized.css`
|
||||||
|
: `${appPath}/node_modules/codemirror/theme/${theme}.css`
|
||||||
}
|
}
|
||||||
|
|
||||||
rewriteIframe () {
|
rewriteIframe () {
|
||||||
@@ -328,7 +341,12 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
}
|
}
|
||||||
el.parentNode.appendChild(copyIcon)
|
el.parentNode.appendChild(copyIcon)
|
||||||
el.innerHTML = ''
|
el.innerHTML = ''
|
||||||
|
if (codeBlockTheme.indexOf('solarized') === 0) {
|
||||||
|
const [refThema, color] = codeBlockTheme.split(' ')
|
||||||
|
el.parentNode.className += ` cm-s-${refThema} cm-s-${color} CodeMirror`
|
||||||
|
} else {
|
||||||
el.parentNode.className += ` cm-s-${codeBlockTheme} CodeMirror`
|
el.parentNode.className += ` cm-s-${codeBlockTheme} CodeMirror`
|
||||||
|
}
|
||||||
CodeMirror.runMode(content, syntax.mime, el, {
|
CodeMirror.runMode(content, syntax.mime, el, {
|
||||||
tabSize: indentSize
|
tabSize: indentSize
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
line-height 32px
|
line-height 32px
|
||||||
padding 0
|
padding 0
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
navWhiteButtonColor()
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.navToggle
|
.navToggle
|
||||||
&:hover
|
&:hover
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteCont
|
|||||||
|
|
||||||
<div styleName='item-bottom-time'>{dateDisplay}</div>
|
<div styleName='item-bottom-time'>{dateDisplay}</div>
|
||||||
{note.isStarred
|
{note.isStarred
|
||||||
? <i styleName='item-star' className='fa fa-star' /> : ''
|
? <img styleName='item-star' src='../resources/icon/icon-starred.svg' /> : ''
|
||||||
}
|
}
|
||||||
{note.isPinned && !pathname.match(/\/home|\/starred|\/trash/)
|
{note.isPinned && !pathname.match(/\/home|\/starred|\/trash/)
|
||||||
? <i styleName='item-pin' className='fa fa-thumb-tack' /> : ''
|
? <i styleName='item-pin' className='fa fa-thumb-tack' /> : ''
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ $control-height = 30px
|
|||||||
user-select none
|
user-select none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
transition background-color 0.2s
|
transition 0.2s
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
.item-title
|
.item-title
|
||||||
.item-title-icon
|
.item-title-icon
|
||||||
.item-bottom-time
|
.item-bottom-time
|
||||||
@@ -25,7 +25,7 @@ $control-height = 30px
|
|||||||
.item-star
|
.item-star
|
||||||
color $ui-favorite-star-button-color
|
color $ui-favorite-star-button-color
|
||||||
&:active
|
&:active
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
.item-title
|
.item-title
|
||||||
.item-title-icon
|
.item-title-icon
|
||||||
@@ -43,7 +43,7 @@ $control-height = 30px
|
|||||||
|
|
||||||
.item--active
|
.item--active
|
||||||
@extend .item
|
@extend .item
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
.item-title
|
.item-title
|
||||||
.item-title-empty
|
.item-title-empty
|
||||||
@@ -59,7 +59,15 @@ $control-height = 30px
|
|||||||
.item-star
|
.item-star
|
||||||
color $ui-favorite-star-button-color
|
color $ui-favorite-star-button-color
|
||||||
&:hover
|
&:hover
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color #e74c3c
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-text-color
|
||||||
|
&:active, &:active:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color #e74c3c
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
.item-title-icon
|
.item-title-icon
|
||||||
position relative
|
position relative
|
||||||
@@ -67,7 +75,8 @@ $control-height = 30px
|
|||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
.item-title
|
.item-title
|
||||||
font-size 14px
|
font-size 15px
|
||||||
|
font-weight 700
|
||||||
position relative
|
position relative
|
||||||
top -12px
|
top -12px
|
||||||
left 20px
|
left 20px
|
||||||
@@ -83,7 +92,7 @@ $control-height = 30px
|
|||||||
.item-bottom
|
.item-bottom
|
||||||
position relative
|
position relative
|
||||||
bottom 0px
|
bottom 0px
|
||||||
margin-top 2px
|
margin-top 10px
|
||||||
font-size 12px
|
font-size 12px
|
||||||
line-height 20px
|
line-height 20px
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
@@ -92,35 +101,33 @@ $control-height = 30px
|
|||||||
.item-bottom-tagList
|
.item-bottom-tagList
|
||||||
flex 1
|
flex 1
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
line-height 20px
|
line-height 25px
|
||||||
padding-top 7px
|
|
||||||
padding-left 2px
|
padding-left 2px
|
||||||
margin-right 27px
|
margin-right 40px
|
||||||
|
|
||||||
.item-bottom-tagList-item
|
.item-bottom-tagList-item
|
||||||
font-size 11px
|
font-size 11px
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
padding 0
|
padding 0
|
||||||
height 20px
|
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
padding 1px 2px
|
padding 4px
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
background-color white
|
background-color white
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
.item-bottom-time
|
.item-bottom-time
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
font-size 11px
|
font-size 13px
|
||||||
padding-left 2px
|
padding-left 2px
|
||||||
padding-bottom 2px
|
padding-bottom 2px
|
||||||
|
|
||||||
.item-star
|
.item-star
|
||||||
position absolute
|
position absolute
|
||||||
right -20px
|
right -6px
|
||||||
bottom 2px
|
bottom 23px
|
||||||
width 34px
|
width 16px
|
||||||
height 34px
|
height 16px
|
||||||
color alpha($ui-favorite-star-button-color, 60%)
|
color alpha($ui-favorite-star-button-color, 60%)
|
||||||
font-size 12px
|
font-size 12px
|
||||||
padding 0
|
padding 0
|
||||||
@@ -128,8 +135,8 @@ $control-height = 30px
|
|||||||
|
|
||||||
.item-pin
|
.item-pin
|
||||||
position absolute
|
position absolute
|
||||||
right -21px
|
right 0px
|
||||||
bottom 28px
|
bottom 2px
|
||||||
width 34px
|
width 34px
|
||||||
height 34px
|
height 34px
|
||||||
color #E54D42
|
color #E54D42
|
||||||
@@ -137,6 +144,20 @@ $control-height = 30px
|
|||||||
padding 0
|
padding 0
|
||||||
border-radius 17px
|
border-radius 17px
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.item
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
|
&:active
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
|
||||||
|
.item--active
|
||||||
|
@extend .item
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
@@ -148,6 +169,7 @@ body[data-theme="dark"]
|
|||||||
&:hover
|
&:hover
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
||||||
|
color $ui-dark-text-color
|
||||||
.item-title
|
.item-title
|
||||||
.item-title-icon
|
.item-title-icon
|
||||||
.item-bottom-time
|
.item-bottom-time
|
||||||
@@ -155,11 +177,12 @@ body[data-theme="dark"]
|
|||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
.item-bottom-tagList-item
|
.item-bottom-tagList-item
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 40%)
|
background-color alpha(#fff, 20%)
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
&:active
|
&:active
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
background-color $ui-dark-button--active-backgroundColor
|
||||||
|
color $ui-dark-text-color
|
||||||
.item-title
|
.item-title
|
||||||
.item-title-icon
|
.item-title-icon
|
||||||
.item-bottom-time
|
.item-bottom-time
|
||||||
@@ -185,6 +208,11 @@ body[data-theme="dark"]
|
|||||||
.item-bottom-tagList-item
|
.item-bottom-tagList-item
|
||||||
background-color alpha(white, 10%)
|
background-color alpha(white, 10%)
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-dark-button--active-backgroundColor, 60%)
|
||||||
|
color #c0392b
|
||||||
|
.item-bottom-tagList-item
|
||||||
|
background-color alpha(#fff, 20%)
|
||||||
|
|
||||||
.item-title
|
.item-title
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|||||||
@@ -10,15 +10,17 @@ import styles from './NoteItemSimple.styl'
|
|||||||
* @param {boolean} isActive
|
* @param {boolean} isActive
|
||||||
* @param {Object} note
|
* @param {Object} note
|
||||||
* @param {Function} handleNoteClick
|
* @param {Function} handleNoteClick
|
||||||
|
* @param {Function} handleNoteContextMenu
|
||||||
* @param {Function} handleDragStart
|
* @param {Function} handleDragStart
|
||||||
*/
|
*/
|
||||||
const NoteItemSimple = ({ isActive, note, handleNoteClick, handleDragStart }) => (
|
const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu, handleDragStart }) => (
|
||||||
<div styleName={isActive
|
<div styleName={isActive
|
||||||
? 'item-simple--active'
|
? 'item-simple--active'
|
||||||
: 'item-simple'
|
: 'item-simple'
|
||||||
}
|
}
|
||||||
key={`${note.storage}-${note.key}`}
|
key={`${note.storage}-${note.key}`}
|
||||||
onClick={e => handleNoteClick(e, `${note.storage}-${note.key}`)}
|
onClick={e => handleNoteClick(e, `${note.storage}-${note.key}`)}
|
||||||
|
onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)}
|
||||||
onDragStart={e => handleDragStart(e, note)}
|
onDragStart={e => handleDragStart(e, note)}
|
||||||
draggable='true'
|
draggable='true'
|
||||||
>
|
>
|
||||||
@@ -44,6 +46,7 @@ NoteItemSimple.propTypes = {
|
|||||||
title: PropTypes.string.isrequired
|
title: PropTypes.string.isrequired
|
||||||
}),
|
}),
|
||||||
handleNoteClick: PropTypes.func.isRequired,
|
handleNoteClick: PropTypes.func.isRequired,
|
||||||
|
handleNoteContextMenu: PropTypes.func.isRequired,
|
||||||
handleDragStart: PropTypes.func.isRequired
|
handleDragStart: PropTypes.func.isRequired
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ $control-height = 30px
|
|||||||
user-select none
|
user-select none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
transition background-color 0.15s
|
transition 0.2s
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-empty
|
.item-simple-title-empty
|
||||||
.item-simple-title-icon
|
.item-simple-title-icon
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
&:active
|
&:active
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-empty
|
.item-simple-title-empty
|
||||||
@@ -28,7 +28,7 @@ $control-height = 30px
|
|||||||
|
|
||||||
.item-simple--active
|
.item-simple--active
|
||||||
@extend .item-simple
|
@extend .item-simple
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-empty
|
.item-simple-title-empty
|
||||||
@@ -37,7 +37,15 @@ $control-height = 30px
|
|||||||
.item-simple-title-icon
|
.item-simple-title-icon
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
&:hover
|
&:hover
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color #e74c3c
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-text-color
|
||||||
|
&:active, &:active:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color #e74c3c
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
font-size 13px
|
font-size 13px
|
||||||
@@ -59,6 +67,20 @@ $control-height = 30px
|
|||||||
font-weight normal
|
font-weight normal
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.item-simple
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
|
&:active
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
|
||||||
|
.item-simple--active
|
||||||
|
@extend .item-simple
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
@@ -67,33 +89,50 @@ body[data-theme="dark"]
|
|||||||
.item-simple
|
.item-simple
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
background-color $ui-dark-noteList-backgroundColor
|
background-color $ui-dark-noteList-backgroundColor
|
||||||
&:active
|
&:hover
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
transition 0.15s
|
||||||
|
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
||||||
|
color $ui-dark-text-color
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-icon
|
.item-simple-title-icon
|
||||||
.item-simple-bottom-time
|
.item-simple-bottom-time
|
||||||
.item-simple-bottom-tagList-item
|
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
&:hover
|
.item-simple-bottom-tagList-item
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
transition 0.15s
|
||||||
|
background-color alpha(#fff, 20%)
|
||||||
|
color $ui-dark-text-color
|
||||||
|
&:active
|
||||||
|
transition 0.15s
|
||||||
|
background-color $ui-dark-button--active-backgroundColor
|
||||||
|
color $ui-dark-text-color
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-icon
|
.item-simple-title-icon
|
||||||
.item-simple-bottom-time
|
.item-simple-bottom-time
|
||||||
|
transition 0.15s
|
||||||
|
color $ui-dark-text-color
|
||||||
.item-simple-bottom-tagList-item
|
.item-simple-bottom-tagList-item
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
|
background-color alpha(white, 10%)
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
.item-simple--active
|
.item-simple--active
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
background-color $ui-dark-button--active-backgroundColor
|
||||||
|
.item-simple-wrapper
|
||||||
|
border-color transparent
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
.item-simple-title-icon
|
.item-simple-title-icon
|
||||||
.item-simple-bottom-time
|
.item-simple-bottom-time
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
.item-simple-bottom-tagList-item
|
.item-simple-bottom-tagList-item
|
||||||
background-color transparent
|
background-color alpha(white, 10%)
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-dark-button--active-backgroundColor, 60%)
|
||||||
|
color #c0392b
|
||||||
|
.item-simple-bottom-tagList-item
|
||||||
|
background-color alpha(#fff, 20%)
|
||||||
|
|
||||||
.item-simple-title
|
.item-simple-title
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class RealtimeNotification extends React.Component {
|
|||||||
? <a styleName='notification-link' href={notifications[0].linkUrl}
|
? <a styleName='notification-link' href={notifications[0].linkUrl}
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>
|
>
|
||||||
{notifications[0].text}
|
Info: {notifications[0].text}
|
||||||
</a>
|
</a>
|
||||||
: ''
|
: ''
|
||||||
|
|
||||||
|
|||||||
@@ -2,20 +2,20 @@
|
|||||||
z-index 1000
|
z-index 1000
|
||||||
font-size 12px
|
font-size 12px
|
||||||
position absolute
|
position absolute
|
||||||
bottom 0px
|
bottom 20px
|
||||||
right 0px
|
width 100%
|
||||||
background-color #EBEBEB
|
float left
|
||||||
height 30px
|
height 30px
|
||||||
|
background-color none
|
||||||
|
|
||||||
.notification-link
|
.notification-link
|
||||||
position absolute
|
position absolute
|
||||||
right 5px
|
|
||||||
top 5px
|
|
||||||
text-decoration none
|
text-decoration none
|
||||||
color #282A36
|
color #282A36
|
||||||
|
font-size 14px
|
||||||
border 1px solid #6FA8E6
|
border 1px solid #6FA8E6
|
||||||
background-color alpha(#6FA8E6, 0.2)
|
background-color alpha(#6FA8E6, 0.2)
|
||||||
padding 3px 9px
|
padding 5px 12px
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
transition 0.2s
|
transition 0.2s
|
||||||
&:hover
|
&:hover
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.notification-area
|
.notification-area
|
||||||
background-color #1E2124
|
background-color none
|
||||||
|
|
||||||
.notification-link
|
.notification-link
|
||||||
color #fff
|
color #fff
|
||||||
|
|||||||
@@ -15,27 +15,53 @@ import styles from './SideNavFilter.styl'
|
|||||||
*/
|
*/
|
||||||
const SideNavFilter = ({
|
const SideNavFilter = ({
|
||||||
isFolded, isHomeActive, handleAllNotesButtonClick,
|
isFolded, isHomeActive, handleAllNotesButtonClick,
|
||||||
isStarredActive, handleStarredButtonClick, isTrashedActive, handleTrashedButtonClick
|
isStarredActive, handleStarredButtonClick, isTrashedActive, handleTrashedButtonClick, counterDelNote,
|
||||||
|
counterTotalNote, counterStarredNote
|
||||||
}) => (
|
}) => (
|
||||||
<div styleName={isFolded ? 'menu--folded' : 'menu'}>
|
<div styleName={isFolded ? 'menu--folded' : 'menu'}>
|
||||||
|
|
||||||
<button styleName={isHomeActive ? 'menu-button--active' : 'menu-button'}
|
<button styleName={isHomeActive ? 'menu-button--active' : 'menu-button'}
|
||||||
onClick={handleAllNotesButtonClick}
|
onClick={handleAllNotesButtonClick}
|
||||||
>
|
>
|
||||||
<i className='fa fa-archive fa-fw' />
|
<div styleName='iconWrap'>
|
||||||
|
<img src={isHomeActive
|
||||||
|
? '../resources/icon/icon-all-active.svg'
|
||||||
|
: '../resources/icon/icon-all.svg'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<span styleName='menu-button-label'>All Notes</span>
|
<span styleName='menu-button-label'>All Notes</span>
|
||||||
|
<span styleName='counters'>{counterTotalNote}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button styleName={isStarredActive ? 'menu-button-star--active' : 'menu-button'}
|
<button styleName={isStarredActive ? 'menu-button-star--active' : 'menu-button'}
|
||||||
onClick={handleStarredButtonClick}
|
onClick={handleStarredButtonClick}
|
||||||
>
|
>
|
||||||
<i className='fa fa-star fa-fw' />
|
<div styleName='iconWrap'>
|
||||||
|
<img src={isStarredActive
|
||||||
|
? '../resources/icon/icon-star-active.svg'
|
||||||
|
: '../resources/icon/icon-star.svg'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<span styleName='menu-button-label'>Starred</span>
|
<span styleName='menu-button-label'>Starred</span>
|
||||||
|
<span styleName='counters'>{counterStarredNote}</span>
|
||||||
</button>
|
</button>
|
||||||
<button styleName={isTrashedActive ? 'menu-button--active' : 'menu-button'}
|
|
||||||
|
<button styleName={isTrashedActive ? 'menu-button-trash--active' : 'menu-button'}
|
||||||
onClick={handleTrashedButtonClick}
|
onClick={handleTrashedButtonClick}
|
||||||
>
|
>
|
||||||
<i className='fa fa-trash fa-fw' />
|
<div styleName='iconWrap'>
|
||||||
|
<img src={isTrashedActive
|
||||||
|
? '../resources/icon/icon-trash-active.svg'
|
||||||
|
: '../resources/icon/icon-trash.svg'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<span styleName='menu-button-label'>Trash</span>
|
<span styleName='menu-button-label'>Trash</span>
|
||||||
|
<span styleName='counters'>{counterDelNote}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,89 @@
|
|||||||
|
|
||||||
.menu-button
|
.menu-button
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
height 32px
|
height 36px
|
||||||
padding 0 15px
|
padding 0 15px 0 20px
|
||||||
font-size 12px
|
font-size 14px
|
||||||
width 100%
|
width 100%
|
||||||
text-align left
|
text-align left
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
&:hover, &:active, &:active:hover
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
|
||||||
|
.iconWrap
|
||||||
|
width 20px
|
||||||
|
text-align center
|
||||||
|
|
||||||
|
.counters
|
||||||
|
float right
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
.menu-button--active
|
||||||
|
@extend .menu-button
|
||||||
|
SideNavFilter()
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
.menu-button-label, .counters
|
||||||
|
color #1EC38B
|
||||||
|
&:hover
|
||||||
|
color #1EC38B
|
||||||
|
|
||||||
|
.menu-button-star--active
|
||||||
|
@extend .menu-button
|
||||||
|
SideNavFilter()
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
.menu-button-label, .counters
|
||||||
|
color #1EC38B
|
||||||
|
|
||||||
|
.menu-button-trash--active
|
||||||
|
@extend .menu-button
|
||||||
|
SideNavFilter()
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
.menu-button-label, .counters
|
||||||
|
color #1EC38B
|
||||||
|
|
||||||
|
.menu-button-label
|
||||||
|
margin-left 10px
|
||||||
|
flex 1
|
||||||
|
|
||||||
|
.menu--folded
|
||||||
|
@extend .menu
|
||||||
|
.menu-button, .menu-button--active
|
||||||
|
text-align center
|
||||||
|
&:hover .menu-button-label
|
||||||
|
transition opacity 0.15s
|
||||||
|
opacity 1
|
||||||
|
|
||||||
|
.menu-button-label
|
||||||
|
position fixed
|
||||||
|
display inline-block
|
||||||
|
height 32px
|
||||||
|
left 44px
|
||||||
|
padding 0 10px
|
||||||
|
margin-top -8px
|
||||||
|
margin-left 0
|
||||||
|
overflow ellipsis
|
||||||
|
z-index 10
|
||||||
|
line-height 32px
|
||||||
|
border-top-right-radius 2px
|
||||||
|
border-bottom-right-radius 2px
|
||||||
|
pointer-events none
|
||||||
|
opacity 0
|
||||||
|
font-size 13px
|
||||||
|
.counters
|
||||||
|
display none
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.menu-button
|
||||||
|
navWhiteButtonColor()
|
||||||
|
|
||||||
|
.counters
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
.menu-button--active
|
.menu-button--active
|
||||||
@extend .menu-button
|
@extend .menu-button
|
||||||
@@ -44,34 +121,22 @@
|
|||||||
.menu-button-label
|
.menu-button-label
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
|
|
||||||
|
.menu-button-trash--active
|
||||||
|
@extend .menu-button
|
||||||
|
color #5D9E36
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
.menu-button-label
|
.menu-button-label
|
||||||
margin-left 5px
|
color $ui-text-color
|
||||||
|
&:hover
|
||||||
.menu--folded
|
background-color alpha($ui-button--active-backgroundColor, 50%)
|
||||||
@extend .menu
|
color #5D9E36
|
||||||
.menu-button, .menu-button--active
|
|
||||||
text-align center
|
|
||||||
&:hover .menu-button-label
|
|
||||||
transition opacity 0.15s
|
|
||||||
opacity 1
|
|
||||||
.menu-button-label
|
.menu-button-label
|
||||||
position fixed
|
color $ui-text-color
|
||||||
display inline-block
|
&:active, &:active:hover
|
||||||
height 32px
|
background-color alpha($ui-button--active-backgroundColor, 50%)
|
||||||
left 44px
|
color #5D9E36
|
||||||
padding 0 10px
|
.menu-button-label
|
||||||
margin-top -8px
|
color $ui-text-color
|
||||||
margin-left 0
|
|
||||||
overflow ellipsis
|
|
||||||
background-color $ui-tooltip-backgroundColor
|
|
||||||
z-index 10
|
|
||||||
color white
|
|
||||||
line-height 32px
|
|
||||||
border-top-right-radius 2px
|
|
||||||
border-bottom-right-radius 2px
|
|
||||||
pointer-events none
|
|
||||||
opacity 0
|
|
||||||
font-size 12px
|
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.menu-button
|
.menu-button
|
||||||
@@ -103,3 +168,14 @@ body[data-theme="dark"]
|
|||||||
color $ui-favorite-star-button-color
|
color $ui-favorite-star-button-color
|
||||||
.menu-button-label
|
.menu-button-label
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
|
.menu-button-trash--active
|
||||||
|
color #5D9E36
|
||||||
|
background-color $ui-dark-button--active-backgroundColor
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-dark-text-color
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-dark-button--active-backgroundColor, 50%)
|
||||||
|
color #5D9E36
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-dark-text-color
|
||||||
@@ -35,10 +35,8 @@ const StorageItem = ({
|
|||||||
>
|
>
|
||||||
<span styleName={isFolded
|
<span styleName={isFolded
|
||||||
? 'folderList-item-name--folded' : 'folderList-item-name'
|
? 'folderList-item-name--folded' : 'folderList-item-name'
|
||||||
}
|
}>
|
||||||
style={{borderColor: folderColor}}
|
<text style={{color: folderColor, paddingRight: '10px'}}>{isActive ? <i className='fa fa-folder-open-o' /> : <i className='fa fa-folder-o' />}</text>{isFolded ? folderName.substring(0, 1) : folderName}
|
||||||
>
|
|
||||||
{isFolded ? folderName.substring(0, 1) : folderName}
|
|
||||||
</span>
|
</span>
|
||||||
{(!isFolded && isNumber(noteCount)) &&
|
{(!isFolded && isNumber(noteCount)) &&
|
||||||
<span styleName='folderList-item-noteCount'>{noteCount}</span>
|
<span styleName='folderList-item-noteCount'>{noteCount}</span>
|
||||||
|
|||||||
@@ -5,37 +5,36 @@
|
|||||||
.folderList-item
|
.folderList-item
|
||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
height 26px
|
height 34px
|
||||||
background-color transparent
|
background-color transparent
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
padding 0
|
padding 0
|
||||||
margin-bottom 5px
|
|
||||||
text-align left
|
text-align left
|
||||||
border none
|
border none
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
font-size 12px
|
font-size 14px
|
||||||
&:first-child
|
&:first-child
|
||||||
margin-top 0
|
margin-top 0
|
||||||
&:hover
|
&:hover
|
||||||
color $ui-text-color
|
color #1EC38B;
|
||||||
background-color alpha($ui-button--active-backgroundColor, 20%)
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
transition background-color 0.15s
|
transition background-color 0.15s
|
||||||
&:active
|
&:active
|
||||||
color $ui-text-color
|
color $$ui-button-default-color
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
|
||||||
.folderList-item--active
|
.folderList-item--active
|
||||||
@extend .folderList-item
|
@extend .folderList-item
|
||||||
color $ui-text-color
|
color #1EC38B
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
&:hover
|
&:hover
|
||||||
color $ui-text-color
|
color #1EC38B;
|
||||||
background-color alpha($ui-button--active-backgroundColor, 50%)
|
background-color alpha($ui-button-default--active-backgroundColor, 50%)
|
||||||
|
|
||||||
.folderList-item-name
|
.folderList-item-name
|
||||||
display block
|
display block
|
||||||
flex 1
|
flex 1
|
||||||
padding 0 25px
|
padding 0 12px
|
||||||
height 26px
|
height 26px
|
||||||
line-height 26px
|
line-height 26px
|
||||||
border-width 0 0 0 2px
|
border-width 0 0 0 2px
|
||||||
@@ -48,7 +47,7 @@
|
|||||||
float right
|
float right
|
||||||
line-height 26px
|
line-height 26px
|
||||||
padding-right 15px
|
padding-right 15px
|
||||||
font-size 12px
|
font-size 13px
|
||||||
|
|
||||||
.folderList-item-tooltip
|
.folderList-item-tooltip
|
||||||
tooltip()
|
tooltip()
|
||||||
@@ -69,8 +68,28 @@
|
|||||||
|
|
||||||
.folderList-item-name--folded
|
.folderList-item-name--folded
|
||||||
@extend .folderList-item-name
|
@extend .folderList-item-name
|
||||||
padding-left 12px
|
padding-left 17px
|
||||||
|
text
|
||||||
|
display none
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.folderList-item
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
&:hover
|
||||||
|
color $ui-text-color
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
|
transition background-color 0.15s
|
||||||
|
&:active
|
||||||
|
color $ui-text-color
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
|
||||||
|
.folderList-item--active
|
||||||
|
@extend .folderList-item
|
||||||
|
color $ui-text-color
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
&:hover
|
||||||
|
color $ui-text-color
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 50%)
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.folderList-item
|
.folderList-item
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @fileoverview Micro component for showing StorageList
|
* @fileoverview Micro component for showing StorageList
|
||||||
*/
|
*/
|
||||||
import React, { PropTypes } from 'react'
|
import React, { PropTypes } from 'react'
|
||||||
import styles from './StorgaeList.styl'
|
import styles from './StorageList.styl'
|
||||||
import CSSModules from 'browser/lib/CSSModules'
|
import CSSModules from 'browser/lib/CSSModules'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.storageList
|
.storageList
|
||||||
absolute left right
|
absolute left right
|
||||||
bottom 37px
|
bottom 37px
|
||||||
top 160px
|
top 180px
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
|
|
||||||
.storageList-empty
|
.storageList-empty
|
||||||
@@ -9,19 +9,19 @@
|
|||||||
text-align left
|
text-align left
|
||||||
border none
|
border none
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
font-size 12px
|
font-size 13px
|
||||||
&:first-child
|
&:first-child
|
||||||
margin-top 0
|
margin-top 0
|
||||||
&:hover
|
&:hover
|
||||||
color $ui-text-color
|
color $ui-button-default-color
|
||||||
background-color alpha($ui-button--active-backgroundColor, 20%)
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
transition background-color 0.15s
|
transition background-color 0.15s
|
||||||
&:active
|
&:active, &:active:hover
|
||||||
color $ui-text-color
|
color $ui-button-default-color
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color $ui-button-default--active-backgroundColor
|
||||||
|
|
||||||
.tagList-item-active
|
.tagList-item-active
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color $ui-button-default--active-backgroundColor
|
||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
height 26px
|
height 26px
|
||||||
@@ -30,15 +30,16 @@
|
|||||||
text-align left
|
text-align left
|
||||||
border none
|
border none
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
font-size 12px
|
font-size 13px
|
||||||
|
color $ui-button-default-color
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--active-backgroundColor, 60%)
|
background-color alpha($ui-button-default--active-backgroundColor, 60%)
|
||||||
transition 0.2s
|
transition 0.2s
|
||||||
|
|
||||||
.tagList-item-name
|
.tagList-item-name
|
||||||
display block
|
display block
|
||||||
flex 1
|
flex 1
|
||||||
padding 0 25px
|
padding 0 15px
|
||||||
height 26px
|
height 26px
|
||||||
line-height 26px
|
line-height 26px
|
||||||
border-width 0 0 0 2px
|
border-width 0 0 0 2px
|
||||||
@@ -47,6 +48,22 @@
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.tagList-item
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
&:hover
|
||||||
|
color $ui-text-color
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
|
&:active
|
||||||
|
color $ui-text-color
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
|
||||||
|
.tagList-item-active
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
color $ui-text-color
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 60%)
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.tagList-item
|
.tagList-item
|
||||||
color $ui-dark-inactive-text-color
|
color $ui-dark-inactive-text-color
|
||||||
|
|||||||
@@ -1,24 +1,25 @@
|
|||||||
.percentageBar
|
.percentageBar
|
||||||
position absolute
|
position absolute
|
||||||
top 58px
|
top 50px
|
||||||
right: 0px
|
right 0px
|
||||||
left 0px
|
left 0px
|
||||||
background-color #DADFE1
|
background-color #DADFE1
|
||||||
width 100%
|
width 100%
|
||||||
height: 15px
|
height: 17px
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
z-index 100
|
z-index 100
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
|
|
||||||
.progressBar
|
.progressBar
|
||||||
background-color: #6C7A89
|
background-color: #1EC38B
|
||||||
height 15px
|
height 17px
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
transition 0.3s
|
transition 0.4s cubic-bezier(0.4, 0.4, 0, 1)
|
||||||
|
|
||||||
.percentageText
|
.percentageText
|
||||||
color #f4f4f4
|
color #f4f4f4
|
||||||
padding: 2px 43%
|
padding: 2px 43%
|
||||||
|
font-weight 600
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.percentageBar
|
.percentageBar
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ hr
|
|||||||
h1, h2, h3, h4, h5, h6
|
h1, h2, h3, h4, h5, h6
|
||||||
font-weight bold
|
font-weight bold
|
||||||
h1
|
h1
|
||||||
font-size 2.25em
|
font-size 2.55em
|
||||||
padding-bottom 0.3em
|
padding-bottom 0.3em
|
||||||
line-height 1.2em
|
line-height 1.2em
|
||||||
border-bottom solid 1px borderColor
|
border-bottom solid 1px borderColor
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ $list-width = 250px
|
|||||||
|
|
||||||
.result-nav-storageList
|
.result-nav-storageList
|
||||||
absolute bottom left right
|
absolute bottom left right
|
||||||
top 110px + 32px + 10px + 10px
|
top 110px + 32px + 10px + 10px + 20px
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
|
|
||||||
.result-list
|
.result-list
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ nodeIpc.connectTo(
|
|||||||
const { config } = payload
|
const { config } = payload
|
||||||
if (config.ui.theme === 'dark') {
|
if (config.ui.theme === 'dark') {
|
||||||
document.body.setAttribute('data-theme', 'dark')
|
document.body.setAttribute('data-theme', 'dark')
|
||||||
|
} else if (config.ui.theme === 'white') {
|
||||||
|
document.body.setAttribute('data-theme', 'white')
|
||||||
} else {
|
} else {
|
||||||
document.body.setAttribute('data-theme', 'default')
|
document.body.setAttribute('data-theme', 'default')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import emoji from 'markdown-it-emoji'
|
|||||||
import math from '@rokt33r/markdown-it-math'
|
import math from '@rokt33r/markdown-it-math'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
|
// FIXME We should not depend on global variable.
|
||||||
const katex = window.katex
|
const katex = window.katex
|
||||||
|
|
||||||
function createGutter (str) {
|
function createGutter (str) {
|
||||||
@@ -69,6 +70,8 @@ md.use(require('markdown-it-named-headers'), {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
md.use(require('markdown-it-kbd'))
|
md.use(require('markdown-it-kbd'))
|
||||||
|
md.use(require('markdown-it-plantuml'))
|
||||||
|
|
||||||
// Override task item
|
// Override task item
|
||||||
md.block.ruler.at('paragraph', function (state, startLine/*, endLine */) {
|
md.block.ruler.at('paragraph', function (state, startLine/*, endLine */) {
|
||||||
let content, terminate, i, l, token
|
let content, terminate, i, l, token
|
||||||
@@ -135,37 +138,9 @@ md.renderer.render = function render (tokens, options, env) {
|
|||||||
let result = originalRender.call(md.renderer, tokens, options, env)
|
let result = originalRender.call(md.renderer, tokens, options, env)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
// FIXME We should not depend on global variable.
|
||||||
window.md = md
|
window.md = md
|
||||||
|
|
||||||
function strip (input) {
|
|
||||||
var output = input
|
|
||||||
try {
|
|
||||||
output = output
|
|
||||||
.replace(/^([\s\t]*)([\*\-\+]|\d\.)\s+/gm, '$1')
|
|
||||||
.replace(/\n={2,}/g, '\n')
|
|
||||||
.replace(/~~/g, '')
|
|
||||||
.replace(/`{3}.*\n/g, '')
|
|
||||||
.replace(/<(.*?)>/g, '$1')
|
|
||||||
.replace(/^[=\-]{2,}\s*$/g, '')
|
|
||||||
.replace(/\[\^.+?\](: .*?$)?/g, '')
|
|
||||||
.replace(/\s{0,2}\[.*?\]: .*?$/g, '')
|
|
||||||
.replace(/!\[.*?\][\[\(].*?[\]\)]/g, '')
|
|
||||||
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1')
|
|
||||||
.replace(/>/g, '')
|
|
||||||
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, '')
|
|
||||||
.replace(/^#{1,6}\s*([^#]*)\s*(#{1,6})?/gm, '$1')
|
|
||||||
.replace(/([\*_]{1,3})(\S.*?\S)\1/g, '$2')
|
|
||||||
.replace(/(`{3,})(.*?)\1/gm, '$2')
|
|
||||||
.replace(/^-{3,}\s*$/g, '')
|
|
||||||
.replace(/`(.+?)`/g, '$1')
|
|
||||||
.replace(/\n{2,}/g, '\n\n')
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
return input
|
|
||||||
}
|
|
||||||
return output
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalizeLinkText (linkText) {
|
function normalizeLinkText (linkText) {
|
||||||
return md.normalizeLinkText(linkText)
|
return md.normalizeLinkText(linkText)
|
||||||
}
|
}
|
||||||
@@ -176,7 +151,7 @@ const markdown = {
|
|||||||
const renderedContent = md.render(content)
|
const renderedContent = md.render(content)
|
||||||
return renderedContent
|
return renderedContent
|
||||||
},
|
},
|
||||||
strip,
|
|
||||||
normalizeLinkText
|
normalizeLinkText
|
||||||
}
|
}
|
||||||
|
|
||||||
export default markdown
|
export default markdown
|
||||||
|
|||||||
39
browser/lib/markdownTextHelper.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @fileoverview Text trimmer for markdown note.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} input
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
export function strip (input) {
|
||||||
|
let output = input
|
||||||
|
try {
|
||||||
|
output = output
|
||||||
|
.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, '$1')
|
||||||
|
.replace(/\n={2,}/g, '\n')
|
||||||
|
.replace(/~~/g, '')
|
||||||
|
.replace(/`{3}.*\n/g, '')
|
||||||
|
.replace(/<(.*?)>/g, '$1')
|
||||||
|
.replace(/^[=\-]{2,}\s*$/g, '')
|
||||||
|
.replace(/\[\^.+?\](: .*?$)?/g, '')
|
||||||
|
.replace(/\s{0,2}\[.*?\]: .*?$/g, '')
|
||||||
|
.replace(/!\[.*?\][\[\(].*?[\]\)]/g, '')
|
||||||
|
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1')
|
||||||
|
.replace(/>/g, '')
|
||||||
|
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, '')
|
||||||
|
.replace(/^#{1,6}\s*([^#]*)\s*(#{1,6})?/gm, '$1')
|
||||||
|
.replace(/(`{3,})(.*?)\1/gm, '$2')
|
||||||
|
.replace(/^-{3,}\s*$/g, '')
|
||||||
|
.replace(/`(.+?)`/g, '$1')
|
||||||
|
.replace(/\n{2,}/g, '\n\n')
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
return input
|
||||||
|
}
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
strip
|
||||||
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
.root
|
.root
|
||||||
absolute top bottom right
|
absolute top bottom right
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
justify-content center
|
||||||
|
|
||||||
.empty
|
.empty
|
||||||
height 320px
|
height 320px
|
||||||
@@ -8,8 +11,9 @@
|
|||||||
|
|
||||||
.empty-message
|
.empty-message
|
||||||
width 100%
|
width 100%
|
||||||
font-size 42px
|
font-size 36px
|
||||||
line-height 72px
|
font-weight 600
|
||||||
|
line-height 56px
|
||||||
text-align center
|
text-align center
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Margin on the left side and the right side for NoteDetail component.
|
// Margin on the left side and the right side for NoteDetail component.
|
||||||
$note-detail-left-margin = 25px
|
$note-detail-left-margin = 100px
|
||||||
$note-detail-right-margin = 25px
|
$note-detail-right-margin = 120px
|
||||||
|
$snippet-note-detail-left-margin = 60px
|
||||||
|
$snippet-note-detail-right-margin = 80px
|
||||||
|
|
||||||
$note-detail-box-shadow = 2px 0 15px -8px #b1b1b1 inset
|
$note-detail-box-shadow = 2px 0 15px -8px #b1b1b1 inset
|
||||||
|
|||||||
@@ -259,12 +259,11 @@ class FolderSelect extends React.Component {
|
|||||||
{optionList}
|
{optionList}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
: <div styleName='idle'>
|
: <div styleName='idle' style={{color: currentOption.folder.color}}>
|
||||||
<div styleName='idle-label'>
|
<div styleName='idle-label'>
|
||||||
<span styleName='idle-label-name'
|
<i className='fa fa-folder' />
|
||||||
style={{color: currentOption.folder.color}}
|
<span styleName='idle-label-name'>
|
||||||
>
|
{currentOption.folder.name}
|
||||||
{currentOption.folder.name} /
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
.root
|
.root
|
||||||
position relative
|
position relative
|
||||||
border solid 1px transparent
|
border solid 1px transparent
|
||||||
line-height 26px
|
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
user-select none
|
user-select none
|
||||||
|
margin-right 10px
|
||||||
&:hover
|
&:hover
|
||||||
background-color $ui-button--hover-backgroundColor
|
background-color $ui-button--hover-backgroundColor
|
||||||
|
|
||||||
.root--search, .root--focus
|
.root--search, .root--focus
|
||||||
@extend .root
|
@extend .root
|
||||||
background-color $ui-noteDetail-backgroundColor = #F4F4F4
|
background-color $ui-noteDetail-backgroundColor = #fff
|
||||||
border-color $ui-input--focus-borderColor
|
border-color $ui-input--focus-borderColor
|
||||||
width 100px
|
width 154px
|
||||||
|
height 30px
|
||||||
&:hover
|
&:hover
|
||||||
border-color $ui-input--focus-borderColor
|
border-color $ui-input--focus-borderColor = #fff
|
||||||
|
|
||||||
.idle
|
.idle
|
||||||
position relative
|
position relative
|
||||||
@@ -24,13 +25,16 @@
|
|||||||
.idle-label
|
.idle-label
|
||||||
right 20px
|
right 20px
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
|
||||||
.idle-label-name
|
.idle-label-name
|
||||||
font-size 14px
|
font-size 13px
|
||||||
padding 2px
|
font-weight 600
|
||||||
|
margin-left 4px
|
||||||
|
|
||||||
.idle-label-name-surfix
|
.idle-label-name-surfix
|
||||||
font-size 10px
|
font-size 15px
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
margin-left 5px
|
margin-left 5px
|
||||||
.idle-caret
|
.idle-caret
|
||||||
@@ -39,35 +43,37 @@
|
|||||||
width 20px
|
width 20px
|
||||||
line-height 34px
|
line-height 34px
|
||||||
|
|
||||||
.search
|
|
||||||
absolute top left right bottom
|
|
||||||
line-height 34px
|
|
||||||
|
|
||||||
.search-input
|
.search-input
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
position relative
|
position relative
|
||||||
top -2px
|
top 0
|
||||||
|
font-size 14px
|
||||||
outline none
|
outline none
|
||||||
border none
|
border none
|
||||||
height 20px
|
width 100%
|
||||||
line-height 20px
|
|
||||||
background-color transparent
|
background-color transparent
|
||||||
padding 0 10px
|
padding 0 10px
|
||||||
|
|
||||||
.search-optionList
|
.search-optionList
|
||||||
position fixed
|
position absolute
|
||||||
|
top 30px
|
||||||
max-height 450px
|
max-height 450px
|
||||||
|
min-width 150px
|
||||||
overflow auto
|
overflow auto
|
||||||
z-index 200
|
z-index 200
|
||||||
border $ui-border
|
border $ui-border
|
||||||
background-color white
|
background-color white
|
||||||
border-radius 2px
|
border-radius 2px
|
||||||
|
padding 10px 6px
|
||||||
|
|
||||||
.search-optionList-item
|
.search-optionList-item
|
||||||
|
width 140px
|
||||||
height 34px
|
height 34px
|
||||||
width 250px
|
display flex
|
||||||
|
align-items center
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
padding 0 5px
|
padding 0
|
||||||
|
margin-bottom 10px
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
cursor pointer
|
cursor pointer
|
||||||
&:hover
|
&:hover
|
||||||
@@ -81,13 +87,17 @@
|
|||||||
background-color $ui-button--active-backgroundColor
|
background-color $ui-button--active-backgroundColor
|
||||||
color $ui-button--active-color
|
color $ui-button--active-color
|
||||||
.search-optionList-item-name
|
.search-optionList-item-name
|
||||||
border-left solid 2px transparent
|
border-left solid 3px transparent
|
||||||
padding 2px 5px
|
padding 6px
|
||||||
.search-optionList-item-name-surfix
|
.search-optionList-item-name-surfix
|
||||||
font-size 10px
|
font-size 10px
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
margin-left 5px
|
margin-left 5px
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ const InfoButton = ({
|
|||||||
onClick
|
onClick
|
||||||
}) => (
|
}) => (
|
||||||
<button styleName='control-infoButton'
|
<button styleName='control-infoButton'
|
||||||
onClick={onClick}
|
onClick={(e) => onClick(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-info infoButton' styleName='info-button' />
|
<img className='infoButton' src='../resources/icon/icon-info.svg' />
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
.control-infoButton
|
.control-infoButton
|
||||||
float right
|
top 10px
|
||||||
|
margin-bottom 10px
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
|
||||||
.control-infoPanel
|
|
||||||
position fixed
|
|
||||||
pointer-events none
|
|
||||||
top 50px
|
|
||||||
z-index 200
|
|
||||||
line-height normal
|
|
||||||
border-radius 2px
|
|
||||||
opacity 0
|
|
||||||
transition 0.1s
|
|
||||||
|
|
||||||
.infoButton
|
.infoButton
|
||||||
padding 0px
|
padding 0px
|
||||||
margin 15px 0
|
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.control-infoButton
|
.control-infoButton
|
||||||
|
|||||||
@@ -6,68 +6,54 @@ const InfoPanel = ({
|
|||||||
storageName, folderName, noteLink, updatedAt, createdAt, exportAsMd, exportAsTxt, wordCount, letterCount, type, print
|
storageName, folderName, noteLink, updatedAt, createdAt, exportAsMd, exportAsTxt, wordCount, letterCount, type, print
|
||||||
}) => (
|
}) => (
|
||||||
<div className='infoPanel' styleName='control-infoButton-panel' style={{display: 'none'}}>
|
<div className='infoPanel' styleName='control-infoButton-panel' style={{display: 'none'}}>
|
||||||
<div styleName='group-section'>
|
<div>
|
||||||
<div styleName='group-section-label'>
|
<p styleName='modification-date'>{updatedAt}</p>
|
||||||
Storage
|
<p styleName='modification-date-desc'>MODIFICATION DATE</p>
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{storageName}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Folder
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{folderName}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Created
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{createdAt}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Updated
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{updatedAt}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Note Link
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
<input value={noteLink} onClick={(e) => { e.target.select() }} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
{type === 'SNIPPET_NOTE'
|
{type === 'SNIPPET_NOTE'
|
||||||
? ''
|
? ''
|
||||||
: <div>
|
: <div styleName='count-wrap'>
|
||||||
<div styleName='group-section'>
|
<div styleName='count-number'>
|
||||||
<div styleName='group-section-label'>
|
<p styleName='infoPanel-defaul-count'>{wordCount}</p>
|
||||||
Words
|
<p styleName='infoPanel-sub-count'>Words</p>
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{wordCount}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Letters
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{letterCount}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div styleName='count-number'>
|
||||||
|
<p styleName='infoPanel-defaul-count'>{letterCount}</p>
|
||||||
|
<p styleName='infoPanel-sub-count'>Letters</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{type === 'SNIPPET_NOTE'
|
||||||
|
? ''
|
||||||
|
: <hr />
|
||||||
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p styleName='infoPanel-default'>{storageName}</p>
|
||||||
|
<p styleName='infoPanel-sub'>STORAGE</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p styleName='infoPanel-default'>{folderName}</p>
|
||||||
|
<p styleName='infoPanel-sub'>FOLDER</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p styleName='infoPanel-default'>{createdAt}</p>
|
||||||
|
<p styleName='infoPanel-sub'>CREATION DATE</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input styleName='infoPanel-noteLink' value={noteLink} onClick={(e) => { e.target.select() }} />
|
||||||
|
<p styleName='infoPanel-sub'>NOTE LINK</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
<div id='export-wrap'>
|
<div id='export-wrap'>
|
||||||
<button styleName='export--enable' onClick={(e) => exportAsMd(e)}>
|
<button styleName='export--enable' onClick={(e) => exportAsMd(e)}>
|
||||||
<i className='fa fa-file-code-o fa-fw' />
|
<i className='fa fa-file-code-o fa-fw' />
|
||||||
|
|||||||
@@ -10,52 +10,81 @@
|
|||||||
|
|
||||||
.control-infoButton-panel
|
.control-infoButton-panel
|
||||||
z-index 200
|
z-index 200
|
||||||
margin-top 45px
|
margin-top 0px
|
||||||
margin-left -210px
|
right 0
|
||||||
position absolute
|
position absolute
|
||||||
padding 20px 20px 0 20px
|
padding 20px 25px 0 25px
|
||||||
width 340px
|
width 300px
|
||||||
|
height 350px
|
||||||
|
overflow auto
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
border 1px solid $border-color
|
box-shadow 2px 12px 15px 2px rgba(0, 0, 0, 0.1), 2px 1px 50px 2px rgba(0, 0, 0, 0.1)
|
||||||
|
border-radius 2px
|
||||||
|
|
||||||
|
.modification-date
|
||||||
|
font-size 18px
|
||||||
|
line-height 30px
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.modification-date-desc
|
||||||
|
font-size 18px
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
.control-infoButton-panel-trash
|
.control-infoButton-panel-trash
|
||||||
z-index 200
|
z-index 200
|
||||||
margin-top 45px
|
margin-top 0px
|
||||||
margin-left -230px
|
right 0px
|
||||||
position absolute
|
position absolute
|
||||||
padding 20px 20px 0 20px
|
padding 20px 25px 0 25px
|
||||||
width 320px
|
width 300px
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
border 1px solid $border-color
|
box-shadow 2px 12px 15px 2px rgba(0, 0, 0, 0.1), 2px 1px 50px 2px rgba(0, 0, 0, 0.1)
|
||||||
|
border-radius 2px
|
||||||
|
|
||||||
.group-section
|
.count-wrap
|
||||||
display flex
|
display flex
|
||||||
|
position relative
|
||||||
|
width 100%
|
||||||
|
|
||||||
|
.count-number
|
||||||
|
position relative
|
||||||
|
display block
|
||||||
|
width 50%
|
||||||
|
overflow hidden
|
||||||
|
margin 0
|
||||||
|
padding 0
|
||||||
|
|
||||||
|
.infoPanel-defaul-count
|
||||||
|
font-size 16px
|
||||||
line-height 30px
|
line-height 30px
|
||||||
font-size 13px
|
|
||||||
|
|
||||||
.group-section-label
|
|
||||||
width 70px
|
|
||||||
height 20px
|
|
||||||
text-align left
|
|
||||||
margin-right 50px
|
|
||||||
font-size 13px
|
|
||||||
color $ui-inactive-text-color
|
|
||||||
|
|
||||||
.group-section-control
|
|
||||||
flex 1
|
|
||||||
font-size 13px
|
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
|
|
||||||
.group-section-control input
|
.infoPanel-sub-count
|
||||||
width 160px
|
font-size 16px
|
||||||
height 25px
|
color $ui-inactive-text-color
|
||||||
|
padding-bottom 8px
|
||||||
|
|
||||||
.group-section-control text
|
.infoPanel-default
|
||||||
|
font-size 14px
|
||||||
|
line-height 30px
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.infoPanel-sub
|
||||||
|
font-size 14px
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
padding-bottom 8px
|
||||||
|
|
||||||
|
.infoPanel-noteLink
|
||||||
|
padding-right 5px
|
||||||
|
width 200px
|
||||||
|
height 25px
|
||||||
|
margin-bottom 6px
|
||||||
|
|
||||||
|
.infoPanel-trash
|
||||||
color #EA4447
|
color #EA4447
|
||||||
font-weight 600
|
font-weight 600
|
||||||
font-size 14px
|
font-size 14px
|
||||||
width 70px
|
width 70px
|
||||||
height 25px
|
|
||||||
background-color rgba(226,33,113,0.1)
|
background-color rgba(226,33,113,0.1)
|
||||||
border none
|
border none
|
||||||
outline none
|
outline none
|
||||||
@@ -96,20 +125,30 @@
|
|||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.control-infoButton-panel
|
.control-infoButton-panel
|
||||||
background-color $ui-dark-noteList-backgroundColor
|
background-color $ui-dark-noteList-backgroundColor
|
||||||
border 1px solid $ui-dark-borderColor
|
|
||||||
|
|
||||||
.control-infoButton-panel-trash
|
.control-infoButton-panel-trash
|
||||||
background-color $ui-dark-noteList-backgroundColor
|
background-color $ui-dark-noteList-backgroundColor
|
||||||
border 1px solid $ui-dark-borderColor
|
|
||||||
|
|
||||||
.group-section-label
|
.modification-date
|
||||||
color $ui-inactive-text-color
|
|
||||||
|
|
||||||
.group-section-control
|
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
.group-section-control input
|
.modification-date-desc
|
||||||
background-color alpha($ui-dark-borderColor, 80%)
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
.infoPanel-defaul-count
|
||||||
|
color $ui-dark-text-color
|
||||||
|
|
||||||
|
.infoPanel-sub-count
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
.infoPanel-default
|
||||||
|
color $ui-dark-text-color
|
||||||
|
|
||||||
|
.infoPanel-sub
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
|
||||||
|
.infoPanel-noteLink
|
||||||
|
background-color alpha($ui-dark-borderColor, 60%)
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
[id=export-wrap]
|
[id=export-wrap]
|
||||||
|
|||||||
@@ -6,37 +6,26 @@ const InfoPanelTrashed = ({
|
|||||||
storageName, folderName, updatedAt, createdAt, exportAsMd, exportAsTxt
|
storageName, folderName, updatedAt, createdAt, exportAsMd, exportAsTxt
|
||||||
}) => (
|
}) => (
|
||||||
<div className='infoPanel' styleName='control-infoButton-panel-trash' style={{display: 'none'}}>
|
<div className='infoPanel' styleName='control-infoButton-panel-trash' style={{display: 'none'}}>
|
||||||
<div styleName='group-section'>
|
<div>
|
||||||
<div styleName='group-section-label'>
|
<p styleName='modification-date'>{updatedAt}</p>
|
||||||
Storage
|
<p styleName='modification-date-desc'>MODIFICATION DATE</p>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{storageName}
|
<hr />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p styleName='infoPanel-default'>{storageName}</p>
|
||||||
|
<p styleName='infoPanel-sub'>STORAGE</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p styleName='infoPanel-default'><text styleName='infoPanel-trash'>Trash</text>{folderName}</p>
|
||||||
|
<p styleName='infoPanel-sub'>FOLDER</p>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
<div>
|
||||||
Folder
|
<p styleName='infoPanel-default'>{createdAt}</p>
|
||||||
</div>
|
<p styleName='infoPanel-sub'>CREATION DATE</p>
|
||||||
<div styleName='group-section-control'>
|
|
||||||
<text>Trash</text>{folderName}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Created
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{createdAt}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
Updated
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
{updatedAt}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='export-wrap'>
|
<div id='export-wrap'>
|
||||||
|
|||||||
@@ -9,12 +9,13 @@ import FolderSelect from './FolderSelect'
|
|||||||
import dataApi from 'browser/main/lib/dataApi'
|
import dataApi from 'browser/main/lib/dataApi'
|
||||||
import { hashHistory } from 'react-router'
|
import { hashHistory } from 'react-router'
|
||||||
import ee from 'browser/main/lib/eventEmitter'
|
import ee from 'browser/main/lib/eventEmitter'
|
||||||
import markdown from 'browser/lib/markdown'
|
import markdown from 'browser/lib/markdownTextHelper'
|
||||||
import StatusBar from '../StatusBar'
|
import StatusBar from '../StatusBar'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import { findNoteTitle } from 'browser/lib/findNoteTitle'
|
import { findNoteTitle } from 'browser/lib/findNoteTitle'
|
||||||
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
||||||
import TrashButton from './TrashButton'
|
import TrashButton from './TrashButton'
|
||||||
|
import PermanentDeleteButton from './PermanentDeleteButton'
|
||||||
import InfoButton from './InfoButton'
|
import InfoButton from './InfoButton'
|
||||||
import InfoPanel from './InfoPanel'
|
import InfoPanel from './InfoPanel'
|
||||||
import InfoPanelTrashed from './InfoPanelTrashed'
|
import InfoPanelTrashed from './InfoPanelTrashed'
|
||||||
@@ -231,7 +232,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getToggleLockButton () {
|
getToggleLockButton () {
|
||||||
return this.state.isLocked ? 'fa-lock' : 'fa-unlock'
|
return this.state.isLocked ? '../resources/icon/icon-lock.svg' : '../resources/icon/icon-unlock.svg'
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDeleteKeyDown (e) {
|
handleDeleteKeyDown (e) {
|
||||||
@@ -285,7 +286,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='info-right'>
|
<div styleName='info-right'>
|
||||||
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
<PermanentDeleteButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
||||||
<InfoButton
|
<InfoButton
|
||||||
onClick={(e) => this.handleInfoButtonClick(e)}
|
onClick={(e) => this.handleInfoButtonClick(e)}
|
||||||
/>
|
/>
|
||||||
@@ -302,10 +303,6 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
|
|
||||||
const detailTopBar = <div styleName='info'>
|
const detailTopBar = <div styleName='info'>
|
||||||
<div styleName='info-left'>
|
<div styleName='info-left'>
|
||||||
<StarButton styleName='info-left-button'
|
|
||||||
onClick={(e) => this.handleStarButtonClick(e)}
|
|
||||||
isActive={note.isStarred}
|
|
||||||
/>
|
|
||||||
<div styleName='info-left-top'>
|
<div styleName='info-left-top'>
|
||||||
<FolderSelect styleName='info-left-top-folderSelect'
|
<FolderSelect styleName='info-left-top-folderSelect'
|
||||||
value={this.state.note.storage + '-' + this.state.note.folder}
|
value={this.state.note.storage + '-' + this.state.note.folder}
|
||||||
@@ -325,31 +322,38 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='info-right'>
|
<div styleName='info-right'>
|
||||||
|
<InfoButton
|
||||||
|
onClick={(e) => this.handleInfoButtonClick(e)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<StarButton
|
||||||
|
onClick={(e) => this.handleStarButtonClick(e)}
|
||||||
|
isActive={note.isStarred}
|
||||||
|
/>
|
||||||
|
|
||||||
{(() => {
|
{(() => {
|
||||||
const faClassName = `fa ${this.getToggleLockButton()}`
|
const imgSrc = `${this.getToggleLockButton()}`
|
||||||
const lockButtonComponent =
|
const lockButtonComponent =
|
||||||
<button styleName='control-lockButton'
|
<button styleName='control-lockButton'
|
||||||
onFocus={(e) => this.handleFocus(e)}
|
onFocus={(e) => this.handleFocus(e)}
|
||||||
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
|
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
|
||||||
>
|
>
|
||||||
<i className={faClassName} styleName='lock-button' />
|
<img styleName='iconInfo' src={imgSrc} />
|
||||||
<span styleName='control-lockButton-tooltip'>
|
|
||||||
{this.state.isLocked ? 'Unlock Editor' : 'Keep Editor Locked'}
|
|
||||||
</span>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
this.state.isLockButtonShown ? lockButtonComponent : ''
|
this.state.isLockButtonShown ? lockButtonComponent : ''
|
||||||
)
|
)
|
||||||
})()}
|
})()}
|
||||||
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
|
||||||
<button styleName='control-fullScreenButton'
|
<button styleName='control-fullScreenButton'
|
||||||
onMouseDown={(e) => this.handleFullScreenButton(e)}
|
onMouseDown={(e) => this.handleFullScreenButton(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-window-maximize' styleName='fullScreen-button' />
|
<img styleName='iconInfo' src='../resources/icon/icon-sidebar.svg' />
|
||||||
</button>
|
</button>
|
||||||
<InfoButton
|
|
||||||
onClick={(e) => this.handleInfoButtonClick(e)}
|
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
||||||
/>
|
|
||||||
<InfoPanel
|
<InfoPanel
|
||||||
storageName={currentOption.storage.name}
|
storageName={currentOption.storage.name}
|
||||||
folderName={currentOption.folder.name}
|
folderName={currentOption.folder.name}
|
||||||
|
|||||||
@@ -3,50 +3,48 @@
|
|||||||
|
|
||||||
.root
|
.root
|
||||||
absolute top right bottom
|
absolute top right bottom
|
||||||
border-width 0 0 1px
|
border-left 1px solid alpha(#DEDEDE, 60%)
|
||||||
border-style solid
|
|
||||||
border-color $ui-borderColor
|
|
||||||
background-color $ui-noteDetail-backgroundColor
|
background-color $ui-noteDetail-backgroundColor
|
||||||
box-shadow $note-detail-box-shadow
|
box-shadow none
|
||||||
|
padding 20px 40px
|
||||||
|
|
||||||
.lock-button
|
.lock-button
|
||||||
padding-bottom 3px
|
padding-bottom 3px
|
||||||
|
|
||||||
.control-lockButton
|
.control-lockButton
|
||||||
|
top 160px
|
||||||
|
margin-bottom 10px
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
|
||||||
.control-lockButton-tooltip
|
.trashed-infopanel
|
||||||
tooltip()
|
top 40px
|
||||||
position fixed
|
position relative
|
||||||
pointer-events none
|
|
||||||
top 50px
|
|
||||||
z-index 200
|
|
||||||
padding 5px
|
|
||||||
line-height normal
|
|
||||||
border-radius 2px
|
|
||||||
opacity 0
|
|
||||||
transition 0.1s
|
|
||||||
|
|
||||||
.control-fullScreenButton
|
.control-fullScreenButton
|
||||||
float right
|
top 80px
|
||||||
padding 0 0 2px 0
|
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
|
||||||
.body
|
.body
|
||||||
absolute left right
|
absolute left right
|
||||||
left $note-detail-left-margin
|
left 0
|
||||||
right $note-detail-right-margin
|
right 0
|
||||||
top $info-height + $info-margin-under-border
|
top $info-height + $info-margin-under-border
|
||||||
bottom $statusBar-height
|
bottom $statusBar-height
|
||||||
|
max-width 600px
|
||||||
|
margin 0 auto
|
||||||
.body-noteEditor
|
.body-noteEditor
|
||||||
absolute top bottom left right
|
absolute top bottom left right
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root
|
||||||
|
box-shadow $note-detail-box-shadow
|
||||||
|
border none
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
border-color $ui-dark-borderColor
|
|
||||||
background-color $ui-dark-noteDetail-backgroundColor
|
background-color $ui-dark-noteDetail-backgroundColor
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
border none
|
||||||
|
|
||||||
.control-lockButton
|
.control-lockButton
|
||||||
topBarButtonDark()
|
topBarButtonDark()
|
||||||
|
|||||||
@@ -1,33 +1,31 @@
|
|||||||
@import('DetailVars')
|
@import('DetailVars')
|
||||||
|
|
||||||
$info-height = 60px
|
$info-height = 50px
|
||||||
$info-margin-under-border = 27px
|
$info-margin-under-border = 30px
|
||||||
|
|
||||||
.info
|
.info
|
||||||
absolute top left right
|
absolute top left right
|
||||||
left $note-detail-left-margin
|
left 0
|
||||||
right $note-detail-right-margin
|
right 0
|
||||||
height $info-height
|
height $info-height
|
||||||
border-bottom $ui-border
|
border-bottom 1px solid #eee
|
||||||
background-color $ui-noteDetail-backgroundColor
|
background-color $ui-noteDetail-backgroundColor
|
||||||
|
width 100%
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
|
||||||
.info-left
|
.info-left
|
||||||
float left
|
padding 0 10px
|
||||||
padding 0 5px
|
width 100%
|
||||||
margin 0px 2px
|
display flex
|
||||||
.info-left-top
|
align-items center
|
||||||
display inline-block
|
|
||||||
height $info-height
|
|
||||||
line-height $info-height
|
|
||||||
|
|
||||||
.info-left-top-folderSelect
|
.info-left-top-folderSelect
|
||||||
padding 0 3px
|
|
||||||
height 34px
|
|
||||||
line-height 26px
|
|
||||||
display flex
|
display flex
|
||||||
align-items center
|
align-items center
|
||||||
justify-content center
|
justify-content center
|
||||||
border-radius 3px
|
|
||||||
.info-left-button
|
.info-left-button
|
||||||
width 34px
|
width 34px
|
||||||
height 34px
|
height 34px
|
||||||
@@ -48,18 +46,18 @@ $info-margin-under-border = 27px
|
|||||||
|
|
||||||
.info-right
|
.info-right
|
||||||
position absolute
|
position absolute
|
||||||
right 0
|
right 40px
|
||||||
top 0
|
top 60px
|
||||||
background $ui-noteDetail-backgroundColor
|
|
||||||
bottom 1px
|
bottom 1px
|
||||||
padding-left 30px
|
padding-left 30px
|
||||||
|
z-index 101
|
||||||
|
|
||||||
.undo-button
|
.undo-button
|
||||||
width 34px
|
width 34px
|
||||||
height 34px
|
height 34px
|
||||||
border-radius 17px
|
border-radius 17px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
margin 15px 7px
|
margin 5px 0px
|
||||||
border none
|
border none
|
||||||
color $ui-button-color
|
color $ui-button-color
|
||||||
display flex
|
display flex
|
||||||
@@ -72,6 +70,7 @@ $info-margin-under-border = 27px
|
|||||||
border-color $ui-button--active-backgroundColor
|
border-color $ui-button--active-backgroundColor
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--hover-backgroundColor, 60%)
|
background-color alpha($ui-button--hover-backgroundColor, 60%)
|
||||||
|
transition 0.2s
|
||||||
.control-lockButton-tooltip
|
.control-lockButton-tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
|
|||||||
19
browser/main/Detail/PermanentDeleteButton.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import React, { PropTypes } from 'react'
|
||||||
|
import CSSModules from 'browser/lib/CSSModules'
|
||||||
|
import styles from './TrashButton.styl'
|
||||||
|
|
||||||
|
const PermanentDeleteButton = ({
|
||||||
|
onClick
|
||||||
|
}) => (
|
||||||
|
<button styleName='control-trashButton--in-trash'
|
||||||
|
onClick={(e) => onClick(e)}
|
||||||
|
>
|
||||||
|
<img styleName='iconInfo' src='../resources/icon/icon-trash.svg' />
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
|
||||||
|
PermanentDeleteButton.propTypes = {
|
||||||
|
onClick: PropTypes.func.isRequired
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CSSModules(PermanentDeleteButton, styles)
|
||||||
@@ -18,6 +18,7 @@ import _ from 'lodash'
|
|||||||
import { findNoteTitle } from 'browser/lib/findNoteTitle'
|
import { findNoteTitle } from 'browser/lib/findNoteTitle'
|
||||||
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
||||||
import TrashButton from './TrashButton'
|
import TrashButton from './TrashButton'
|
||||||
|
import PermanentDeleteButton from './PermanentDeleteButton'
|
||||||
import InfoButton from './InfoButton'
|
import InfoButton from './InfoButton'
|
||||||
import InfoPanel from './InfoPanel'
|
import InfoPanel from './InfoPanel'
|
||||||
import InfoPanelTrashed from './InfoPanelTrashed'
|
import InfoPanelTrashed from './InfoPanelTrashed'
|
||||||
@@ -566,7 +567,7 @@ class SnippetNoteDetail extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='info-right'>
|
<div styleName='info-right'>
|
||||||
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
<PermanentDeleteButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
||||||
<InfoButton
|
<InfoButton
|
||||||
onClick={(e) => this.handleInfoButtonClick(e)}
|
onClick={(e) => this.handleInfoButtonClick(e)}
|
||||||
/>
|
/>
|
||||||
@@ -583,10 +584,6 @@ class SnippetNoteDetail extends React.Component {
|
|||||||
|
|
||||||
const detailTopBar = <div styleName='info'>
|
const detailTopBar = <div styleName='info'>
|
||||||
<div styleName='info-left'>
|
<div styleName='info-left'>
|
||||||
<StarButton styleName='info-left-button'
|
|
||||||
onClick={(e) => this.handleStarButtonClick(e)}
|
|
||||||
isActive={note.isStarred}
|
|
||||||
/>
|
|
||||||
<div styleName='info-left-top'>
|
<div styleName='info-left-top'>
|
||||||
<FolderSelect styleName='info-left-top-folderSelect'
|
<FolderSelect styleName='info-left-top-folderSelect'
|
||||||
value={this.state.note.storage + '-' + this.state.note.folder}
|
value={this.state.note.storage + '-' + this.state.note.folder}
|
||||||
@@ -603,15 +600,21 @@ class SnippetNoteDetail extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='info-right'>
|
<div styleName='info-right'>
|
||||||
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
|
||||||
<button styleName='control-fullScreenButton'
|
|
||||||
onMouseDown={(e) => this.handleFullScreenButton(e)}
|
|
||||||
>
|
|
||||||
<i className='fa fa-window-maximize' styleName='fullScreen-button' />
|
|
||||||
</button>
|
|
||||||
<InfoButton
|
<InfoButton
|
||||||
onClick={(e) => this.handleInfoButtonClick(e)}
|
onClick={(e) => this.handleInfoButtonClick(e)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<StarButton
|
||||||
|
onClick={(e) => this.handleStarButtonClick(e)}
|
||||||
|
isActive={note.isStarred}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button styleName='control-fullScreenButton'
|
||||||
|
onMouseDown={(e) => this.handleFullScreenButton(e)}>
|
||||||
|
<img styleName='iconInfo' src='../resources/icon/icon-sidebar.svg' />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
|
||||||
<InfoPanel
|
<InfoPanel
|
||||||
storageName={currentOption.storage.name}
|
storageName={currentOption.storage.name}
|
||||||
folderName={currentOption.folder.name}
|
folderName={currentOption.folder.name}
|
||||||
|
|||||||
@@ -3,16 +3,14 @@
|
|||||||
|
|
||||||
.root
|
.root
|
||||||
absolute top bottom right
|
absolute top bottom right
|
||||||
border-width 0 0 1px
|
border-left 1px solid alpha(#DEDEDE, 60%)
|
||||||
border-style solid
|
|
||||||
border-color $ui-borderColor
|
|
||||||
background-color $ui-noteDetail-backgroundColor
|
background-color $ui-noteDetail-backgroundColor
|
||||||
box-shadow $note-detail-box-shadow
|
box-shadow none
|
||||||
|
|
||||||
.body
|
.body
|
||||||
absolute left right
|
absolute left right
|
||||||
left $note-detail-left-margin
|
left $snippet-note-detail-left-margin
|
||||||
right $note-detail-right-margin
|
right $snippet-note-detail-right-margin
|
||||||
top $info-height + $info-margin-under-border
|
top $info-height + $info-margin-under-border
|
||||||
bottom $statusBar-height
|
bottom $statusBar-height
|
||||||
background-color $ui-noteDetail-backgroundColor
|
background-color $ui-noteDetail-backgroundColor
|
||||||
@@ -45,7 +43,7 @@
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
.tabList .plusButton
|
.tabList .plusButton
|
||||||
navButtonColor()
|
navWhiteButtonColor()
|
||||||
width 30px
|
width 30px
|
||||||
|
|
||||||
.tabView
|
.tabView
|
||||||
@@ -57,24 +55,30 @@
|
|||||||
|
|
||||||
.override
|
.override
|
||||||
absolute bottom left
|
absolute bottom left
|
||||||
bottom 30px
|
bottom 1px
|
||||||
left 60px
|
left 60px
|
||||||
height 23px
|
|
||||||
z-index 101
|
z-index 101
|
||||||
button
|
button
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
height 24px
|
padding 0 6px
|
||||||
|
&:hover
|
||||||
|
color $ui-active-color
|
||||||
&:active .update-icon
|
&:active .update-icon
|
||||||
color white
|
color $ui-active-color
|
||||||
|
|
||||||
.control-fullScreenButton
|
.control-fullScreenButton
|
||||||
float right
|
top 80px
|
||||||
padding 0 0 2px 0
|
margin-bottom 10px
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root
|
||||||
|
box-shadow $note-detail-box-shadow
|
||||||
|
border none
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
border-color $ui-dark-borderColor
|
border none
|
||||||
background-color $ui-dark-noteDetail-backgroundColor
|
background-color $ui-dark-noteDetail-backgroundColor
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ class StarButton extends React.Component {
|
|||||||
onMouseLeave={(e) => this.handleMouseLeave(e)}
|
onMouseLeave={(e) => this.handleMouseLeave(e)}
|
||||||
onClick={this.props.onClick}
|
onClick={this.props.onClick}
|
||||||
>
|
>
|
||||||
<i styleName='icon'
|
<img styleName='icon'
|
||||||
className={this.state.isActive || this.props.isActive
|
src={this.state.isActive || this.props.isActive
|
||||||
? 'fa fa-star'
|
? '../resources/icon/icon-starred.svg'
|
||||||
: 'fa fa-star-o'
|
: '../resources/icon/icon-star.svg'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,47 +1,24 @@
|
|||||||
.root
|
.root
|
||||||
left 7px
|
top 45px
|
||||||
top 0
|
topBarButtonLight()
|
||||||
padding 0
|
|
||||||
color alpha($ui-favorite-star-button-color, 60%)
|
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.15s
|
transition 0.2s
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
color alpha($ui-favorite-star-button-color, 0.6)
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
&:active
|
|
||||||
transition 0.15s
|
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
|
|
||||||
.root--active
|
.root--active
|
||||||
@extend .root
|
@extend .root
|
||||||
|
transition 0.15s
|
||||||
color $ui-favorite-star-button-color
|
color $ui-favorite-star-button-color
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.15s
|
transition 0.2s
|
||||||
color $ui-favorite-star-button-color
|
color alpha($ui-favorite-star-button-color, 0.6)
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
|
||||||
&:active
|
|
||||||
transition 0.15s
|
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
|
||||||
|
|
||||||
.icon
|
.icon
|
||||||
transition transform 0.15s
|
transition transform 0.15s
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
|
topBarButtonDark()
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.15s
|
transition 0.2s
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
color alpha($ui-favorite-star-button-color, 0.6)
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
&:active
|
|
||||||
transition 0.15s
|
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
|
|
||||||
.root--active
|
|
||||||
@extend .root
|
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
&:hover
|
|
||||||
transition 0.15s
|
|
||||||
color $ui-favorite-star-button-color
|
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
|
||||||
@@ -113,7 +113,7 @@ class TagSelect extends React.Component {
|
|||||||
<button styleName='tag-removeButton'
|
<button styleName='tag-removeButton'
|
||||||
onClick={(e) => this.handleTagRemoveButtonClick(tag)(e)}
|
onClick={(e) => this.handleTagRemoveButtonClick(tag)(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-times fa-fw tag-removeButton-icon' />
|
<img className='tag-removeButton-icon' src='../resources/icon/icon-x.svg' width='8px' />
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
.root
|
.root
|
||||||
display inline-block
|
display flex
|
||||||
|
align-items center
|
||||||
user-select none
|
user-select none
|
||||||
height 23px
|
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
width 300px
|
width 100%
|
||||||
overflow-x scroll
|
overflow-x scroll
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
|
|
||||||
@@ -11,51 +11,42 @@
|
|||||||
display none
|
display none
|
||||||
|
|
||||||
.tag
|
.tag
|
||||||
display inline-block
|
display flex
|
||||||
margin 1px 3px
|
align-items center
|
||||||
padding 0
|
margin 0px 2px
|
||||||
height 20px
|
padding 2px 4px
|
||||||
background-color alpha($ui-tag-backgroundColor, 10%)
|
background-color alpha($ui-tag-backgroundColor, 3%)
|
||||||
border-radius 3px
|
border-radius 4px
|
||||||
overflow hidden
|
position relative
|
||||||
clearfix()
|
clearfix()
|
||||||
|
|
||||||
.tag-removeButton
|
.tag-removeButton
|
||||||
float right
|
|
||||||
height 20px
|
|
||||||
width 18px
|
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
border-style solid
|
border-style solid
|
||||||
border-width 0
|
border-width 0
|
||||||
border-radius 20px
|
border-radius 20px
|
||||||
line-height 18px
|
|
||||||
background-color transparent
|
background-color transparent
|
||||||
color $ui-button-color
|
color $ui-button-color
|
||||||
|
position absolute
|
||||||
|
right 6px
|
||||||
|
|
||||||
.tag-removeButton-icon
|
.tag-removeButton-icon
|
||||||
width 5px
|
width 5px
|
||||||
padding-right 4px
|
padding-right 4px
|
||||||
|
|
||||||
.tag-label
|
.tag-label
|
||||||
font-size 11px
|
font-size 13px
|
||||||
font-weight 600
|
color: $ui-text-color
|
||||||
color: alpha($ui-text-color, 80%)
|
padding 4px 16px 4px 8px
|
||||||
float left
|
|
||||||
height 20px
|
|
||||||
line-height 20px
|
|
||||||
padding 0 6px
|
|
||||||
|
|
||||||
.newTag
|
.newTag
|
||||||
display inline-block
|
|
||||||
margin 2px 0 15px 2px
|
|
||||||
vertical-align middle
|
|
||||||
height 18px
|
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
border none
|
border none
|
||||||
background-color transparent
|
background-color transparent
|
||||||
outline none
|
outline none
|
||||||
padding 0 4px
|
padding 0 4px
|
||||||
|
font-size 13px
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.tag
|
.tag
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const TrashButton = ({
|
|||||||
<button styleName='control-trashButton'
|
<button styleName='control-trashButton'
|
||||||
onClick={(e) => onClick(e)}
|
onClick={(e) => onClick(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-trash trashButton' styleName='info-button' />
|
<img styleName='iconInfo' src='../resources/icon/icon-trash.svg' />
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
.control-trashButton
|
.control-trashButton
|
||||||
float right
|
top 120px
|
||||||
|
margin-bottom 10px
|
||||||
|
topBarButtonLight()
|
||||||
|
|
||||||
|
.control-trashButton--in-trash
|
||||||
|
top 60px
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
|
||||||
.trashButton
|
.trashButton
|
||||||
padding 0px
|
padding 0px
|
||||||
margin 15px 0
|
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.control-trashButton
|
.control-trashButton
|
||||||
|
|||||||
@@ -11,14 +11,8 @@ import _ from 'lodash'
|
|||||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||||
import modal from 'browser/main/lib/modal'
|
import modal from 'browser/main/lib/modal'
|
||||||
import InitModal from 'browser/main/modals/InitModal'
|
import InitModal from 'browser/main/modals/InitModal'
|
||||||
import mixpanel from 'browser/main/lib/mixpanel'
|
|
||||||
import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
||||||
import eventEmitter from 'browser/main/lib/eventEmitter'
|
import eventEmitter from 'browser/main/lib/eventEmitter'
|
||||||
import RealtimeNotification from 'browser/components/RealtimeNotification'
|
|
||||||
|
|
||||||
function focused () {
|
|
||||||
mixpanel.track('MAIN_FOCUSED')
|
|
||||||
}
|
|
||||||
|
|
||||||
class Main extends React.Component {
|
class Main extends React.Component {
|
||||||
|
|
||||||
@@ -58,6 +52,8 @@ class Main extends React.Component {
|
|||||||
|
|
||||||
if (config.ui.theme === 'dark') {
|
if (config.ui.theme === 'dark') {
|
||||||
document.body.setAttribute('data-theme', 'dark')
|
document.body.setAttribute('data-theme', 'dark')
|
||||||
|
} else if (config.ui.theme === 'white') {
|
||||||
|
document.body.setAttribute('data-theme', 'white')
|
||||||
} else {
|
} else {
|
||||||
document.body.setAttribute('data-theme', 'default')
|
document.body.setAttribute('data-theme', 'default')
|
||||||
}
|
}
|
||||||
@@ -77,11 +73,9 @@ class Main extends React.Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
eventEmitter.on('editor:fullscreen', this.toggleFullScreen)
|
eventEmitter.on('editor:fullscreen', this.toggleFullScreen)
|
||||||
window.addEventListener('focus', focused)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
window.removeEventListener('focus', focused)
|
|
||||||
eventEmitter.off('editor:fullscreen', this.toggleFullScreen)
|
eventEmitter.off('editor:fullscreen', this.toggleFullScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,14 +186,6 @@ class Main extends React.Component {
|
|||||||
|
|
||||||
// the width of the navigation bar when it is folded/collapsed
|
// the width of the navigation bar when it is folded/collapsed
|
||||||
const foldedNavigationWidth = 44
|
const foldedNavigationWidth = 44
|
||||||
let notificationBarOffsetLeft
|
|
||||||
if (this.state.fullScreen) {
|
|
||||||
notificationBarOffsetLeft = 0
|
|
||||||
} else if (config.isSideNavFolded) {
|
|
||||||
notificationBarOffsetLeft = foldedNavigationWidth
|
|
||||||
} else {
|
|
||||||
notificationBarOffsetLeft = this.state.navWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -268,9 +254,6 @@ class Main extends React.Component {
|
|||||||
ignorePreviewPointerEvents={this.state.isRightSliderFocused}
|
ignorePreviewPointerEvents={this.state.isRightSliderFocused}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<RealtimeNotification
|
|
||||||
style={{left: notificationBarOffsetLeft}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ $control-height = 34px
|
|||||||
opacity 0
|
opacity 0
|
||||||
transition 0.1s
|
transition 0.1s
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root, .root--expanded
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
|
.control-newNoteButton
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root, .root--expanded
|
.root, .root--expanded
|
||||||
background-color $ui-dark-noteList-backgroundColor
|
background-color $ui-dark-noteList-backgroundColor
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class NewNoteButton extends React.Component {
|
|||||||
<div styleName='control'>
|
<div styleName='control'>
|
||||||
<button styleName='control-newNoteButton'
|
<button styleName='control-newNoteButton'
|
||||||
onClick={(e) => this.handleNewNoteButtonClick(e)}>
|
onClick={(e) => this.handleNewNoteButtonClick(e)}>
|
||||||
<i className='fa fa-pencil-square-o' />
|
<img styleName='iconTag' src='../resources/icon/icon-newnote.svg' />
|
||||||
<span styleName='control-newNoteButton-tooltip'>
|
<span styleName='control-newNoteButton-tooltip'>
|
||||||
Make a Note {OSX ? '⌘' : '^'} + n
|
Make a Note {OSX ? '⌘' : '^'} + n
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ $control-height = 30px
|
|||||||
|
|
||||||
.root
|
.root
|
||||||
absolute left bottom
|
absolute left bottom
|
||||||
bottom 30px
|
|
||||||
top $topBar-height - 1
|
top $topBar-height - 1
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
|
|
||||||
@@ -22,14 +21,14 @@ $control-height = 30px
|
|||||||
|
|
||||||
.control-sortBy-select
|
.control-sortBy-select
|
||||||
appearance: none;
|
appearance: none;
|
||||||
margin-left 3px
|
margin-left 5px
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
padding 0
|
padding 0
|
||||||
border none
|
border none
|
||||||
background-color transparent
|
background-color transparent
|
||||||
outline none
|
outline none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
font-size 11px
|
font-size 12px
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.2s
|
transition 0.2s
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
@@ -60,6 +59,13 @@ $control-height = 30px
|
|||||||
top $control-height
|
top $control-height
|
||||||
overflow auto
|
overflow auto
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
|
.control
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
|
|||||||
@@ -285,11 +285,18 @@ class NoteList extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sortByPin (unorderedNotes) {
|
sortByPin (unorderedNotes) {
|
||||||
const pinnedNotes = unorderedNotes.filter((note) => {
|
const pinnedNotes = []
|
||||||
return note.isPinned
|
const unpinnedNotes = []
|
||||||
|
|
||||||
|
unorderedNotes.forEach((note) => {
|
||||||
|
if (note.isPinned) {
|
||||||
|
pinnedNotes.push(note)
|
||||||
|
} else {
|
||||||
|
unpinnedNotes.push(note)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return pinnedNotes.concat(unorderedNotes)
|
return pinnedNotes.concat(unpinnedNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
handleNoteClick (e, uniqueKey) {
|
handleNoteClick (e, uniqueKey) {
|
||||||
@@ -351,19 +358,23 @@ class NoteList extends React.Component {
|
|||||||
|
|
||||||
handleNoteContextMenu (e, uniqueKey) {
|
handleNoteContextMenu (e, uniqueKey) {
|
||||||
const { location } = this.props
|
const { location } = this.props
|
||||||
const targetIndex = this.getTargetIndex()
|
const note = this.notes.find((note) => {
|
||||||
let note = this.notes[targetIndex]
|
const noteKey = `${note.storage}-${note.key}`
|
||||||
const label = note.isPinned ? 'Remove pin' : 'Pin to Top'
|
return noteKey === uniqueKey
|
||||||
|
})
|
||||||
|
|
||||||
let menu = new Menu()
|
const pinLabel = note.isPinned ? 'Remove pin' : 'Pin to Top'
|
||||||
|
const deleteLabel = 'Delete Note'
|
||||||
|
|
||||||
|
const menu = new Menu()
|
||||||
if (!location.pathname.match(/\/home|\/starred|\/trash/)) {
|
if (!location.pathname.match(/\/home|\/starred|\/trash/)) {
|
||||||
menu.append(new MenuItem({
|
menu.append(new MenuItem({
|
||||||
label: label,
|
label: pinLabel,
|
||||||
click: (e) => this.pinToTop(e, uniqueKey)
|
click: (e) => this.pinToTop(e, uniqueKey)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
menu.append(new MenuItem({
|
menu.append(new MenuItem({
|
||||||
label: 'Delete Note',
|
label: deleteLabel,
|
||||||
click: (e) => this.deleteNote(e, uniqueKey)
|
click: (e) => this.deleteNote(e, uniqueKey)
|
||||||
}))
|
}))
|
||||||
menu.popup()
|
menu.popup()
|
||||||
@@ -377,6 +388,7 @@ class NoteList extends React.Component {
|
|||||||
const currentStorage = data.storageMap.get(storageKey)
|
const currentStorage = data.storageMap.get(storageKey)
|
||||||
const currentFolder = _.find(currentStorage.folders, {key: folderKey})
|
const currentFolder = _.find(currentStorage.folders, {key: folderKey})
|
||||||
|
|
||||||
|
this.handleNoteClick(e, uniqueKey)
|
||||||
const targetIndex = this.getTargetIndex()
|
const targetIndex = this.getTargetIndex()
|
||||||
let note = this.notes[targetIndex]
|
let note = this.notes[targetIndex]
|
||||||
note.isPinned = !note.isPinned
|
note.isPinned = !note.isPinned
|
||||||
@@ -421,11 +433,7 @@ class NoteList extends React.Component {
|
|||||||
// Add notes to the current folder
|
// Add notes to the current folder
|
||||||
addNotesFromFiles (filepaths) {
|
addNotesFromFiles (filepaths) {
|
||||||
const { dispatch, location } = this.props
|
const { dispatch, location } = this.props
|
||||||
|
const { storage, folder } = this.resolveTargetFolder()
|
||||||
const targetIndex = this.getTargetIndex()
|
|
||||||
|
|
||||||
const storageKey = this.notes[targetIndex].storage
|
|
||||||
const folderKey = this.notes[targetIndex].folder
|
|
||||||
|
|
||||||
if (filepaths === undefined) return
|
if (filepaths === undefined) return
|
||||||
filepaths.forEach((filepath) => {
|
filepaths.forEach((filepath) => {
|
||||||
@@ -434,11 +442,11 @@ class NoteList extends React.Component {
|
|||||||
const content = data.toString()
|
const content = data.toString()
|
||||||
const newNote = {
|
const newNote = {
|
||||||
content: content,
|
content: content,
|
||||||
folder: folderKey,
|
folder: folder.key,
|
||||||
title: markdown.strip(findNoteTitle(content)),
|
title: markdown.strip(findNoteTitle(content)),
|
||||||
type: 'MARKDOWN_NOTE'
|
type: 'MARKDOWN_NOTE'
|
||||||
}
|
}
|
||||||
dataApi.createNote(storageKey, newNote)
|
dataApi.createNote(storage.key, newNote)
|
||||||
.then((note) => {
|
.then((note) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'UPDATE_NOTE',
|
type: 'UPDATE_NOTE',
|
||||||
@@ -461,6 +469,36 @@ class NoteList extends React.Component {
|
|||||||
return targetIndex
|
return targetIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resolveTargetFolder () {
|
||||||
|
const { data, params } = this.props
|
||||||
|
let storage = data.storageMap.get(params.storageKey)
|
||||||
|
|
||||||
|
// Find first storage
|
||||||
|
if (storage == null) {
|
||||||
|
for (let kv of data.storageMap) {
|
||||||
|
storage = kv[1]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (storage == null) this.showMessageBox('No storage for importing note(s)')
|
||||||
|
const folder = _.find(storage.folders, {key: params.folderKey}) || storage.folders[0]
|
||||||
|
if (folder == null) this.showMessageBox('No folder for importing note(s)')
|
||||||
|
|
||||||
|
return {
|
||||||
|
storage,
|
||||||
|
folder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
showMessageBox (message) {
|
||||||
|
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||||
|
type: 'warning',
|
||||||
|
message: message,
|
||||||
|
buttons: ['OK']
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
let { location, notes, config, dispatch } = this.props
|
let { location, notes, config, dispatch } = this.props
|
||||||
let sortFunc = config.sortBy === 'CREATED_AT'
|
let sortFunc = config.sortBy === 'CREATED_AT'
|
||||||
@@ -476,6 +514,25 @@ class NoteList extends React.Component {
|
|||||||
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
moment.locale('en', {
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: '%ds',
|
||||||
|
ss: '%ss',
|
||||||
|
m: '1m',
|
||||||
|
mm: '%dm',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%dh',
|
||||||
|
d: '1d',
|
||||||
|
dd: '%dd',
|
||||||
|
M: '1M',
|
||||||
|
MM: '%dM',
|
||||||
|
y: '1Y',
|
||||||
|
yy: '%dY'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
let noteList = notes
|
let noteList = notes
|
||||||
.map(note => {
|
.map(note => {
|
||||||
if (note == null) {
|
if (note == null) {
|
||||||
@@ -487,7 +544,7 @@ class NoteList extends React.Component {
|
|||||||
const dateDisplay = moment(
|
const dateDisplay = moment(
|
||||||
config.sortBy === 'CREATED_AT'
|
config.sortBy === 'CREATED_AT'
|
||||||
? note.createdAt : note.updatedAt
|
? note.createdAt : note.updatedAt
|
||||||
).fromNow()
|
).fromNow('D')
|
||||||
const key = `${note.storage}-${note.key}`
|
const key = `${note.storage}-${note.key}`
|
||||||
|
|
||||||
if (isDefault) {
|
if (isDefault) {
|
||||||
@@ -510,6 +567,7 @@ class NoteList extends React.Component {
|
|||||||
isActive={isActive}
|
isActive={isActive}
|
||||||
note={note}
|
note={note}
|
||||||
key={key}
|
key={key}
|
||||||
|
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
|
||||||
handleNoteClick={this.handleNoteClick.bind(this)}
|
handleNoteClick={this.handleNoteClick.bind(this)}
|
||||||
handleDragStart={this.handleDragStart.bind(this)}
|
handleDragStart={this.handleDragStart.bind(this)}
|
||||||
/>
|
/>
|
||||||
@@ -541,7 +599,7 @@ class NoteList extends React.Component {
|
|||||||
}
|
}
|
||||||
onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')}
|
onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')}
|
||||||
>
|
>
|
||||||
<i className='fa fa-th-large' />
|
<img styleName='iconTag' src='../resources/icon/icon-column.svg' />
|
||||||
</button>
|
</button>
|
||||||
<button styleName={config.listStyle === 'SMALL'
|
<button styleName={config.listStyle === 'SMALL'
|
||||||
? 'control-button--active'
|
? 'control-button--active'
|
||||||
@@ -549,7 +607,7 @@ class NoteList extends React.Component {
|
|||||||
}
|
}
|
||||||
onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')}
|
onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')}
|
||||||
>
|
>
|
||||||
<i className='fa fa-list-ul' />
|
<img styleName='iconTag' src='../resources/icon/icon-column-list.svg' />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.root
|
.root
|
||||||
absolute top left bottom
|
absolute top left bottom
|
||||||
width $sideNav-width
|
width $sideNav-width
|
||||||
background-color #f9f9f9
|
background-color #2E3235
|
||||||
user-select none
|
user-select none
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
height: 100vh
|
height: 100vh
|
||||||
@@ -11,42 +11,41 @@
|
|||||||
.top
|
.top
|
||||||
padding-bottom 15px
|
padding-bottom 15px
|
||||||
|
|
||||||
.top-menu
|
.top-menu-preference
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
position absolute
|
position absolute
|
||||||
top 22px
|
top 22px
|
||||||
right 5px
|
right 10px
|
||||||
height 23px
|
|
||||||
width 2em
|
width 2em
|
||||||
|
background-color transparent
|
||||||
&:hover
|
&:hover
|
||||||
color $ui-text-color
|
color $ui-button-default--active-backgroundColor
|
||||||
|
background-color transparent
|
||||||
&:active, &:active:hover
|
&:active, &:active:hover
|
||||||
color $ui-text-color
|
color $ui-button-default--active-backgroundColor
|
||||||
background-color alpha($ui-button--active-backgroundColor, 20%)
|
|
||||||
|
|
||||||
.switch-buttons
|
.switch-buttons
|
||||||
background-color transparent
|
background-color transparent
|
||||||
border 1px solid $ui-borderColor
|
border 0
|
||||||
width 110px
|
margin 24px auto 4px 14px
|
||||||
height 25px
|
display flex
|
||||||
margin 20px auto 0px auto
|
text-align center
|
||||||
border-radius 1px
|
|
||||||
|
|
||||||
.non-active-button
|
.non-active-button
|
||||||
navButtonColor()
|
color $ui-inactive-text-color
|
||||||
font-weight 600
|
font-size 16px
|
||||||
width 54px
|
border 0
|
||||||
height 23px
|
background-color transparent
|
||||||
|
transition 0.2s
|
||||||
|
display flex
|
||||||
|
text-align center
|
||||||
|
margin-right 4px;
|
||||||
|
&:hover
|
||||||
|
color alpha(#239F86, 60%)
|
||||||
|
|
||||||
.active-button
|
.active-button
|
||||||
@extend .non-active-button
|
@extend .non-active-button
|
||||||
background-color $ui-button--active-backgroundColor
|
color $ui-button-default--active-backgroundColor
|
||||||
color $ui-text-color
|
|
||||||
&:hover
|
|
||||||
background-color alpha($ui-button--active-backgroundColor, 70%)
|
|
||||||
color alpha($ui-text-color, 70%)
|
|
||||||
&:active, &:active:hover
|
|
||||||
background-color $ui-button--active-backgroundColor
|
|
||||||
|
|
||||||
.top-menu-label
|
.top-menu-label
|
||||||
margin-left 5px
|
margin-left 5px
|
||||||
@@ -62,7 +61,7 @@
|
|||||||
padding-left 15px
|
padding-left 15px
|
||||||
padding-bottom 13px
|
padding-bottom 13px
|
||||||
p
|
p
|
||||||
color $ui-text-color
|
color $ui-button-default-color
|
||||||
|
|
||||||
.tagList
|
.tagList
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
@@ -71,6 +70,7 @@
|
|||||||
.root--folded
|
.root--folded
|
||||||
height 100vh
|
height 100vh
|
||||||
width $sideNav--folded-width
|
width $sideNav--folded-width
|
||||||
|
background-color #2E3235
|
||||||
.switch-buttons
|
.switch-buttons
|
||||||
display none
|
display none
|
||||||
.top
|
.top
|
||||||
@@ -93,14 +93,48 @@
|
|||||||
opacity 0
|
opacity 0
|
||||||
margin-left 0
|
margin-left 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background-color $ui-tooltip-backgroundColor
|
|
||||||
z-index 10
|
z-index 10
|
||||||
color white
|
color white
|
||||||
line-height 30px
|
line-height 30px
|
||||||
border-top-right-radius 2px
|
border-top-right-radius 2px
|
||||||
border-bottom-right-radius 2px
|
border-bottom-right-radius 2px
|
||||||
pointer-events none
|
pointer-events none
|
||||||
font-size 12px
|
font-size 13px
|
||||||
|
.top-menu-preference
|
||||||
|
position absolute
|
||||||
|
left 11px
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root, .root--folded
|
||||||
|
background-color #f9f9f9
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.top-menu-preference
|
||||||
|
navWhiteButtonColor()
|
||||||
|
background-color transparent
|
||||||
|
&:hover
|
||||||
|
color #0B99F1
|
||||||
|
background-color transparent
|
||||||
|
&:active, &:active:hover
|
||||||
|
color #0B99F1
|
||||||
|
background-color transparent
|
||||||
|
|
||||||
|
.non-active-button
|
||||||
|
color $ui-inactive-text-color
|
||||||
|
&:hover
|
||||||
|
color alpha(#0B99F1, 60%)
|
||||||
|
|
||||||
|
.tag-title
|
||||||
|
p
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.non-active-button
|
||||||
|
&:hover
|
||||||
|
color alpha(#0B99F1, 60%)
|
||||||
|
|
||||||
|
.active-button
|
||||||
|
@extend .non-active-button
|
||||||
|
color #0B99F1
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root, .root--folded
|
.root, .root--folded
|
||||||
@@ -111,32 +145,20 @@ body[data-theme="dark"]
|
|||||||
.top
|
.top
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
|
|
||||||
.top-menu
|
.top-menu-preference
|
||||||
navDarkButtonColor()
|
navDarkButtonColor()
|
||||||
|
background-color transparent
|
||||||
&:active
|
&:active
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
||||||
|
background-color transparent
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
||||||
|
background-color transparent
|
||||||
.switch-buttons
|
|
||||||
border-color $ui-dark-borderColor
|
|
||||||
|
|
||||||
.non-active-button
|
.non-active-button
|
||||||
navDarkButtonColor()
|
color alpha($ui-dark-text-color, 60%)
|
||||||
|
|
||||||
.active-button
|
|
||||||
@extend .non-active-button
|
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
|
||||||
color $ui-dark-text-color
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 70%)
|
color alpha(#0B99F1, 60%)
|
||||||
color alpha($ui-dark-text-color, 70%)
|
|
||||||
&:active
|
|
||||||
color $ui-dark-text-color
|
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 60%)
|
|
||||||
&:active, &:active:hover
|
|
||||||
color $ui-dark-text-color
|
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
|
||||||
|
|
||||||
.tag-title
|
.tag-title
|
||||||
p
|
p
|
||||||
|
|||||||
@@ -226,9 +226,9 @@ class StorageItem extends React.Component {
|
|||||||
<button styleName='header-toggleButton'
|
<button styleName='header-toggleButton'
|
||||||
onMouseDown={(e) => this.handleToggleButtonClick(e)}
|
onMouseDown={(e) => this.handleToggleButtonClick(e)}
|
||||||
>
|
>
|
||||||
<i className={this.state.isOpen
|
<img src={this.state.isOpen
|
||||||
? 'fa fa-caret-down'
|
? '../resources/icon/icon-down.svg'
|
||||||
: 'fa fa-caret-right'
|
: '../resources/icon/icon-right.svg'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
@@ -237,7 +237,7 @@ class StorageItem extends React.Component {
|
|||||||
<button styleName='header-addFolderButton'
|
<button styleName='header-addFolderButton'
|
||||||
onClick={(e) => this.handleAddFolderButtonClick(e)}
|
onClick={(e) => this.handleAddFolderButtonClick(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-plus' />
|
<img styleName='iconTag' src='../resources/icon/icon-plus.svg' />
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,27 +5,23 @@
|
|||||||
|
|
||||||
.header
|
.header
|
||||||
position relative
|
position relative
|
||||||
height 25px
|
height 36px
|
||||||
width 100%
|
width 100%
|
||||||
margin-bottom 5px
|
margin-bottom 5px
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
|
||||||
.header--active
|
.header--active
|
||||||
margin-bottom 5px
|
margin-bottom 5px
|
||||||
background-color $ui-button--active-backgroundColor
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
transition color background-color 0.15s
|
transition color background-color 0.15s
|
||||||
|
display flex
|
||||||
.header--active
|
align-items center
|
||||||
.header-toggleButton
|
.header-toggleButton
|
||||||
color $ui-text-color
|
|
||||||
|
|
||||||
.header--active
|
|
||||||
.header-info
|
.header-info
|
||||||
color $ui-text-color
|
|
||||||
|
|
||||||
.header--active
|
|
||||||
.header-addFolderButton
|
.header-addFolderButton
|
||||||
color $ui-text-color
|
color #1EC38B
|
||||||
|
|
||||||
.header-toggleButton
|
.header-toggleButton
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
@@ -38,23 +34,31 @@
|
|||||||
border-radius 50%
|
border-radius 50%
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.2s
|
transition 0.2s
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
background-color alpha($ui-button-default--hover-backgroundColor, 40%)
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
|
|
||||||
.header-info
|
.header-info
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
display block
|
display block
|
||||||
width 100%
|
width 100%
|
||||||
height 25px
|
height 36px
|
||||||
padding-left 23px
|
padding-left 25px
|
||||||
padding-right 10px
|
padding-right 15px
|
||||||
line-height 22px
|
line-height 22px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
font-size 13px
|
font-size 14px
|
||||||
border none
|
border none
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
text-align left
|
text-align left
|
||||||
background-color alpha($ui-button--active-backgroundColor, 20%)
|
font-weight 600;
|
||||||
|
background-color transparent
|
||||||
|
&:hover
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
transition background-color 0.15s
|
||||||
|
&:active, &:active:hover
|
||||||
|
color #1EC38B
|
||||||
|
background-color alpha($ui-button-default--active-backgroundColor, 20%)
|
||||||
|
|
||||||
.header-info-path
|
.header-info-path
|
||||||
font-size 10px
|
font-size 10px
|
||||||
@@ -63,17 +67,14 @@
|
|||||||
.header-addFolderButton
|
.header-addFolderButton
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
position absolute
|
position absolute
|
||||||
right 0
|
right 7px
|
||||||
width 25px
|
width 25px
|
||||||
height 25px
|
height 25px
|
||||||
padding 0
|
padding 0
|
||||||
border none
|
border none
|
||||||
margin-right 5px
|
|
||||||
border-radius 50%
|
border-radius 50%
|
||||||
&:hover
|
&:hover
|
||||||
transition 0.2s
|
transition 0.2s
|
||||||
background-color alpha($ui-button--active-backgroundColor, 40%)
|
|
||||||
color $ui-text-color
|
|
||||||
|
|
||||||
.root--folded
|
.root--folded
|
||||||
@extend .root
|
@extend .root
|
||||||
@@ -102,6 +103,33 @@
|
|||||||
font-size 10px
|
font-size 10px
|
||||||
margin 0 5px
|
margin 0 5px
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.header--active
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
transition color background-color 0.15s
|
||||||
|
.header-toggleButton
|
||||||
|
color $ui-text-color
|
||||||
|
.header-info
|
||||||
|
color $ui-text-color
|
||||||
|
.header-addFolderButton
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.header-toggleButton
|
||||||
|
navWhiteButtonColor()
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
|
.header-info
|
||||||
|
navWhiteButtonColor()
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
|
|
||||||
|
.header-addFolderButton
|
||||||
|
navWhiteButtonColor()
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 40%)
|
||||||
|
color $ui-text-color
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.header--active
|
.header--active
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
background-color $ui-dark-button--active-backgroundColor
|
||||||
|
|||||||
@@ -9,9 +9,19 @@ import TagListItem from 'browser/components/TagListItem'
|
|||||||
import SideNavFilter from 'browser/components/SideNavFilter'
|
import SideNavFilter from 'browser/components/SideNavFilter'
|
||||||
import StorageList from 'browser/components/StorageList'
|
import StorageList from 'browser/components/StorageList'
|
||||||
import NavToggleButton from 'browser/components/NavToggleButton'
|
import NavToggleButton from 'browser/components/NavToggleButton'
|
||||||
|
import EventEmitter from 'browser/main/lib/eventEmitter'
|
||||||
|
|
||||||
class SideNav extends React.Component {
|
class SideNav extends React.Component {
|
||||||
// TODO: should not use electron stuff v0.7
|
// TODO: should not use electron stuff v0.7
|
||||||
|
|
||||||
|
componentDidMount () {
|
||||||
|
EventEmitter.on('side:preferences', this.handleMenuButtonClick)
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount () {
|
||||||
|
EventEmitter.off('side:preferences', this.handleMenuButtonClick)
|
||||||
|
}
|
||||||
|
|
||||||
handleMenuButtonClick (e) {
|
handleMenuButtonClick (e) {
|
||||||
openModal(PreferencesModal)
|
openModal(PreferencesModal)
|
||||||
}
|
}
|
||||||
@@ -72,6 +82,9 @@ class SideNav extends React.Component {
|
|||||||
isTrashedActive={isTrashedActive}
|
isTrashedActive={isTrashedActive}
|
||||||
handleStarredButtonClick={(e) => this.handleStarredButtonClick(e)}
|
handleStarredButtonClick={(e) => this.handleStarredButtonClick(e)}
|
||||||
handleTrashedButtonClick={(e) => this.handleTrashedButtonClick(e)}
|
handleTrashedButtonClick={(e) => this.handleTrashedButtonClick(e)}
|
||||||
|
counterTotalNote={data.noteMap._map.size}
|
||||||
|
counterStarredNote={data.starredSet._set.size}
|
||||||
|
counterDelNote={data.trashedSet._set.size}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StorageList storageList={storageList} />
|
<StorageList storageList={storageList} />
|
||||||
@@ -104,13 +117,19 @@ class SideNav extends React.Component {
|
|||||||
<TagListItem
|
<TagListItem
|
||||||
name={tag}
|
name={tag}
|
||||||
handleClickTagListItem={this.handleClickTagListItem.bind(this)}
|
handleClickTagListItem={this.handleClickTagListItem.bind(this)}
|
||||||
isActive={!!location.pathname.match(tag)}
|
isActive={this.getTagActive(location.pathname, tag)}
|
||||||
key={tag}
|
key={tag}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTagActive (path, tag) {
|
||||||
|
const pathSegments = path.split('/')
|
||||||
|
const pathTag = pathSegments[pathSegments.length - 1]
|
||||||
|
return pathTag === tag
|
||||||
|
}
|
||||||
|
|
||||||
handleClickTagListItem (name) {
|
handleClickTagListItem (name) {
|
||||||
const { router } = this.context
|
const { router } = this.context
|
||||||
router.push(`/tags/${name}`)
|
router.push(`/tags/${name}`)
|
||||||
@@ -142,15 +161,26 @@ class SideNav extends React.Component {
|
|||||||
>
|
>
|
||||||
<div styleName='top'>
|
<div styleName='top'>
|
||||||
<div styleName='switch-buttons'>
|
<div styleName='switch-buttons'>
|
||||||
<button styleName={isTagActive ? 'non-active-button' : 'active-button'} onClick={this.handleSwitchFoldersButtonClick.bind(this)}>Folders</button>
|
<button styleName={isTagActive ? 'non-active-button' : 'active-button'} onClick={this.handleSwitchFoldersButtonClick.bind(this)}>
|
||||||
<button styleName={isTagActive ? 'active-button' : 'non-active-button'} onClick={this.handleSwitchTagsButtonClick.bind(this)}>Tags</button>
|
<img src={isTagActive
|
||||||
|
? '../resources/icon/icon-list.svg'
|
||||||
|
: '../resources/icon/icon-list-active.svg'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button styleName={isTagActive ? 'active-button' : 'non-active-button'} onClick={this.handleSwitchTagsButtonClick.bind(this)}>
|
||||||
|
<img src={isTagActive
|
||||||
|
? '../resources/icon/icon-tag-active.svg'
|
||||||
|
: '../resources/icon/icon-tag.svg'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button styleName='top-menu'
|
<button styleName='top-menu-preference'
|
||||||
onClick={(e) => this.handleMenuButtonClick(e)}
|
onClick={(e) => this.handleMenuButtonClick(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-wrench fa-fw' />
|
<img styleName='iconTag' src='../resources/icon/icon-setting.svg' />
|
||||||
<span styleName='top-menu-label'>Preferences</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
@import('../Detail/DetailVars')
|
@import('../Detail/DetailVars')
|
||||||
|
|
||||||
.root
|
.root
|
||||||
absolute bottom left right
|
position absolute
|
||||||
height $statusBar-height
|
bottom 10px
|
||||||
bottom 16px
|
right 10px
|
||||||
z-index 100
|
z-index 100
|
||||||
background-color $ui-noteDetail-backgroundColor
|
|
||||||
display flex
|
display flex
|
||||||
|
|
||||||
.blank
|
.blank
|
||||||
@@ -23,7 +22,18 @@
|
|||||||
|
|
||||||
.zoom
|
.zoom
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
height 24px
|
color rgba(0,0,0,.54)
|
||||||
|
height 20px
|
||||||
|
display flex
|
||||||
|
padding 0
|
||||||
|
align-items center
|
||||||
|
background-color transparent
|
||||||
|
&:hover
|
||||||
|
color $ui-active-color
|
||||||
|
&:active
|
||||||
|
color $ui-active-color
|
||||||
|
span
|
||||||
|
margin-left 5px
|
||||||
|
|
||||||
.update
|
.update
|
||||||
navButtonColor()
|
navButtonColor()
|
||||||
@@ -39,14 +49,14 @@
|
|||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
background-color $ui-dark-noteDetail-backgroundColor
|
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
|
||||||
.zoom
|
.zoom
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
|
background-color transparent
|
||||||
|
color #f9f9f9
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
|
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ class StatusBar extends React.Component {
|
|||||||
<button styleName='zoom'
|
<button styleName='zoom'
|
||||||
onClick={(e) => this.handleZoomButtonClick(e)}
|
onClick={(e) => this.handleZoomButtonClick(e)}
|
||||||
>
|
>
|
||||||
<i className='fa fa-search-plus' />
|
<img src='../resources/icon/icon-zoom.svg' />
|
||||||
{Math.floor(config.zoom * 100)}%
|
<span>{Math.floor(config.zoom * 100)}%</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{status.updateReady
|
{status.updateReady
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $control-height = 34px
|
|||||||
outline none
|
outline none
|
||||||
border none
|
border none
|
||||||
color $ui-text-color
|
color $ui-text-color
|
||||||
font-size 16px
|
font-size 18px
|
||||||
padding-bottom 2px
|
padding-bottom 2px
|
||||||
background-color $ui-noteList-backgroundColor
|
background-color $ui-noteList-backgroundColor
|
||||||
|
|
||||||
@@ -112,6 +112,21 @@ $control-height = 34px
|
|||||||
opacity 0
|
opacity 0
|
||||||
transition 0.1s
|
transition 0.1s
|
||||||
|
|
||||||
|
body[data-theme="white"]
|
||||||
|
.root, .root--expanded
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
|
.control
|
||||||
|
border-color $ui-dark-borderColor
|
||||||
|
|
||||||
|
.control-search
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
|
.control-search-input
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
input
|
||||||
|
background-color $ui-white-noteList-backgroundColor
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root, .root--expanded
|
.root, .root--expanded
|
||||||
background-color $ui-dark-noteList-backgroundColor
|
background-color $ui-dark-noteList-backgroundColor
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ body
|
|||||||
color textColor
|
color textColor
|
||||||
font-size fontSize
|
font-size fontSize
|
||||||
font-weight 200
|
font-weight 200
|
||||||
|
-webkit-font-smoothing antialiased
|
||||||
|
|
||||||
button, input, select, textarea
|
button, input, select, textarea
|
||||||
font-family DEFAULT_FONTS
|
font-family DEFAULT_FONTS
|
||||||
|
|||||||
@@ -91,9 +91,13 @@ function get () {
|
|||||||
: 'default'
|
: 'default'
|
||||||
|
|
||||||
if (config.editor.theme !== 'default') {
|
if (config.editor.theme !== 'default') {
|
||||||
|
if (config.editor.theme.startsWith('solarized')) {
|
||||||
|
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/solarized.css')
|
||||||
|
} else {
|
||||||
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme + '.css')
|
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme + '.css')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
@@ -106,6 +110,8 @@ function set (updates) {
|
|||||||
|
|
||||||
if (newConfig.ui.theme === 'dark') {
|
if (newConfig.ui.theme === 'dark') {
|
||||||
document.body.setAttribute('data-theme', 'dark')
|
document.body.setAttribute('data-theme', 'dark')
|
||||||
|
} else if (newConfig.ui.theme === 'white') {
|
||||||
|
document.body.setAttribute('data-theme', 'white')
|
||||||
} else {
|
} else {
|
||||||
document.body.setAttribute('data-theme', 'default')
|
document.body.setAttribute('data-theme', 'default')
|
||||||
}
|
}
|
||||||
@@ -122,8 +128,12 @@ function set (updates) {
|
|||||||
: 'default'
|
: 'default'
|
||||||
|
|
||||||
if (newTheme !== 'default') {
|
if (newTheme !== 'default') {
|
||||||
|
if (newTheme.startsWith('solarized')) {
|
||||||
|
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/solarized.css')
|
||||||
|
} else {
|
||||||
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css')
|
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ipcRenderer.send('config-renew', {
|
ipcRenderer.send('config-renew', {
|
||||||
config: get()
|
config: get()
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
import store from 'browser/main/store'
|
|
||||||
|
|
||||||
const _ = require('lodash')
|
|
||||||
const keygen = require('browser/lib/keygen')
|
|
||||||
const Mixpanel = require('mixpanel')
|
|
||||||
const mixpanel = Mixpanel.init('7a0aca437d72dfd07cbcbf58d3b61f27', {key: 'fde4fd23f4d550f1b646bcd7d4374b1f'})
|
|
||||||
const moment = require('moment')
|
|
||||||
const electron = require('electron')
|
|
||||||
|
|
||||||
function _getClientKey () {
|
|
||||||
let clientKey = localStorage.getItem('clientKey')
|
|
||||||
if (!_.isString(clientKey) || clientKey.length !== 40) {
|
|
||||||
clientKey = keygen(20)
|
|
||||||
_setClientKey(clientKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
return clientKey
|
|
||||||
}
|
|
||||||
|
|
||||||
function _setClientKey (newKey) {
|
|
||||||
localStorage.setItem('clientKey', newKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
function _fetch () {
|
|
||||||
let events
|
|
||||||
try {
|
|
||||||
events = JSON.parse(localStorage.getItem('events'))
|
|
||||||
if (!_.isArray(events)) throw new Error('events is not an array.')
|
|
||||||
} catch (err) {
|
|
||||||
console.warn(err)
|
|
||||||
events = []
|
|
||||||
localStorage.setItem('events', JSON.stringify(events))
|
|
||||||
console.info('Events cache initialzed')
|
|
||||||
}
|
|
||||||
return events
|
|
||||||
}
|
|
||||||
|
|
||||||
function _keep (name, properties) {
|
|
||||||
let events = _fetch()
|
|
||||||
properties.time = new Date()
|
|
||||||
events.push({
|
|
||||||
name,
|
|
||||||
properties
|
|
||||||
})
|
|
||||||
localStorage.setItem('events', JSON.stringify(events))
|
|
||||||
}
|
|
||||||
|
|
||||||
function _keepUnique (name, properties) {
|
|
||||||
let events = _fetch()
|
|
||||||
properties.time = new Date()
|
|
||||||
events = events.filter((event) => event.name !== name)
|
|
||||||
events.push({
|
|
||||||
name,
|
|
||||||
properties
|
|
||||||
})
|
|
||||||
localStorage.setItem('events', JSON.stringify(events))
|
|
||||||
}
|
|
||||||
|
|
||||||
function _flush () {
|
|
||||||
let events = _fetch()
|
|
||||||
let spliced = events.splice(0, 50)
|
|
||||||
localStorage.setItem('events', JSON.stringify(events))
|
|
||||||
|
|
||||||
if (spliced.length > 0) {
|
|
||||||
let parsedEvents = spliced
|
|
||||||
.filter((event) => {
|
|
||||||
if (!_.isObject(event)) return false
|
|
||||||
if (!_.isString(event.name)) return false
|
|
||||||
if (!_.isObject(event.properties)) return false
|
|
||||||
if (!moment(event.properties.time).isValid()) return false
|
|
||||||
if (new Date() - moment(event.properties.time).toDate() > 1000 * 3600 * 24 * 3) return false
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
.map((event) => {
|
|
||||||
return {
|
|
||||||
event: event.name,
|
|
||||||
properties: event.properties
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
mixpanel.import_batch(parsedEvents, {}, (errs) => {
|
|
||||||
if (errs.length > 0) {
|
|
||||||
let events = _fetch()
|
|
||||||
events = events.concat(spliced)
|
|
||||||
localStorage.setItem('events', JSON.stringify(events))
|
|
||||||
} else {
|
|
||||||
_flush()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
let state = store.getState()
|
|
||||||
mixpanel.people.set(_getClientKey(), {
|
|
||||||
storage_count: state.data.storageMap.size,
|
|
||||||
note_count: state.data.noteMap.size,
|
|
||||||
version: electron.remote.app.getVersion()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setInterval(_flush, 1000 * 60 * 60)
|
|
||||||
|
|
||||||
function track (name, properties) {
|
|
||||||
switch (name) {
|
|
||||||
case 'MAIN_FOCUSED':
|
|
||||||
properties = Object.assign({}, properties, {
|
|
||||||
distinct_id: _getClientKey()
|
|
||||||
})
|
|
||||||
_keepUnique(name, properties)
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
properties = Object.assign({}, properties, {
|
|
||||||
distinct_id: _getClientKey()
|
|
||||||
})
|
|
||||||
_keep(name, properties)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
_mp: mixpanel,
|
|
||||||
track
|
|
||||||
}
|
|
||||||
@@ -152,7 +152,7 @@ class InitModal extends React.Component {
|
|||||||
type: 'MARKDOWN_NOTE',
|
type: 'MARKDOWN_NOTE',
|
||||||
folder: data.storage.folders[0].key,
|
folder: data.storage.folders[0].key,
|
||||||
title: 'Welcome to Boostnote!',
|
title: 'Welcome to Boostnote!',
|
||||||
content: '# Welcome to Boostnote! \n### _Click to edit this note._\n\n---\n\nBoostnote is an *open source* note-taking app. \nRepository is published on [GitHub](https://github.com/BoostIO/Boostnote), and tweeting everyday on [@Boostnoteapp](https://twitter.com/boostnoteapp)!\n\n## Features \n- [x] No internet or registration required. \n- [ ] Quick search and copy the content of note. macOS: <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>S</kbd> / windows: <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>S</kbd> \n- [ ] Markdown & Snippet note. \n- [ ] Available for `vim` and `emacs` mode. \n- [ ] Choose your favorite theme on UI, Editor and Code Block! \n--- \n\n- Copy Codeblock on Markdown Preview.\n```javascript\nvar boostnote = document.getElementById(\'enjoy\').innerHTML\n\nconsole.log(boostnote)\n```'
|
content: '# Welcome to Boostnote!\n## Click here to edit markdown :wave:\n\n<iframe width="560" height="315" src="https://www.youtube.com/embed/L0qNPLsvmyM" frameborder="0" allowfullscreen></iframe>\n\n## Docs :memo:\n- [Boostnote | Boost your happiness, productivity and creativity.](https://hackernoon.com/boostnote-boost-your-happiness-productivity-and-creativity-315034efeebe)\n- [Cloud Syncing & Backups](https://github.com/BoostIO/Boostnote/wiki/Cloud-Syncing-and-Backup)\n- [How to sync your data across Desktop and Mobile apps](https://github.com/BoostIO/Boostnote/wiki/Sync-Data-Across-Desktop-and-Mobile-apps)\n- [Convert data from **Evernote** to Boostnote.](https://github.com/BoostIO/Boostnote/wiki/Evernote)\n- [Keyboard Shortcuts](https://github.com/BoostIO/Boostnote/wiki/Keyboard-Shortcuts)\n- [Keymaps in Editor mode](https://github.com/BoostIO/Boostnote/wiki/Keymaps-in-Editor-mode)\n- [How to set syntax highlight in Snippet note](https://github.com/BoostIO/Boostnote/wiki/Syntax-Highlighting)\n\n---\n\n## Article Archive :books:\n- [Reddit English](http://bit.ly/2mOJPu7)\n- [Reddit Spanish](https://www.reddit.com/r/boostnote_es/)\n- [Reddit Chinese](https://www.reddit.com/r/boostnote_cn/)\n- [Reddit Japanese](https://www.reddit.com/r/boostnote_jp/)\n\n---\n\n## Community :beers:\n- [GitHub](http://bit.ly/2AWWzkD)\n- [Twitter](http://bit.ly/2z8BUJZ)\n- [Facebook Group](http://bit.ly/2jcca8t)'
|
||||||
})
|
})
|
||||||
.then((note) => {
|
.then((note) => {
|
||||||
store.dispatch({
|
store.dispatch({
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
right 15px
|
right 15px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
.success
|
.success
|
||||||
color green
|
color #1EC38B
|
||||||
.error
|
.error
|
||||||
color red
|
color red
|
||||||
|
|
||||||
@@ -115,7 +115,6 @@
|
|||||||
line-height 1.2
|
line-height 1.2
|
||||||
|
|
||||||
.note-for-keymap
|
.note-for-keymap
|
||||||
margin-left: 10px
|
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
|
|
||||||
.code-mirror
|
.code-mirror
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
.folderItem-left-key
|
.folderItem-left-key
|
||||||
color $ui-inactive-text-color
|
color $ui-inactive-text-color
|
||||||
font-size 10px
|
font-size 13px
|
||||||
margin 0 5px
|
margin 0 5px
|
||||||
border none
|
border none
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import styles from './InfoTab.styl'
|
|||||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||||
import store from 'browser/main/store'
|
import store from 'browser/main/store'
|
||||||
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
|
||||||
|
import _ from 'lodash'
|
||||||
|
|
||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const { shell, remote } = electron
|
const { shell, remote } = electron
|
||||||
@@ -36,8 +37,21 @@ class InfoTab extends React.Component {
|
|||||||
|
|
||||||
if (!newConfig.amaEnabled) {
|
if (!newConfig.amaEnabled) {
|
||||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA')
|
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA')
|
||||||
|
this.setState({
|
||||||
|
amaMessage: 'We hope we will gain your trust'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
amaMessage: 'Thank\'s for trust us'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_.debounce(() => {
|
||||||
|
this.setState({
|
||||||
|
amaMessage: ''
|
||||||
|
})
|
||||||
|
}, 3000)()
|
||||||
|
|
||||||
ConfigManager.set(newConfig)
|
ConfigManager.set(newConfig)
|
||||||
|
|
||||||
store.dispatch({
|
store.dispatch({
|
||||||
@@ -46,10 +60,49 @@ class InfoTab extends React.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
infoMessage () {
|
||||||
|
const { amaMessage } = this.state
|
||||||
|
return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div styleName='root'>
|
<div styleName='root'>
|
||||||
<div styleName='header'>Info</div>
|
|
||||||
|
<div styleName='header--sub'>Community</div>
|
||||||
|
<div styleName='top'>
|
||||||
|
<ul styleName='list'>
|
||||||
|
<li>
|
||||||
|
<a href='https://github.com/BoostIO/Boostnote/issues'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>GitHub</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='https://medium.com/boostnote'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>Blog</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='https://www.reddit.com/r/Boostnote/'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>Reddit</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='https://www.facebook.com/groups/boostnote'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>Facebook Group</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='https://twitter.com/boostnoteapp'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>Twitter</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div styleName='header--sub'>Info</div>
|
||||||
|
|
||||||
<div styleName='top'>
|
<div styleName='top'>
|
||||||
<div styleName='icon-space'>
|
<div styleName='icon-space'>
|
||||||
@@ -62,31 +115,17 @@ class InfoTab extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul styleName='list'>
|
<ul styleName='list'>
|
||||||
<li>
|
<li>
|
||||||
<a href='https://boostnote.io'
|
<a href='https://boostnote.io'
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>Website</a>
|
>Website</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a href='https://boostnote.paintory.com/'
|
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
|
||||||
>Boostnote Shop</a> : Products are shipped to all over the world 🌏
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href='https://opencollective.com/boostnoteio'
|
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
|
||||||
>Crowdfunding</a> : Thank you for your support 🎉
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href='https://github.com/BoostIO/Boostnote/issues'
|
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
|
||||||
>GitHub Issues</a> : We'd love to hear your feedback 🙌
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href='https://github.com/BoostIO/Boostnote/blob/master/docs/build.md'
|
<a href='https://github.com/BoostIO/Boostnote/blob/master/docs/build.md'
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>Development</a> : Development configurations for Boostnote 🚀
|
>Development</a> : Development configurations for Boostnote.
|
||||||
</li>
|
</li>
|
||||||
<li styleName='cc'>
|
<li styleName='cc'>
|
||||||
Copyright (C) 2017 Maisin&Co.
|
Copyright (C) 2017 Maisin&Co.
|
||||||
@@ -95,7 +134,9 @@ class InfoTab extends React.Component {
|
|||||||
License: GPL v3
|
License: GPL v3
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
|
||||||
|
<hr styleName='separate-line' />
|
||||||
|
|
||||||
<div styleName='policy'>Data collection policy</div>
|
<div styleName='policy'>Data collection policy</div>
|
||||||
<div>We collect only the number of DAU for Boostnote and **DO NOT collect** any detail information such as your note content.</div>
|
<div>We collect only the number of DAU for Boostnote and **DO NOT collect** any detail information such as your note content.</div>
|
||||||
<div>You can see how it works on <a href='https://github.com/BoostIO/Boostnote' onClick={(e) => this.handleLinkClick(e)}>GitHub</a>.</div>
|
<div>You can see how it works on <a href='https://github.com/BoostIO/Boostnote' onClick={(e) => this.handleLinkClick(e)}>GitHub</a>.</div>
|
||||||
@@ -107,6 +148,7 @@ class InfoTab extends React.Component {
|
|||||||
/>
|
/>
|
||||||
Enable to send analytics to our servers<br />
|
Enable to send analytics to our servers<br />
|
||||||
<button styleName='policy-submit' onClick={(e) => this.handleSaveButtonClick(e)}>Save</button>
|
<button styleName='policy-submit' onClick={(e) => this.handleSaveButtonClick(e)}>Save</button>
|
||||||
|
{this.infoMessage()}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,9 @@
|
|||||||
color #4E8EC6
|
color #4E8EC6
|
||||||
text-decoration none
|
text-decoration none
|
||||||
|
|
||||||
|
.separate-line
|
||||||
|
margin 40px 0
|
||||||
|
|
||||||
.policy
|
.policy
|
||||||
width 100%
|
width 100%
|
||||||
font-size 20px
|
font-size 20px
|
||||||
@@ -50,6 +53,10 @@
|
|||||||
.policy-submit
|
.policy-submit
|
||||||
margin-top 10px
|
margin-top 10px
|
||||||
|
|
||||||
|
.policy-confirm
|
||||||
|
margin-top 10px
|
||||||
|
font-size 12px
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
color alpha($tab--dark-text-color, 80%)
|
color alpha($tab--dark-text-color, 80%)
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ $tab--dark-text-color = #E5E5E5
|
|||||||
font-size 36px
|
font-size 36px
|
||||||
margin-bottom 60px
|
margin-bottom 60px
|
||||||
|
|
||||||
|
.header--sub
|
||||||
|
font-size 36px
|
||||||
|
margin-bottom 20px
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.header
|
.header
|
||||||
color $tab--dark-text-color
|
color $tab--dark-text-color
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ import CodeMirror from 'codemirror'
|
|||||||
|
|
||||||
const OSX = global.process.platform === 'darwin'
|
const OSX = global.process.platform === 'darwin'
|
||||||
|
|
||||||
|
import _ from 'lodash'
|
||||||
|
|
||||||
|
const electron = require('electron')
|
||||||
|
const ipc = electron.ipcRenderer
|
||||||
|
|
||||||
class UiTab extends React.Component {
|
class UiTab extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props)
|
super(props)
|
||||||
@@ -18,10 +23,32 @@ class UiTab extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount () {
|
||||||
|
this.handleSettingDone = () => {
|
||||||
|
this.setState({UiAlert: {
|
||||||
|
type: 'success',
|
||||||
|
message: 'Successfully applied!'
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
this.handleSettingError = (err) => {
|
||||||
|
this.setState({UiAlert: {
|
||||||
|
type: 'error',
|
||||||
|
message: err.message != null ? err.message : 'Error occurs!'
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
ipc.addListener('APP_SETTING_DONE', this.handleSettingDone)
|
||||||
|
ipc.addListener('APP_SETTING_ERROR', this.handleSettingError)
|
||||||
|
}
|
||||||
|
|
||||||
componentWillMount () {
|
componentWillMount () {
|
||||||
CodeMirror.autoLoadMode(ReactCodeMirror, 'javascript')
|
CodeMirror.autoLoadMode(ReactCodeMirror, 'javascript')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount () {
|
||||||
|
ipc.removeListener('APP_SETTING_DONE', this.handleSettingDone)
|
||||||
|
ipc.removeListener('APP_SETTING_ERROR', this.handleSettingError)
|
||||||
|
}
|
||||||
|
|
||||||
handleUIChange (e) {
|
handleUIChange (e) {
|
||||||
const { codemirrorTheme } = this.state
|
const { codemirrorTheme } = this.state
|
||||||
let checkHighLight = document.getElementById('checkHighLight')
|
let checkHighLight = document.getElementById('checkHighLight')
|
||||||
@@ -80,9 +107,25 @@ class UiTab extends React.Component {
|
|||||||
type: 'SET_UI',
|
type: 'SET_UI',
|
||||||
config: newConfig
|
config: newConfig
|
||||||
})
|
})
|
||||||
|
this.clearMessage()
|
||||||
|
}
|
||||||
|
|
||||||
|
clearMessage () {
|
||||||
|
_.debounce(() => {
|
||||||
|
this.setState({
|
||||||
|
UiAlert: null
|
||||||
|
})
|
||||||
|
}, 2000)()
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
let UiAlert = this.state.UiAlert
|
||||||
|
let UiAlertElement = UiAlert != null
|
||||||
|
? <p className={`alert ${UiAlert.type}`}>
|
||||||
|
{UiAlert.message}
|
||||||
|
</p>
|
||||||
|
: null
|
||||||
|
|
||||||
const themes = consts.THEMES
|
const themes = consts.THEMES
|
||||||
const { config, codemirrorTheme } = this.state
|
const { config, codemirrorTheme } = this.state
|
||||||
const codemirrorSampleCode = 'function iamHappy (happy) {\n\tif (happy) {\n\t console.log("I am Happy!")\n\t} else {\n\t console.log("I am not Happy!")\n\t}\n};'
|
const codemirrorSampleCode = 'function iamHappy (happy) {\n\tif (happy) {\n\t console.log("I am Happy!")\n\t} else {\n\t console.log("I am not Happy!")\n\t}\n};'
|
||||||
@@ -98,7 +141,8 @@ class UiTab extends React.Component {
|
|||||||
onChange={(e) => this.handleUIChange(e)}
|
onChange={(e) => this.handleUIChange(e)}
|
||||||
ref='uiTheme'
|
ref='uiTheme'
|
||||||
>
|
>
|
||||||
<option value='default'>Light</option>
|
<option value='default'>Default</option>
|
||||||
|
<option value='white'>White</option>
|
||||||
<option value='dark'>Dark</option>
|
<option value='dark'>Dark</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -228,7 +272,7 @@ class UiTab extends React.Component {
|
|||||||
<option value='vim'>vim</option>
|
<option value='vim'>vim</option>
|
||||||
<option value='emacs'>emacs</option>
|
<option value='emacs'>emacs</option>
|
||||||
</select>
|
</select>
|
||||||
<span styleName='note-for-keymap'>Please restart boostnote after you change the keymap</span>
|
<p styleName='note-for-keymap'>⚠️ Please restart boostnote after you change the keymap</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -285,12 +329,11 @@ class UiTab extends React.Component {
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='group-control'>
|
<div styleName='group-control'>
|
||||||
<button styleName='group-control-rightButton'
|
<button styleName='group-control-rightButton'
|
||||||
onClick={(e) => this.handleSaveUIClick(e)}
|
onClick={(e) => this.handleSaveUIClick(e)}>Save
|
||||||
>
|
|
||||||
Save
|
|
||||||
</button>
|
</button>
|
||||||
|
{UiAlertElement}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import StoragesTab from './StoragesTab'
|
|||||||
import ModalEscButton from 'browser/components/ModalEscButton'
|
import ModalEscButton from 'browser/components/ModalEscButton'
|
||||||
import CSSModules from 'browser/lib/CSSModules'
|
import CSSModules from 'browser/lib/CSSModules'
|
||||||
import styles from './PreferencesModal.styl'
|
import styles from './PreferencesModal.styl'
|
||||||
|
import RealtimeNotification from 'browser/components/RealtimeNotification'
|
||||||
|
|
||||||
class Preferences extends React.Component {
|
class Preferences extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
@@ -99,7 +100,7 @@ class Preferences extends React.Component {
|
|||||||
{target: 'STORAGES', label: 'Storages'},
|
{target: 'STORAGES', label: 'Storages'},
|
||||||
{target: 'HOTKEY', label: 'Hotkey'},
|
{target: 'HOTKEY', label: 'Hotkey'},
|
||||||
{target: 'UI', label: 'UI'},
|
{target: 'UI', label: 'UI'},
|
||||||
{target: 'INFO', label: 'Info'},
|
{target: 'INFO', label: 'Community / Info'},
|
||||||
{target: 'CROWDFUNDING', label: 'Crowdfunding'}
|
{target: 'CROWDFUNDING', label: 'Crowdfunding'}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ class Preferences extends React.Component {
|
|||||||
<div ref='content' styleName='content'>
|
<div ref='content' styleName='content'>
|
||||||
{content}
|
{content}
|
||||||
</div>
|
</div>
|
||||||
|
<RealtimeNotification />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ $danger-color = #c9302c
|
|||||||
$danger-lighten-color = lighten(#c9302c, 5%)
|
$danger-lighten-color = lighten(#c9302c, 5%)
|
||||||
|
|
||||||
// Layouts
|
// Layouts
|
||||||
$statusBar-height = 36px
|
$statusBar-height = 0px
|
||||||
$sideNav-width = 200px
|
$sideNav-width = 200px
|
||||||
$sideNav--folded-width = 44px
|
$sideNav--folded-width = 44px
|
||||||
$topBar-height = 60px
|
$topBar-height = 60px
|
||||||
@@ -15,18 +15,18 @@ $ui-text-color = #333333
|
|||||||
$ui-inactive-text-color = #939395
|
$ui-inactive-text-color = #939395
|
||||||
$ui-borderColor = #D1D1D1
|
$ui-borderColor = #D1D1D1
|
||||||
$ui-backgroundColor = #FFFFFF
|
$ui-backgroundColor = #FFFFFF
|
||||||
$ui-noteList-backgroundColor = #F3F3F3
|
$ui-noteList-backgroundColor = #FBFBFB
|
||||||
$ui-noteDetail-backgroundColor = #F4F4F4
|
$ui-noteDetail-backgroundColor = #FFFFFF
|
||||||
$ui-border = solid 1px $ui-borderColor
|
$ui-border = solid 1px $ui-borderColor
|
||||||
$ui-active-color = #6AA5E9
|
$ui-active-color = #6AA5E9
|
||||||
$ui-tag-backgroundColor = rgba(0, 0, 0, 0.3)
|
$ui-tag-backgroundColor = rgba(0, 0, 0, 0.3)
|
||||||
|
|
||||||
// UI Button
|
// UI Default Button
|
||||||
$ui-button-color = #939395
|
$ui-button-default-color = #FBFBFB
|
||||||
$ui-button--hover-backgroundColor = #D9D9D9
|
$ui-button-default--hover-backgroundColor = #2B8976
|
||||||
$ui-button--active-color = white
|
$ui-button-default--active-color = white
|
||||||
$ui-button--active-backgroundColor = #D9D9D9
|
$ui-button-default--active-backgroundColor = #2B8976
|
||||||
$ui-button--focus-borderColor = lighten(#369DCD, 25%)
|
$ui-button-default--focus-borderColor = lighten(#369DCD, 25%)
|
||||||
|
|
||||||
// UI Tooltip
|
// UI Tooltip
|
||||||
$ui-tooltip-text-color = white
|
$ui-tooltip-text-color = white
|
||||||
@@ -119,6 +119,22 @@ colorDangerButton()
|
|||||||
&:active:hover
|
&:active:hover
|
||||||
background-color $danger-button-background--active
|
background-color $danger-button-background--active
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SideNav
|
||||||
|
*/
|
||||||
|
SideNavFilter()
|
||||||
|
background-color $ui-button-default--active-backgroundColor
|
||||||
|
.counters
|
||||||
|
color $ui-button-default-color
|
||||||
|
.menu-button-label
|
||||||
|
color $ui-button-default-color
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button-default--hover-backgroundColor, 20%)
|
||||||
|
&:active, &:active:hover
|
||||||
|
background-color alpha($ui-button-default--hover-backgroundColor, 20%)
|
||||||
|
.menu-button-label
|
||||||
|
color #1EC38B
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nav
|
* Nav
|
||||||
*/
|
*/
|
||||||
@@ -129,13 +145,12 @@ navButtonColor()
|
|||||||
background-color transparent
|
background-color transparent
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--active-backgroundColor, 20%)
|
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
color $ui-text-color
|
color $ui-button-default-color
|
||||||
&:active, &:active:hover
|
&:active, &:active:hover
|
||||||
background-color $ui-button--active-backgroundColor
|
color $ui-button-default-color
|
||||||
color $ui-text-color
|
|
||||||
transition 0.15s
|
transition 0.15s
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* # Modal Stuff
|
* # Modal Stuff
|
||||||
* These will be moved lib/modal
|
* These will be moved lib/modal
|
||||||
@@ -159,23 +174,53 @@ modal()
|
|||||||
border-radius $modal-border-radius
|
border-radius $modal-border-radius
|
||||||
|
|
||||||
topBarButtonLight()
|
topBarButtonLight()
|
||||||
|
position absolute
|
||||||
width 34px
|
width 34px
|
||||||
height 34px
|
height 34px
|
||||||
border-radius 17px
|
border-radius 17px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
margin 15px 7px
|
|
||||||
border none
|
border none
|
||||||
color $ui-button-color
|
color alpha($ui-button-color, 0.4)
|
||||||
fill $ui-button-color
|
fill $ui-button-color
|
||||||
background-color transparent
|
background-color transparent
|
||||||
&:active
|
&:active
|
||||||
border-color $ui-button--active-backgroundColor
|
border-color $ui-button--active-backgroundColor
|
||||||
&:hover
|
&:hover
|
||||||
background-color alpha($ui-button--hover-backgroundColor, 60%)
|
transform scale(1.1)
|
||||||
|
transition 0.4s
|
||||||
|
color $ui-button-color
|
||||||
.control-lockButton-tooltip
|
.control-lockButton-tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
// Dark theme
|
// White theme
|
||||||
|
$ui-white-noteList-backgroundColor = #F3F3F3
|
||||||
|
$ui-white-noteDetail-backgroundColor = #F4F4F4
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nav
|
||||||
|
*/
|
||||||
|
navWhiteButtonColor()
|
||||||
|
border none
|
||||||
|
color $ui-button-color
|
||||||
|
background-color transparent
|
||||||
|
transition 0.15s
|
||||||
|
&:hover
|
||||||
|
background-color alpha($ui-button--active-backgroundColor, 20%)
|
||||||
|
transition 0.15s
|
||||||
|
color $ui-text-color
|
||||||
|
&:active, &:active:hover
|
||||||
|
background-color $ui-button--active-backgroundColor
|
||||||
|
color $ui-text-color
|
||||||
|
transition 0.15s
|
||||||
|
|
||||||
|
// UI Button
|
||||||
|
$ui-button-color = #939395
|
||||||
|
$ui-button--hover-backgroundColor = #F6F6F6
|
||||||
|
$ui-button--active-color = white
|
||||||
|
$ui-button--active-backgroundColor = #D9D9D9
|
||||||
|
$ui-button--focus-borderColor = lighten(#369DCD, 25%)
|
||||||
|
|
||||||
|
/******* Dark theme ********/
|
||||||
$ui-dark-active-color = #3A404C
|
$ui-dark-active-color = #3A404C
|
||||||
$ui-dark-borderColor = lighten(#21252B, 20%)
|
$ui-dark-borderColor = lighten(#21252B, 20%)
|
||||||
$ui-dark-backgroundColor = #1E2124
|
$ui-dark-backgroundColor = #1E2124
|
||||||
@@ -233,12 +278,10 @@ topBarButtonDark()
|
|||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
color $ui-dark-topbar-button-color
|
color $ui-dark-topbar-button-color
|
||||||
&:hover
|
&:hover
|
||||||
background-color $dark-default-button-background--hover
|
|
||||||
color $ui-dark-tooltip-text-color
|
color $ui-dark-tooltip-text-color
|
||||||
&:active
|
&:active
|
||||||
border-color $ui-dark-button--focus-borderColor
|
border-color $ui-dark-button--focus-borderColor
|
||||||
&:active:hover
|
&:active:hover
|
||||||
background-color $ui-dark-button--active-backgroundColor
|
|
||||||
color $ui-dark-tooltip-text-color
|
color $ui-dark-tooltip-text-color
|
||||||
&:focus
|
&:focus
|
||||||
border-color $ui-button--focus-borderColor
|
border-color $ui-button--focus-borderColor
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Build
|
# Build
|
||||||
This page is also available in [Japanese](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/build.md), [Korean](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/build.md), [Russain](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/build.md), and [Simplified Chinese](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/build.md).
|
This page is also available in [Japanese](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/build.md), [Korean](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/build.md), [Russain](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/build.md), [Simplified Chinese](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/build.md), and [French](https://github.com/BoostIO/Boostnote/blob/master/docs/fr/build.md).
|
||||||
|
|
||||||
## Environments
|
## Environments
|
||||||
* npm: 4.x
|
* npm: 4.x
|
||||||
@@ -53,3 +53,32 @@ grunt pre-build
|
|||||||
You will find the executable in the `dist` directory. Note, the auto updater won't work because the app isn't signed.
|
You will find the executable in the `dist` directory. Note, the auto updater won't work because the app isn't signed.
|
||||||
|
|
||||||
If you find it necessary, you can use codesign or authenticode with this executable.
|
If you find it necessary, you can use codesign or authenticode with this executable.
|
||||||
|
|
||||||
|
## Make own distribution packages (deb, rpm)
|
||||||
|
|
||||||
|
Distribution packages are created by exec `grunt build` on Linux platform (e.g. Ubuntu, Fedora).
|
||||||
|
|
||||||
|
> Note: You can create both `.deb` and `.rpm` in a single environment.
|
||||||
|
|
||||||
|
After installing the supported version of `node` and `npm`, install build dependency packages.
|
||||||
|
|
||||||
|
|
||||||
|
Ubuntu/Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo apt-get install -y rpm fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
Fedora:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo dnf install -y dpkg dpkg-dev rpm-build fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
Then execute `grunt build`.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ grunt build
|
||||||
|
```
|
||||||
|
|
||||||
|
You will find `.deb` and `.rpm` in the `dist` directory.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# How to debug Boostnote (Electron app)
|
# How to debug Boostnote (Electron app)
|
||||||
This page is also available in [Japanese](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/debug.md), [Korean](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/debug.md), [Russain](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/debug.md), and [Simplified Chinese](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/debug.md)
|
This page is also available in [Japanese](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/debug.md), [Korean](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/debug.md), [Russain](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/debug.md), [Simplified Chinese](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/debug.md), and [French](https://github.com/BoostIO/Boostnote/blob/master/docs/fr/debug.md).
|
||||||
|
|
||||||
Boostnote is an Electron app so it's based on Chromium; developers can use `Developer Tools` just like Google Chrome.
|
Boostnote is an Electron app so it's based on Chromium; developers can use `Developer Tools` just like Google Chrome.
|
||||||
|
|
||||||
|
|||||||
83
docs/fr/build.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# Build
|
||||||
|
Cette page est également disponible en [Japonais](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/build.md), [Coréen](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/build.md), [Russe](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/build.md), et en [Chinois Simplifié](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/build.md).
|
||||||
|
|
||||||
|
## Environnements
|
||||||
|
* npm: 4.x
|
||||||
|
* node: 7.x
|
||||||
|
|
||||||
|
Il est conseillé d'utiliser `npm v4.x` car `$ grunt pre-build` ne marche pas sur la `v5.x`.
|
||||||
|
|
||||||
|
## Développement
|
||||||
|
|
||||||
|
Webpack HMR est utilisé pour développer Boostnote.
|
||||||
|
En utilisant les commandes suivantes à la racine du projet, cela va démarrer Boostnote avec les configurations par défaut.
|
||||||
|
|
||||||
|
Installez les paquets requis à l'aide de `yarn`.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn
|
||||||
|
```
|
||||||
|
Build et start
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn run dev-start
|
||||||
|
```
|
||||||
|
|
||||||
|
Cette commande lance `yarn run webpack` et `yarn run hot` en parallèle. Cela revient au même que si on utilisait ces deux commandes dans 2 terminaux.
|
||||||
|
|
||||||
|
La commande `webpack` va surveiller les changements de code et les appliquer automatiquement.
|
||||||
|
|
||||||
|
Si l'erreur suivante apparait : `Failed to load resource: net::ERR_CONNECTION_REFUSED`, relancez Boostnote.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> ### Notice
|
||||||
|
> Il y a certains cas où vous voudrez relancer l'application manuellement.
|
||||||
|
> 1. Quand vous éditez la méthode constructeur dans un composant
|
||||||
|
> 2. Quand vous ajoutez une nouvelle classe css. (Comme pour 1: la classe est réécrite pour chaque composant. Le process intervient dans la méthode constructeur)
|
||||||
|
|
||||||
|
## Déploiement
|
||||||
|
|
||||||
|
On utilise Grunt pour le déploiement automatique.
|
||||||
|
Vous pouvez build le programme en utilisant `grunt`. Cependant, nous ne recommandons pas cette méthode car la task par défaut inclut codesign et authenticode.
|
||||||
|
|
||||||
|
Nous avons donc préparé un script séparé qui va rendre un fichier exécutable.
|
||||||
|
|
||||||
|
Le build ne fonctionne pas sur `npm v5.3.0`. Il faut donc utiliser `npm v5.2.0` quand vous faites le build.
|
||||||
|
|
||||||
|
```
|
||||||
|
grunt pre-build
|
||||||
|
```
|
||||||
|
Vous trouverez l'exécutable dans le dossier `dist`.
|
||||||
|
Note : l'auto updater ne marchera pas car l'application n'est pas signée.
|
||||||
|
|
||||||
|
Si vous trouvez ça nécessaire, vous pouvez utiliser codesign ou authenticode avec cet exécutable.
|
||||||
|
|
||||||
|
## Faire un paquet (deb, rpm)
|
||||||
|
|
||||||
|
Les paquets sont créés en exécutant `grunt build` sur une plateforme Linux (e.g. Ubuntu, Fedora).
|
||||||
|
|
||||||
|
> Note: Vous pouvez créer à la fois un `.deb` et un `.rpm` dans un seul et même environnement.
|
||||||
|
|
||||||
|
Après avoir installé la version supportée de `node` et de `npm`, installer les paquets de builds.
|
||||||
|
|
||||||
|
|
||||||
|
Ubuntu/Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo apt-get install -y rpm fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
Fedora:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo dnf install -y dpkg dpkg-dev rpm-build fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
Puis exécutez `grunt build`.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ grunt build
|
||||||
|
```
|
||||||
|
|
||||||
|
Vous trouverez le `.deb` et le `.rpm` dans le dossier `dist`.
|
||||||
22
docs/fr/debug.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Comment débugger Boostnote (Application Electron)
|
||||||
|
Cette page est également disponible en [Japonais](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/debug.md), [Coréen](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/debug.md), [Russe](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/debug.md), et en [Chinois Simplifié](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/debug.md)
|
||||||
|
|
||||||
|
Boostnote est une application Electron donc basée sur Chromium. Il est possible d'utiliser les `Developer Tools` comme dans Google Chrome.
|
||||||
|
|
||||||
|
Vous pouvez utiliser les `Developer Tools` de la façon suivante :
|
||||||
|

|
||||||
|
|
||||||
|
Les `Developer Tools` ressemblent à ça :
|
||||||
|

|
||||||
|
|
||||||
|
Quand une erreur arrive, les messages d'erreurs sont affichés dans la `console`.
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
Par exemple, vous pouvez utiliser le `debugger` pour placer un point d'arrêt dans le code de la façon suivante:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
C'est une façon comme une autre de faire, vous pouvez trouver une façon de débugger que vous trouverez plus adaptée.
|
||||||
|
|
||||||
|
## Références
|
||||||
|
* [Documentation officiel de Google Chrome sur le debugging](https://developer.chrome.com/devtools)
|
||||||
@@ -46,3 +46,32 @@ grunt pre-build
|
|||||||
実行ファイルは`dist`から見つかります。この場合、認証されていないため、自動アップデーターは使えません。
|
実行ファイルは`dist`から見つかります。この場合、認証されていないため、自動アップデーターは使えません。
|
||||||
|
|
||||||
必要であれば、この実行ファイルからCodesignやAuthenticodeなどの署名ができます。
|
必要であれば、この実行ファイルからCodesignやAuthenticodeなどの署名ができます。
|
||||||
|
|
||||||
|
## ディストリビューション用パッケージ (deb, rpm)
|
||||||
|
|
||||||
|
ディストリビューション用パッケージはLinuxプラットフォーム(Ubuntu や Fedora)上で `grunt build` を実行する事で作成されます。
|
||||||
|
|
||||||
|
> 一つの環境で `.deb` と `.rpm` の両方を作成する事が出来ます。
|
||||||
|
|
||||||
|
|
||||||
|
対応するバージョンの `node` と `npm` をインストールした後、必要なパッケージをインストールします。
|
||||||
|
|
||||||
|
Ubuntu/Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo apt-get install -y rpm fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
Fedora:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo dnf install -y dpkg dpkg-dev rpm-build fakeroot
|
||||||
|
```
|
||||||
|
|
||||||
|
`grunt build` を実行します。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ grunt build
|
||||||
|
```
|
||||||
|
|
||||||
|
`.deb` と `.rpm` は `dist` 配下に作成されます。
|
||||||
|
|||||||
22
gruntfile.js
@@ -50,6 +50,25 @@ module.exports = function (grunt) {
|
|||||||
src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'),
|
src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'),
|
||||||
dest: path.join(__dirname, 'dist')
|
dest: path.join(__dirname, 'dist')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'electron-installer-redhat': {
|
||||||
|
app: {
|
||||||
|
options: {
|
||||||
|
name: 'boostnote',
|
||||||
|
productName: 'Boostnote',
|
||||||
|
genericName: 'Boostnote',
|
||||||
|
productDescription: 'The opensource note app for developer.',
|
||||||
|
arch: 'x86_64',
|
||||||
|
categories: [
|
||||||
|
'Development',
|
||||||
|
'Utility'
|
||||||
|
],
|
||||||
|
icon: path.join(__dirname, 'resources/app.png'),
|
||||||
|
bin: 'Boostnote'
|
||||||
|
},
|
||||||
|
src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'),
|
||||||
|
dest: path.join(__dirname, 'dist')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +76,7 @@ module.exports = function (grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-electron-installer')
|
grunt.loadNpmTasks('grunt-electron-installer')
|
||||||
if (!WIN) {
|
if (!WIN) {
|
||||||
grunt.loadNpmTasks('grunt-electron-installer-debian')
|
grunt.loadNpmTasks('grunt-electron-installer-debian')
|
||||||
|
grunt.loadNpmTasks('grunt-electron-installer-redhat')
|
||||||
}
|
}
|
||||||
|
|
||||||
grunt.registerTask('compile', function () {
|
grunt.registerTask('compile', function () {
|
||||||
@@ -244,7 +264,7 @@ module.exports = function (grunt) {
|
|||||||
grunt.task.run(['compile', 'pack:osx', 'codesign', 'create-osx-installer', 'zip:osx'])
|
grunt.task.run(['compile', 'pack:osx', 'codesign', 'create-osx-installer', 'zip:osx'])
|
||||||
break
|
break
|
||||||
case 'linux':
|
case 'linux':
|
||||||
grunt.task.run(['compile', 'pack:linux', 'electron-installer-debian'])
|
grunt.task.run(['compile', 'pack:linux', 'electron-installer-debian', 'electron-installer-redhat'])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ const boost = macOS
|
|||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Preferences',
|
||||||
|
click () {
|
||||||
|
mainWindow.webContents.send('side:preferences')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Hide Boostnote',
|
label: 'Hide Boostnote',
|
||||||
accelerator: 'Command+H',
|
accelerator: 'Command+H',
|
||||||
@@ -37,7 +46,8 @@ const boost = macOS
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Quit Boostnote',
|
label: 'Quit Boostnote',
|
||||||
role: 'quit'
|
role: 'quit',
|
||||||
|
accelerator: 'CommandOrControl+Q'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -45,7 +55,17 @@ const boost = macOS
|
|||||||
label: 'Boostnote',
|
label: 'Boostnote',
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
role: 'quit'
|
label: 'Preferences',
|
||||||
|
click () {
|
||||||
|
mainWindow.webContents.send('side:preferences')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: 'quit',
|
||||||
|
accelerator: 'Control+Q'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -131,7 +151,15 @@ if (LINUX) {
|
|||||||
file.submenu.push({
|
file.submenu.push({
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
}, {
|
}, {
|
||||||
role: 'quit'
|
label: 'Preferences',
|
||||||
|
click () {
|
||||||
|
mainWindow.webContents.send('side:preferences')
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'separator'
|
||||||
|
}, {
|
||||||
|
role: 'quit',
|
||||||
|
accelerator: 'Control+Q'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon')
|
|||||||
mainWindow.on('close', function (e) {
|
mainWindow.on('close', function (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
mainWindow.minimize()
|
quitApp()
|
||||||
} else {
|
} else {
|
||||||
if (mainWindow.isFullScreen()) {
|
if (mainWindow.isFullScreen()) {
|
||||||
mainWindow.once('leave-full-screen', function () {
|
mainWindow.once('leave-full-screen', function () {
|
||||||
@@ -57,18 +57,27 @@ if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon')
|
|||||||
})
|
})
|
||||||
|
|
||||||
app.on('before-quit', function (e) {
|
app.on('before-quit', function (e) {
|
||||||
|
storeWindowSize()
|
||||||
|
mainWindow.removeAllListeners()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
app.on('window-all-closed', function () {
|
||||||
|
quitApp()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function quitApp () {
|
||||||
|
storeWindowSize()
|
||||||
|
app.quit()
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeWindowSize () {
|
||||||
try {
|
try {
|
||||||
config.set('windowsize', mainWindow.getBounds())
|
config.set('windowsize', mainWindow.getBounds())
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore any errors because an error occurs only on update
|
// ignore any errors because an error occurs only on update
|
||||||
// refs: https://github.com/BoostIO/Boostnote/issues/243
|
// refs: https://github.com/BoostIO/Boostnote/issues/243
|
||||||
}
|
}
|
||||||
mainWindow.removeAllListeners()
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
app.on('window-all-closed', function () {
|
|
||||||
app.quit()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
app.on('activate', function () {
|
app.on('activate', function () {
|
||||||
|
|||||||
@@ -53,6 +53,10 @@
|
|||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
.CodeEditor {
|
||||||
|
opacity: 1 !important;
|
||||||
|
pointer-events: auto !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -67,6 +71,7 @@
|
|||||||
<script src="../node_modules/codemirror/mode/meta.js"></script>
|
<script src="../node_modules/codemirror/mode/meta.js"></script>
|
||||||
<script src="../node_modules/codemirror/addon/mode/overlay.js"></script>
|
<script src="../node_modules/codemirror/addon/mode/overlay.js"></script>
|
||||||
<script src="../node_modules/codemirror/addon/mode/loadmode.js"></script>
|
<script src="../node_modules/codemirror/addon/mode/loadmode.js"></script>
|
||||||
|
<script src="../node_modules/codemirror/addon/mode/simple.js"></script>
|
||||||
<script src="../node_modules/codemirror/keymap/sublime.js"></script>
|
<script src="../node_modules/codemirror/keymap/sublime.js"></script>
|
||||||
<script src="../node_modules/codemirror/keymap/vim.js"></script>
|
<script src="../node_modules/codemirror/keymap/vim.js"></script>
|
||||||
<script src="../node_modules/codemirror/keymap/emacs.js"></script>
|
<script src="../node_modules/codemirror/keymap/emacs.js"></script>
|
||||||
|
|||||||
13
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"productName": "Boostnote",
|
"productName": "Boostnote",
|
||||||
"version": "0.8.16",
|
"version": "0.8.17",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"description": "Boostnote",
|
"description": "Boostnote",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"dev-start": "concurrently --kill-others \"npm run webpack\" \"npm run hot\""
|
"dev-start": "concurrently --kill-others \"npm run webpack\" \"npm run hot\""
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"electron-version": "1.2.8"
|
"electron-version": "1.6.15"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -67,12 +67,12 @@
|
|||||||
"markdown-it-emoji": "^1.1.1",
|
"markdown-it-emoji": "^1.1.1",
|
||||||
"markdown-it-footnote": "^3.0.0",
|
"markdown-it-footnote": "^3.0.0",
|
||||||
"markdown-it-imsize": "^2.0.1",
|
"markdown-it-imsize": "^2.0.1",
|
||||||
"markdown-it-kbd": "^1.1.0",
|
"markdown-it-kbd": "^1.1.1",
|
||||||
"markdown-it-multimd-table": "^2.0.1",
|
"markdown-it-multimd-table": "^2.0.1",
|
||||||
"markdown-it-named-headers": "^0.0.4",
|
"markdown-it-named-headers": "^0.0.4",
|
||||||
|
"markdown-it-plantuml": "^0.3.0",
|
||||||
"md5": "^2.0.0",
|
"md5": "^2.0.0",
|
||||||
"mdurl": "^1.0.1",
|
"mdurl": "^1.0.1",
|
||||||
"mixpanel": "^0.4.1",
|
|
||||||
"moment": "^2.10.3",
|
"moment": "^2.10.3",
|
||||||
"node-ipc": "^8.1.0",
|
"node-ipc": "^8.1.0",
|
||||||
"raphael": "^2.2.7",
|
"raphael": "^2.2.7",
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"devtron": "^1.1.0",
|
"devtron": "^1.1.0",
|
||||||
"dom-storage": "^2.0.2",
|
"dom-storage": "^2.0.2",
|
||||||
"electron-packager": "^6.0.0",
|
"electron-packager": "^6.0.0",
|
||||||
"electron-prebuilt": "^1.2.8",
|
"electron": "^1.6.15",
|
||||||
"eslint": "^3.13.1",
|
"eslint": "^3.13.1",
|
||||||
"eslint-config-standard": "^6.2.1",
|
"eslint-config-standard": "^6.2.1",
|
||||||
"eslint-config-standard-jsx": "^3.2.0",
|
"eslint-config-standard-jsx": "^3.2.0",
|
||||||
@@ -129,7 +129,8 @@
|
|||||||
"webpack-dev-server": "^1.12.0"
|
"webpack-dev-server": "^1.12.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"grunt-electron-installer-debian": "^0.2.0"
|
"grunt-electron-installer-debian": "^0.2.0",
|
||||||
|
"grunt-electron-installer-redhat": "^0.3.1"
|
||||||
},
|
},
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"ava": {
|
"ava": {
|
||||||
|
|||||||
25
readme.md
@@ -1,12 +1,12 @@
|
|||||||
New:zap:
|
New:zap:
|
||||||
|
|
||||||
[Android and iOS apps](https://github.com/BoostIO/Boostnote-mobile) are released!
|
Open sourcing our [Android and iOS apps](https://github.com/BoostIO/Boostnote-mobile)!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<h4 align="center">Note-taking app for programmers. </h4>
|
<h4 align="center">Note-taking app for programmers. </h4>
|
||||||
<h5 align="center">Apps available for Mac, Windows, Linux, Android and iOS!</h5>
|
<h5 align="center">Apps available for Mac, Windows, Linux, Android and iOS.</h5>
|
||||||
<h5 align="center">Built with Electron, React + Redux, Webpack and CSSModules</h5>
|
<h5 align="center">Built with Electron, React + Redux, Webpack and CSSModules.</h5>
|
||||||
|
|
||||||
[](https://travis-ci.org/BoostIO/Boostnote)
|
[](https://travis-ci.org/BoostIO/Boostnote)
|
||||||
|
|
||||||
@@ -14,21 +14,26 @@ New:zap:
|
|||||||
- [Rokt33r](https://github.com/rokt33r)
|
- [Rokt33r](https://github.com/rokt33r)
|
||||||
- [sota1235](https://github.com/sota1235)
|
- [sota1235](https://github.com/sota1235)
|
||||||
- [Kohei TAKATA](https://github.com/kohei-takata)
|
- [Kohei TAKATA](https://github.com/kohei-takata)
|
||||||
- [asmsuechan](https://github.com/asmsuechan)
|
- [Sosuke](https://github.com/sosukesuzuki)
|
||||||
- [Kazu Yokomizo](https://github.com/kazup01)
|
- [Kazz](https://github.com/kazup01)
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
[Great contributors](https://github.com/BoostIO/Boostnote/graphs/contributors) :tada:
|
Thank you to all the people who already contributed to Boostnote!
|
||||||
|
|
||||||
|
<a href="https://github.com/BoostIO/Boostnote/graphs/contributors"><img src="https://opencollective.com/boostnoteio/contributors.svg?width=890" /></a>
|
||||||
|
|
||||||
|
## Supporting Boostnote
|
||||||
|
Boostnote is an open source project. It's an independent project with its ongoing development made possible entirely thanks to the support by these awesome [backers](https://github.com/BoostIO/Boostnote/blob/master/Backers.md). If you'd like to join them, please consider:
|
||||||
|
- [Become a backer or sponsor on Open Collective.](https://opencollective.com/boostnoteio)
|
||||||
|
|
||||||
## Slack Group
|
## Slack Group
|
||||||
Let's talk about Boostnote! <br>
|
Let's talk about Boostnote! <br>
|
||||||
[Join us](https://join.slack.com/t/boostnote-group/shared_invite/enQtMjU5NTUwNjcwMjkyLWI3N2I1YWIzNWRlZDZmZjVlYzRiNDc1YTcxZWNmY2UyZjc3MTQwMDUxMzAxZjg0NjNmZmIwNDFhMDkwZDlmZDc)
|
[Join us](https://join.slack.com/t/boostnote-group/shared_invite/enQtMjc2MDM0MDEyODk2LThlZDlhYmYwMjdkMmJjMGM5MGFiMGJmNzk5ZTdhNzFhMmNmMDFlY2M2YTE1MTZkOThiOGZmNTI3YzJiOTBhMTQ)
|
||||||
|
|
||||||
## More Information
|
## More Information
|
||||||
* [Website](https://boostnote.io)
|
* [Website](https://boostnote.io)
|
||||||
* [10hz](https://boostnote.io/team/) : Boostnote for the creative hacker teams. Share your markdown notes and snippets instantly with your team. **We will release it at October!** 🏃💨
|
* [Subscribe to the Newsletter](https://boostnote.io/#community): Get updates on Boostnote progress. No spam, ever :)
|
||||||
* [Support us via OpenCollective](https://opencollective.com/boostnoteio) : Thank you for your support 🎉
|
* [Development](https://github.com/BoostIO/Boostnote/blob/master/docs/build.md): Development configurations for Boostnote.
|
||||||
* [Development](https://github.com/BoostIO/Boostnote/blob/master/docs/build.md) : Development configurations for Boostnote 🚀
|
|
||||||
* Copyright (C) 2017 Maisin&Co.
|
* Copyright (C) 2017 Maisin&Co.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
BIN
resources/fonts/Lato-Black.ttf
Normal file
BIN
resources/fonts/Lato-Black.woff
Normal file
BIN
resources/fonts/Lato-Black.woff2
Normal file
18
resources/icon/icon-all-active.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="14px" height="18px" viewBox="0 0 14 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-all</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-112.000000, -289.000000)">
|
||||||
|
<g id="icon-all" transform="translate(109.000000, 288.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="book" transform="translate(4.000000, 2.500000)" stroke="#1EC38B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M0,13.125 C0,12.0894661 0.839466094,11.25 1.875,11.25 L12,11.25" id="Shape"></path>
|
||||||
|
<path d="M1.875,0 L12,0 L12,15 L1.875,15 C0.839466094,15 0,14.1605339 0,13.125 L0,1.875 C0,0.839466094 0.839466094,3.33066907e-16 1.875,0 Z" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
18
resources/icon/icon-all.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="14px" height="18px" viewBox="0 0 14 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-all</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-86.000000, -289.000000)">
|
||||||
|
<g id="icon-all" transform="translate(83.000000, 288.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="book" transform="translate(4.000000, 2.500000)" stroke="#8A8C8D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M0,13.125 C0,12.0894661 0.839466094,11.25 1.875,11.25 L12,11.25" id="Shape"></path>
|
||||||
|
<path d="M1.875,0 L12,0 L12,15 L1.875,15 C0.839466094,15 0,14.1605339 0,13.125 L0,1.875 C0,0.839466094 0.839466094,3.33066907e-16 1.875,0 Z" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
20
resources/icon/icon-column-list.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="14px" height="10px" viewBox="0 0 14 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-column-list</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-461.000000, -199.000000)">
|
||||||
|
<g id="icon-column-list" transform="translate(458.000000, 194.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="align-justify" transform="translate(4.000000, 6.000000)" stroke="#8A8C8D" stroke-width="1.33333333" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M12,2.76923077 L0,2.76923077" id="Shape"></path>
|
||||||
|
<path d="M12,0 L0,0" id="Shape"></path>
|
||||||
|
<path d="M12,5.53846154 L0,5.53846154" id="Shape"></path>
|
||||||
|
<path d="M12,8.30769231 L0,8.30769231" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
18
resources/icon/icon-column.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-column</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-440.000000, -198.000000)">
|
||||||
|
<g id="icon-column" transform="translate(436.000000, 194.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="server" transform="translate(5.000000, 5.000000)" stroke="#8A8C8D" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<rect id="Rectangle-path" x="0" y="0" width="10" height="4" rx="1"></rect>
|
||||||
|
<rect id="Rectangle-path" x="0" y="6" width="10" height="4" rx="1"></rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
17
resources/icon/icon-down.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="10px" height="6px" viewBox="0 0 10 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-down</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-191.000000, -325.000000)">
|
||||||
|
<g id="icon-down" transform="translate(186.000000, 318.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="chevron-right" transform="translate(10.000000, 10.000000) rotate(90.000000) translate(-10.000000, -10.000000) translate(8.000000, 6.000000)" stroke-linecap="round" stroke-width="1.33333333" stroke="#8A8C8D" stroke-linejoin="round">
|
||||||
|
<polyline id="Shape" points="0 8 4 4 0 0"></polyline>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
19
resources/icon/icon-info-24.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-info-24</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-1431.000000, -144.000000)">
|
||||||
|
<g id="icon-info-24" transform="translate(1429.000000, 142.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#BFBFBF" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||||
|
<g id="info" transform="translate(3.000000, 3.000000)">
|
||||||
|
<circle id="Oval" stroke="#8A8C8D" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" cx="9" cy="9" r="9"></circle>
|
||||||
|
<path d="M9,14.1428571 L9,9" id="Shape" stroke="#8A8C8D" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||||
|
<circle id="Oval-2" fill="#8A8C8D" cx="9" cy="5.14285714" r="1.28571429"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
19
resources/icon/icon-info.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-info</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-1440.000000, -152.000000)">
|
||||||
|
<g id="icon-info" transform="translate(1439.000000, 151.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#BFBFBF" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="info" transform="translate(2.000000, 2.000000)">
|
||||||
|
<circle id="Oval" stroke="#8A8C8D" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" cx="8" cy="8" r="8"></circle>
|
||||||
|
<path d="M8,12.5714286 L8,8" id="Shape" stroke="#8A8C8D" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||||
|
<circle id="Oval-2" fill="#8A8C8D" cx="8" cy="4.57142857" r="1.14285714"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
20
resources/icon/icon-list-active.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="14px" viewBox="0 0 20 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-list-active</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-84.000000, -175.000000)">
|
||||||
|
<g id="icon-list-active" transform="translate(84.000000, 172.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="align-left" transform="translate(1.000000, 4.000000)" stroke="#1EC38B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M14,4 L0,4" id="Shape"></path>
|
||||||
|
<path d="M18,0 L0,0" id="Shape"></path>
|
||||||
|
<path d="M18,8 L0,8" id="Shape"></path>
|
||||||
|
<path d="M14,12 L0,12" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
20
resources/icon/icon-list.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="14px" viewBox="0 0 20 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-list</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-84.000000, -155.000000)">
|
||||||
|
<g id="icon-list" transform="translate(84.000000, 152.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="align-left" transform="translate(1.000000, 4.000000)" stroke="#8A8C8D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M14,4 L0,4" id="Shape"></path>
|
||||||
|
<path d="M18,0 L0,0" id="Shape"></path>
|
||||||
|
<path d="M18,8 L0,8" id="Shape"></path>
|
||||||
|
<path d="M14,12 L0,12" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
18
resources/icon/icon-lock.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="16px" height="18px" viewBox="0 0 16 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-lock</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-1463.000000, -309.000000)">
|
||||||
|
<g id="icon-lock" transform="translate(1461.000000, 308.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="lock" transform="translate(3.000000, 2.000000)" stroke="#1EC38B" stroke-width="1.55555556" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<rect id="Rectangle-path" x="0" y="7.2" width="14" height="8.8" rx="1.55555556"></rect>
|
||||||
|
<path d="M3.11111111,7.2 L3.11111111,4 C3.11111111,1.790861 4.85222597,1.24344979e-15 7,8.8817842e-16 C9.14777403,1.77635684e-16 10.8888889,1.790861 10.8888889,4 L10.8888889,7.2" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
18
resources/icon/icon-newnote.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-newnote3</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-448.000000, -153.000000)">
|
||||||
|
<g id="icon-newnote3" transform="translate(446.000000, 151.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#BFBFBF" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="edit" transform="translate(3.000000, 3.000000)" stroke="#8A8C8D" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M12.6,8.862 L12.6,12.6 C12.6,13.3731986 11.9731986,14 11.2,14 L1.4,14 C0.62680135,14 0,13.3731986 0,12.6 L0,2.8 C-1.55431223e-16,2.02680135 0.62680135,1.4 1.4,1.4 L5.138,1.4" id="Shape"></path>
|
||||||
|
<polygon id="Shape" points="11.2 0 14 2.8 7 9.8 4.2 9.8 4.2 7"></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
20
resources/icon/icon-note-code.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-note-code</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-344.000000, -267.000000)">
|
||||||
|
<g id="icon-note-code" transform="translate(340.000000, 265.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#BFBFBF" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="file-code" transform="translate(5.000000, 3.500000)">
|
||||||
|
<path d="M6.25,0 L1.25,0 C0.559644063,0 0,0.582029825 0,1.3 L0,11.7 C0,12.4179702 0.559644063,13 1.25,13 L8.75,13 C9.44035594,13 10,12.4179702 10,11.7 L10,3.9 L6.25,0 Z" id="Shape" stroke="#8A8C8D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||||
|
<polyline id="Shape" stroke="#8A8C8D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" points="6.25 0 6.25 3.9 10 3.9"></polyline>
|
||||||
|
<path d="M6.62135922,7.5 L5.34466019,8.60504202 L5.34466019,8.60504202 C5.17990298,8.747647 5.16194505,8.9968133 5.30455003,9.16157051 C5.31694041,9.17588561 5.3303451,9.1892903 5.34466019,9.20168067 L5.41240363,9.26031575 L5.41240363,9.26031575 C5.57137564,9.39791337 5.80726514,9.39791337 5.96623715,9.26031575 L7.63036872,7.81993296 L7.63036872,7.81993296 C7.80706281,7.66699605 7.82632182,7.39977733 7.67338492,7.22308324 C7.66009684,7.207731 7.64572097,7.19335512 7.63036872,7.18006704 L5.96623715,5.73968425 L5.96623715,5.73968425 C5.80726514,5.60208663 5.57137564,5.60208663 5.41240363,5.73968425 L5.34466019,5.79831933 L5.34466019,5.79831933 C5.17990298,5.94092431 5.16194505,6.19009061 5.30455003,6.35484782 C5.31694041,6.36916292 5.3303451,6.38256761 5.34466019,6.39495798 L6.62135922,7.5 Z" id="Shape" fill="#8A8C8D" fill-rule="nonzero"></path>
|
||||||
|
<path d="M2.36963128,7.81993296 L4.03376285,9.26031575 L4.03376285,9.26031575 C4.19273486,9.39791337 4.42862436,9.39791337 4.58759637,9.26031575 L4.65533981,9.20168067 L4.65533981,9.20168067 C4.82009702,9.05907569 4.83805495,8.80990939 4.69544997,8.64515218 C4.68305959,8.63083708 4.6696549,8.61743239 4.65533981,8.60504202 L3.37864078,7.5 L4.65533981,6.39495798 L4.65533981,6.39495798 C4.82009702,6.252353 4.83805495,6.0031867 4.69544997,5.83842949 C4.68305959,5.82411439 4.6696549,5.8107097 4.65533981,5.79831933 L4.58759637,5.73968425 L4.58759637,5.73968425 C4.42862436,5.60208663 4.19273486,5.60208663 4.03376285,5.73968425 L2.36963128,7.18006704 L2.36963128,7.18006704 C2.19293719,7.33300395 2.17367818,7.60022267 2.32661508,7.77691676 C2.33990316,7.792269 2.35427903,7.80664488 2.36963128,7.81993296 Z" id="Shape" fill="#8A8C8D" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
21
resources/icon/icon-note-text.svg
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-note-text</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-323.000000, -266.000000)">
|
||||||
|
<g id="icon-note-text" transform="translate(319.000000, 264.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#BFBFBF" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="file-text" transform="translate(5.000000, 3.500000)" stroke="#8A8C8D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M6.25,0 L1.25,0 C0.559644063,0 0,0.582029825 0,1.3 L0,11.7 C0,12.4179702 0.559644063,13 1.25,13 L8.75,13 C9.44035594,13 10,12.4179702 10,11.7 L10,3.9 L6.25,0 Z" id="Shape"></path>
|
||||||
|
<polyline id="Shape" points="6.25 0 6.25 3.9 10 3.9"></polyline>
|
||||||
|
<path d="M7.5,7.15 L2.5,7.15" id="Shape"></path>
|
||||||
|
<path d="M7.5,9.75 L2.5,9.75" id="Shape"></path>
|
||||||
|
<polyline id="Shape" points="3.75 4.55 3.125 4.55 2.5 4.55"></polyline>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
18
resources/icon/icon-plus.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-plus</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-242.000000, -318.000000)">
|
||||||
|
<g id="icon-plus" transform="translate(239.000000, 315.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="plus" transform="translate(4.000000, 4.000000)" stroke="#8A8C8D" stroke-width="1.71428571" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M6,0 L6,12" id="Shape"></path>
|
||||||
|
<path d="M0,6 L12,6" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
17
resources/icon/icon-right.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="6px" height="10px" viewBox="0 0 6 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-right</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-169.000000, -323.000000)">
|
||||||
|
<g id="icon-right" transform="translate(162.000000, 318.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="chevron-right" transform="translate(8.000000, 6.000000)" stroke-linecap="round" stroke-width="1.33333333" stroke="#8A8C8D" stroke-linejoin="round">
|
||||||
|
<polyline id="Shape" points="0 8 4 4 0 0"></polyline>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1006 B |
19
resources/icon/icon-setting.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="18px" height="6px" viewBox="0 0 18 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-setting</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-234.000000, -159.000000)">
|
||||||
|
<g id="icon-setting" transform="translate(233.000000, 152.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<g id="more-horizontal" transform="translate(2.000000, 8.500000)" stroke="#8A8C8D" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<ellipse id="Oval" cx="8" cy="1.5" rx="1.6" ry="1.5"></ellipse>
|
||||||
|
<ellipse id="Oval" cx="14.4" cy="1.5" rx="1.6" ry="1.5"></ellipse>
|
||||||
|
<ellipse id="Oval" cx="1.6" cy="1.5" rx="1.6" ry="1.5"></ellipse>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
18
resources/icon/icon-sidebar-24.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>icon-sidebar-24</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Artboard" transform="translate(-1400.000000, -219.000000)">
|
||||||
|
<g id="icon-sidebar-24" transform="translate(1397.000000, 216.000000)">
|
||||||
|
<rect id="Rectangle-7" fill="#D8D8D8" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||||
|
<g id="sidebar" transform="translate(4.000000, 4.000000)" stroke="#8A8C8D" stroke-width="1.77777778" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<rect id="Rectangle-path" x="0" y="0" width="16" height="16" rx="1.77777778"></rect>
|
||||||
|
<path d="M5.33333333,0 L5.33333333,16" id="Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |