1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 18:26:26 +00:00

Compare commits

..

1216 Commits

Author SHA1 Message Date
Kohei TAKATA
414e0dbc05 Merge pull request #1172 from BoostIO/feature-v0-8-17
v0.8.17
2017-11-25 14:41:20 +09:00
Kohei TAKATA
081a3da9e1 v0.8.17 2017-11-25 11:22:52 +09:00
Kazz Yokomizo
626175b2b8 Merge pull request #1165 from BoostIO/fix-infopanel-position
Fix infopanel in note detail position
2017-11-24 17:41:59 +09:00
Kazu Yokomizo
54db0c718a Fix infopanel in note detail position 2017-11-24 17:38:03 +09:00
Kazz Yokomizo
ae9175d1b1 Merge pull request #1164 from BoostIO/fix-ci-error
Fix ci error
2017-11-24 12:53:10 +09:00
Kazu Yokomizo
16e1f0f882 Fix zoom icon color 2017-11-24 12:43:04 +09:00
Kazu Yokomizo
179b830d14 Fix layout at statusbar in snippet note detail 2017-11-24 12:31:45 +09:00
Kazu Yokomizo
aeb27f7bff Fix font color in note detail 2017-11-24 12:26:39 +09:00
Kazu Yokomizo
0b2b89da0f Fix CI error 2017-11-24 12:26:28 +09:00
Kazz Yokomizo
804991b300 Merge pull request #1161 from ytk141/update-note-design
Update note design
2017-11-24 12:17:32 +09:00
Yutaka Ishii
529f271e07 style update 2017-11-24 12:04:11 +09:00
Yutaka Ishii
402d577ce0 update status bar style 2017-11-23 21:52:49 +09:00
Yutaka Ishii
4bb28a358e improve search folder 2017-11-23 21:52:49 +09:00
Yutaka Ishii
200a9275d2 add font Black 2017-11-23 21:52:49 +09:00
Yutaka Ishii
9cb086cbd9 update tag and folder 2017-11-23 21:52:49 +09:00
Kazz Yokomizo
3a836aaf34 Merge pull request #1160 from BoostIO/update-readme
Update readme
2017-11-23 19:10:20 +09:00
Kazz Yokomizo
e14a6f2374 Update readme 2017-11-23 19:01:13 +09:00
Kazz Yokomizo
28794bff79 Merge pull request #1159 from BoostIO/update-top-image
Update top image
2017-11-23 17:57:18 +09:00
Kazu Yokomizo
ecc9443c9a Update top image 2017-11-23 17:32:55 +09:00
Kazz Yokomizo
a1c499c026 Merge pull request #1156 from yamash723/update-markdown-it-kbd
Updated markdown-it-kbd to 1.1.1 from 1.1.0
2017-11-22 16:31:27 +09:00
yamash723
4e8321268c Updated markdown-it-kbd to 1.1.1 from 1.1.0 2017-11-22 16:13:09 +09:00
Kazz Yokomizo
8510325732 Merge pull request #1154 from romainwn/master
Add fr /docs translations
2017-11-21 21:39:56 +09:00
Unknown
49102be894 Add fr /docs translations 2017-11-21 12:43:51 +01:00
Kazz Yokomizo
1a97488dd7 Merge pull request #1153 from BoostIO/improve-intial-content
Improve the initial content
2017-11-21 20:15:46 +09:00
Kazu Yokomizo
b90c7e5318 Improve the initial content 2017-11-21 19:54:07 +09:00
Kazz Yokomizo
ece1e37c16 Merge pull request #1152 from BoostIO/fix-layout-at-noteitem
Fix layout at note item
2017-11-21 18:06:13 +09:00
Kazu Yokomizo
3a6e3f5cae Fix layout at note item 2017-11-21 17:55:43 +09:00
Kazz Yokomizo
8e502eec80 Merge pull request #1151 from BoostIO/fix-finder-ui
Fix finder UI
2017-11-21 15:04:16 +09:00
Kazu Yokomizo
042ebe8316 Fix finder UI 2017-11-21 13:37:25 +09:00
Kazz Yokomizo
eee47b1f76 Merge pull request #1150 from BoostIO/fix-statusbar-layout
Fix status bar layout
2017-11-21 13:26:54 +09:00
Kazu Yokomizo
7978704f1b Fix status bar layout 2017-11-21 13:22:16 +09:00
Kazz Yokomizo
9392ac438c Merge pull request #1149 from BoostIO/fix-windows-scrolling-bug
Fix windows scrolling bug
2017-11-21 12:40:10 +09:00
Kazu Yokomizo
cbcfb57e35 Fix windows scrolling bug 2017-11-21 12:20:53 +09:00
Kazz Yokomizo
29fa512a90 Merge pull request #1143 from BoostIO/fix-star-position
Fix star position at note list
2017-11-18 18:11:13 +09:00
Kazu Yokomizo
059d1fb4f2 Fix star position at note list 2017-11-18 17:36:08 +09:00
Kazz Yokomizo
4d3a538213 Merge pull request #1142 from BoostIO/fix-button-ux-when-toggle
Fix button layout when hover and active
2017-11-18 16:52:33 +09:00
Kazu Yokomizo
108a0db799 Fix button layout when hover and active 2017-11-18 16:21:31 +09:00
Kazz Yokomizo
04f632570d Merge pull request #1141 from BoostIO/fix-button-toggle-ux
Fix toggle info button ux at note detail
2017-11-18 16:13:47 +09:00
Kazz Yokomizo
92b919da6c Merge pull request #1140 from BoostIO/six-button-in-trash
Fix button layout in Trash
2017-11-18 16:09:10 +09:00
Kazu Yokomizo
4f0f611e52 Fix toggle info button ux at note detail 2017-11-18 16:02:45 +09:00
Kazu Yokomizo
90f7cf0996 Fix button layout in Trash 2017-11-18 15:39:00 +09:00
Kazz Yokomizo
ce43e80bdf Merge pull request #1139 from BoostIO/fix-ci
Fix ci
2017-11-18 14:50:35 +09:00
Kazu Yokomizo
c397752b7a Fix at InfoButton 2017-11-18 14:47:39 +09:00
Kazu Yokomizo
2470364571 Fix at StatusBar 2017-11-18 14:44:06 +09:00
Kazu Yokomizo
cab122ba8b Fix at StorageItem 2017-11-18 14:43:38 +09:00
Kazu Yokomizo
56b01b5a85 Fix at SideNav 2017-11-18 14:42:57 +09:00
Kazu Yokomizo
cbcc9fb411 Fix at NoteList 2017-11-18 14:42:31 +09:00
Kazu Yokomizo
5bbc60d48a Fix at NewNoteButton 2017-11-18 14:41:51 +09:00
Kazu Yokomizo
8fb8aab7b8 Fix at TrashButton 2017-11-18 14:41:15 +09:00
Kazu Yokomizo
5b76216a64 Fix at SnippetNoteDetail 2017-11-18 14:40:41 +09:00
Kazu Yokomizo
7f5e372bdc Fix at markdown note detail 2017-11-18 14:40:11 +09:00
Kazu Yokomizo
01913a9a40 Fix at Infobutton 2017-11-18 14:39:08 +09:00
Kazu Yokomizo
62f9fcf171 Fix CI error at SideNavFilter 2017-11-18 14:35:37 +09:00
Kazz Yokomizo
34c667f6b2 Merge pull request #1138 from ytk141/design-icon
Icon Design Update
2017-11-18 14:24:38 +09:00
Yutaka Ishii
7a6de387e3 delete boostnote json 2017-11-18 13:55:24 +09:00
Yutaka Ishii
b6efbcedef design update 2 2017-11-18 13:46:46 +09:00
Kazz Yokomizo
3c70b2e5a0 Merge pull request #1136 from kazuhisya/doc-for-dist-pkgs
[doc] Add how to creating distribution packages(deb, rpm)
2017-11-17 18:45:09 +09:00
Kazuhisa Hara
62e108d460 [doc] Add how to creating distribution packages (jp)
Signed-off-by: Kazuhisa Hara <kazuhisya@gmail.com>
2017-11-17 17:28:11 +09:00
Kazuhisa Hara
b7f426b03f [doc] Add how to creating distribution packages
Signed-off-by: Kazuhisa Hara <kazuhisya@gmail.com>
2017-11-17 17:22:37 +09:00
Kazz Yokomizo
5ca13b70aa Merge pull request #1135 from BoostIO/add-information-tab
Add facebook group url to infotab
2017-11-17 13:30:37 +09:00
Kazu Yokomizo
4644d107c6 Add facebook group url to infotab 2017-11-17 13:25:41 +09:00
Kazz Yokomizo
06013b2a6a Merge pull request #1126 from yamash723/add-simple-addon
Add simple addon for CodeMirror
2017-11-17 01:25:22 +09:00
Kazz Yokomizo
7380fc8500 Merge pull request #1133 from BoostIO/add-Community-on-tab
Add community on tab in preferences
2017-11-16 22:41:52 +09:00
Kazu Yokomizo
81b550e66c Add community on tab in preferences 2017-11-16 21:14:07 +09:00
Kazz Yokomizo
f5972c273b Merge pull request #266 from kazuhisya/add-rpm-support
add rpm support
2017-11-16 11:23:53 +09:00
Kohei TAKATA
c259ec2bed Merge pull request #1119 from mslourens/paste-image
replace selection with pasted image
2017-11-15 23:57:38 +09:00
Kazz Yokomizo
86a04b0dcb Merge pull request #1127 from yamash723/modify-indent-adjustment
Add task item to indent adjustment target for list
2017-11-15 15:00:17 +09:00
Kazz Yokomizo
8b7c0c957c Merge pull request #1125 from BoostIO/fix-ci-error
Fix CI error
2017-11-15 14:18:56 +09:00
Kazu Yokomizo
0cfe971a48 Fix CI error 2017-11-15 13:48:04 +09:00
Kazz Yokomizo
8884db858c Merge pull request #1041 from machellerogden/master
make ZZ work in vim mode
2017-11-15 13:46:50 +09:00
yamash723
0fe9dd4fbb Add simple addon for CodeMirror 2017-11-15 13:10:55 +09:00
yamash723
ae57e99173 Add task item to indent adjustment target for list 2017-11-15 11:31:40 +09:00
Kazz Yokomizo
c238e1b5cb Merge pull request #1121 from BoostIO/fix-note-detail-layout
Fix note detail layout
2017-11-14 21:36:13 +09:00
Kazu Yokomizo
55ef998c55 Fix create sub snippet button color 2017-11-14 21:27:02 +09:00
Maurits Lourens
166815ccbf removed unused code 2017-11-14 13:18:36 +01:00
Kazu Yokomizo
34a16298d4 Change markdown lock icon 2017-11-14 21:15:00 +09:00
Kohei TAKATA
1613e72d47 Merge pull request #1105 from yosmoc/latest_electron
electron-prebuilt is obsolete. use latest electron instead
2017-11-14 21:02:48 +09:00
Kazu Yokomizo
e933ad89dc Fix star button at note detail 2017-11-14 21:00:10 +09:00
Kazu Yokomizo
148fb25a15 Fix note list layout 2017-11-14 20:54:31 +09:00
Kohei TAKATA
fe0544dbc9 Merge pull request #1114 from levrik/remove-mixpanel
Removed mixpanel
2017-11-14 20:46:10 +09:00
Kazu Yokomizo
0aaea28e74 Fix note detail layout 2017-11-14 20:46:07 +09:00
Kazu Yokomizo
f4764afbf4 Appear the todo percentage bar 2017-11-14 20:45:53 +09:00
Kazu Yokomizo
2a2b662a6f Fix right buttons layout in note detail 2017-11-14 20:28:51 +09:00
Kazu Yokomizo
deade1f9f8 Add trash button in trash 2017-11-14 20:26:36 +09:00
Kazu Yokomizo
2b73c17cca Fix CI 2017-11-14 18:51:50 +09:00
Kazu Yokomizo
369f8b6093 Fix CI 2017-11-14 18:40:38 +09:00
Kazu Yokomizo
5391ca161d Fix top part of note detail 2017-11-14 18:38:05 +09:00
Kazu Yokomizo
5b224d3b54 Fix note detail layout 2017-11-14 18:13:37 +09:00
Maurits Lourens
dad6a93944 replace selection with pasted image 2017-11-13 22:44:18 +01:00
Kazz Yokomizo
10ec5c1342 Merge pull request #1108 from BoostIO/change-default-color-and-add-white-theme
Change default theme and add white
2017-11-14 00:51:17 +09:00
Kazz Yokomizo
8edfc15f45 Merge pull request #1081 from yosmoc/solarized_bug_fix
solarized light/dark bug fix
2017-11-13 01:05:59 +09:00
Kazu Yokomizo
792e41f161 Fix tag list on note list 2017-11-12 12:11:47 +09:00
Levin Rickert
9fbdf895af Removed mixpanel 2017-11-12 03:44:51 +01:00
yosmoc
dbc0fedf43 improve readability 2017-11-11 23:17:00 +01:00
yosmoc
cb298b8cad check solarized theme or not beofre setting css
solarized dark/light shares the solarized.css
2017-11-11 22:55:17 +01:00
yosmoc
2459a80e15 solarized light/dark bug fix
fixup for 0bf7e8b705
ConfigManager is also needed to change.
2017-11-11 22:55:17 +01:00
Kazu Yokomizo
0a973c4db3 Fix at folded UI 2017-11-12 02:11:26 +09:00
Kazu Yokomizo
a84fddd5fa Fix CI error 2017-11-11 20:34:31 +09:00
Kazu Yokomizo
1cd26d2e71 Fix layout at note detail 2017-11-11 20:25:34 +09:00
Kazu Yokomizo
f88ac891ff Fix layout at note list 2017-11-11 20:10:16 +09:00
Kazu Yokomizo
17aa9ae85f Fix small layout bug 2017-11-11 19:10:00 +09:00
Kazu Yokomizo
bb46a9ba4c Change default color and add white theme 2017-11-11 19:06:27 +09:00
Kazu Yokomizo
4a6c16df8d Add base of white theme 2017-11-11 19:05:08 +09:00
Kazz Yokomizo
95787fafc6 Merge pull request #1106 from BoostIO/chage-initial-items
Chage initial items
2017-11-11 13:25:38 +09:00
Kazu Yokomizo
c51d79e4d7 Change the information at the Infotab 2017-11-11 12:26:57 +09:00
Kazu Yokomizo
d5232a1b0e Change default markdown content 2017-11-11 12:21:27 +09:00
Kazz Yokomizo
e093c7f982 Merge pull request #1104 from yosmoc/fix_grunt_pre-build_error
Fix grunt pre-build error
2017-11-11 10:44:12 +09:00
yosmoc
3f53bddf7e electron-prebuilt is obsolete. use latest electron instead 2017-11-11 00:54:44 +01:00
yosmoc
e03d8175e3 fix grunt pre-build error 2017-11-11 00:33:41 +01:00
Kazz Yokomizo
7ab2e9f6ca Merge pull request #1096 from BoostIO/fix-layout
Fix layout
2017-11-09 23:37:25 +09:00
Kazu Yokomizo
6316ddc6a6 Fix layout 2017-11-09 21:51:43 +09:00
Kazz Yokomizo
11c46ede5d Merge pull request #398 from asmsuechan/iss-397
Fix note title
2017-11-09 21:05:14 +09:00
Kazz Yokomizo
2ec5238d97 Merge pull request #1093 from clone1612/openPreferences
[Improvement] - Option for preferences in menus (916 & 1074)
2017-11-09 19:41:53 +09:00
Jannick Hemelhof
b7f359f6cf Option for preferences in menus 2017-11-09 09:40:59 +01:00
Kazz Yokomizo
8ef485221c Merge pull request #1052 from PaulRosset/trash-counter-notes
Add counter on deleted notes
2017-11-09 15:33:36 +09:00
Kazu Yokomizo
afddb6fc33 Merge pull request #1087 from BoostIO/udpate-readme
Update Readme
2017-11-08 19:25:05 +09:00
Kazu Yokomizo
f28ee1bc4b Merge pull request #1088 from BoostIO/update-backers
Update Backers.md
2017-11-08 19:24:48 +09:00
Kazu Yokomizo
b997f0a5a7 Update Backers.md 2017-11-08 19:20:28 +09:00
Kazu Yokomizo
48dc47ce57 Update Readme 2017-11-08 19:06:47 +09:00
asmsuechan
f1a90f4a11 Remove an unused function 2017-11-07 14:48:32 +09:00
asmsuechan
990d7edba4 Fix some pointed by eslint 2017-11-07 14:44:50 +09:00
asmsuechan
13a1da91be [Lint] Remove an unexpected trailing comma 2017-11-07 14:44:20 +09:00
asmsuechan
930b58d2a8 [Lint] Remove semicolons 2017-11-07 14:44:20 +09:00
asmsuechan
b88b1065ee [Lint] Fix double quatations to single quatations 2017-11-07 14:44:20 +09:00
sota1235
5fbb802b32 modify: add test case 2017-11-07 14:44:20 +09:00
sota1235
a40f8d25ef modify: change to modern js 2017-11-07 14:44:20 +09:00
sota1235
0a28798d54 modify: add test case for underscore 2017-11-07 14:44:20 +09:00
asmsuechan
6047987c25 refactor: fix to use cut off file 2017-11-07 14:44:15 +09:00
sota1235
2ce96186f2 add: cut out trimming text logic for md note title and add unit test 2017-11-07 14:43:31 +09:00
asmsuechan
26357bd4bc Fix note title 2017-11-07 14:43:31 +09:00
SuenagaRyota
e94b45a7e4 Merge pull request #1064 from yosmoc/importfiletoemptyfolder
enable importing file to empty folder
2017-11-07 14:42:35 +09:00
Kazu Yokomizo
4be1eb7a28 Merge pull request #1084 from BoostIO/add-backer
Add backer
2017-11-07 12:54:43 +09:00
Kazu Yokomizo
f4bbbb640d Merge pull request #1083 from BoostIO/update-issue-template
Update issue template
2017-11-07 12:54:27 +09:00
Kazu Yokomizo
94b4e70b0f Add backer 2017-11-07 10:05:23 +09:00
Kazu Yokomizo
b31e3f7783 Update issue template 2017-11-07 10:03:07 +09:00
Kazu Yokomizo
6375ac857a Merge pull request #1076 from BoostIO/update-backers
Update Backers.md
2017-11-06 19:06:34 +09:00
Kazu Yokomizo
5eac08430f Update Backers.md 2017-11-06 18:56:18 +09:00
Paul Rosset
ef0b109ad4 Add 0 by default 2017-11-06 09:19:12 +00:00
Kazu Yokomizo
7fbe6c0955 Merge pull request #1067 from BoostIO/fix-layout
Fix layout
2017-11-06 16:30:32 +09:00
Kazu Yokomizo
c86e43597c Fix CI error 2017-11-06 16:11:00 +09:00
Kazu Yokomizo
123a73a5e6 Fix at InfoPanel in trash 2017-11-06 15:57:00 +09:00
Kazu Yokomizo
706b5d253f Fix updated date at note list 2017-11-06 15:49:04 +09:00
yosmoc
8fb8c7a40b importing from file uses the same storage/folder resolve logic as creating new note
It makes less confusing for user.
2017-11-06 00:22:43 +01:00
yosmoc
21220f93b1 enable importing file to empty folder
Current implementation is fetching the import destination storageKey and folderkey from a file in the folder. If no files are in the folder, it cannot fetch these keys. Use prop.params.storageKey / folderKey instead.
2017-11-06 00:21:58 +01:00
Kazu Yokomizo
705e64377b Fix CI 2017-11-06 03:08:15 +09:00
Kazu Yokomizo
5c3f0cd060 Fix layout at InfoPanel 2017-11-06 02:40:59 +09:00
Kazu Yokomizo
a238be5b7c Fix font size at tag list in side bar 2017-11-05 20:40:16 +09:00
Kazu Yokomizo
2351bb78da Change "Folders" and "Tags" strings to icons. 2017-11-05 20:31:32 +09:00
Kazu Yokomizo
6bbc5a91fe Increase font size and change folder icon at side bar 2017-11-05 20:05:44 +09:00
Kazu Yokomizo
2f52233bd0 Fix UX when press a note in note list 2017-11-05 19:21:28 +09:00
Kazu Yokomizo
92eccb635a Move the notification area from main window to preference modal 2017-11-05 17:56:32 +09:00
Kazu Yokomizo
1f8acc3afc Merge pull request #1065 from BoostIO/not-quit-mac
Not quit app using close button on Mac
2017-11-05 15:18:03 +09:00
Kazu Yokomizo
f8eaa9e796 Not quit app using close button on Mac 2017-11-05 12:34:19 +09:00
Kazu Yokomizo
7c9fecd943 Merge pull request #1043 from mslourens/close-in-windows
added shortcut ctrl+q for quit and quit the app when using the Windows Close button
2017-11-05 12:13:34 +09:00
Kazu Yokomizo
3df8cbb357 Merge pull request #1049 from mslourens/selected-tag-issue
only make the selected tag active
2017-11-05 11:39:42 +09:00
Kazu Yokomizo
993cb9cb0b Merge pull request #1061 from yosmoc/master
fix solarized dark/light code block thema bug
2017-11-04 19:27:36 +09:00
Kazu Yokomizo
5bd4a3f761 Merge pull request #1033 from nathanielw/fix/pinned-next
Include each note only once when sorting by pin
2017-11-04 19:24:59 +09:00
Kazu Yokomizo
fcad84ced3 Merge pull request #1062 from asmsuechan/add-plantuml
Add PlantUML support
2017-11-04 13:25:52 +09:00
asmsuechan
0bd48981ec Add markdown-it-plantuml 2017-11-04 12:54:41 +09:00
yosmoc
0bf7e8b705 fix solarized dark/light code block thema bug
solarized dark/light shares the same css in CodeMirror.
You can see more detail info in commit 5b17808569
We need to treat solarized as a special case in code block also.
2017-11-04 01:03:56 +01:00
Paul Rosset
875c451221 Add Counters on All notes && Starred notes 2017-11-02 17:03:59 +00:00
Paul Rosset
c8256bea3a Add counter on deleted notes 2017-11-01 17:54:35 +00:00
Maurits Lourens
7d10b951b7 only make the selected tag active 2017-11-01 15:42:55 +01:00
Maurits Lourens
34e9238cc4 added shortcut ctrl+q for quit and quit the app when using the Windows Close button 2017-10-31 09:10:04 +01:00
Kazu Yokomizo
7d97784a58 Merge pull request #1042 from mslourens/image-in-anchor
only decode the url when the content of the link is a string
2017-10-31 13:23:54 +09:00
Kazu Yokomizo
1265e7c4a1 Merge pull request #1038 from voidsatisfaction/fix/pinned_note_right_click
Fix enabling no focus right click pin to top and show adequate context menu
2017-10-31 12:59:56 +09:00
Maurits Lourens
44ece2bf34 only decode the url when the content of the link is a string 2017-10-30 22:54:00 +01:00
Mac Heller-Ogden
fde2a8055d make ZZ work in vim mode 2017-10-30 15:20:59 -05:00
Kazu Yokomizo
f9643c2503 Merge pull request #1039 from BoostIO/add-props
Add props on NoteItemSimple
2017-10-31 00:53:34 +09:00
Kazu Yokomizo
e6a97e5cb3 Add props on NoteItemSimple 2017-10-31 00:46:33 +09:00
Kazu Yokomizo
73b5546ae9 Merge pull request #1036 from mslourens/context-menu
added the context menu to the list view
2017-10-31 00:37:48 +09:00
Kazu Yokomizo
f98719ee73 Merge pull request #1037 from BoostIO/change-image
Change top image
2017-10-31 00:29:58 +09:00
voidSatisfaction
7666182ae3 Fix enable no focus right click pin to top and show right context menu 2017-10-31 00:24:17 +09:00
Kazu Yokomizo
05af30f336 Change top image 2017-10-31 00:22:48 +09:00
Maurits Lourens
20de08b625 added the context menu to the list view 2017-10-30 16:18:49 +01:00
Nathaniel Watson
e60f4f4a64 Include each note only once when sorting by pin
Fixes #983
2017-10-30 21:51:44 +13:00
Kazu Yokomizo
6af25d932c Merge pull request #1022 from BoostIO/add-notification-ui-tab
Add notification at UI tab
2017-10-30 15:34:45 +09:00
Kazu Yokomizo
3f49a8a15a Merge pull request #1030 from RedBug312/fix-font-quotation
Fix custom preview fonts
2017-10-29 13:33:00 +09:00
RedBug312
bfa8db7b55 Delete escaped quotation marks between fonts
Delete addtional single quotation marks between the font name Microsoft YaHei
2017-10-29 11:42:35 +08:00
Kazu Yokomizo
d6f2e7588c Merge pull request #1025 from PaulRosset/note-uiTab_data-policy
Adjust Note in Uitab && Add message notification for data policy save
2017-10-28 18:28:27 +09:00
Kohei TAKATA
a594332ffb Merge pull request #1027 from BoostIO/feature-v0-8-16
v0.8.16
2017-10-28 14:15:41 +09:00
Kohei TAKATA
ceb18ebf1c v0.8.16 2017-10-28 12:28:06 +09:00
Paul Rosset
b9038e254e Adjust Note in Uitab && Add message notification for policy save 2017-10-27 12:38:26 +01:00
Kazu Yokomizo
b351e42538 Add notification at UI tab 2017-10-26 15:27:22 +09:00
Kazu Yokomizo
8910c26ee2 Merge pull request #1016 from PaulRosset/clear-message-HotKeyTab
ClearMessage notification HotKeyTab
2017-10-26 13:53:43 +09:00
Kazu Yokomizo
7549a7bbbe Merge pull request #1014 from asmsuechan/improve-lock-tooltip-text
Change the tooltip text of the lock button for easy to understand what its role
2017-10-26 13:49:57 +09:00
Kazu Yokomizo
17fbe6e232 Merge pull request #1020 from BoostIO/change-init-content
Make <kbd> on keyboard introduction
2017-10-26 10:15:39 +09:00
Kazu Yokomizo
ccdac8f604 Make <kbd> on keyboard introduction 2017-10-26 09:23:12 +09:00
Kazu Yokomizo
88a828c9ef Merge pull request #1019 from filoxo/add-keyboard-markdown
Add keyboard markdown
2017-10-26 08:58:45 +09:00
Carlos Filoteo
ae3291b90e Add keyboard styles 2017-10-25 11:07:03 -06:00
Carlos Filoteo
2c6f0452b8 Require markdown-it-kbd 2017-10-25 10:46:21 -06:00
Carlos Filoteo
4651acd6f4 Install markdown-it-kbd 2017-10-25 10:46:03 -06:00
Kazu Yokomizo
bba7babce3 Merge pull request #1017 from BoostIO/change-crowdfunding
Change crowdfunding Bountysource to OpenCollective.
2017-10-26 00:10:48 +09:00
Kazu Yokomizo
73dc6a4a92 Change crowdfunding Bountysource to OpenCollective. 2017-10-25 23:58:36 +09:00
Paul Rosset
992f5a525a Test build travis with change clearMessage feature 2017-10-25 13:21:30 +01:00
SuenagaRyota
b38d5789f3 Merge pull request #1013 from asmsuechan/change-ISSUETEMPLATE
Change ISSUETEMPLATE to add a sentence dealing with if a user tries to open an issue regarding boostnote mobile
2017-10-25 19:56:25 +09:00
asmsuechan
47b5945e17 Change the tooltip text of the lock button for easy to understand what its role 2017-10-25 19:49:16 +09:00
asmsuechan
73544b0f06 Change ISSUETEMPLATE to add a sentence dealing with if a user tries to open an issue regarding boostnote mobile 2017-10-25 19:45:32 +09:00
Kazu Yokomizo
e7d9311e23 Merge pull request #1010 from PaulRosset/save-notification
Adjust notification HotKeyTab
2017-10-25 10:28:58 +09:00
Paul Rosset
c97c65b707 Delete clearMessage due to problem wih test [WIP] 2017-10-24 23:54:14 +01:00
Paul Rosset
1c02b4e62a Delete setTimeout() due to problem wih test 2017-10-24 23:50:29 +01:00
Paul Rosset
d23156d11a Correction build error 2017-10-24 23:40:15 +01:00
Paul Rosset
bd013adb4d correction eslint syntax 2017-10-24 23:09:21 +01:00
Paul Rosset
c0368ce713 correction 2017-10-24 23:01:16 +01:00
Paul Rosset
80283b5f55 Adjust notification HotKeyTab 2017-10-24 22:27:03 +01:00
Kohei TAKATA
4078645958 Merge pull request #1002 from BoostIO/add-ama-event-for-snippet-lang
Add ama event for snippet lang
2017-10-23 22:33:35 +09:00
Sosuke Suzuki
955ade0b8a add space 2017-10-23 21:12:42 +09:00
Sosuke Suzuki
4b158af9f6 send snippet_lang 2017-10-23 16:35:15 +09:00
Sosuke Suzuki
642fae3ac7 some let => const 2017-10-23 13:51:32 +09:00
SuenagaRyota
d249967aee Merge pull request #1004 from ysshah/patch-1
Fix typo in "Markdown"
2017-10-23 10:47:25 +09:00
Yash Shah
7b6b7f05e0 Fix typo in "Markdown" 2017-10-22 11:10:13 -07:00
Sosuke Suzuki
35b9bf5d34 enable recordDynamicEvent func to passed attribute arg 2017-10-21 18:18:02 +09:00
Sosuke Suzuki
59f0cc4f98 send lang_name of snippet 2017-10-21 16:59:33 +09:00
Kazu Yokomizo
a29ca73fb4 Merge pull request #1000 from BoostIO/fix-sideNav-style
start point of absolute to the right.
2017-10-21 16:18:51 +09:00
Sosuke Suzuki
59b658f059 start point of absolute to the right. 2017-10-21 15:49:47 +09:00
Kazu Yokomizo
3397b3108f Merge pull request #999 from BoostIO/fix-sideNav-style
Fix side nav style
2017-10-21 15:04:26 +09:00
Sosuke Suzuki
cae7baa5e1 change from premitive value to variable 2017-10-21 14:45:26 +09:00
Sosuke Suzuki
4af71fd1dd fix Folded-SideNav size 2017-10-21 14:29:29 +09:00
Sosuke Suzuki
4194b61373 text-align of button-lebels in SideNavFilder are center 2017-10-21 14:11:35 +09:00
Sosuke Suzuki
c91fd6783d fix preference button style 2017-10-21 13:56:21 +09:00
SuenagaRyota
89bbed1dfd Merge pull request #978 from aquibm/master
Fix URIs decoded with mdurl
2017-10-21 13:40:36 +09:00
Sosuke Suzuki
2aeb53920c enable tooltip-label of Preference 2017-10-21 13:37:10 +09:00
Sosuke Suzuki
fe51c232b6 fix typo 2017-10-21 13:27:45 +09:00
Sosuke Suzuki
57b054794c fix position of preference button 2017-10-21 13:25:28 +09:00
SuenagaRyota
8318c56046 Merge pull request #998 from asmsuechan/change-issue-template
Change ISSUE_TEMPLATE because it seems unfriendly
2017-10-21 13:10:54 +09:00
Sosuke Suzuki
0d52417ee7 disable switch-buttons, when NavToggle 2017-10-21 13:06:04 +09:00
asmsuechan
6f3b1b8d6f Change ISSUE_TEMPLATE because it seems unfriendly 2017-10-21 13:05:14 +09:00
Kazu Yokomizo
a460d7722e Merge pull request #996 from BoostIO/update-readme
Update readme
2017-10-21 00:19:00 +09:00
Kazu Yokomizo
d770208d4c Update Backers 2017-10-21 00:14:59 +09:00
Kazu Yokomizo
0434109908 Update Bakcers 2017-10-21 00:11:29 +09:00
Kazu Yokomizo
289d3a4e6b Update Readme 2017-10-21 00:07:39 +09:00
Kazu Yokomizo
ffb9be63c7 Merge pull request #920 from BoostIO/add-ama-options
enable to get appVerion and platformName
2017-10-20 23:05:35 +09:00
Kazu Yokomizo
bf2b53cbce Merge pull request #994 from Visovsiouk/master
Adjust tooltip (#963)
2017-10-19 13:53:40 +09:00
visovsiouk
1d9bf65c31 Adjust tooltip (#963) 2017-10-18 20:29:38 +03:00
Kazu Yokomizo
4744b918d3 Merge pull request #988 from ringohub/fix/982-can_not_scroll_tag_list
Fix #982: Tag list cannot be scroll
2017-10-18 16:35:19 +09:00
Kazu Yokomizo
588b1809a9 Merge pull request #992 from mrseanbaines/sean/fix-grammar
Grammar fix
2017-10-18 16:13:24 +09:00
Sean Baines
dc1c19293d Grammar fix
"Quick search and copy the content of note" to "Quick search and copy the content of a note"
2017-10-17 19:49:51 +01:00
Yoshiki Aoki
1f548959e3 Fix #928: Tag list cannot be scroll 2017-10-17 11:47:06 +09:00
asmsuechan
8cae5670fc Change travis_snapcraft 2017-10-16 15:09:28 +09:00
SuenagaRyota
07c0982d4f Merge pull request #986 from asmsuechan/snapcraft
Snapcraft
2017-10-16 14:07:20 +09:00
SuenagaRyota
2f9e4b3198 Merge pull request #950 from clone1612/catchAnalyticsError
Add try/catch logic to recording of analytics events
2017-10-16 14:06:49 +09:00
asmsuechan
89dba149a3 Change to run build script only master branch 2017-10-16 14:03:19 +09:00
asmsuechan
aa71b4c1b8 Change to snap on travisCI 2017-10-16 13:57:39 +09:00
asmsuechan
43110f8f2a Add boostnote.desktop 2017-10-16 13:57:39 +09:00
asmsuechan
e48540713d Edit snapcraft.yaml to snap Boostnote 2017-10-16 13:57:35 +09:00
asmsuechan
cfd13139e0 snapcraft init 2017-10-16 13:55:32 +09:00
SuenagaRyota
ac5cdf384f Merge pull request #984 from asmsuechan/remove-unused-vars
Remove unused vars
2017-10-15 23:39:50 +09:00
asmsuechan
e9d858d902 Remove unused vars 2017-10-15 23:33:22 +09:00
Kazu Yokomizo
1beae4403a Merge pull request #979 from BoostIO/fix-layout
Fix layout
2017-10-15 17:54:59 +09:00
Kazu Yokomizo
dedf36f704 Position of navToggle button at Sidebar 2017-10-15 17:44:02 +09:00
Kazu Yokomizo
1477de3899 Fix tag layout 2017-10-15 17:40:19 +09:00
Kazu Yokomizo
0d947c7dd8 Fix CI error 2017-10-15 17:25:40 +09:00
Kazu Yokomizo
ebfd8f40e3 Pin to top layout 2017-10-15 17:20:55 +09:00
Kazu Yokomizo
3159cc0ded Add crowdfunding page in Preference 2017-10-15 17:10:58 +09:00
Kazu Yokomizo
10dcbfb891 Fix tags and folder list layout 2017-10-15 16:17:06 +09:00
Kazu Yokomizo
19dc16e14a Change sort icon and string 2017-10-15 15:52:16 +09:00
Kazu Yokomizo
95586b3156 Tag list layout 2017-10-15 15:46:30 +09:00
Kazu Yokomizo
0637daf645 Fix topbar height 2017-10-15 15:31:26 +09:00
Kazu Yokomizo
fdcd62617d Fix position of preference button 2017-10-15 15:30:03 +09:00
Kazu Yokomizo
0f3e5ee4ed Tag button at topbar in sidenav 2017-10-15 15:25:31 +09:00
Kazu Yokomizo
7b171ecc67 Fix layout
- [ ] Pin to top
- [ ] Tag area
- [ ] Preference button
- [ ] Position of New post button
- [ ] Icon of sort button at NoteList and change name of "Updated, Created"
- [ ] Set donation button at side bar in Preference
2017-10-15 11:46:37 +09:00
Sota Sugiura
7a4052ede3 Merge pull request #922 from sosukesuzuki/feature-tag-area
Feature tag area
2017-10-14 16:58:28 +09:00
Aquib Master
3f53a1f629 Fix linting issues 2017-10-14 19:28:11 +13:00
Aquib Master
31daec5fe2 Fix URIs decoded with mdurl
This PR mitigates #918 by retroactively replacing link text decoded by mdurl with the original link.
2017-10-14 19:01:04 +13:00
Sosuke Suzuki
0d7155bda6 implement convertPlatformName function 2017-10-14 12:12:35 +09:00
Sosuke Suzuki
35beec3e39 insert necessary space 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
ff4b96b622 implement tagItem active styleName 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
9b60814292 fix bug : isTrashedActive and isStarredActive are inverted 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
3c4fa83161 modify the arg of arrayOf to the correct 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
e8564f6540 modify propTypes "array" -> "arrayOf" 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
a22e97d4bd add a space after "//" in comment 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
046e6af489 remove extra semicolon and fix indent 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
f805e8a688 cut out NavToggle component 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
2fddc32eb7 cut out StorageList component 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
6018cd5d81 get "data" from this.props 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
3533903be3 duplicate conditions as a variable 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
d867292f66 remove unnecesarry "e" variable 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
7691b662d6 remove unnecesarry "return" 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
86270dd856 add the comment fot complicated condition 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
012e2dde4f remove unnecessary "e" variables 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
ad7a3c49f9 modify to use "const" from "let" 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
e8abd43c8a modify to remove unnecessary "return" 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
3192ce9d39 modify to use PropTypes 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
d09de09fef use color variables 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
4689ddeb98 some rename plural form or easy to understand 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
e300b33a4f fix a mistake in function naming 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
0ca87ea407 fix type description parens () -> {} 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
2886da4f63 give the key props to tagList Item 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
bf9ecb02e5 remove extra parens 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
852617726c complete editting file 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
c2aa35104c remove button width style 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
95e237d4a3 fix style tagList 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
59e5c547e9 fix button style to change color when switch active/inactive 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
06bd2b2b79 add title "tags" 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
faede48217 feature tag search 2017-10-14 11:57:03 +09:00
Sosuke Suzuki
ad0ac19d3d handling tagButton click 2017-10-14 11:49:32 +09:00
Sosuke Suzuki
3154110de1 list tags 2017-10-14 11:49:32 +09:00
Sosuke Suzuki
5248c05e61 switching view and change routing 2017-10-14 11:49:32 +09:00
Sosuke Suzuki
8311030bec add the tag to routing 2017-10-14 11:49:32 +09:00
SuenagaRyota
c429fc6b2c Merge pull request #968 from adrichey/master
Fix: "Uncaught TypeError: Cannot read property 'className' of null"
2017-10-13 23:36:48 +09:00
Alan Richey
590aa9ab17 Fixed the "Uncaught TypeError: Cannot read property 'className' of null" bug that appears when creating folders (coding style adjustments) 2017-10-13 09:30:41 -05:00
SuenagaRyota
f9a7c2d457 Merge pull request #853 from PrimaMateria/feature-rearrange-storage
Feature rearrange storage
2017-10-13 20:16:39 +09:00
Kazu Yokomizo
b4506168fb Merge pull request #972 from asmsuechan/replace-pdf-to-print
Replace pdf to print
2017-10-13 18:11:07 +09:00
SuenagaRyota
f203ab3aaf Merge pull request #973 from asmsuechan/refactor-targetIndex
Add getTargetIndex() and replece them
2017-10-13 17:25:30 +09:00
asmsuechan
c197dd0a4b Add getTargetIndex() and replece them 2017-10-13 17:19:38 +09:00
SuenagaRyota
457e596851 Merge pull request #956 from asmsuechan/pinn-to-top
Pin to top
2017-10-13 17:02:59 +09:00
asmsuechan
d274563b2c Change order for pinned notes on /home, /trashed, /searched or /starred 2017-10-13 16:33:55 +09:00
asmsuechan
2003bea3cf Remove unnecessary lines 2017-10-13 16:24:13 +09:00
asmsuechan
f9b3284852 Fix a condition 2017-10-13 14:22:13 +09:00
asmsuechan
9bca133d88 Remove updateFolder because it's no longer used 2017-10-13 14:18:41 +09:00
asmsuechan
03fc453608 Change method names 2017-10-13 14:18:41 +09:00
asmsuechan
3027cc81b3 Add handleNoteDelete 2017-10-13 14:18:41 +09:00
asmsuechan
2415fbf676 Change to use const instead of let 2017-10-13 14:18:41 +09:00
asmsuechan
725c6a7ba9 Resolve conflicts 2017-10-13 14:18:41 +09:00
asmsuechan
c33da0cf8e Fix some pointed by eslint 2017-10-13 14:18:41 +09:00
asmsuechan
d915d19425 Add comment for NoteItem 2017-10-13 14:18:41 +09:00
asmsuechan
f3370242bf Add conditions to hide pin from /home, /starred or /trash 2017-10-13 14:18:41 +09:00
asmsuechan
0e312ba929 Change name Pinn to Pin 2017-10-13 14:18:41 +09:00
asmsuechan
6440395197 Change to use strict equation 2017-10-13 14:18:41 +09:00
asmsuechan
5433abddaf Remove console.log 2017-10-13 14:18:41 +09:00
asmsuechan
0ccb465288 Remove pinnedNotes from Folder 2017-10-13 14:18:41 +09:00
asmsuechan
8fd4deb3eb Add unpin 2017-10-13 14:18:41 +09:00
asmsuechan
fe8045c51d Add pinn to top 2017-10-13 14:18:41 +09:00
SuenagaRyota
b890c59134 Merge pull request #948 from wrhansen/master
Support for solarized dark and light themes
2017-10-13 13:29:10 +09:00
SuenagaRyota
f39caeb967 Merge pull request #954 from asmsuechan/improve-searching
Improve searching
2017-10-13 12:08:25 +09:00
asmsuechan
7ab482184b Improve tag search by changing the logic 2017-10-13 11:40:10 +09:00
asmsuechan
78b12ae686 Add test 2017-10-13 10:58:32 +09:00
asmsuechan
caa5deac4e Change searching by tag 2017-10-13 10:37:43 +09:00
Kazu Yokomizo
af3083825e Merge pull request #970 from Samatar26/fix-handleCloseButtonClick
Use the correct handler for closing the modal.
2017-10-13 09:35:13 +09:00
asmsuechan
5255708ff2 Replace pdf to print 2017-10-13 09:29:41 +09:00
Samatar26
9331f2034b Use the correct handler for closing the modal.
Relates to #967
2017-10-12 18:01:34 +01:00
Kazu Yokomizo
fc6a5c22bf Merge pull request #969 from Samatar26/fix-button-protrusion
Fixed button protrustion when creating a new folder.
2017-10-13 01:44:17 +09:00
Samatar26
51c397d177 Fixed button protrustion when creating a new folder.
Relates to #966
2017-10-12 17:33:18 +01:00
Alan Richey
7c9596308e Fixed the "Uncaught TypeError: Cannot read property 'className' of null" bug that appears when creating folders 2017-10-12 10:56:07 -05:00
asmsuechan
15dc424ade Change keycode handling scope due to global keyboard support 2017-10-12 23:27:48 +09:00
asmsuechan
49243a8010 Add to handle space key on search 2017-10-12 23:27:45 +09:00
asmsuechan
93e188d118 Change to be able to search on starred 2017-10-12 20:28:23 +09:00
asmsuechan
df3195fc1e Refactor getContextNotes() 2017-10-12 18:42:34 +09:00
asmsuechan
da6b8c30a0 Improve some 2017-10-12 18:42:34 +09:00
asmsuechan
70468b6b7d Change contextNotes a state to a variable because of lifesycle loop 2017-10-12 18:42:34 +09:00
asmsuechan
2511512d94 Improve context search 2017-10-12 18:42:34 +09:00
asmsuechan
4418617d3b Delete a unnecessary break 2017-10-12 18:42:34 +09:00
asmsuechan
6e480ba146 Add comments 2017-10-12 18:42:34 +09:00
asmsuechan
b4f5913a80 Fix to work inputting by IME on search 2017-10-12 18:42:34 +09:00
Kazu Yokomizo
6a3062709c Merge pull request #951 from mrseanbaines/sean/grammar-fix
Grammar and capitalization fix
2017-10-12 14:37:34 +09:00
Kazu Yokomizo
d66bc1faef Merge pull request #943 from voidsatisfaction/add_context_menu_delete_note
Add notelist right click(context menu) and delete note
2017-10-12 14:34:51 +09:00
Kazu Yokomizo
bef7d45c3e Merge pull request #961 from asmsuechan/fix-pasting-image
Fix to create imageDir if it does not exist
2017-10-12 11:48:20 +09:00
SuenagaRyota
bb9489a8d3 Merge pull request #955 from asmsuechan/iss-919
Change to apply font with single quotations
2017-10-12 11:34:42 +09:00
asmsuechan
700eeb8f5a Fix to create imageDir if it does not exist 2017-10-12 10:28:01 +09:00
asmsuechan
7e2f0049b6 Change to apply font with single quotations 2017-10-11 12:17:49 +09:00
Sean Baines
b2388544d8 Merge branch 'master' into sean/grammar-fix 2017-10-10 19:22:02 +01:00
Sosuke Suzuki
d772551c60 convert platformName from os.platfoem() form to AMA form 2017-10-10 14:58:52 +09:00
Wesley Hansen
31dca6f06b Fix failed build lint error 2017-10-09 20:55:04 -04:00
Sean Baines
83f68fe153 Grammar and capitalization fix 2017-10-09 19:15:52 +01:00
Kazu Yokomizo
08a2ae0fd3 Merge pull request #941 from voidsatisfaction/korean_trans_dev
Add recent translated korean developement & debug docs
2017-10-10 01:21:56 +09:00
Jannick Hemelhof
53d3f51c74 Cleaner catch 2017-10-09 14:04:02 +02:00
Jannick Hemelhof
f7cdafb087 Add try/catch logic to recording of analytics events 2017-10-09 10:45:09 +02:00
Wesley Hansen
5b17808569 Support for solarized dark and light themes
CodeMirror seems to have the two solarized themes within the
`node_modules/coemirror/theme/solarized.css`. So passing the string
"solarized light" and "solarized dark" to the editor theme appropriately
sets these themes.

The Boostnote app appears to be dynamically determining themes based
on the css files found within `node_modules/codemirror/theme/`.
So that's why there was just a single option of 'solarized' before.

The light and dark 'solarized' themes appear to be the *only* themes
that share a css style, whereas all other light and dark variarnt
themes get their own css file (ex: base16-dark.css and base16-light.css).

Weird!
2017-10-08 23:56:15 -04:00
voidSatisfaction
a7328e21f1 feat: add right click notelist delete 2017-10-08 18:20:31 +09:00
voidSatisfaction
e64370e9a2 fix: no need enter 2017-10-08 15:16:26 +09:00
voidSatisfaction
d5b37b2418 feat: add debug docs for korean and link on debug.md 2017-10-08 13:58:15 +09:00
voidSatisfaction
4da08d93fd feat: add translated korean developement docs 2017-10-08 13:39:32 +09:00
Kazu Yokomizo
c39e5c67f5 Merge pull request #937 from mrseanbaines/sean/improve-english
Sean/improve english
2017-10-06 13:21:35 +09:00
Sean Baines
00d5cf13c9 Merge branch 'master' into sean/improve-english 2017-10-05 07:46:02 +01:00
Kazu Yokomizo
1120bcfc0c Merge pull request #934 from mrseanbaines/sean/tag-select-border-box
Fix "borde-box" typo
2017-10-05 10:49:39 +09:00
Sean Baines
8e506cb7c2 Improve English
This would make more sense like this.
2017-10-04 21:50:15 +01:00
Sean Baines
145b66d375 Fix English mistake 2017-10-04 21:46:55 +01:00
Sean Baines
82e4a8bbc3 Fix borde-box typo
Mistake in code. Changed from `borde-box` to `border-box`
2017-10-04 21:33:49 +01:00
Kazu Yokomizo
bca9bfb960 Merge pull request #931 from BoostIO/fix-font-color-in-code
Fix font color in code block
2017-10-04 13:11:55 +09:00
Kazu Yokomizo
d8e19d9c17 Fix font color in code block 2017-10-04 11:39:27 +09:00
SuenagaRyota
95d74d1ca2 Merge pull request #897 from urda/urda/feature/copy-notify-toggle
Allow users to disable "Saved to clipboard" notification.
2017-10-01 19:33:17 +09:00
Peter Urda
ebdd6d77f7 Allow users to disable "Saved to clipboard" notification. 2017-10-01 02:48:54 -07:00
Sosuke Suzuki
d56bcc4fdf enable to get appVerion and platformName 2017-09-30 12:19:51 +09:00
Kazu Yokomizo
4bb18cfc9a Merge pull request #915 from cofcool/fix_doc
change grand to grunt
2017-09-27 13:01:45 +09:00
CofCool
6f30692534 grand -> grunt 2017-09-27 11:49:05 +08:00
Kazu Yokomizo
e249c1ec65 Merge pull request #911 from sferra/place-notification-to-the-right
Place notifications on the right side of the notification bar
2017-09-26 18:37:49 +09:00
Cristian Beskid
c2b4c77003 Place notifications on the right side 2017-09-26 10:35:58 +02:00
Kazu Yokomizo
e64733827a Merge pull request #906 from sferra/fix-collapse-sidebar-button-not-visible
Align notification bar with the navigation bar
2017-09-26 13:02:24 +09:00
Cristian Beskid
ea81b0d414 Fix notification bar offset in full screen mode 2017-09-25 23:08:12 +02:00
Cristian Beskid
000cf2a864 Center notification in the notification bar 2017-09-25 18:44:22 +02:00
Cristian Beskid
dc13b919b3 Fix incorrect notification bar width 2017-09-25 17:34:40 +02:00
Cristian Beskid
a0c8ec3171 Remove redundant semicolon 2017-09-25 17:26:08 +02:00
Cristian Beskid
80c13f7c4f Align notification bar with the navigation bar 2017-09-25 17:17:34 +02:00
Kazu Yokomizo
1a6f3d808b Merge pull request #899 from BoostIO/change-font-color-at-code-in-default
Change font color in code at default theme
2017-09-24 13:35:21 +09:00
Kazu Yokomizo
ec8fac1199 Change font color in code at default theme 2017-09-24 13:24:14 +09:00
Kazu Yokomizo
98c93d3248 Merge pull request #895 from Overload119/fix_grammar
Fix grammer in InfoTab
2017-09-24 12:00:18 +09:00
Amir Sharif
a053706c24 Fix grammer in InfoTab 2017-09-23 09:10:33 -07:00
Kohei TAKATA
e1a75a13e9 Merge pull request #891 from BoostIO/v0.8.15
v0.8.15
2017-09-23 17:02:56 +09:00
Kazu Yokomizo
ee6f4de183 v0.8.15 2017-09-23 14:41:13 +09:00
Kazu Yokomizo
475885b3ef Merge pull request #893 from BoostIO/downgrade_striptags_version
Downgrade striptags version
2017-09-23 14:35:54 +09:00
Kohei TAKATA
2d2b2d4c6c Downgrade striptags version 2017-09-23 14:20:53 +09:00
SuenagaRyota
4d00454539 Merge pull request #892 from asmsuechan/fix-typo
Fix typo addNotes to addNotesFromFiles
2017-09-23 12:34:15 +09:00
asmsuechan
bf590b5614 Fix typo addNotes to addNotesFromFiles 2017-09-23 12:29:08 +09:00
Kazu Yokomizo
3ef33c065c Merge pull request #793 from asmsuechan/add-drop-on-notelist
Add file drop on NoteList
2017-09-23 12:09:55 +09:00
Kazu Yokomizo
8e89fb8b92 Merge pull request #890 from asmsuechan/iss-888
iss #888 Fix letter count
2017-09-23 11:43:09 +09:00
asmsuechan
8e81cfcf89 iss #888 Fix letter count 2017-09-23 11:40:26 +09:00
Kazu Yokomizo
515736262d Merge pull request #889 from asmsuechan/cloud-sync-comment
Add link for cloud integration
2017-09-23 11:38:01 +09:00
Kazu Yokomizo
bd266dc602 Merge pull request #885 from asmsuechan/exit-by-comma-q-in-vim-mode
iss #832 Make :q work in vim mode
2017-09-23 11:34:01 +09:00
asmsuechan
9b3306157c Add link for cloud integration 2017-09-23 11:15:16 +09:00
asmsuechan
f8e6a939ca Fix comment 2017-09-23 10:20:48 +09:00
Kazu Yokomizo
8c48ee6fc1 Merge pull request #887 from BoostIO/fix-layout
Fix layout
2017-09-23 01:38:28 +09:00
Kazu Yokomizo
5e476054d7 Fix layout at NewNoteModal 2017-09-23 01:34:51 +09:00
Kazu Yokomizo
2fc8547384 Fix layout at CreateFolderModal 2017-09-23 01:20:39 +09:00
asmsuechan
2af2d71540 Rename addNotes to addNotesFromFiles 2017-09-23 00:28:55 +09:00
asmsuechan
6aaf9d9eb2 Change disable drop on trash 2017-09-23 00:28:55 +09:00
asmsuechan
42a9caf5a3 Add file drop on NoteList 2017-09-23 00:28:52 +09:00
asmsuechan
e6c1d7a383 iss #832 Make :qw work in vim mode 2017-09-23 00:21:20 +09:00
asmsuechan
02100bbc0a iss #832 Make :q! and :qw work in vim mode 2017-09-23 00:16:51 +09:00
Kazu Yokomizo
ce7c5f5d40 Merge pull request #884 from BoostIO/fix-layout-at-bottom
Fix layout at bottom
2017-09-23 00:07:14 +09:00
Kazu Yokomizo
69f1ad6eb3 Sorry CI 2017-09-23 00:00:27 +09:00
Kazu Yokomizo
8320fb5024 Fix layout at bottom 2017-09-22 23:57:43 +09:00
asmsuechan
4b79bca6bf iss #832 Make :q work in vim mode 2017-09-22 23:57:14 +09:00
Kazu Yokomizo
4a5fd41249 Fix layout at description in SnippetNoteDetail 2017-09-22 23:48:41 +09:00
Kazu Yokomizo
4e90a93b30 Fix layout at NoteDetail 2017-09-22 23:46:41 +09:00
Kazu Yokomizo
9861fbf7c8 Fix layout at RealtimeNotification 2017-09-22 22:56:32 +09:00
Kohei TAKATA
c762b9ae00 Merge pull request #877 from asmsuechan/add-realtime-info
Add RealtimeNotification
2017-09-22 20:26:20 +09:00
Kazu Yokomizo
cc667a6edf Merge pull request #882 from BoostIO/fix-layout
Fix layout
2017-09-22 16:20:05 +09:00
Kazu Yokomizo
419c57ed3f Fix CI error 2017-09-22 16:14:06 +09:00
Kazu Yokomizo
601f0b0de8 Fix layout at narrow the width of description in SnippetNoteDetail 2017-09-22 16:06:40 +09:00
Kazu Yokomizo
7b1c6c10b7 Change expand icon at NoteDetail 2017-09-22 15:56:49 +09:00
Kazu Yokomizo
5a85c257cf Fix layout at SideNab in PreferenceModal 2017-09-22 15:46:08 +09:00
Kazu Yokomizo
beceb851c2 Fix layout at selector size in PreferenceModal 2017-09-22 15:41:40 +09:00
Kazu Yokomizo
31485d3387 Fix layout at head in PreferenceModal 2017-09-22 15:27:22 +09:00
Kazu Yokomizo
fc552e030a Change save button position to top 2017-09-22 15:21:04 +09:00
Kazu Yokomizo
bf4c9f920a Fix layout at preference modal 2017-09-22 15:13:34 +09:00
Kazu Yokomizo
4ebd503664 Merge pull request #880 from xxdavid/feature-strip-html-from-title
Strip HTML tags from the note title
2017-09-22 13:05:01 +09:00
David Pavlík
0907bc80ef Strip HTML from the note title 2017-09-21 16:48:13 +02:00
Kazu Yokomizo
2cf46a3332 Merge pull request #878 from BoostIO/update-readme
Update readme
2017-09-21 00:38:34 +09:00
Kazu Yokomizo
41868f28e6 Update readme
- Renew slack invitation url
- Change name "Boostnote Team" to "10hz"
2017-09-21 00:34:13 +09:00
asmsuechan
964b7b62de Change url development to production 2017-09-20 10:31:50 +09:00
SuenagaRyota
0d34a03fe0 Merge pull request #857 from BoostIO/feature-ama-event-main-focused
add MAIN_FOCUSED event
2017-09-16 10:57:08 +09:00
Sosuke Suzuki
a62faa471c change the event name for app start from MAIN_FOCUSED to APP_STARTED 2017-09-15 00:23:31 +09:00
Sosuke Suzuki
66f3ce2cb2 add MAIN_FOCUSED event 2017-09-12 19:43:59 +09:00
Matus Benko
43c49f54d2 used findStorage function in the updateFolder 2017-09-11 21:10:44 +02:00
Matus Benko
a15dfffa44 used findStorage function in the reorderFolder 2017-09-11 21:09:51 +02:00
Matus Benko
59985dee72 fixed test title 2017-09-09 21:53:10 +02:00
Matus Benko
6b7132f134 fixed style of dragged folder item for dark theme 2017-09-09 21:50:06 +02:00
asmsuechan
e313b5e59d Add RealtimeNotification 2017-09-09 13:47:30 +09:00
SuenagaRyota
bb26d9a0a8 Merge pull request #834 from KuangLei/master
Translate contributing.md to Simplified Chinese
2017-09-09 09:18:35 +09:00
Matus Benko
5c2c99282d added test for reorderFolder 2017-09-08 18:58:35 +02:00
Matus Benko
94e6f89d07 fixed errors from lint 2017-09-08 18:46:17 +02:00
Matus Benko
3804a746df connected sortable folder list to data api 2017-09-08 12:07:59 +02:00
Matus Benko
5c2d7e2d2a fixed typo in the useDragHandle attribute for the folder list 2017-09-08 00:59:38 +02:00
Matus Benko
c34dd462b6 made sortable item helper visible by setting proper zindex 2017-09-08 00:41:20 +02:00
Matus Benko
9141b1a641 saving new order in the storage only for now 2017-09-08 00:09:13 +02:00
Matus Benko
0fea85e2f2 added drag handle to the folder item 2017-09-07 23:52:27 +02:00
Kazu Yokomizo
0ca41fbdb4 Merge pull request #844 from BoostIO/fix-layout
Fix layout
2017-09-08 01:39:02 +09:00
Matus Benko
a58c191ded used react-sortable-hoc on folderList and folderItem 2017-09-06 22:56:32 +02:00
Matus Benko
77089a1178 extracted folder list and item to separate components 2017-09-06 20:02:47 +02:00
Kazu Yokomizo
2cfb883bad Merge pull request #847 from BoostIO/update-readme
Update Readme
2017-09-05 16:01:37 +09:00
Kazu Yokomizo
ec8c8bb669 Update Readme 2017-09-05 15:54:47 +09:00
Kazu Yokomizo
0b54f01107 Fix layout at code block in markdown 2017-09-04 11:48:16 +09:00
Kazu Yokomizo
67be198bee Merge pull request #815 from asmsuechan/add-word-count-to-InfoPanel
Add wordcount and lettercount to InfoPanel
2017-09-01 12:22:38 +09:00
Kazu Yokomizo
32a4a1aae1 Merge pull request #837 from BoostIO/update-readme
Update Readme
2017-08-30 16:22:47 +09:00
Kazu Yokomizo
dac7372839 Update Readme 2017-08-30 16:09:38 +09:00
Kazu Yokomizo
521c261a37 Merge pull request #836 from BoostIO/move-to-image
Create repository folder and move top image to here.
2017-08-30 16:06:43 +09:00
Kazu Yokomizo
27367488c2 Create repository folder and move top image to here. 2017-08-30 14:39:37 +09:00
Kazu Yokomizo
0d5c3b1be6 Merge pull request #835 from BoostIO/delete-top-image
Delete top image
2017-08-30 14:35:25 +09:00
Kazu Yokomizo
a67d5ffacb Upload new top image 2017-08-30 14:23:52 +09:00
Kazu Yokomizo
687440a7c7 Delete old top.png 2017-08-30 14:21:40 +09:00
KLsz
bafdc24a6d Add a link from the english doc pages to doc pages in other languages 2017-08-28 19:54:13 +08:00
KLsz
047f9c93c5 Translate debug.md to Simplified Chinese 2017-08-28 19:46:36 +08:00
KLsz
116fafc117 Translate build.md to Simplified Chinese 2017-08-28 18:00:12 +08:00
KLsz
060c92091c Translate contributing.md to Simplified Chinese 2017-08-28 16:26:00 +08:00
Kazu Yokomizo
5802525b73 Merge pull request #829 from BoostIO/add-backers
Add Backers
2017-08-25 09:57:32 +09:00
Kazu Yokomizo
c3580caabc Merge pull request #828 from BoostIO/update-slack-link
Update slack invitation link
2017-08-25 09:57:16 +09:00
Kazu Yokomizo
08c027acc5 Add Backers 2017-08-25 09:52:54 +09:00
Kazu Yokomizo
4468792346 Update slack invitation link 2017-08-25 09:51:25 +09:00
SuenagaRyota
1b16c68cf9 Merge pull request #818 from asmsuechan/work-paste-image
Make pasting an image in CodeEditor work
2017-08-23 13:05:28 +09:00
asmsuechan
b99c1e3b32 Remove unnecessary bind 2017-08-22 13:48:50 +09:00
SuenagaRyota
eb2994e3c2 Merge pull request #820 from asmsuechan/drag-drop-image-caret-ubuntu
Fix image insesration problem
2017-08-20 09:19:23 +09:00
asmsuechan
d88dd26186 Fix image insesration problem, Use a function of CodeMirror instead of dom function 2017-08-20 08:11:00 +09:00
asmsuechan
59fcc58e9c Make pasting an image in CodeEditor work 2017-08-19 18:37:51 +09:00
SuenagaRyota
acba61f36a Merge pull request #816 from asmsuechan/iss-809
iss #809 normalize text works only in img tag
2017-08-19 09:44:56 +09:00
asmsuechan
a3a55a8bb4 iss #809 normalize text only in img tag 2017-08-19 09:25:45 +09:00
SuenagaRyota
22929d84fc Merge pull request #812 from asmsuechan/add-anchor
Add markdown-it-named-headers and adjust to use Japanese or Chinese
2017-08-19 08:42:00 +09:00
asmsuechan
9ea9d30947 Add wordcount and lettercount to InfoPanel 2017-08-19 08:26:55 +09:00
SuenagaRyota
7f08428fe2 Merge pull request #813 from asmsuechan/fix-build.md
Add to specify npm version
2017-08-18 23:51:10 +09:00
asmsuechan
0d80a7d961 Add to specify npm version 2017-08-18 18:52:18 +09:00
SuenagaRyota
2899264b54 Merge pull request #806 from sferra/fix-app-name-and-icon-on-linux
Fix app name and icon on linux
2017-08-18 18:44:37 +09:00
asmsuechan
923de0aa0d Add markdown-it-named-headers and adjust to use Japanese or Chinese 2017-08-18 16:07:15 +09:00
SuenagaRyota
2b729dad15 Merge pull request #811 from RedBug312/multimd-table
Support for extended table markdown syntax
2017-08-18 14:16:20 +09:00
RedBug312
b9b5bae78a Add markdown-it plugin for multimarkdown table 2017-08-18 12:48:55 +08:00
Cristian Beskid
a9acde07d1 Add missing 'productName' attribute to package.json
Fixes incorrect application name displayed in linux/gnome-shell. See
BoostIO/Boostnote#251
2017-08-15 13:52:01 +02:00
Cristian Beskid
a46b8d3079 Configure the icon of the main window
Fixes the incorrect application icon in linux/gnome-shell. See
BoostIO/Boostnote#251
2017-08-15 13:49:32 +02:00
SuenagaRyota
8b92e2cbb7 Merge pull request #805 from asmsuechan/fix-typo-of-fullscreen
Fix typo regarding fullscreen
2017-08-15 20:29:22 +09:00
asmsuechan
881f5a5110 Fix typo regarding fullscreen 2017-08-15 20:22:26 +09:00
SuenagaRyota
4e986a6384 Merge pull request #802 from asmsuechan/fix-by-eslint-react
Fix by eslint react
2017-08-15 10:16:33 +09:00
SuenagaRyota
ce5e1babb7 Merge pull request #803 from asmsuechan/fix-note-creation-in-all-notes
Fix note creation in All Notes
2017-08-15 10:16:07 +09:00
asmsuechan
b85790d2fa Fix note creation in All Notes 2017-08-15 10:09:17 +09:00
asmsuechan
6bc3e7fcf1 [eslint] react/no-direct-mutation-state 2017-08-15 10:01:04 +09:00
asmsuechan
1ca968201d [eslint] react/no-unescaped-entities 2017-08-14 11:56:55 +09:00
SuenagaRyota
f2a03e4cc7 Merge pull request #800 from asmsuechan/componentnize-NewNoteButton
Componentnize NewNoteButton
2017-08-14 11:45:37 +09:00
asmsuechan
a752730718 Change to use sdialog.showMEssageBox() instead of window.alert 2017-08-14 11:39:06 +09:00
asmsuechan
9d20fd91ec Change ee to eventEmitter 2017-08-14 11:20:54 +09:00
asmsuechan
70a6a3acb8 Remove unused variable 2017-08-14 11:20:54 +09:00
asmsuechan
7f52eed4d5 Move condition of trash or not 2017-08-14 11:20:54 +09:00
asmsuechan
105119e1a4 Change let to const 2017-08-14 11:20:54 +09:00
asmsuechan
169e30e029 Fix by lint 2017-08-14 11:20:54 +09:00
asmsuechan
a5fa3e9e7a 🗑️ Remove unused file 2017-08-14 11:20:54 +09:00
asmsuechan
8985062d34 ♻️ Refactor 2017-08-14 11:20:54 +09:00
asmsuechan
56eb9c76ae Componentnize NewNoteButton 2017-08-14 11:20:54 +09:00
SuenagaRyota
e5b6762bf3 Merge pull request #801 from asmsuechan/add-eslint-plugin-react
Add eslint plugin react
2017-08-14 11:17:06 +09:00
asmsuechan
e8bccaef88 Add a rule 2017-08-14 11:13:25 +09:00
asmsuechan
afdb038244 Add rules 2017-08-14 11:10:15 +09:00
asmsuechan
56942d55eb Add eslint-plugin-react to .eslintrc 2017-08-14 11:02:56 +09:00
asmsuechan
9d742c8435 Add eslint-plugin-react 2017-08-14 10:46:40 +09:00
Kazu Yokomizo
6ee4e48de2 Merge pull request #795 from BoostIO/feature-v0-8-14
v0.8.14
2017-08-12 14:50:16 +09:00
Kazu Yokomizo
184f3dc04b v0.8.14 2017-08-12 12:20:30 +09:00
Kazu Yokomizo
2027f60014 Merge pull request #794 from BoostIO/fix-progress-bar-ui
Fix progress bar ui at Noteitem
2017-08-12 12:17:34 +09:00
Kazu Yokomizo
076edd375f Fix progress bar UI at NoteItem 2017-08-12 12:13:07 +09:00
SuenagaRyota
ab1aa56059 Merge pull request #792 from asmsuechan/add-tests
Add tests
2017-08-12 10:31:42 +09:00
asmsuechan
46f7dfdfeb Change " to ' 2017-08-12 10:17:36 +09:00
asmsuechan
fcaa5e21cf Add tests for RcParser 2017-08-12 09:36:39 +09:00
asmsuechan
1e202db50f Change the directory of RcParser 2017-08-12 09:36:30 +09:00
asmsuechan
9405b95825 Change RcParser testable 2017-08-12 09:11:22 +09:00
asmsuechan
f05e256afc Fix .boostnoterc.sample 2017-08-12 09:08:42 +09:00
asmsuechan
731ffd4a22 Add spec for getTodoStatus 2017-08-12 09:07:58 +09:00
SuenagaRyota
8f4566b7e1 Merge pull request #789 from asmsuechan/try-catch-in-rc-parser
Make RcParser ignore errors at JSON.parse()
2017-08-11 08:38:00 +09:00
asmsuechan
95aec54f60 Make RcParser ignore errors at JSON.parse() 2017-08-11 08:24:08 +09:00
SuenagaRyota
f14ce0d68e Merge pull request #787 from asmsuechan/fix-configmanager
Fix configmanager
2017-08-11 00:41:16 +09:00
asmsuechan
cc1c7f3820 Fix stupid JSON 2017-08-11 00:30:57 +09:00
SuenagaRyota
2df901288a Merge pull request #776 from XGHeaven/master
add todo percentage in item list
2017-08-10 23:39:12 +09:00
asmsuechan
821a7c780e Change variable names 2017-08-10 23:30:42 +09:00
asmsuechan
6e2e48fa64 Fix ConfigManger to load the settings from localStorage properly 2017-08-10 23:19:57 +09:00
Kazu Yokomizo
2864ac88f5 Merge pull request #784 from BoostIO/feature-v0-8-13
v0.8.13
2017-08-10 22:05:33 +09:00
XGHeaven
4a292d6518 add transition for TodoProcess inner bar 2017-08-10 20:00:57 +08:00
XGHeaven
e934182e86 change getTodoState to getTodoStatus 2017-08-10 19:58:58 +08:00
Kazu Yokomizo
d8fa73287b v0.8.13 2017-08-10 19:44:20 +09:00
SuenagaRyota
35938c09e8 Merge pull request #783 from asmsuechan/add-boostnoterc-for-config
Add boostnoterc revival
2017-08-10 16:58:23 +09:00
SuenagaRyota
9eaa90c691 Merge pull request #768 from BoostIO/fix-infoPanel-layout-in-trash
Fixed InfoPanel layout in Trash
2017-08-10 16:52:07 +09:00
Kazu Yokomizo
049835d426 Fix typo “in Trash” to “Trash” 2017-08-10 16:43:25 +09:00
asmsuechan
af91c40406 Remove unused variable 2017-08-10 16:42:14 +09:00
asmsuechan
4940ad6825 Add .boostnoterc.sample 2017-08-10 16:38:20 +09:00
asmsuechan
d02b740300 Fix assignConfigValues because it didn't return proper hash object 2017-08-10 16:37:31 +09:00
asmsuechan
9cb443dc2f Remove unused variable 2017-08-10 15:18:55 +09:00
XGHeaven
1c7cba2951 add todo percentage in item list 2017-08-10 12:31:07 +08:00
asmsuechan
473b80710d Remove RcParser.exec 2017-08-10 11:14:42 +09:00
asmsuechan
2247c0835d Ignore any errors in ~/.boostnoterc 2017-08-10 09:54:56 +09:00
asmsuechan
b7b715ba3d Fix a return value of RcParser.parse 2017-08-10 09:44:00 +09:00
asmsuechan
6c43fb2325 Enable to set configs in ~/.boostnoterc 2017-08-10 09:43:50 +09:00
asmsuechan
a6fe3c27d4 Fix a cyclic object value error 2017-08-10 09:43:19 +09:00
asmsuechan
d47ff96b13 Enable to set configs in ~/.boostnoterc 2017-08-10 09:43:19 +09:00
SuenagaRyota
a0def654bd Merge pull request #782 from MrBMT/update-app-wording
Update application wording
2017-08-10 07:15:18 +09:00
Ben
4873b40e49 Update application text
Updates application text in various places to correct the wording of or better reflect the functionality provided.
2017-08-09 16:48:39 +01:00
SuenagaRyota
0a758f20a7 Merge pull request #780 from asmsuechan/fix-storageKey-undefined
Add storageKey to MarkdownEditor
2017-08-09 23:16:53 +09:00
asmsuechan
5e58d457a3 Add storageKey to MarkdownEditor 2017-08-09 23:12:07 +09:00
SuenagaRyota
0f745361ad Merge pull request #779 from MrBMT/fix-default-fonts
Add Lato font-face definition to main.html
2017-08-09 22:51:43 +09:00
Ben
bf6cae9a0e Add Lato font definition to main.html
Lato is the default "Preview font family" font. However, in the case that Lato is not installed on the user's system, it falls back to using a different font instead of using the font included with the application.
2017-08-09 14:42:07 +01:00
SuenagaRyota
ab640a7676 Merge pull request #777 from MrBMT/finder-fix
Finder UI Fix (My Storage positioning)
2017-08-09 21:04:26 +09:00
Ben
820171e19e Fixes storage positioning
Fixes positioning of the My Storage section on Finder, so that it is not shown over the top of the Trash.
2017-08-09 12:34:14 +01:00
Kazu Yokomizo
f1e9d0ab81 Merge pull request #767 from mrseanbaines/fix-typo
Fixes typo in welcome screen
2017-08-09 11:55:58 +09:00
Sean Baines
0646484c83 Fixes wording on folder delete
"This work will deletes all notes in the folder and can not be undone." to "This will delete all notes in the folder and can not be undone."
2017-08-06 11:34:39 +01:00
Kazu Yokomizo
a27b79c213 Add newline at InfoPanel 2017-08-06 13:59:51 +09:00
Kazu Yokomizo
773a9b4b7f Fixed InfoPanel layout in Trash 2017-08-06 12:56:52 +09:00
Sean Baines
07b838ef7b Fixes typo in welcome screen 2017-08-05 17:17:33 +01:00
SuenagaRyota
85217a7171 Merge pull request #766 from asmsuechan/improve-search
Context search
2017-08-05 22:56:31 +09:00
asmsuechan
886d7b7227 Fix test 2017-08-05 22:48:04 +09:00
asmsuechan
6987b762dd Make context-search work 2017-08-05 22:23:33 +09:00
SuenagaRyota
f32ac81f84 Merge pull request #764 from asmsuechan/fix-noteCount-by-trash
Fix noteCount on a note trased
2017-08-05 22:03:44 +09:00
asmsuechan
87ea66bb92 Change iterate variable 2017-08-05 22:00:12 +09:00
SuenagaRyota
ff6fd62932 Merge pull request #765 from asmsuechan/iss-758
iss #758 Add InfoButton and InfoPanel in Trash
2017-08-05 21:56:22 +09:00
asmsuechan
76728448ff iss #758 Add InfoButton and InfoPanel in SnippetNoteDetail 2017-08-05 17:34:26 +09:00
asmsuechan
3b7225e0fa iss #758 Add InfoButton and InfoPanel in Trash 2017-08-05 17:30:59 +09:00
asmsuechan
d6280f4397 Fix noteCount on a note trased 2017-08-05 17:16:57 +09:00
SuenagaRyota
8df867046f Merge pull request #753 from asmsuechan/work-shortcuts-in-right-click
Change to work ctrl-e and ctrl-w in RIGHTCLICK
2017-08-05 12:05:22 +09:00
SuenagaRyota
331c822816 Merge pull request #754 from asmsuechan/add-print
Add Print
2017-08-05 11:59:16 +09:00
SuenagaRyota
6219173945 Merge pull request #763 from asmsuechan/fix-issue_template
Stress words in ISSUE_TEMPLATE
2017-08-04 08:36:27 +09:00
asmsuechan
6207e02e7f Stress words in ISSUE_TEMPLATE 2017-08-04 08:33:09 +09:00
asmsuechan
537ba537dc Add Print 2017-08-01 19:30:48 +09:00
asmsuechan
3e919241e6 Change to work ctrl-e and ctrl-w in RIGHTCLICK 2017-08-01 09:20:22 +09:00
SuenagaRyota
2324327e7e Merge pull request #749 from asmsuechan/change-order-for-ama-event
Change order for AMA event
2017-07-31 23:08:41 +09:00
asmsuechan
b8374494ea Change order for AMA event 2017-07-31 23:02:49 +09:00
SuenagaRyota
a480ca7b55 Merge pull request #731 from asmsuechan/add-find-storage-path-module
Add find storage path module
2017-07-30 16:15:33 +09:00
Kohei TAKATA
bfd67fb7f1 Merge pull request #735 from BoostIO/feature-v0-8-12
v0.8.12
2017-07-29 15:04:53 +09:00
Kohei TAKATA
e6bd6a5077 v0.8.12 2017-07-29 13:58:11 +09:00
Kohei TAKATA
350af844ca Merge pull request #736 from BoostIO/fix-layout
Fix layout
2017-07-29 13:56:21 +09:00
Kazu Yokomizo
a49d53179a Change “Trashed” to “Trash” 2017-07-29 13:49:45 +09:00
Kazu Yokomizo
e68069fd2f Fix undo button layout at notedetail 2017-07-29 13:40:04 +09:00
SuenagaRyota
a193ba3e6c Merge pull request #732 from asmsuechan/fix-image-path-on-dropped
Make it work on windows
2017-07-26 15:55:30 +09:00
asmsuechan
9034b3ab54 Make it work on windows 2017-07-26 15:47:38 +09:00
asmsuechan
f39b7594ab Add tests for findStorage() 2017-07-26 15:16:21 +09:00
asmsuechan
f79734391e Change to use the module 2017-07-26 15:16:18 +09:00
asmsuechan
e54f516418 Add findStorage() 2017-07-26 14:40:50 +09:00
SuenagaRyota
e86464535d Merge pull request #730 from asmsuechan/make-image-path-relative
Make image path relative
2017-07-26 14:33:41 +09:00
asmsuechan
e8553caa65 Make finder work fine 2017-07-26 14:29:55 +09:00
asmsuechan
044e6b7180 Make image path relative 2017-07-26 13:16:32 +09:00
SuenagaRyota
0266770657 Merge pull request #726 from asmsuechan/fix-default-font-on-windows
iss #155 Change defaut font on windows_
2017-07-25 16:04:12 +09:00
SuenagaRyota
2d6f7c08e8 Merge pull request #728 from asmsuechan/iss-727
iss #727 fix incorrect encoding in link
2017-07-25 15:59:28 +09:00
asmsuechan
0a27819a7f iss #727 fix incorrect encoding in link 2017-07-25 15:35:44 +09:00
SuenagaRyota
3185c25ee1 Merge pull request #724 from BoostIO/fix-button-at-markdown-eidt
Fix hidden button
2017-07-25 14:32:37 +09:00
asmsuechan
820802cdc2 iss #155 Change defaut font on windows_ 2017-07-25 14:04:39 +09:00
Kazu Yokomizo
2c169e6f15 Merge pull request #723 from asmsuechan/fix-typo-for-info-data-collection
Fix typo in InfoTab
2017-07-25 13:45:23 +09:00
Kazu Yokomizo
49be1320f9 Fix hidden button 2017-07-25 13:44:17 +09:00
asmsuechan
6bc4ecce48 Fix typo in InfoTab 2017-07-25 11:57:04 +09:00
SuenagaRyota
0290d23832 Merge pull request #722 from BoostIO/fix-layout
Fix layout
2017-07-25 10:18:12 +09:00
Kazu Yokomizo
e001c97e01 Make padding between Storages at SideNav. 2017-07-24 19:18:48 +09:00
Kazu Yokomizo
976d1bb4f3 Delete unnecessary comma. 2017-07-24 19:09:13 +09:00
Kazu Yokomizo
dee6495b08 Fix typo 2017-07-24 18:12:33 +09:00
Kazu Yokomizo
4a77f250f1 Fix button layout 2017-07-24 17:55:47 +09:00
Kazu Yokomizo
c697f19642 Fix layout at export note in InfoPanel 2017-07-24 17:00:08 +09:00
Kazu Yokomizo
f7d1f9e949 Fix InfoTab layout 2017-07-24 14:47:10 +09:00
Kazu Yokomizo
27b9952f8e Change policy content 2017-07-24 14:39:43 +09:00
Kazu Yokomizo
961dab4a97 Merge pull request #721 from BoostIO/udpate-slack-link
Update readme
2017-07-24 12:11:56 +09:00
Kazu Yokomizo
930b6bc927 Update readme
Update the slack link.
2017-07-24 11:53:39 +09:00
SuenagaRyota
ed7d8258cf Merge pull request #720 from asmsuechan/goodby-ctrl-g
Goodbye Ctrl-G
2017-07-22 16:44:48 +09:00
asmsuechan
762425125f Remove Ctrl-G because it's unneccessary and conflicts with CodeMirror 2017-07-22 16:41:08 +09:00
SuenagaRyota
03bdf0c653 Merge pull request #719 from asmsuechan/fix-inseration-image
Fix inseration position
2017-07-22 16:13:25 +09:00
asmsuechan
7002026190 Fix inseration position 2017-07-22 16:05:14 +09:00
SuenagaRyota
b35395e6bd Merge pull request #709 from asmsuechan/add-exports-to-infoPanel
Add exports to infoPanel
2017-07-22 15:47:01 +09:00
SuenagaRyota
b74fb76d03 Merge pull request #718 from asmsuechan/fix-typos
Fix typos Dynamit to Dynamic
2017-07-22 15:42:49 +09:00
asmsuechan
72d2df465b Fix typos Dynamit to Dynamic 2017-07-22 15:33:56 +09:00
SuenagaRyota
2592c943f7 Merge pull request #717 from asmsuechan/fix-a-bug-on-click
Fix a bug on click
2017-07-22 15:28:38 +09:00
asmsuechan
7b3a3ba200 Fix by eslint 2017-07-22 15:24:51 +09:00
asmsuechan
8369832585 Fix a bug on click 2017-07-22 15:11:59 +09:00
SuenagaRyota
d94a674343 Merge pull request #716 from asmsuechan/change-note-link-content
Change ["title"](note-hash) to [the exact title](note-hash)
2017-07-22 15:01:04 +09:00
SuenagaRyota
260611ffd6 Merge pull request #715 from asmsuechan/add-checkbox-for-ama
Add checkbox for ama
2017-07-22 14:57:31 +09:00
asmsuechan
690549b57f Change a word 2017-07-22 14:34:28 +09:00
asmsuechan
5d9aeb4c04 Fix typo 2017-07-22 14:32:18 +09:00
asmsuechan
eddfdea2ca Fix a closing tag and a condition 2017-07-22 14:20:42 +09:00
asmsuechan
a40385f87f Add policy 2017-07-22 13:58:02 +09:00
asmsuechan
0123526c98 Change ["title"](note-hash) to [the exact title](note-hash) 2017-07-22 11:29:39 +09:00
asmsuechan
275e3317a3 Add checkbox for ama 2017-07-22 08:59:27 +09:00
SuenagaRyota
d0b835a825 Merge pull request #710 from asmsuechan/fix-image-dropped
Change to create a new directory when storage/images does not exist
2017-07-16 15:52:03 +09:00
asmsuechan
f450260ff8 Fix a prop name noteKey to noteLink 2017-07-16 15:16:59 +09:00
asmsuechan
5f7b119e5c Remove an useless 'cancel' button 2017-07-16 15:06:22 +09:00
asmsuechan
bb9eb494e9 Change to create a new directory when storage/images does not exist 2017-07-16 15:02:18 +09:00
asmsuechan
6ea2b5e1d9 Add exports to infoPanel 2017-07-15 19:33:58 +09:00
SuenagaRyota
b21baf1ce5 Merge pull request #708 from asmsuechan/change-note-hash
Change noteHash to noteLink in the input in InfoPanel
2017-07-15 16:57:55 +09:00
SuenagaRyota
4c3fd461e4 Merge pull request #707 from asmsuechan/remove-dialogbox-from-trash
Remove a dialogbox from onTrashButtonClick
2017-07-15 14:47:38 +09:00
asmsuechan
8365a60d5d Change noteHash to noteLink in the input in InfoPanel 2017-07-15 13:41:22 +09:00
asmsuechan
804ac1aa96 Remove a dialogbox from onTrashButtonClick 2017-07-15 12:52:55 +09:00
SuenagaRyota
49fd2cfc4d Merge pull request #706 from asmsuechan/change-shotrcut-ctrl-u-to-ctrl-k
Change the keymap of Ctrl-U to Ctrl-K
2017-07-15 12:51:40 +09:00
asmsuechan
2bb2a52f27 Change the keymap of Ctrl-U to Ctrl-K 2017-07-14 18:18:38 +09:00
Kazu Yokomizo
8d71b28afa Merge pull request #705 from BoostIO/udpate-readme
Fix slack link
2017-07-13 16:23:34 +09:00
Kazu Yokomizo
86eac7054d Update Readmd 2017-07-13 15:41:56 +09:00
SuenagaRyota
dccb92d72b Merge pull request #297 from asmsuechan/add-trash-can
Add trash can
2017-07-12 15:53:49 +09:00
asmsuechan
2e628de9c6 Restore missing components 2017-07-12 15:48:11 +09:00
asmsuechan
2d243abc12 Add condition 2017-07-12 15:48:11 +09:00
asmsuechan
ae08bf4d7a Escape from addition a note when the note is in the trashbox 2017-07-12 15:48:11 +09:00
asmsuechan
cbff5fb585 Fix indents pointed by lint 2017-07-12 15:48:11 +09:00
asmsuechan
2650cc2f1c Add trash can 2017-07-12 15:48:08 +09:00
Kazu Yokomizo
ec560ceab1 Merge pull request #702 from BoostIO/update-readme
Update Readme
2017-07-11 01:01:19 +09:00
Kazu Yokomizo
ad17cb8837 Update Readme 2017-07-11 00:55:21 +09:00
Kazu Yokomizo
4f98d9641a Merge pull request #698 from BoostIO/update-layout
Update layout
2017-07-11 00:20:59 +09:00
Kazu Yokomizo
17535ccd4c Add Info Panel at SnippetDetail 2017-07-10 17:43:20 +09:00
Kazu Yokomizo
110c1ea337 Delete update date at under of NoteDetail 2017-07-10 17:13:18 +09:00
Kazu Yokomizo
7e087bfbab Fix info panel layout 2017-07-10 17:07:44 +09:00
SuenagaRyota
85e0d4b922 Merge pull request #697 from asmsuechan/remove-sharp-from-hash
Remove sharp from note hash on list:jump
2017-07-10 16:43:02 +09:00
asmsuechan
265262ccbf Remove sharp from note hash on list:jump 2017-07-10 16:37:07 +09:00
Kazu Yokomizo
345008e9b6 Fix info area layout at NoteDetail 2017-07-10 16:28:50 +09:00
SuenagaRyota
849aa05d76 Merge pull request #696 from asmsuechan/replace-cm-searchbox-to-official-search-addon
Replace cm searchbox to official search addon
2017-07-10 14:21:47 +09:00
asmsuechan
5ff5ec6a71 Remove cm-searchbox 2017-07-09 22:47:15 +09:00
asmsuechan
684c3f64aa Add search addon 2017-07-09 22:46:23 +09:00
SuenagaRyota
4ff73ede59 Merge pull request #695 from asmsuechan/bugfix-on-click-event
Fix an error on click event
2017-07-09 18:20:51 +09:00
asmsuechan
7302d83f60 Fix a bug on click event 2017-07-09 18:08:33 +09:00
SuenagaRyota
f9836fd66e Merge pull request #692 from asmsuechan/add-info-button
Add info button
2017-07-09 17:16:06 +09:00
SuenagaRyota
c0f05695fe Merge pull request #686 from asmsuechan/add-search-box
Add search-box
2017-07-09 17:15:57 +09:00
SuenagaRyota
e50a1172d6 Merge pull request #693 from asmsuechan/feature-links-among-notes
Feature links among notes
2017-07-09 17:15:50 +09:00
Kazu Yokomizo
7a4234e73c Merge pull request #690 from BoostIO/update-layout
Fix layout
2017-07-09 13:29:00 +09:00
Kazu Yokomizo
4b9640e5a3 Fix star position at NoteList 2017-07-09 12:56:02 +09:00
Kazu Yokomizo
4b58054100 Fix tag area layout at NoteItem 2017-07-09 12:46:46 +09:00
Kazu Yokomizo
8951dbf4ed Fix star position at NoteList 2017-07-08 16:05:45 +09:00
Kazu Yokomizo
5047bc94eb Fix search area layout 2017-07-08 15:58:40 +09:00
asmsuechan
75fb29c594 Change == to === 2017-07-08 15:44:20 +09:00
asmsuechan
bd75f7fd2c Remove a display of a note hash 2017-07-08 14:08:28 +09:00
asmsuechan
8b8cb3c9b4 Change styleName in each styles 2017-07-08 14:08:28 +09:00
asmsuechan
b479b21c37 Remove a blank line 2017-07-08 14:08:28 +09:00
asmsuechan
525c490704 Remove console.log 2017-07-08 14:08:28 +09:00
asmsuechan
2e3599d005 Add a feature which enables to link between notes 2017-07-08 14:08:28 +09:00
asmsuechan
f005bb1e46 hoge 2017-07-08 14:02:03 +09:00
asmsuechan
21f96febdb Fix some pointed by lint 2017-07-08 13:37:24 +09:00
asmsuechan
805829be78 Make InfoButton component stateless 2017-07-08 13:32:37 +09:00
asmsuechan
a7bd3f253f Rename getLastUpdated() to formatDate() 2017-07-08 13:16:19 +09:00
asmsuechan
81e8a290f0 Add infomation panel 2017-07-08 13:16:02 +09:00
Kazu Yokomizo
f46a967b6e Fix an error 2017-07-08 12:31:21 +09:00
Kazu Yokomizo
b78d9534aa Fix layout 2017-07-08 02:18:33 +09:00
SuenagaRyota
bdefaf7427 Merge pull request #681 from BoostIO/edit-initial-files
Edit initial files
2017-07-07 20:59:50 +09:00
SuenagaRyota
43550c7dec Merge pull request #688 from asmsuechan/remove-handle-note-context-menu
Remove the context menu for deletion
2017-07-07 20:12:11 +09:00
asmsuechan
1b07d393f2 Rename handleDeleteButtonClick to handleTrashButtonClick 2017-07-07 20:04:47 +09:00
asmsuechan
44fc356775 Remove the context menu for deletion 2017-07-07 19:45:02 +09:00
SuenagaRyota
5623c68170 Merge pull request #684 from BoostIO/change-menu-to-preferences
Change “Menu” to “Preferences”, and icon.
2017-07-07 18:11:01 +09:00
asmsuechan
d5f82943cf Edit style 2017-07-07 18:06:08 +09:00
asmsuechan
96a020341d Add search-box 2017-07-07 17:59:01 +09:00
Kazu Yokomizo
99b5f75763 Change “Menu” to “Preferences”, and icon. 2017-07-06 14:27:18 +09:00
SuenagaRyota
a128ff7cd8 Merge pull request #683 from asmsuechan/add-iss_template.md
Add issue template
2017-07-06 13:53:26 +09:00
Kazu Yokomizo
59329cc5da Fix typo 2017-07-06 13:50:39 +09:00
asmsuechan
ecd5daaf55 Add issue template 2017-07-06 13:44:19 +09:00
Kazu Yokomizo
514232d720 Merge pull request #682 from BoostIO/update-slack-link
Update slack link
2017-07-06 13:29:39 +09:00
Kazu Yokomizo
93abfe3202 Update slack link 2017-07-06 13:23:22 +09:00
Kazu Yokomizo
4d9e0e3bd7 Change default theme at editor and code-block 2017-07-06 02:32:14 +09:00
Kazu Yokomizo
75d9bf8e38 Edit initial files 2017-07-06 02:31:41 +09:00
SuenagaRyota
ccb9752254 Merge pull request #678 from asmsuechan/remove-e2e-document
Remove e2e documents
2017-07-05 13:38:42 +09:00
asmsuechan
0f2ca19c6c Remove the script of e2e test 2017-07-05 13:33:07 +09:00
asmsuechan
d5a77aade4 Remove testing.md 2017-07-05 13:32:06 +09:00
SuenagaRyota
3c89e6a128 Merge pull request #672 from asmsuechan/componentnize-top-bar-of-note-detail
Componentnize TrashButton
2017-07-02 22:29:14 +09:00
SuenagaRyota
a36be79977 Merge pull request #667 from asmsuechan/randomize-image-name
Randomize the image name when it's dropped
2017-07-02 22:22:23 +09:00
asmsuechan
617f0e0f9c Remove duplicated styles 2017-07-02 22:13:35 +09:00
asmsuechan
0db1a94105 Replace a button to TrashButton component 2017-07-02 22:13:35 +09:00
asmsuechan
f29f97a00f Add TrashButton component 2017-07-02 22:13:32 +09:00
asmsuechan
032b5a59f2 Remove encodeURI 2017-07-01 18:07:16 +09:00
SuenagaRyota
1e5bc395ac Merge pull request #671 from asmsuechan/goodbye-spectron
Goodbye spectron
2017-07-01 12:43:06 +09:00
asmsuechan
fef4afe660 Change .travis.yml 2017-07-01 12:02:52 +09:00
asmsuechan
679ed1eacf Remove e2e tests 2017-07-01 12:02:52 +09:00
asmsuechan
78a9320017 Remove spectron 2017-07-01 12:01:16 +09:00
asmsuechan
927981bf30 Randomize the image name when it's dropped 2017-06-28 13:05:40 +09:00
Kazu Yokomizo
70ea2f6c14 Merge pull request #665 from BoostIO/update-slack-link
Update slack link
2017-06-27 13:46:57 +09:00
Kazu Yokomizo
a6779414ff Delete readme.ja 2017-06-27 13:34:25 +09:00
Kazu Yokomizo
b62fcf523a Update slack link 2017-06-27 13:33:48 +09:00
Kazu Yokomizo
d0bbea5a97 Merge pull request #664 from asmsuechan/auth-aws-only-production
Exclude auth of aws only production
2017-06-26 15:38:33 +09:00
asmsuechan
212d7027fc Exclude auth of aws only production 2017-06-26 15:33:58 +09:00
Kohei TAKATA
be1a5b09da Merge pull request #663 from BoostIO/feature-v0-8-11
v0.8.11
2017-06-24 13:28:49 +09:00
Kohei TAKATA
3de2db4459 v0.8.11 2017-06-24 10:38:13 +09:00
Kazu Yokomizo
f2405a5b34 Merge pull request #661 from BoostIO/translate-to-russian
Add Russian files
2017-06-23 00:51:26 +09:00
Kazu Yokomizo
94abb8f959 Add credit 2017-06-22 23:38:23 +09:00
Kazu Yokomizo
2e30db05bc Add credit 2017-06-22 23:38:05 +09:00
Kazu Yokomizo
c93f3cc5dd Add credit 2017-06-22 23:37:14 +09:00
Kazu Yokomizo
068f8f2ba9 Update contributing.md 2017-06-22 23:35:27 +09:00
Kazu Yokomizo
0980c3b012 Add Russian files 2017-06-22 23:29:45 +09:00
SuenagaRyota
5288d6768f Merge pull request #658 from BoostIO/fix-scroll-bar-z-index
Fix not to show scroll bar when full screen mode in Windows
2017-06-22 14:42:46 +09:00
Kohei TAKATA
34491f4ea4 Remove unnecessary style 2017-06-21 22:53:22 +09:00
Kohei TAKATA
8c73ca8854 Fix not to show scroll bar when full screen mode in Windows 2017-06-21 22:51:21 +09:00
Kazu Yokomizo
0786d8eab6 Merge pull request #656 from BoostIO/add-backers-file
Add backers.md
2017-06-21 20:05:59 +09:00
Kazu Yokomizo
209518c815 Add backers.md 2017-06-21 19:42:51 +09:00
SuenagaRyota
b2753b6457 Merge pull request #644 from BoostIO/windows-fullscreen-zIndex
Fixed z-index at NoteDetail when fullscreen mode in windows.
2017-06-21 09:31:33 +09:00
Kazu Yokomizo
4775a920c0 Merge pull request #653 from BoostIO/update-slack-link
Update slack link
2017-06-20 21:51:01 +09:00
Kazu Yokomizo
0e94dc8740 Update slack link 2017-06-20 21:40:41 +09:00
Kazu Yokomizo
cf68d202d5 Update slack linl 2017-06-20 21:40:11 +09:00
SuenagaRyota
d29ba2bf16 Merge pull request #647 from clone1612/productionSizeFix
Fix dependency type of Spectron module
2017-06-18 14:39:31 +09:00
Kazu Yokomizo
720686cef5 Merge pull request #649 from asmsuechan/add-copy-on-ctrl-c-on-vim
Make Ctrl-C copy
2017-06-18 14:31:35 +09:00
asmsuechan
0625c65cf0 Make Ctrl-C copy 2017-06-18 08:14:33 +09:00
Jannick Hemelhof
acaefe22d1 Fix dependency type of spectron module 2017-06-17 18:01:01 +02:00
Kazu Yokomizo
df1f083ebf Merge pull request #645 from AlbertHilb/FixTypo
Rename `TodolistPercentage.js` to `TodoListPercentage.js`.
2017-06-17 22:25:28 +09:00
Raffaele De Feo
5a1dfc2ca9 Rename TodolistPercentage.js to TodoListPercentage.js. 2017-06-17 14:42:40 +02:00
Kazu Yokomizo
d84894f1bf Merge pull request #643 from BoostIO/update-fullscreen-btn-position
Change fullscreen button position at NoteDetail
2017-06-16 22:35:56 +09:00
SuenagaRyota
0fdc444c4c Merge pull request #642 from BoostIO/fix-analytics
Fix initialize logic of analytics
2017-06-16 22:35:33 +09:00
Kazu Yokomizo
4d216c6f13 Fixed z-index at NoteDetail when fullscreen mode in windows. 2017-06-16 22:25:48 +09:00
Kazu Yokomizo
1c0af8eede Change fullscreen button position at NoteDetail 2017-06-16 21:58:02 +09:00
Kohei TAKATA
f443f9264a Fix initialize logic of analytics 2017-06-16 21:35:21 +09:00
SuenagaRyota
d9b2981327 Merge pull request #325 from asmsuechan/feature-import-from-md-file
Add importer which imports files from .md/.txt
2017-06-16 21:28:04 +09:00
asmsuechan
68e36d2a6d Fix some pointed by lint 2017-06-16 21:17:39 +09:00
SuenagaRyota
68b91bf98c Merge pull request #611 from asmsuechan/error-handling-for-loading-notes
Fix errorhandling on cases of invalid notes
2017-06-16 21:09:48 +09:00
Kazu Yokomizo
b91ddfad05 Merge pull request #640 from BoostIO/update-slack-link
Update slack link
2017-06-13 11:44:21 +09:00
Kazu Yokomizo
a110cbfb5d Update slack link 2017-06-13 11:38:57 +09:00
Kazu Yokomizo
d69f45b0c9 Update slack link 2017-06-13 11:38:22 +09:00
asmsuechan
07df26d5c4 Change to use findNoteTitle() 2017-06-13 11:13:07 +09:00
asmsuechan
d24bcb7f86 Change to template literal 2017-06-13 11:06:09 +09:00
asmsuechan
9f383ba491 Add an option to enable selectiong multiple files 2017-06-13 11:06:09 +09:00
asmsuechan
c38a76d587 Add importer which imports files from .md/.txt 2017-06-13 11:06:00 +09:00
SuenagaRyota
994ca5dd02 Merge pull request #639 from hassec/FixAWSInclude
Fix typo in includes
2017-06-13 10:24:56 +09:00
Christoph Hasse
9281f8f6cb fix spelling to avoid include error 2017-06-13 00:59:37 +02:00
Kohei TAKATA
324f579474 Merge pull request #636 from BoostIO/feature-v0-8-10
v0.8.10
2017-06-13 02:52:07 +09:00
Kohei TAKATA
10bd2d4547 v0.8.10 2017-06-12 22:44:28 +09:00
SuenagaRyota
d1942868e4 Merge pull request #635 from asmsuechan/add-notification-on-copying-a-codeblock
Add notification on a copy button clicked
2017-06-12 21:54:56 +09:00
asmsuechan
a409b3e48d Add notification on a copy button clicked 2017-06-12 21:44:29 +09:00
SuenagaRyota
21004aab6a Merge pull request #634 from asmsuechan/enable-analytics-on-develop
Disable awsAnalytics on develop
2017-06-12 19:07:32 +09:00
asmsuechan
eaf88c6491 Disable awsAnalytics on develop 2017-06-12 18:57:40 +09:00
SuenagaRyota
17dcd1b6f1 Merge pull request #633 from asmsuechan/iss-619
Fix a rendering bug
2017-06-12 18:44:40 +09:00
asmsuechan
244a06eea6 Fix some pointed by lint 2017-06-12 18:12:11 +09:00
asmsuechan
afb13af7a1 iss #619 Add a test for teh helper methods 2017-06-12 18:05:32 +09:00
asmsuechan
ff9b935e98 iss #619 Add an entity to fix the rendering bug 2017-06-12 18:01:04 +09:00
SuenagaRyota
4250d6fe52 Merge pull request #632 from asmsuechan/handling-pull-602
Handling pull 602
2017-06-12 17:43:42 +09:00
SuenagaRyota
5bc2094f10 Merge pull request #628 from BoostIO/feature-improve-search-textbox-ux
improve searchTextBox UX
2017-06-12 17:41:27 +09:00
Kevin Nadro
552653c0ed for got run eslint 2017-06-12 17:34:14 +09:00
Kevin Nadro
c9bbc61c95 cleaning up code and fixing slider bug on fullscreen mode 2017-06-12 17:34:08 +09:00
Kevin Nadro
41a04aa3f1 reworking architecture of code 2017-06-12 17:34:02 +09:00
Kevin Nadro
cd421c4662 fixed the state change and cleaned up code for eslint 2017-06-12 17:33:56 +09:00
Kevin Nadro
063e2e02bd fixing some code from the comments 2017-06-12 17:33:50 +09:00
Kevin Nadro
0c3019b52e added fullscreen button for notes and snippets
allows user to hide the sidebars for fullscreen editing
2017-06-12 17:33:44 +09:00
Kevin Nadro
2ee2494dc4 for got run eslint 2017-06-12 17:33:37 +09:00
Kevin Nadro
df6ff1fffe cleaning up code and fixing slider bug on fullscreen mode 2017-06-12 17:33:31 +09:00
Kevin Nadro
0d2e6a6a12 forgot this in last commit 2017-06-12 17:33:24 +09:00
Kevin Nadro
79ed55a76f reworking architecture of code 2017-06-12 17:32:59 +09:00
Kevin Nadro
cbe58b9437 fixed the state change and cleaned up code for eslint 2017-06-12 17:30:38 +09:00
Kevin Nadro
afc729b1c3 fixing some code from the comments 2017-06-12 17:30:29 +09:00
Kevin Nadro
5d0cb0302e added fullscreen button for notes and snippets
allows user to hide the sidebars for fullscreen editing
2017-06-12 17:30:19 +09:00
Sosuke Suzuki
29e0d121cd improve searchTextBox ux 2017-06-11 15:42:07 +09:00
Kohei TAKATA
48ca13f82c Merge pull request #620 from BoostIO/feature-AmazonMobileAnalytics
Feature amazon mobile analytics
2017-06-10 13:45:38 +09:00
Sosuke Suzuki
278061e4f1 fix spacing 2017-06-10 12:58:24 +09:00
Sosuke Suzuki
186a815821 config to use dynamic customEvents 2017-06-10 12:51:01 +09:00
Sosuke Suzuki
2fea9eb874 setting AMA custom events 2017-06-10 12:50:19 +09:00
Sosuke Suzuki
f8b6453be9 config AmazonMobileAnalytics 2017-06-10 12:48:28 +09:00
SuenagaRyota
be625f8884 Merge pull request #626 from asmsuechan/iss-625
Fix a bug which is not showing dialog when user tries to export a snippet
2017-06-07 15:32:02 +09:00
asmsuechan
2271def5d3 Fix a bug which is not showing dialog when user tries to export a snippet 2017-06-07 15:23:07 +09:00
SuenagaRyota
275a8ea7cc Merge pull request #624 from asmsuechan/remove-unused-file
Remove an unused file
2017-06-07 14:19:22 +09:00
asmsuechan
dc236f33b1 Remove an unused file 2017-06-07 14:14:55 +09:00
SuenagaRyota
678d739e75 Merge pull request #623 from asmsuechan/add-emacs-keymap
Add emacs keymap
2017-06-07 12:48:39 +09:00
SuenagaRyota
8fe05a4c24 Merge pull request #548 from asmsuechan/add-a-module-findTitle
Add a module to find the title
2017-06-07 10:30:46 +09:00
asmsuechan
77adfdb9f0 Add emacs keymap 2017-06-07 09:37:21 +09:00
Kazu Yokomizo
30c94028fb Merge pull request #622 from BoostIO/fix-copy-button-layout
Fix copy button layout
2017-06-06 23:30:08 +09:00
Kazu Yokomizo
b5bf0780fa Fix copy button layout 2017-06-06 23:14:31 +09:00
SuenagaRyota
ad838d82ee Merge pull request #603 from nadr0/copyclipboard
Copy clipboard button for markdown code blocks
2017-06-06 21:38:00 +09:00
Kazu Yokomizo
d5ec0c0cdd Merge pull request #617 from CodeRi13/master
Translate contributing.md to korean
2017-06-05 16:16:50 +09:00
SuenagaRyota
ff29f1e0c6 Merge pull request #618 from BoostIO/revert-610-add-e2e-tests
Revert "Add e2e tests"
2017-06-05 13:09:10 +09:00
SuenagaRyota
1f58698a04 Revert "Add e2e tests" 2017-06-05 13:06:10 +09:00
CodeRi13
a275f331d0 Translate contributing.md to korean 2017-06-05 10:38:44 +09:00
Sota Sugiura
0862c6e059 Merge pull request #293 from asmsuechan/copy-image-on-dropped-into-CodeEditor
Add dataApi.copyImage for copying image to boostnote storage on an image dropped into CodeEditor
2017-06-05 01:29:11 +09:00
SuenagaRyota
46fddfd26c Merge pull request #614 from asmsuechan/add-documents
Add documents
2017-06-04 15:29:33 +09:00
asmsuechan
c547ccb4cb Update a document 2017-06-04 15:24:40 +09:00
asmsuechan
86e82fb149 Add required environments for building Boostnote on each local 2017-06-04 12:10:15 +09:00
SuenagaRyota
00a284bfbd Merge pull request #612 from asmsuechan/move-a-package-dev-to-prod
Move markdown-it-imsize dev-dependency to production
2017-06-03 20:52:40 +09:00
asmsuechan
f6fbec0a2e Move markdown-it-imsize dev-dependency to production 2017-06-03 20:47:43 +09:00
SuenagaRyota
b24c06bee6 Merge pull request #610 from asmsuechan/add-e2e-tests
Add e2e tests
2017-06-03 18:52:45 +09:00
asmsuechan
95e7f4f645 Fix errorhandling on cases of invalid notes 2017-06-03 18:47:56 +09:00
asmsuechan
4b75d501f5 Edit a e2e test for editting note 2017-06-03 18:28:40 +09:00
asmsuechan
b28d5c8b25 Fix the class name of modalClose button 2017-06-03 18:28:40 +09:00
SuenagaRyota
86e61661e6 Merge pull request #609 from asmsuechan/add-tests-for-search
Add tests for searchFromeNotes()
2017-06-03 17:24:33 +09:00
asmsuechan
cdd5717e63 Fix some pointed by eslint 2017-06-03 17:10:58 +09:00
asmsuechan
42bd7fb4fb Add tests for searchFromeNotes() 2017-06-03 17:04:22 +09:00
SuenagaRyota
66e478a001 Merge pull request #600 from BoostIO/feature-change-search-ux
change search ux
2017-06-03 16:41:36 +09:00
Kazu Yokomizo
c8259abcac Merge pull request #549 from LetItRock/#535
Fix for #535:
2017-06-03 14:35:52 +09:00
SuenagaRyota
d6d16a63a4 Merge pull request #608 from asmsuechan/fix-travis-node-version
Fix travis node version
2017-06-03 14:32:11 +09:00
asmsuechan
df8d1f0714 Add a comment 2017-06-03 14:24:28 +09:00
asmsuechan
fbbc6411c3 Fix the node_version to 4.x 2017-06-03 14:07:56 +09:00
Kazu Yokomizo
bc1e94fcab Merge pull request #607 from BoostIO/update-slack-link
Update slack link
2017-06-02 15:44:32 +09:00
Kazu Yokomizo
418439e3d5 Update slack group link 2017-06-02 15:27:36 +09:00
Kazu Yokomizo
46cbd04ba7 Update slack group link 2017-06-02 15:27:06 +09:00
asmsuechan
0ade6d9ece Add e2e tests for modal click and input texts 2017-06-01 17:26:28 +09:00
asmsuechan
823599192f Fix e2e tests 2017-06-01 15:59:12 +09:00
Sosuke Suzuki
9496ab88f7 fix spacings 2017-05-31 20:52:36 +09:00
Sosuke Suzuki
290e6ab170 change arg findByTag 2017-05-31 20:49:34 +09:00
asmsuechan
a9e3572f4f Add a e2e-test for Modal 2017-05-31 15:38:55 +09:00
Kazu Yokomizo
92b2b7dde3 Merge pull request #605 from BoostIO/improve-dark-theme
I improved the dark theme.
2017-05-31 15:26:55 +09:00
Kazu Yokomizo
dad1e40234 Fix white theme layout 2017-05-31 01:43:07 +09:00
Kazu Yokomizo
b75c8b0373 Fix code highlight 2017-05-31 01:26:40 +09:00
Sosuke Suzuki
fc4c471a87 fix spacing for eslint 2017-05-31 00:30:55 +09:00
Kazu Yokomizo
24de71f240 I improved the dark theme. 2017-05-30 23:33:59 +09:00
Sosuke Suzuki
805c39e60c refactor search function 2017-05-30 22:16:27 +09:00
Sosuke Suzuki
10e75041e8 add className 'searchInput' 2017-05-30 18:54:13 +09:00
Sosuke Suzuki
2364348df4 fix indent 2017-05-30 18:49:39 +09:00
Sosuke Suzuki
e643443660 split search function to module. 2017-05-30 18:27:57 +09:00
Kevin Nadro
d72e876b23 fixing eslint 2017-05-28 17:58:10 -05:00
Kevin Nadro
f3612774ba clipboard button is added 2017-05-28 17:31:23 -05:00
SuenagaRyota
67d8b02c49 Merge pull request #598 from dangvanthanh/master
#595 - Resize an image with markdown
2017-05-27 07:08:31 +09:00
Sosuke Suzuki
7abf53009a change search ux 2017-05-26 18:01:44 +09:00
Kazu Yokomizo
90bb4632b6 Merge pull request #599 from BoostIO/update-slack-link
Update slack link
2017-05-26 13:59:50 +09:00
Kazu Yokomizo
630da00235 Update slack link 2017-05-26 13:57:01 +09:00
Kazu Yokomizo
245e0dd7ee update slack group link 2017-05-26 13:56:23 +09:00
Dang Van Thanh
824e288a80 #595 - Resize an image with markdown 2017-05-26 10:58:39 +07:00
asmsuechan
99228f2e60 ♻️ Refactor findeTitle() 2017-05-23 17:01:07 +09:00
asmsuechan
0f71139eba Delete a comma pointed by eslint 2017-05-23 15:51:21 +09:00
asmsuechan
2bbe7056d1 Add test cases 2017-05-23 15:43:54 +09:00
asmsuechan
005d8f84fd Change for to some 2017-05-23 15:43:48 +09:00
asmsuechan
908cd7a890 Edit the method 2017-05-23 15:31:32 +09:00
asmsuechan
d4865adf6a Change findNoteTitle.find() to findNoteTitle.findNoteTitle() in test 2017-05-23 15:23:16 +09:00
asmsuechan
20411a2fd5 Change the function name of findNoteTitle.js from find to findNoteTitle 2017-05-23 15:23:16 +09:00
asmsuechan
19f8930f5a Fix to use strict equal 2017-05-23 15:23:16 +09:00
asmsuechan
ffc4ca1dd4 Add an unit test for findNoteTitle 2017-05-23 15:23:16 +09:00
asmsuechan
0bc9c6fb5a Change to use the module instead of a function findTitle() implemented inside the file 2017-05-23 15:23:11 +09:00
asmsuechan
983f453afd Add findTitle as a module 2017-05-23 15:17:47 +09:00
Kazu Yokomizo
60a0293495 Merge pull request #594 from BoostIO/edit-noteList-layout
If there is no tag, narrow the width of NoteList.
2017-05-22 21:19:36 +09:00
Kazu Yokomizo
4807d22763 If there is no tag, narrow the width of NoteList. 2017-05-22 20:13:47 +09:00
Kazu Yokomizo
e8d451bcbb Merge pull request #587 from BoostIO/fix-task-bar-ui
Fix task bar UI
2017-05-20 15:18:50 +09:00
Kazu Yokomizo
4809bb6f06 Change the z-index postiion 2017-05-20 15:09:52 +09:00
Kazu Yokomizo
d6d694cf66 Change z-index position and delete unnecessary class 2017-05-20 15:07:21 +09:00
Kazu Yokomizo
132e3c3088 Fix task bar UI 2017-05-20 14:53:06 +09:00
SuenagaRyota
3c7ff78549 Merge pull request #374 from BoostIO/feature_move_note_between_folder
Move note between folders
2017-05-20 14:33:55 +09:00
SuenagaRyota
adbdc2cb1c Merge pull request #510 from BoostIO/fix-note-title-bug-for-h1
fix the bug when using markdown syntax h1
2017-05-20 14:27:52 +09:00
Kazu Yokomizo
e52b74bbc9 Merge pull request #557 from BoostIO/feature-todo-percentage
display percentage of achievement of todo in markdown
2017-05-20 13:51:30 +09:00
Sosuke Suzuki
575f1b4b33 change from forEach to some 2017-05-20 12:28:11 +09:00
Sosuke Suzuki
a528c99900 change from 'undefined' to undefined 2017-05-20 12:24:58 +09:00
Sosuke Suzuki
e6047ed383 use String template literal 2017-05-20 11:38:09 +09:00
Kazu Yokomizo
381b7d960a Merge pull request #584 from BoostIO/update-slack-invitation
Update slack invitation
2017-05-18 17:01:15 +09:00
Kazu Yokomizo
045a8bde22 Update slack group link 2017-05-18 16:57:06 +09:00
Kazu Yokomizo
e528182c2a Update slack group link 2017-05-18 16:56:30 +09:00
Sosuke Suzuki
b86cdb461a fix the spacing 2017-05-18 01:27:37 +09:00
Sosuke Suzuki
7265f76770 for loop change to forEach 2017-05-18 00:31:46 +09:00
Sosuke Suzuki
2ed092279d avoid undefined 2017-05-18 00:07:48 +09:00
SuenagaRyota
7d71819be0 Merge pull request #578 from asmsuechan/add-a-documentation-of-e2e-testiong
Add a documentation of e2e testiong
2017-05-16 15:20:59 +09:00
asmsuechan
e848c74511 Fix the document in English 2017-05-16 15:17:20 +09:00
asmsuechan
968ed146b2 Fix the document in Japanese 2017-05-16 15:16:55 +09:00
asmsuechan
5e03f12875 Add a documentation of e2e testing in Japanese 2017-05-16 15:13:56 +09:00
asmsuechan
09f8e5f25a Add a documentation of e2e testing in English 2017-05-16 15:11:20 +09:00
SuenagaRyota
89f4ed3006 Merge pull request #471 from BoostIO/escButton-to-ReactComponent
made escButton ReactComponent
2017-05-13 17:15:21 +09:00
Sosuke Suzuki
8d14a9557d fix the indent 2017-05-13 17:07:02 +09:00
Sosuke Suzuki
513042d769 made escButton ReactComponent 2017-05-13 17:00:34 +09:00
Sosuke Suzuki
c28980c2a9 fix the spacing 2017-05-12 19:54:52 +09:00
Sosuke Suzuki
1c31ff4e98 use string template literal 2017-05-10 23:47:09 +09:00
Sosuke Suzuki
7c9d3904b3 change to forEach from for 2017-05-10 23:10:25 +09:00
Sosuke Suzuki
e23707f0a0 add + and * to matching pattern 2017-05-10 22:49:15 +09:00
Kazu Yokomizo
a952b18b96 Merge pull request #560 from BoostIO/update-slack-link-1
Update slack link 1
2017-05-09 21:55:29 +09:00
Kazu Yokomizo
35cc07bf63 Update readme-ja.md 2017-05-09 21:49:07 +09:00
Kazu Yokomizo
118bf18434 Update slack link 2017-05-09 21:48:40 +09:00
Sosuke Suzuki
34da15208b fix spacing 2017-05-06 16:57:15 +09:00
Sosuke Suzuki
e0dc62c00b fix indents 2017-05-06 16:40:42 +09:00
Sosuke Suzuki
b58df2f172 display percentage of achievement of todo in markdown 2017-05-06 16:30:03 +09:00
Pavlo Tymchuk
90846fab81 Fix for #535:
- hide/show code editor based on markdown editor state (could be CODE or PREVIEW);
- changed styles for code editor;
2017-05-04 23:09:48 +02:00
SuenagaRyota
efd80d5c0c Merge pull request #545 from LeoLamCY/revamp-keypress-handling
Revamp handling of multiple key press
2017-05-04 10:59:28 -07:00
SuenagaRyota
e37e28a22e Merge pull request #541 from asmsuechan/fix-travis-for-spectron
Fix viriables for travis
2017-05-03 09:45:24 -07:00
Leo Lam
a1e71b318c fix lint error again 2017-05-03 01:20:57 -04:00
Leo Lam
aee6541d45 fix lint errors 2017-05-03 01:17:13 -04:00
Leo Lam
50ad5e3791 minor improvement on multi-key detection
-check if number of keys pressed is the same as number of keys in a
shortcut key combo before matching to avoid incorrect detection
2017-05-03 01:04:50 -04:00
Leo Lam
b34d72f21a revamp handling of multi-key presses
- use keyCodes instead of strings to detect keys
- delete key from keyPressed array on key up
- fix #540
2017-05-03 00:29:18 -04:00
asmsuechan
e5ae420ef6 Fix viriables for travis 2017-05-02 09:49:49 -07:00
Sota Sugiura
7269750264 Merge pull request #502 from asmsuechan/add-spectron
Add spectron
2017-05-02 18:23:02 +09:00
Sota Sugiura
33fe3ff733 Merge pull request #527 from BoostIO/fix-add-description
Add description for package.json
2017-04-29 16:25:03 +09:00
sota1235
aa77180957 modify: backword compatibility 2017-04-29 16:24:08 +09:00
sota1235
3d80b6a4cd modify: add descriptoin (it is reuqired for building windows app) 2017-04-29 16:01:39 +09:00
Sota Sugiura
d76f9243a3 Merge pull request #524 from BoostIO/feature-v0-8-9
v0.8.9
2017-04-29 15:25:15 +09:00
sota1235
88f1a0d5cd v0.8.9 2017-04-29 15:22:15 +09:00
Kazu Yokomizo
26c435d6da Merge pull request #526 from BoostIO/change-noteitem-border-color
Change noteitem border color
2017-04-29 15:19:39 +09:00
Kazu Yokomizo
e66abdea2d Change the border color at NoteItemSimple 2017-04-29 15:11:48 +09:00
Kazu Yokomizo
c7d2eeb71a Change the border color at NoteItem 2017-04-29 15:07:13 +09:00
Kazu Yokomizo
0e8d681954 Merge pull request #525 from BoostIO/update-slack-link
Update slack link
2017-04-29 14:20:24 +09:00
Kazu Yokomizo
433d110cf0 Update slack invitation link 2017-04-29 14:17:48 +09:00
Kazu Yokomizo
4a514cd7bd Update slack invitation link 2017-04-29 14:17:10 +09:00
Kazu Yokomizo
417fee16bd Merge pull request #512 from LeoLamCY/fix-md-viewer-line-breaks
Fix md viewer line breaks when copying
2017-04-29 14:09:23 +09:00
Kazu Yokomizo
49a821d9ee Merge pull request #480 from SalvatoreTosti/master
Changed wordings on 'Make a Note' pane
2017-04-29 14:09:00 +09:00
Kazu Yokomizo
6a5ce098e0 Merge pull request #513 from bbtran/master
fixes (#504) scrollbar no longer appears above modal.
2017-04-29 12:47:27 +09:00
Kazu Yokomizo
1af73eebea Merge pull request #523 from BoostIO/change-donate-link
Change donate link
2017-04-29 12:31:16 +09:00
Sota Sugiura
b7ba29ac92 Merge pull request #341 from asmsuechan/fix-incorrect-tag-completion
Fix incorrect tag completion in code block
2017-04-29 12:24:50 +09:00
Kazu Yokomizo
133c2ec308 Change the donation link Patreon to Bountysource 2017-04-29 12:19:26 +09:00
Kazu Yokomizo
a70fe1bba8 Merge pull request #522 from BoostIO/change-star-layout
fix: modify the star layout at NoteItem
2017-04-29 12:09:53 +09:00
Kazu Yokomizo
6dcd653eac Merge pull request #520 from BoostIO/improvement-of-sidebar-uiux
Improvement of sidebar uiux
2017-04-29 11:17:03 +09:00
Kazu Yokomizo
db2f90b1ce fix: modify the star layout at NoteItem 2017-04-29 05:56:48 +09:00
Kazu Yokomizo
60e5665133 Fix the layout and UX of StorageItem at SIdebra 2017-04-28 16:07:55 +09:00
Kazu Yokomizo
7aa982849f Fix the layout and UX at create-folder-btn at sidebar 2017-04-28 15:42:46 +09:00
Kohei TAKATA
d94f7626c2 Merge pull request #477 from BoostIO/hotfix-fix-package-name
Fix package name
2017-04-28 00:39:06 +09:00
Benjamin Tran
549c289f81 fixes #504 scrollbar no longer appears above modal.
Edit NoteList style properties on modal component. Remove overflow to hide scrollbar on modal open.
2017-04-26 19:12:56 -07:00
Leo Lam
b35953d1f9 fix md viewer line breaks when copying
-set white-space to normal to remove extra space between lines
2017-04-26 19:37:12 -04:00
Leo
941c4aeb19 Merge pull request #2 from BoostIO/master
update fork
2017-04-26 14:08:30 -04:00
Sosuke Suzuki
11f7fcbaef fix the bug that is markdown titile starts with second letter 2017-04-26 18:32:46 +09:00
Sosuke Suzuki
6b8488ae0f fix the bug when using markdown syntax h1 2017-04-26 18:14:29 +09:00
asmsuechan
ee5268a07e Change to separation osx and linux 2017-04-25 17:05:10 -07:00
asmsuechan
28bc331318 Change to run only master branch 2017-04-25 11:48:45 -07:00
asmsuechan
098153b6ba Add osx support to .travis.yml
Change to run xvfb only linux
2017-04-25 09:19:46 -07:00
asmsuechan
878f31e91e Remove unnecessary break 2017-04-25 09:18:45 -07:00
asmsuechan
b40d09fa86 Edit .travis.yml to handle ES7 syntax problem 2017-04-25 00:08:59 -07:00
asmsuechan
eb48f48f6b Edit spectron.js to deal with linux 2017-04-25 00:08:49 -07:00
asmsuechan
7961008500 Edit gruntfile.js 2017-04-25 00:08:49 -07:00
asmsuechan
ff87c6b226 Fix .travis.yml to add grunt-cli because travis needs grunt to run $ grund pre-build for e2e test 2017-04-24 19:46:39 -07:00
asmsuechan
0c2807a08b Rename spectron-test.js to spectron.js because of avoidance from be ran it by npm run test 2017-04-24 19:42:02 -07:00
asmsuechan
f0cf369317 Edit .travis.yml for e2e test 2017-04-24 19:28:29 -07:00
asmsuechan
5e9954c060 Add a yarn task 2017-04-24 19:23:23 -07:00
asmsuechan
0c7bdf20af Add a smiple test to confirm Boostnote starts 2017-04-24 19:23:23 -07:00
Sosuke Suzuki
9c1179a6f9 Fixed indent which could not be corrected 2017-04-25 02:53:29 +09:00
Sosuke Suzuki
43cb290c80 fix the indent 2017-04-25 02:41:16 +09:00
Sosuke Suzuki
f8b7b7df9f change how to use dataApi and fix indent 2017-04-25 02:31:03 +09:00
Sosuke Suzuki
b73f0a8012 refactor some dirty code 2017-04-25 01:40:49 +09:00
Sota Sugiura
75b2c7bd2e Merge pull request #484 from asmsuechan/fix-delete-shortcut
Fix a shortcut for deletion
2017-04-24 23:14:42 +09:00
Leo
5fd9866eef Merge pull request #1 from BoostIO/master
update fork
2017-04-24 00:59:37 -04:00
asmsuechan
4e7204bdbc Add spectron 2017-04-23 12:13:58 -07:00
SuenagaRyota
ff7024e38f Merge pull request #488 from tkshnwesper/master
Added `Shift` to HotkeyTab.js
2017-04-23 00:21:05 -07:00
Saurabh
8c11a0b42d Added Shift to HotkeyTab.js 2017-04-23 12:43:39 +05:30
asmsuechan
2df295dc1d Fix styles by lint 2017-04-22 17:30:55 -07:00
asmsuechan
b695d27817 Add test for htmlTextHelper 2017-04-22 17:19:05 -07:00
asmsuechan
8e2fd300f6 Delete an encode table
because when & is encoded, it affect other encodes due to they use &
2017-04-22 16:14:09 -07:00
asmsuechan
1722e103fc Change methods to helper methods 2017-04-22 16:14:09 -07:00
asmsuechan
71464112ce Remove a disused condition 2017-04-22 16:14:09 -07:00
asmsuechan
003d8a1b21 Fix a bug on regexp of a question mark 2017-04-22 16:14:09 -07:00
asmsuechan
adf81175f3 Reduce the code 2017-04-22 16:14:09 -07:00
asmsuechan
39274ce483 Fix to handle with multiple entities in one line 2017-04-22 16:14:09 -07:00
asmsuechan
1daf07edeb Refactor to more readable 2017-04-22 16:14:09 -07:00
asmsuechan
cd2dc471c7 Fix to string literal 2017-04-22 16:14:09 -07:00
asmsuechan
6229ca7ac9 Refactor to ES6 2017-04-22 16:14:09 -07:00
asmsuechan
10043cc755 Fix to handle when codeBlocks is null 2017-04-22 16:14:09 -07:00
asmsuechan
e60a5430b4 Fix to replace only CodeBlock 2017-04-22 16:14:09 -07:00
asmsuechan
f7e0cb655f Add question mark 2017-04-22 16:14:09 -07:00
asmsuechan
04097ecfcd Fix incorrect tag completion in code block 2017-04-22 16:14:09 -07:00
asmsuechan
2222192bcd Fix to enable a shortcut for deleting a note 2017-04-22 15:38:55 -07:00
Salvatore Tosti
ae93c38d46 Changed wordings on 'Make a Note' pane
Note type descriptions are now more concise and uniform in style.
2017-04-22 08:16:05 -07:00
Sota Sugiura
9ff9dcbe6d Merge branch 'master' into hotfix-fix-package-name 2017-04-22 18:45:52 +09:00
sota1235
94d442af7d modify: fix package name 2017-04-22 18:43:56 +09:00
Sota Sugiura
6a711d6a71 Merge pull request #476 from BoostIO/v8-8-8
v0.8.8
2017-04-22 18:30:05 +09:00
sota1235
9d8e71aeb3 v8.8.8 2017-04-22 16:34:58 +09:00
Sota Sugiura
cfeeba209e Merge pull request #468 from BoostIO/feature-fix-text
Fix text on menu bar(macOS) and some refactor
2017-04-22 16:31:58 +09:00
Sota Sugiura
455029851a Merge pull request #474 from BoostIO/delete-escbutton-in-initimodal
delete the escButton in the InitModal
2017-04-22 16:19:32 +09:00
Sota Sugiura
d0f7baaad0 Merge pull request #473 from BoostIO/Fix-ConfigTab-Interface
Fix the config tab layout
2017-04-22 16:17:43 +09:00
Kazu Yokomizo
e3fb236139 Fix the config tab layout 2017-04-22 16:06:01 +09:00
Sosuke Suzuki
42296e421a delete the escButton in the InitModal 2017-04-22 16:05:22 +09:00
Sota Sugiura
c6f4ed7c8f Merge pull request #472 from BoostIO/Design-update
Fix the english typo
2017-04-22 15:45:09 +09:00
Kazu Yokomizo
e1fb36d64d Fix the border-left width at folder-selector 2017-04-22 15:33:05 +09:00
Sota Sugiura
48cf695e11 Merge branch 'master' into Design-update 2017-04-22 15:17:03 +09:00
Kazu Yokomizo
5b0e0c71a0 Fix the english typo 2017-04-22 14:59:53 +09:00
Sota Sugiura
c1a76b6fb4 Merge pull request #290 from BoostIO/featureSyntaxHighlightCheck
Feature syntax highlight check
2017-04-22 13:20:19 +09:00
Sota Sugiura
945a6306ec Merge pull request #469 from LeoLamCY/add-support-to-bold-selected-text-via-kb-shortcut
Add support to bold selected text via kb shortcut
2017-04-22 13:07:04 +09:00
sota1235
313bacf9dc modify: fix for ESLint 2017-04-22 13:00:25 +09:00
Sota Sugiura
9027f48dda Merge pull request #453 from bubuzzz/feature/double-click-to-rename-tab
double click on tab to rename
2017-04-22 12:58:29 +09:00
Sota Sugiura
eea8f7cdf4 Merge pull request #425 from AWEEKJ/feature_markdown_note
Fix new line problem in list and task list
2017-04-22 12:52:53 +09:00
Leo Lam
ffef239aa7 fix minor build error 2017-04-21 23:40:52 -04:00
Leo Lam
50fc15feea add support to bold selected text via kb shortcut
to improve upon #301
ctrl + : to bold a single word under caret or bold selected text if some
text is selected (highlighted)

#463
2017-04-21 23:32:57 -04:00
Leo Lam
2d7a37c872 Merge remote-tracking branch 'refs/remotes/BoostIO/master' 2017-04-21 23:24:44 -04:00
sota1235
db468fc095 modify: some refactor 2017-04-22 11:54:05 +09:00
sota1235
9a9f0035c2 modify: add label for quit button on macOS 2017-04-22 11:51:06 +09:00
Sota Sugiura
b9270cd040 Merge pull request #349 from asmsuechan/iss-332
Fix the screen become black on closing Boostnote when a state of Boostnote is fullscreen on mac
2017-04-22 11:44:44 +09:00
Kazu Yokomizo
65b1bd18c4 Merge pull request #465 from BoostIO/Design-update
Fix the loading layout
2017-04-21 20:48:44 +09:00
Kazu Yokomizo
c87ecc3d40 Fix the Statusbar layout 2017-04-21 20:23:33 +09:00
Kazu Yokomizo
e39e1648f9 Fix the loading layout 2017-04-21 20:07:14 +09:00
Kazu Yokomizo
091d2618a2 Merge pull request #462 from BoostIO/Design-update
Design update
2017-04-21 18:21:16 +09:00
Kazu Yokomizo
d039b17715 modify: Fix the SideNavFilter layout 2017-04-21 16:13:45 +09:00
Kazu Yokomizo
e350dca72c modify: Fix the star-btn layout at NoteDetail 2017-04-21 15:48:57 +09:00
Kazu Yokomizo
c07e334f03 modify: Fix the tag style at NoteDetail 2017-04-21 15:32:23 +09:00
Kazu Yokomizo
1ccfd8e392 modify: Fix the tag-list layout at NoteItem 2017-04-21 15:00:09 +09:00
Kazu Yokomizo
d22c40f0a5 modify: Fix the tag layout at note list 2017-04-21 14:53:25 +09:00
Kazu Yokomizo
3d37db6e54 modify: Fix the hover layout at SideNav 2017-04-21 14:33:16 +09:00
Kazu Yokomizo
22bd92916b modify: Fix the navtoggle-btn layout 2017-04-21 14:24:22 +09:00
Kazu Yokomizo
de303cf072 modify: Fix the sort-by-btn layout 2017-04-21 14:20:21 +09:00
Kazu Yokomizo
b22aad0678 modify: Fix the navtoggle-btn layout 2017-04-21 14:02:48 +09:00
Kazu Yokomizo
bf02f9b256 modify: Fix the layout of new-post-btn and status-bar 2017-04-21 13:45:04 +09:00
SuenagaRyota
6440ab423e Merge pull request #457 from SalvatoreTosti/master
Updated initial pieces of text to read more clearly in English
2017-04-20 22:16:53 -05:00
Salvatore Tosti
fceab73226 Updated initial pieces of text to read more clearly in English 2017-04-19 17:57:42 -07:00
Thai Tran
fded0ad3e8 double click on tab to rename 2017-04-19 15:05:47 +10:00
Kazu Yokomizo
294eb64686 Merge pull request #451 from BoostIO/Fix-slack-link
Fix slack group invitation
2017-04-19 10:15:45 +09:00
Kazu Yokomizo
851b28c482 Fix slack group invitation 2017-04-19 10:10:35 +09:00
Kazu Yokomizo
63fa2f1149 Fix slack group invitaition 2017-04-19 10:10:05 +09:00
Kazu Yokomizo
816d8decbd Merge pull request #443 from SalvatoreTosti/master
Changed wording in build.md and debug.md
2017-04-18 12:04:39 +09:00
Salvatore Tosti
85b4eedcd6 Changed wording in build.md and debug.md
I've adjusted the wording in the build and debug files to flow better and make more sense in English.
2017-04-17 19:38:20 -07:00
Kazu Yokomizo
901f40a669 Merge pull request #442 from BoostIO/Fix-typo
Fix typo in Infotab
2017-04-18 10:24:07 +09:00
Kazu Yokomizo
bae5f202a5 Fix typo in Infotab 2017-04-18 10:20:39 +09:00
Kazu Yokomizo
131f6780c2 Merge pull request #441 from SalvatoreTosti/master
Updated readme file to read more cleanly in English
2017-04-18 10:10:53 +09:00
Salvatore Tosti
a0e067cacf Updated readme file to read more cleanly in English
Made some small styling tweaks for greater uniformity within the readme document.
Also reworded a few sections to read more clearly.
2017-04-17 12:38:43 -07:00
Kazu Yokomizo
8cdcf537be Merge pull request #439 from BoostIO/update-info
Update information.
2017-04-18 00:57:38 +09:00
Kazu Yokomizo
575f5f160c Update information. 2017-04-18 00:55:31 +09:00
Kazu Yokomizo
d8fbac584c Merge pull request #438 from BoostIO/Fix-readme
Fix readme
2017-04-18 00:47:34 +09:00
Kazu Yokomizo
b73e1b04dc Fix readme 2017-04-17 18:21:12 +09:00
Kazu Yokomizo
3dd49c287d Merge pull request #424 from BoostIO/Design-update
Design update at v0.8.8
2017-04-15 13:00:36 +09:00
Kazu Yokomizo
6ce6a7036b Fix typo 2017-04-15 12:33:16 +09:00
SuenagaRyota
c120633f14 Merge pull request #426 from asmsuechan/edit-contributing.md
Edit contributing.md
2017-04-14 19:33:04 -07:00
asmsuechan
6e84b24309 Edit contributing.md 2017-04-14 18:52:48 -07:00
Kazu Yokomizo
343e35bb54 Fix the select-btn layout at setting modal in white theme 2017-04-14 17:14:45 +09:00
Kazu Yokomizo
09cf94d807 Fix to outline:none 2017-04-14 17:10:37 +09:00
Hanju Jo
a5531e20f2 Fix new line problem of list and task list 2017-04-14 17:09:30 +09:00
Kazu Yokomizo
0f311120af Fix the layout of NoteItem at SideNav 2017-04-14 16:42:01 +09:00
Kazu Yokomizo
614506cada Fix the hover/active layout at menubar in white theme 2017-04-14 15:45:52 +09:00
Kazu Yokomizo
7891d14a0a Fix the hover/active layout at NoteItemSimple 2017-04-14 15:38:45 +09:00
Kazu Yokomizo
2df12b6891 Fix the hover layout at NoteNavFilter in white theme 2017-04-14 15:28:27 +09:00
Kazu Yokomizo
97b42d6be1 Fix the hover/active layout at NoteItem in white theme 2017-04-14 15:26:45 +09:00
Kazu Yokomizo
39baadeb04 Fix hover/active layout at NoteItem 2017-04-14 15:23:52 +09:00
Kazu Yokomizo
a6f5452a85 Change the button color at setting modal 2017-04-13 20:45:26 +09:00
Kazu Yokomizo
29dc3bd550 Fix the layout of nav-btn at setting modal 2017-04-13 12:14:36 +09:00
Kazu Yokomizo
e103605956 Change the border-left at setting modal 2017-04-13 12:05:10 +09:00
Kazu Yokomizo
c510c2e540 Change the add-storage-btn at setting modal 2017-04-13 12:04:51 +09:00
Kazu Yokomizo
41d65e4132 Change the border-width at folder list 2017-04-13 11:46:41 +09:00
SuenagaRyota
b6cb532568 Merge pull request #422 from asmsuechan/iss-421
Update katex to 0.7.1
2017-04-12 14:27:36 -07:00
asmsuechan
a034ea3a05 Update katex to 0.7.1 2017-04-12 12:55:30 -07:00
Kazu Yokomizo
adeb45a9ce Fix the storage-btn layout at SideNav 2017-04-12 23:10:29 +09:00
Kazu Yokomizo
4ada755793 Change the info at InfoTag modal 2017-04-12 22:22:22 +09:00
Kazu Yokomizo
c4be052a49 Change the info at infoModal 2017-04-12 20:17:06 +09:00
Kazu Yokomizo
54c2d7bac9 Delete the border-line at Statusbar 2017-04-12 16:14:00 +09:00
Kazu Yokomizo
233ab17992 Change the default background-color of ui-btn at white theme 2017-04-12 15:08:51 +09:00
Kazu Yokomizo
e251ec64dc Fix the layout of SideNavFilter 2017-04-12 14:59:47 +09:00
Kazu Yokomizo
32bd6d76ee Change the All Notes icon at SideNavFilter 2017-04-12 14:48:52 +09:00
Kazu Yokomizo
3fc17634aa Merge pull request #418 from BoostIO/Update-slack-invitation
Update slack invitation
2017-04-12 12:45:20 +09:00
Kazu Yokomizo
555d725e7b Update slack group invitation link 2017-04-12 12:42:54 +09:00
Kazu Yokomizo
35416796b5 Update slack group invitation link 2017-04-12 12:42:14 +09:00
SuenagaRyota
6c737fe25f Merge pull request #399 from asmsuechan/remove-a-shortcut-fot-bold
Remove Ctrl-B shortcut for bold
2017-04-11 12:54:29 -07:00
Kazu Yokomizo
1b58e320aa Change the font color at dark theme 2017-04-11 00:47:13 +09:00
Kazu Yokomizo
658a90bf15 Fix the layout at NoteItem 2017-04-10 23:08:06 +09:00
Kazu Yokomizo
d092e75f3c Delete the border line at Statusbar 2017-04-10 22:11:44 +09:00
asmsuechan
162fae19cc Remove Ctrl-B shortcut for bold 2017-04-08 14:31:18 -07:00
Kazu Yokomizo
58f5035ec6 Change the star background-color when hover at NoteDetail 2017-04-08 16:58:52 +09:00
Kazu Yokomizo
c5076e4e95 Change the star background-color when hover 2017-04-08 16:54:36 +09:00
Kazu Yokomizo
28ef1e625c Fix the rename folder modal layout 2017-04-08 16:49:35 +09:00
Kazu Yokomizo
97441ccacb Fix the box-shadow 2017-04-08 16:46:11 +09:00
Kazu Yokomizo
6b29aed6c4 Fix the search modal layout 2017-04-08 16:40:26 +09:00
Kazu Yokomizo
31eb9caee4 Fix the dark layout at NoteList 2017-04-08 16:03:53 +09:00
Kazu Yokomizo
64cf34e673 Fix the make note modal layout at white theme 2017-04-08 15:57:59 +09:00
Kazu Yokomizo
8996ebb819 Fix the make note modal layout at dark theme 2017-04-08 15:53:31 +09:00
Kazu Yokomizo
a36c62044b Fix the create folder modal layout at dark theme 2017-04-08 15:49:43 +09:00
Kazu Yokomizo
13418109ea Fix the create folder modal layout at white theme 2017-04-08 15:37:55 +09:00
Kohei TAKATA
fe7c05aaa5 Merge pull request #393 from BoostIO/feature-use-yarn
Using yarn
2017-04-08 12:51:48 +09:00
Kazu Yokomizo
116e27e0db Fix the textarea layout at Snippet note 2017-04-08 01:04:32 +09:00
Kazu Yokomizo
6b135afe1a Change the font-size at FolderSelect 2017-04-07 19:20:49 +09:00
Kazu Yokomizo
7a9c4951a2 Fix the tag layout of white theme at NoteDetail 2017-04-07 19:08:34 +09:00
Kazu Yokomizo
041a51a70f Fix the tag layout of dark theme at NoteDetail 2017-04-07 19:04:09 +09:00
Kazu Yokomizo
7b4ff9906e Change the note-title-icon position at NoteList 2017-04-07 18:51:34 +09:00
Kazu Yokomizo
11ab5c7598 Fix the tag layout of white theme at NoteList 2017-04-07 18:45:16 +09:00
Kazu Yokomizo
64d53c611b Fix the tag layout of dark theme at NoteList 2017-04-07 18:43:36 +09:00
Kazu Yokomizo
657d69a0fb Fix the dark theme layout at NoteList 2017-04-07 15:25:59 +09:00
Kazu Yokomizo
62d39e6715 Change the StorageList layout 2017-04-07 15:12:46 +09:00
Kazu Yokomizo
a27d8192ee Change the white theme layout of NoteList 2017-04-07 15:05:18 +09:00
SuenagaRyota
41b69afe03 Merge pull request #385 from BoostIO/Change-trashButton-size
Change the trashButton size
2017-04-06 23:04:20 -07:00
sota1235
54b5af0741 modify: update docs 2017-04-07 14:39:10 +09:00
sota1235
d4060f8a5a add: using yarn 🎉 2017-04-07 14:37:13 +09:00
SuenagaRyota
2935d41aba Merge pull request #386 from clone1612/productionPruneFix
Fix for 'npm prune --production' deleting needed dependencies
2017-04-06 22:33:16 -07:00
Kazu Yokomizo
af6cd10e28 Change the layout at SideNav 2017-04-07 14:24:38 +09:00
SuenagaRyota
435c80d870 Merge pull request #392 from asmsuechan/rm-finder-menu
Remove finder-menu
2017-04-06 21:30:04 -07:00
asmsuechan
775cec32da Remove finder-menu
it's no longer required
2017-04-06 21:22:25 -07:00
SuenagaRyota
e8cc7abadc Merge pull request #364 from Hastegan/master
Uniform the accelerator notation
2017-04-06 21:08:55 -07:00
Kazu Yokomizo
c1051afdc0 Change the SideNav layout 2017-04-07 00:38:49 +09:00
Kazu Yokomizo
573d3ce11e Fix the layout on NoteList 2017-04-06 23:25:38 +09:00
Kazu Yokomizo
0a89dcc6d8 Change the font-size at SideNav 2017-04-06 23:09:24 +09:00
Kazu Yokomizo
d45033ae8e Change the font-size at NoteList 2017-04-06 22:59:09 +09:00
Kazu Yokomizo
313e8b8c98 Fix the dark theme layout of Sidebar and NoteList 2017-04-06 22:11:59 +09:00
Sosuke Suzuki
25685dc8b0 Several small fixes 2017-04-06 21:52:23 +09:00
Jannick Hemelhof
d6a78dfe28 Fix for prune deleting needed packages 2017-04-05 14:53:51 +02:00
Kazu Yokomizo
de45852790 Change the trashButton size 2017-04-05 11:38:44 +09:00
Kazu Yokomizo
c6a505cb44 Merge pull request #384 from BoostIO/update-slack-invitiaon
Update slack invitiaon
2017-04-05 11:36:10 +09:00
Kazu Yokomizo
44427a40b7 Update readme
Update slack group invitation link.
2017-04-05 11:32:06 +09:00
Kazu Yokomizo
8a2ac08c0a Update readme
Update the slack group invitation link.
2017-04-05 11:31:12 +09:00
Kazu Yokomizo
7babf66d5f Merge pull request #340 from asmsuechan/remove-a-menu-on-delete
Remove a menu which is shown on clicked the trash button
2017-04-05 11:26:18 +09:00
Sosuke Suzuki
50cd0b794b change color with hover during dragging 2017-04-05 10:08:09 +09:00
Sosuke Suzuki
720f07f62c Move note between folders 2017-04-01 02:36:48 +09:00
hastegan
6daffbcafa uniform shortcut notation 2017-03-29 01:10:55 +02:00
Sota Sugiura
b76729e836 Merge pull request #362 from BoostIO/Edit-slackgrou-link
Edit slack group invitation link
2017-03-28 15:14:49 +09:00
Kazu Yokomizo
b2294e0fc9 modify: Edited the slack group invitation link
at Japanese
2017-03-28 14:49:21 +09:00
Kazu Yokomizo
3559737e8e modify: Edited the slack group invitation link 2017-03-28 14:48:15 +09:00
asmsuechan
40b7ce607b Add it to snippet note 2017-03-27 11:49:54 -07:00
asmsuechan
1de67a00cb Remove a menu which is shown on clicked the trash button 2017-03-27 11:44:42 -07:00
SuenagaRyota
6b4b44dba8 Merge pull request #358 from asmsuechan/modify-documents
Modify and add documents
2017-03-27 02:37:44 -07:00
asmsuechan
c424cc5d33 Change the sentence 2017-03-26 23:55:09 -07:00
asmsuechan
5b71d010b4 Add docs/ja/debug.md 2017-03-26 23:49:18 -07:00
asmsuechan
b9457d3e33 Add docs/debug.md 2017-03-26 23:49:08 -07:00
asmsuechan
60e267409c Modify ja/build.md accompanied by npm run dev-start 2017-03-26 23:20:04 -07:00
asmsuechan
e6a2521143 Modify build.md accompanied by npm run dev-start 2017-03-26 23:15:36 -07:00
Sota Sugiura
ae36ed2b46 Merge pull request #357 from asmsuechan/add-concurrently
Add concurrently for running local environment more easily
2017-03-27 14:30:21 +09:00
asmsuechan
fb2ed81fd3 Add concurrently for running local environment more easily 2017-03-26 22:04:47 -07:00
Sosuke Suzuki
a74651b515 load javascript mode of codemirror & clean up dirty codes 2017-03-25 15:32:45 +09:00
SuenagaRyota
6904c192e4 Merge pull request #352 from redcom/fix-288
fix: #288 Fixed Snippet tabs overwriting other tabs when closed
2017-03-23 13:41:54 -07:00
Razvan Moraru
6540d2670c better formatting 2017-03-23 21:01:49 +01:00
Razvan Moraru
966ba06bc4 change let to const 2017-03-23 17:50:39 +01:00
Razvan Moraru
3b4921b848 fix: #288 Fixed Snippet tabs overwriting other tabs when closed 2017-03-23 09:20:02 +01:00
SuenagaRyota
b11e10ac07 Merge pull request #347 from BoostIO/add-slack-group-link
Add slack group link
2017-03-22 18:50:03 -07:00
asmsuechan
2ec7ba04f5 Fix by lint 2017-03-22 00:21:49 -07:00
asmsuechan
095910d156 Fix the screen become black on closing Boostnote when a state of Boostnote is fullscreen on mac 2017-03-22 00:00:45 -07:00
Kazu Yokomizo
c39463aea8 modify: add the join to slack group link
Ver Japanese
2017-03-21 15:54:29 +09:00
Kazu Yokomizo
87e47c7ffb modify: Add the join to slack group link 2017-03-21 15:52:43 +09:00
Sota Sugiura
359f6734c5 Merge pull request #317 from BoostIO/feature-add-esilnt-rule
Add prefer-const rule and fix code
2017-03-21 15:16:48 +09:00
sota1235
1d3e71cf49 fix: for ESLint 2017-03-21 15:14:03 +09:00
Sota Sugiura
1ab449cecf Merge branch 'master' into feature-add-esilnt-rule 2017-03-21 15:04:14 +09:00
Sota Sugiura
44dd609134 Merge pull request #289 from kostaldavid8/master
Smart bullets
2017-03-21 15:02:25 +09:00
kostaldavid8
1e8e161a33 remove console.log 2017-03-20 19:42:14 +01:00
kostaldavid8
c56d232e58 Added + as bullet, bug fix 2017-03-20 19:22:31 +01:00
Sota Sugiura
8315b75587 Merge pull request #342 from sota1235/feature-v0-8-7
v0.8.7
2017-03-20 16:11:24 +09:00
sota1235
562b0592af v0.8.7 2017-03-20 15:39:34 +09:00
Sota Sugiura
1fd1bed01a Merge pull request #343 from asmsuechan/remove-markdown-it-toc
Remove markdown-it-toc because an errors are happening
2017-03-20 15:38:32 +09:00
asmsuechan
4f116cba34 Remove markdown-it-toc because an errors are happening 2017-03-19 23:32:51 -07:00
Sota Sugiura
9d1d57f183 Merge pull request #331 from asmsuechan/fix-the-behavior-of-lock
Fix the behavior of a feature which locks the editor
2017-03-20 15:31:44 +09:00
asmsuechan
6feeee8933 Refactor the styles of the buttons 2017-03-19 22:17:01 -07:00
asmsuechan
5541c0dc38 Refactor styles of the buttons 2017-03-19 22:11:02 -07:00
asmsuechan
4a8054faed Fix the design of the trash button on snippet note 2017-03-19 22:04:19 -07:00
asmsuechan
bbced7be25 Fix the background-color of button 2017-03-19 21:56:41 -07:00
asmsuechan
893a92c87b Fix from reviews 2017-03-19 12:39:46 -07:00
asmsuechan
4055ce19cd Fix the design of buttons of TopBar on dark theme 2017-03-19 11:18:17 -07:00
asmsuechan
bcf27233bc Fix a style of the lock button 2017-03-19 01:31:28 -07:00
asmsuechan
45111e1610 Change the styleName info-right-button to control-trashButton because it's not good name
* fix the position of lock button
2017-03-19 01:20:04 -07:00
asmsuechan
2af86dfa3e Fix the action of hover 2017-03-19 01:02:47 -07:00
Sota Sugiura
1b474e1c28 Merge pull request #337 from BoostIO/Change-the-tray-icon
Changed the tray icon when mouse on.
2017-03-19 16:45:15 +09:00
Sota Sugiura
c4370694cc Merge pull request #295 from asmsuechan/add-a-shortcut-for-jump-to-top
Add a shortcut which jumps to top by Ctrl-G
2017-03-19 16:43:15 +09:00
asmsuechan
91f24d96b9 Fix a bug which cannot read a property when moves to other folder on locking 2017-03-19 00:41:55 -07:00
Kazu Yokomizo
bb0b74e889 Changed the tray icon when mouse on. 2017-03-19 16:20:55 +09:00
asmsuechan
525ab900bd Fix == to === 2017-03-19 00:18:09 -07:00
asmsuechan
31c04de7b6 Change the name list:top to list:jumpToTop 2017-03-19 00:18:09 -07:00
asmsuechan
dea0c4287b Fix let to const 2017-03-19 00:18:09 -07:00
asmsuechan
cec4b3132c Add a shortcut which jumps to top by Ctrl-G 2017-03-19 00:18:05 -07:00
asmsuechan
f3ed22dd51 Enable to appear a tooltip for the LockButton 2017-03-18 23:19:43 -07:00
asmsuechan
6aa9104076 Fix not to be shown the lock button if config.editor.switchPreview is
RIGHTCLICK
2017-03-18 23:19:43 -07:00
asmsuechan
e7fd18967b Change a state name editorStatus to isLockButtonShown 2017-03-18 23:19:43 -07:00
asmsuechan
8a5558db55 Change a name showlockbutton to togglelockbutton 2017-03-18 23:19:43 -07:00
asmsuechan
4767f15e9b Fix the behavior of a feature what locks the editor 2017-03-18 23:19:43 -07:00
Sota Sugiura
b7ca4668e9 Merge pull request #301 from asmsuechan/add-a-shortcut-for-supporting-to-input-bold
Add a shortcut for supporting to input bold
2017-03-19 15:08:17 +09:00
Sota Sugiura
70e637fada Merge pull request #326 from asmsuechan/refactor-typos
Fix typos
2017-03-19 14:09:29 +09:00
SuenagaRyota
459b0ff030 Merge pull request #316 from asmsuechan/fix-the-design-of-li
Fix the design of li
2017-03-18 10:58:30 -07:00
SuenagaRyota
2903788fd4 Merge pull request #330 from BoostIO/feature-dragDrop-svg
dragged svg file is turns not into xml text
2017-03-17 22:54:04 -07:00
Sosuke Suzuki
af0fdb9277 move the line under L57 2017-03-18 14:49:46 +09:00
SuenagaRyota
41a58583dc Merge pull request #324 from BoostIO/feature_note_title_markdown_sharp
ignore # in the code block
2017-03-17 21:48:16 -07:00
Sosuke Suzuki
c80a26fe0b dragged svg file is turns not into xml text 2017-03-18 13:44:35 +09:00
Sosuke Suzuki
806c3bbaf9 delete unnecessary } and correct the indent 2017-03-18 12:27:43 +09:00
Sosuke Suzuki
fe1c197138 reduce indent 2017-03-18 03:02:04 +09:00
Sosuke Suzuki
b577ca2bc2 Refactor the dirty code 2017-03-18 01:58:15 +09:00
asmsuechan
70a97a6a2a Fix a typo 2017-03-16 13:30:24 -07:00
Sosuke Suzuki
034f46792b ignore # in the code block 2017-03-17 03:42:17 +09:00
SuenagaRyota
3dc1b59753 Merge pull request #307 from BoostIO/feature-trashCan-icon
I changed the button  deleting snnipet and markdown from ... to trash can.
2017-03-15 13:55:31 -07:00
SuenagaRyota
98b761f1d1 Merge pull request #322 from BoostIO/featureSuccessfullyDeleteSubtab
The snippet subtab was successfully deleted.
2017-03-15 13:51:11 -07:00
Sosuke Suzuki
712301436d I crrected indents 2017-03-16 02:54:57 +09:00
Sosuke Suzuki
4243afb033 remove the extra file, and correct indents 2017-03-16 02:34:26 +09:00
Sosuke Suzuki
0f43485606 The snippet subtab was successfully deleted. 2017-03-16 01:36:58 +09:00
Sota Sugiura
b91b88f16e Merge pull request #321 from BoostIO/Change-the-tray-icon
Change the tray icons.
2017-03-14 14:24:02 +09:00
Kazu Yokomizo
2f2c500e4a Change the tray icons. 2017-03-14 13:59:59 +09:00
sota1235
7065fad69b modify: change warning level for no-lone-blocks rule 2017-03-13 18:55:16 +09:00
sota1235
6fcbca6b10 refactor: by ESLint 2017-03-13 18:40:12 +09:00
sota1235
93b15f2a7a modify: change warning level for no-undef 2017-03-13 18:36:21 +09:00
sota1235
df9d8ff735 modify: change warning level for no-unused-var 2017-03-13 18:33:39 +09:00
sota1235
fda17e044e modify: change warning level for prefer-const rule 2017-03-13 18:26:56 +09:00
sota1235
b4e54fc149 modify: npm script 2017-03-13 18:26:39 +09:00
asmsuechan
48514d1020 Change an arg name md to mdElement 2017-03-12 16:07:40 -07:00
asmsuechan
49a4ec5e16 Enable CTRL + B in a word to make it bold 2017-03-12 16:04:08 -07:00
asmsuechan
c3e92b3b81 Fix if clauses 2017-03-12 16:04:00 -07:00
asmsuechan
e78492983a Add a shortcut for supporting to input bold 2017-03-12 16:02:52 -07:00
asmsuechan
0f3230110c Change to use const instead of let 2017-03-10 20:40:11 -08:00
asmsuechan
65573bd4db Add comments 2017-03-10 20:33:16 -08:00
asmsuechan
928df018dc Fix the assginment of targetStorage 2017-03-10 20:33:16 -08:00
asmsuechan
b2187b72ab Fix let to const 2017-03-10 20:33:16 -08:00
asmsuechan
aae2bddd32 Improve the Promise of copyImage 2017-03-10 20:33:11 -08:00
asmsuechan
b6eddf0821 Add dataApi.copyImage for copying image to boostnote storage on an image to boostnote storage on an image doropped into CodeEditor 2017-03-10 20:31:54 -08:00
sota1235
fac0abaed6 modify: add prefer-const rule and fix code 2017-03-10 10:12:23 +09:00
asmsuechan
a6bd239592 Fix the design of li
* fix the design of markdown-it-TOC
2017-03-09 13:04:14 -08:00
SuenagaRyota
7845bbd881 Merge pull request #310 from Gansgar/master
Added Table of Contents and two small bug fixes
2017-03-09 12:09:50 -08:00
SuenagaRyota
68bc440749 Merge pull request #298 from asmsuechan/fix-drop-an-image-on-CodeEditor-and-MarkdownPreview
Disable dragging an image to MarkdownPreview and fix the behavior of an image dropped on CodeEditor.
2017-03-08 15:38:27 +09:00
SuenagaRyota
6dbe3cec69 Merge pull request #283 from asmsuechan/add-lock-to-CodeEditor
Enable lock in MarkdownEditor
2017-03-07 11:16:55 +09:00
georg
850c339bb3 bug fix to select all
- at least on OSX fixed bug, that would select all text when clicking,
opening or any other action was done
2017-03-04 18:37:04 +01:00
georg
57835d0e32 Added ToC support
- added `markdown-it-toc-and-anchor` into the project
- integrated it, create a table of contents every in a markup by adding
`@[TOC]`
2017-03-04 17:48:17 +01:00
georg
ac2c50c8bc Fixed background of taskListItem
- fixed background bug when using a taskListItem with the light design
2017-03-04 17:18:30 +01:00
Kohei TAKATA
7296cbe4ec Merge pull request #309 from BoostIO/feature-v0-8-6
v0.8.6
2017-03-04 14:06:31 +09:00
Kohei TAKATA
16061a7eba v0.8.6 2017-03-04 13:04:18 +09:00
Sosuke Suzuki
566fe92589 change the icon to delete snippet and markdown 2017-03-03 02:13:13 +09:00
asmsuechan
83cef13f1c Change let to const 2017-02-21 23:30:37 +09:00
asmsuechan
4bb9533049 Fix prevention of an image dropped on MarkdownPreview and fix the behavior of an image dropped on CodeEditor 2017-02-21 00:14:03 +09:00
kostaldavid8
d07c62e266 Merge branch 'master' of https://github.com/BoostIO/Boostnote 2017-02-18 23:36:09 +01:00
SuenagaRyota
8beb661af4 Merge pull request #291 from kostaldavid8/image-drag-fix
Image drag fix
2017-02-18 21:06:16 +09:00
Sosuke Suzuki
5a201dd1b9 correction the pointed out code 2017-02-18 12:26:38 +09:00
asmsuechan
aa0ad3bb70 Fix from review 2017-02-18 12:18:55 +09:00
kostaldavid8
f7fb531902 Fixed image drag and drop
Added escaping and changed function that wasn't working
2017-02-17 10:31:41 +01:00
kostaldavid8
c65db4e2b0 Fixed image drag and drop
Added escaping and changed function that wasn't working
2017-02-17 10:04:55 +01:00
Sota Sugiura
b32b38bb0d Merge pull request #287 from ericsolomon/274_font_color_rename_folder_modal
Fix font color for dark theme rename folder modal
2017-02-16 21:38:37 -08:00
kostaldavid8
d6171dc502 Smart numbered lists, too
Has auto increment, but no auto indent on tab, I don't know what to do
2017-02-16 13:18:17 +01:00
Sosuke Suzuki
7b5a7aabed add HighLightCheckEditor 2017-02-16 13:00:45 +09:00
kostaldavid8
77eb19af40 Code style fixes 2017-02-15 23:30:56 +01:00
kostaldavid8
e68d535fa2 Smart bullets
When you hit enter on a line with a bullet, you get a new one on the new line.
Also when you hit tab after a bullet, it automatically indents.
It makes typing with bullets much more pleasant.
2017-02-15 22:18:20 +01:00
Eric Solomon
6e5f6cc739 Fix font color for dark theme rename folder modal 2017-02-14 03:21:23 -06:00
asmsuechan
bbeeeccb31 Fix to use by preventDefault 2017-02-11 23:09:03 +09:00
asmsuechan
e9525fae22 Change the order of focus and emit 'editor:lock' 2017-02-11 23:09:01 +09:00
asmsuechan
672d409bf2 Enable to show the lock icon only the Editor state is CODE 2017-02-11 17:52:11 +09:00
asmsuechan
74ee6ae6ce Add lock icon to NoteDetail 2017-02-11 15:48:38 +09:00
Sosuke Suzuki
743b220953 unfinished syntaxHighLightCheck 2017-02-04 14:41:26 +09:00
Kazuhisa Hara
b6304a04e6 add rpm support
Make it able to build rpm package using grunt-electron-installer-redhat.
https://www.npmjs.com/package/grunt-electron-installer-redhat

Signed-off-by: Kazuhisa Hara <kazuhisya@gmail.com>
2017-01-25 21:14:30 +09:00
222 changed files with 13816 additions and 2360 deletions

33
.boostnoterc.sample Normal file
View File

@@ -0,0 +1,33 @@
{
"amaEnabled": true,
"editor": {
"fontFamily": "Monaco, Consolas",
"fontSize": "14",
"indentSize": "2",
"indentType": "space",
"keyMap": "vim",
"switchPreview": "BLUR",
"theme": "monokai"
},
"hotkey": {
"toggleFinder": "Cmd + Alt + S",
"toggleMain": "Cmd + Alt + L"
},
"isSideNavFolded": false,
"listStyle": "DEFAULT",
"listWidth": 174,
"navWidth": 200,
"preview": {
"codeBlockTheme": "dracula",
"fontFamily": "Lato",
"fontSize": "14",
"lineNumber": true
},
"sortBy": "UPDATED_AT",
"ui": {
"defaultNote": "ALWAYS_ASK",
"disableDirectWrite": false,
"theme": "default"
},
"zoom": 1
}

View File

@@ -1,6 +1,16 @@
{
"extends": ["standard", "standard-jsx"],
"extends": ["standard", "standard-jsx", "plugin:react/recommended"],
"plugins": ["react"],
"rules": {
"no-useless-escape": 0
"no-useless-escape": 0,
"prefer-const": "warn",
"no-unused-vars": "warn",
"no-undef": "warn",
"no-lone-blocks": "warn",
"react/prop-types": 0,
"react/no-string-refs": 0,
"react/no-find-dom-node": "warn",
"react/no-render-return-value": "warn",
"react/no-deprecated": "warn"
}
}

Binary file not shown.

View File

@@ -1,6 +1,20 @@
language: node_js
node_js:
- 'stable'
- 'lts/*'
script: npm run lint && npm run test
- stable
- lts/*
script:
- npm run lint && npm run test
- 'if [[ ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} = "master" ]]; then npm install -g grunt npm@5.2 && grunt pre-build; fi'
after_success:
- openssl aes-256-cbc -K $encrypted_440d7f9a3c38_key -iv $encrypted_440d7f9a3c38_iv
-in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
sudo: required
services:
- docker
deploy:
'on':
branch: master
provider: script
script: if [ ${TRAVIS_NODE_VERSION} = "stable" ];then docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq
&& cd $(pwd) && snapcraft && snapcraft push *.snap --release edge"; fi
skip_cleanup: true

49
Backers.md Normal file
View File

@@ -0,0 +1,49 @@
<h1 align="center">Sponsors &amp; Backers</h1>
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)
---
## Backers via OpenCollective
<a href="https://opencollective.com/boostnoteio#backers" target="_blank"><img src="https://opencollective.com/boostnoteio/backers.svg?width=890"></a>
- [Ralph03](https://opencollective.com/ralph03) - $24
- [Nikolas Dan](https://opencollective.com/nikolas-dan) - $20
- [tatoosh11](https://twitter.com/ta11) - $10
- [Alexander Borovkov](https://opencollective.com/alexander-borovkov) - $10
- [Yeojong Kim](https://twitter.com/yeojoy) - $5
- [Scotia Draven](https://opencollective.com/scotia-draven) - $5
- [spoonhoop](https://opencollective.com/spoonhoop) - $5
## Backers via Bountysource
https://salt.bountysource.com/teams/boostnote
- Kuzz - $65
- Intense Raiden - $45
- ravy22 - $25
- trentpolack - $20
- hikariru - $10
- kolchan11 - $10
- RonWalker22 - $10
- hocchuc - $5
- Adam - $5
- Steve - $5
- evmin - $5

10
ISSUE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,10 @@
<!--
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.
-->
<!--
Love Boostnote? Please consider supporting us via OpenCollective:
👉 https://opencollective.com/boostnoteio
-->

View File

@@ -1,8 +1,8 @@
GPL-3.0
Boostnote - the simplest note app
Boostnote - an open source note-taking app made for programmers just like you.
Copyright (C) 2016 MAISIN&CO.
Copyright (C) 2017 Maisin&Co., Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@@ -2,6 +2,9 @@ import React, { PropTypes } from 'react'
import _ from 'lodash'
import CodeMirror from 'codemirror'
import path from 'path'
import copyImage from 'browser/main/lib/dataApi/copyImage'
import { findStorage } from 'browser/lib/findStorage'
import fs from 'fs'
CodeMirror.modeURL = '../node_modules/codemirror/mode/%N/%N.js'
@@ -38,6 +41,7 @@ export default class CodeEditor extends React.Component {
}
this.props.onBlur != null && this.props.onBlur(e)
}
this.pasteHandler = (editor, e) => this.handlePaste(editor, e)
this.loadStyleHandler = (e) => {
this.editor.refresh()
}
@@ -55,19 +59,40 @@ export default class CodeEditor extends React.Component {
indentWithTabs: this.props.indentType !== 'space',
keyMap: this.props.keyMap,
inputStyle: 'textarea',
dragDrop: false,
extraKeys: {
Tab: function (cm) {
const cursor = cm.getCursor()
const line = cm.getLine(cursor.line)
if (cm.somethingSelected()) cm.indentSelection('add')
else {
if (cm.getOption('indentWithTabs')) {
cm.execCommand('insertTab')
const tabs = cm.getOption('indentWithTabs')
if (line.trimLeft().match(/^(-|\*|\+) (\[( |x)\] )?$/)) {
cm.execCommand('goLineStart')
if (tabs) {
cm.execCommand('insertTab')
} else {
cm.execCommand('insertSoftTab')
}
cm.execCommand('goLineEnd')
} else {
cm.execCommand('insertSoftTab')
if (tabs) {
cm.execCommand('insertTab')
} else {
cm.execCommand('insertSoftTab')
}
}
}
},
'Cmd-T': function (cm) {
// Do nothing
},
Enter: 'newlineAndIndentContinueMarkdownList',
'Ctrl-C': (cm) => {
if (cm.getOption('keyMap').substr(0, 3) === 'vim') {
document.execCommand('copy')
}
return CodeMirror.Pass
}
}
})
@@ -76,14 +101,26 @@ export default class CodeEditor extends React.Component {
this.editor.on('blur', this.blurHandler)
this.editor.on('change', this.changeHandler)
this.editor.on('paste', this.pasteHandler)
let editorTheme = document.getElementById('editorTheme')
editorTheme.addEventListener('load', this.loadStyleHandler)
CodeMirror.Vim.defineEx('quit', 'q', this.quitEditor)
CodeMirror.Vim.defineEx('q!', 'q!', this.quitEditor)
CodeMirror.Vim.defineEx('wq', 'wq', this.quitEditor)
CodeMirror.Vim.defineEx('qw', 'qw', this.quitEditor)
CodeMirror.Vim.map('ZZ', ':q', 'normal')
}
quitEditor () {
document.querySelector('textarea').blur()
}
componentWillUnmount () {
this.editor.off('blur', this.blurHandler)
this.editor.off('change', this.changeHandler)
this.editor.off('paste', this.pasteHandler)
let editorTheme = document.getElementById('editorTheme')
editorTheme.removeEventListener('load', this.loadStyleHandler)
}
@@ -156,6 +193,7 @@ export default class CodeEditor extends React.Component {
this.editor.setValue(this.props.value)
this.editor.clearHistory()
this.editor.on('change', this.changeHandler)
this.editor.refresh()
}
setValue (value) {
@@ -166,15 +204,41 @@ export default class CodeEditor extends React.Component {
handleDropImage (e) {
e.preventDefault()
let imagePath = e.dataTransfer.files[0].path
let filename = path.basename(imagePath)
let imageMd = `![${filename}](${imagePath})`
this.insertImage(imageMd)
const imagePath = e.dataTransfer.files[0].path
const filename = path.basename(imagePath)
copyImage(imagePath, this.props.storageKey).then((imagePath) => {
const imageMd = `![${filename}](${path.join('/:storage', imagePath)})`
this.insertImageMd(imageMd)
})
}
insertImage (imageMd) {
const textarea = this.editor.getInputField()
textarea.value = textarea.value.substr(0, textarea.selectionStart) + imageMd + textarea.value.substr(textarea.selectionEnd)
insertImageMd (imageMd) {
this.editor.replaceSelection(imageMd)
}
handlePaste (editor, e) {
const dataTransferItem = e.clipboardData.items[0]
if (!dataTransferItem.type.match('image')) return
const blob = dataTransferItem.getAsFile()
let reader = new FileReader()
let base64data
reader.readAsDataURL(blob)
reader.onloadend = () => {
base64data = reader.result.replace(/^data:image\/png;base64,/, '')
base64data += base64data.replace('+', ' ')
const binaryData = new Buffer(base64data, 'base64').toString('binary')
const imageName = Math.random().toString(36).slice(-16)
const storagePath = findStorage(this.props.storageKey).path
const imageDir = path.join(storagePath, 'images')
if (!fs.existsSync(imageDir)) fs.mkdirSync(imageDir)
const imagePath = path.join(imageDir, `${imageName}.png`)
fs.writeFile(imagePath, binaryData, 'binary')
const imageMd = `![${imageName}](${path.join('/:storage', `${imageName}.png`)})`
this.insertImageMd(imageMd)
}
}
render () {

View File

@@ -3,22 +3,33 @@ import CSSModules from 'browser/lib/CSSModules'
import styles from './MarkdownEditor.styl'
import CodeEditor from 'browser/components/CodeEditor'
import MarkdownPreview from 'browser/components/MarkdownPreview'
import eventEmitter from 'browser/main/lib/eventEmitter'
import { findStorage } from 'browser/lib/findStorage'
const _ = require('lodash')
class MarkdownEditor extends React.Component {
constructor (props) {
super(props)
this.escapeFromEditor = ['Control', 'w']
// char codes for ctrl + w
this.escapeFromEditor = [17, 87]
// ctrl + shift + ;
this.supportMdSelectionBold = [16, 17, 186]
this.state = {
status: 'PREVIEW',
renderValue: props.value,
keyPressed: {}
keyPressed: new Set(),
isLocked: false
}
this.lockEditorCode = () => this.handleLockEditor()
}
componentDidMount () {
this.value = this.refs.code.value
eventEmitter.on('editor:lock', this.lockEditorCode)
}
componentDidUpdate () {
@@ -33,6 +44,7 @@ class MarkdownEditor extends React.Component {
componentWillUnmount () {
this.cancelQueue()
eventEmitter.off('editor:lock', this.lockEditorCode)
}
queueRendering (value) {
@@ -69,15 +81,16 @@ class MarkdownEditor extends React.Component {
if (newStatus === 'CODE') {
this.refs.code.focus()
} else {
this.refs.code.blur()
this.refs.preview.focus()
}
eventEmitter.emit('topbar:togglelockbutton', this.state.status)
})
}
}
handleBlur (e) {
this.setState({ keyPressed: [] })
if (this.state.isLocked) return
this.setState({ keyPressed: new Set() })
let { config } = this.props
if (config.editor.switchPreview === 'BLUR') {
let cursorPosition = this.refs.code.editor.getCursor()
@@ -87,6 +100,7 @@ class MarkdownEditor extends React.Component {
this.refs.preview.focus()
this.refs.preview.scrollTo(cursorPosition.line)
})
eventEmitter.emit('topbar:togglelockbutton', this.state.status)
}
}
@@ -102,6 +116,7 @@ class MarkdownEditor extends React.Component {
}, () => {
this.refs.code.focus()
})
eventEmitter.emit('topbar:togglelockbutton', this.state.status)
}
}
@@ -138,6 +153,7 @@ class MarkdownEditor extends React.Component {
} else {
this.refs.code.focus()
}
eventEmitter.emit('topbar:togglelockbutton', this.state.status)
}
reload () {
@@ -146,26 +162,52 @@ class MarkdownEditor extends React.Component {
this.renderPreview(this.props.value)
}
handleKeyDown(e) {
const keyPressed = Object.assign(this.state.keyPressed, {
[e.key]: true
})
handleKeyDown (e) {
let { config } = this.props
if (this.state.status !== 'CODE') return false
const keyPressed = this.state.keyPressed
keyPressed.add(e.keyCode)
this.setState({ keyPressed })
let isNoteHandlerKey = (el) => { return this.state.keyPressed[el] }
if (this.state.status === 'CODE' && this.escapeFromEditor.every(isNoteHandlerKey)) {
document.activeElement.blur()
let isNoteHandlerKey = (el) => { return keyPressed.has(el) }
// These conditions are for ctrl-e and ctrl-w
if (keyPressed.size === this.escapeFromEditor.length &&
!this.state.isLocked && this.state.status === 'CODE' &&
this.escapeFromEditor.every(isNoteHandlerKey)) {
this.handleContextMenu()
if (config.editor.switchPreview === 'BLUR') document.activeElement.blur()
}
if (keyPressed.size === this.supportMdSelectionBold.length && this.supportMdSelectionBold.every(isNoteHandlerKey)) {
this.addMdAroundWord('**')
}
}
addMdAroundWord (mdElement) {
if (this.refs.code.editor.getSelection()) {
return this.addMdAroundSelection(mdElement)
}
const currentCaret = this.refs.code.editor.getCursor()
const word = this.refs.code.editor.findWordAt(currentCaret)
const cmDoc = this.refs.code.editor.getDoc()
cmDoc.replaceRange(mdElement, word.anchor)
cmDoc.replaceRange(mdElement, { line: word.head.line, ch: word.head.ch + mdElement.length })
}
addMdAroundSelection (mdElement) {
this.refs.code.editor.replaceSelection(`${mdElement}${this.refs.code.editor.getSelection()}${mdElement}`)
}
handleKeyUp (e) {
const keyPressed = Object.assign(this.state.keyPressed, {
[e.key]: false
})
const keyPressed = this.state.keyPressed
keyPressed.delete(e.keyCode)
this.setState({ keyPressed })
}
handleLockEditor () {
this.setState({ isLocked: !this.state.isLocked })
}
render () {
let { className, value, config } = this.props
let { className, value, config, storageKey } = this.props
let editorFontSize = parseInt(config.editor.fontSize, 10)
if (!(editorFontSize > 0 && editorFontSize < 101)) editorFontSize = 14
@@ -175,6 +217,8 @@ class MarkdownEditor extends React.Component {
let previewStyle = {}
if (this.props.ignorePreviewPointerEvents) previewStyle.pointerEvents = 'none'
const storage = findStorage(storageKey)
return (
<div className={className == null
? 'MarkdownEditor'
@@ -185,7 +229,10 @@ class MarkdownEditor extends React.Component {
onKeyDown={(e) => this.handleKeyDown(e)}
onKeyUp={(e) => this.handleKeyUp(e)}
>
<CodeEditor styleName='codeEditor'
<CodeEditor styleName={this.state.status === 'CODE'
? 'codeEditor'
: 'codeEditor--hide'
}
ref='code'
mode='GitHub Flavored Markdown'
value={value}
@@ -195,6 +242,7 @@ class MarkdownEditor extends React.Component {
fontSize={editorFontSize}
indentType={config.editor.indentType}
indentSize={editorIndentSize}
storageKey={storageKey}
onChange={(e) => this.handleChange(e)}
onBlur={(e) => this.handleBlur(e)}
/>
@@ -218,6 +266,8 @@ class MarkdownEditor extends React.Component {
onMouseUp={(e) => this.handlePreviewMouseUp(e)}
onMouseDown={(e) => this.handlePreviewMouseDown(e)}
onCheckboxClick={(e) => this.handleCheckboxClick(e)}
showCopyNotification={config.ui.showCopyNotification}
storagePath={storage.path}
/>
</div>
)

View File

@@ -4,8 +4,14 @@
.codeEditor
absolute top bottom left right
.hide
z-index 0
opacity 0
pointer-events none
.codeEditor--hide
@extend .codeEditor
@extend .hide
.preview
display block
@@ -17,7 +23,5 @@
.preview--hide
@extend .preview
z-index 0
opacity 0
pointer-events none
@extend .hide

View File

@@ -8,21 +8,9 @@ import flowchart from 'flowchart'
import SequenceDiagram from 'js-sequence-diagrams'
import eventEmitter from 'browser/main/lib/eventEmitter'
import fs from 'fs'
function decodeHTMLEntities (text) {
var entities = [
['apos', '\''],
['amp', '&'],
['lt', '<'],
['gt', '>']
]
for (var i = 0, max = entities.length; i < max; ++i) {
text = text.replace(new RegExp('&' + entities[i][0] + ';', 'g'), entities[i][1])
}
return text
}
import htmlTextHelper from 'browser/lib/htmlTextHelper'
import copy from 'copy-to-clipboard'
import mdurl from 'mdurl'
const { remote } = require('electron')
const { app } = remote
@@ -45,21 +33,49 @@ function buildStyle (fontFamily, fontSize, codeBlockFontFamily, lineNumber) {
font-weight: normal;
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}
body {
font-family: ${fontFamily.join(', ')};
font-family: '${fontFamily.join("','")}';
font-size: ${fontSize}px;
}
code {
font-family: ${codeBlockFontFamily.join(', ')};
background-color: rgba(0,0,0,0.04);
color: #CC305F;
}
.lineNumber {
${lineNumber && 'display: block !important;'}
font-family: ${codeBlockFontFamily.join(', ')};
}
.clipboardButton {
color: rgba(147,147,149,0.8);;
fill: rgba(147,147,149,1);;
border-radius: 50%;
margin: 0px 10px;
border: none;
background-color: transparent;
outline: none;
height: 15px;
width: 15px;
cursor: pointer;
}
.clipboardButton:hover {
transition: 0.2s;
color: #939395;
fill: #939395;
background-color: rgba(0,0,0,0.1);
}
h1, h2 {
border: none;
}
@@ -73,6 +89,10 @@ h2 {
padding-bottom: 0.2em;
margin: 1em 0 0.37em;
}
body p {
white-space: normal;
}
`
}
@@ -81,7 +101,7 @@ const OSX = global.process.platform === 'darwin'
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
if (!OSX) {
defaultFontFamily.unshift('\'Microsoft YaHei\'')
defaultFontFamily.unshift('Microsoft YaHei')
defaultFontFamily.unshift('meiryo')
}
const defaultCodeBlockFontFamily = ['Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'monospace']
@@ -97,6 +117,9 @@ export default class MarkdownPreview extends React.Component {
this.checkboxClickHandler = (e) => this.handleCheckboxClick(e)
this.saveAsTextHandler = () => this.handleSaveAsText()
this.saveAsMdHandler = () => this.handleSaveAsMd()
this.printHandler = () => this.handlePrint()
this.linkClickHandler = this.handlelinkClick.bind(this)
}
handlePreviewAnchorClick (e) {
@@ -149,10 +172,14 @@ export default class MarkdownPreview extends React.Component {
this.exportAsDocument('md')
}
handlePrint () {
this.refs.root.contentWindow.print()
}
exportAsDocument (fileType) {
const options = {
filters: [
{ name: 'Documents', extensions: [fileType]}
{ name: 'Documents', extensions: [fileType] }
],
properties: ['openFile', 'createDirectory']
}
@@ -166,6 +193,16 @@ export default class MarkdownPreview extends React.Component {
})
}
fixDecodedURI (node) {
if (node && node.children.length === 1 && typeof node.children[0] === 'string') {
const { innerText, href } = node
node.innerText = mdurl.decode(href) === innerText
? href
: innerText
}
}
componentDidMount () {
this.refs.root.setAttribute('sandbox', 'allow-scripts')
this.refs.root.contentWindow.document.body.addEventListener('contextmenu', this.contextMenuHandler)
@@ -181,16 +218,22 @@ export default class MarkdownPreview extends React.Component {
this.refs.root.contentWindow.document.addEventListener('mousedown', this.mouseDownHandler)
this.refs.root.contentWindow.document.addEventListener('mouseup', this.mouseUpHandler)
this.refs.root.contentWindow.document.addEventListener('drop', this.preventImageDroppedHandler)
this.refs.root.contentWindow.document.addEventListener('dragover', this.preventImageDroppedHandler)
eventEmitter.on('export:save-text', this.saveAsTextHandler)
eventEmitter.on('export:save-md', this.saveAsMdHandler)
eventEmitter.on('print', this.printHandler)
}
componentWillUnmount () {
this.refs.root.contentWindow.document.body.removeEventListener('contextmenu', this.contextMenuHandler)
this.refs.root.contentWindow.document.removeEventListener('mousedown', this.mouseDownHandler)
this.refs.root.contentWindow.document.removeEventListener('mouseup', this.mouseUpHandler)
this.refs.root.contentWindow.document.removeEventListener('drop', this.preventImageDroppedHandler)
this.refs.root.contentWindow.document.removeEventListener('dragover', this.preventImageDroppedHandler)
eventEmitter.off('export:save-text', this.saveAsTextHandler)
eventEmitter.off('export:save-md', this.saveAsMdHandler)
eventEmitter.off('print', this.printHandler)
}
componentDidUpdate (prevProps) {
@@ -200,6 +243,7 @@ export default class MarkdownPreview extends React.Component {
prevProps.codeBlockFontFamily !== this.props.codeBlockFontFamily ||
prevProps.codeBlockTheme !== this.props.codeBlockTheme ||
prevProps.lineNumber !== this.props.lineNumber ||
prevProps.showCopyNotification !== this.props.showCopyNotification ||
prevProps.theme !== this.props.theme) {
this.applyStyle()
this.rewriteIframe()
@@ -223,7 +267,9 @@ export default class MarkdownPreview extends React.Component {
theme = consts.THEMES.some((_theme) => _theme === theme) && theme !== 'default'
? theme
: '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 () {
@@ -234,12 +280,28 @@ export default class MarkdownPreview extends React.Component {
el.removeEventListener('click', this.checkboxClickHandler)
})
let { value, theme, indentSize, codeBlockTheme } = this.props
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('a'), (el) => {
el.removeEventListener('click', this.linkClickHandler)
})
let { value, theme, indentSize, codeBlockTheme, showCopyNotification, storagePath } = this.props
this.refs.root.contentWindow.document.body.setAttribute('data-theme', theme)
const codeBlocks = value.match(/(```)(.|[\n])*?(```)/g)
if (codeBlocks !== null) {
codeBlocks.forEach((codeBlock) => {
value = value.replace(codeBlock, htmlTextHelper.encodeEntities(codeBlock))
})
}
this.refs.root.contentWindow.document.body.innerHTML = markdown.render(value)
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('.taskListItem'), (el) => {
el.parentNode.parentNode.style.listStyleType = 'none'
})
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('a'), (el) => {
this.fixDecodedURI(el)
el.addEventListener('click', this.anchorClickHandler)
})
@@ -247,6 +309,16 @@ export default class MarkdownPreview extends React.Component {
el.addEventListener('click', this.checkboxClickHandler)
})
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('a'), (el) => {
el.addEventListener('click', this.linkClickHandler)
})
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('img'), (el) => {
el.src = markdown.normalizeLinkText(el.src)
if (!/\/:storage/.test(el.src)) return
el.src = `file:///${markdown.normalizeLinkText(path.join(storagePath, 'images', path.basename(el.src)))}`
})
codeBlockTheme = consts.THEMES.some((_theme) => _theme === codeBlockTheme)
? codeBlockTheme
: 'default'
@@ -255,9 +327,26 @@ export default class MarkdownPreview extends React.Component {
let syntax = CodeMirror.findModeByName(el.className)
if (syntax == null) syntax = CodeMirror.findModeByName('Plain Text')
CodeMirror.requireMode(syntax.mode, () => {
let content = decodeHTMLEntities(el.innerHTML)
let content = htmlTextHelper.decodeEntities(el.innerHTML)
const copyIcon = document.createElement('i')
copyIcon.innerHTML = '<button class="clipboardButton"><svg width="13" height="13" viewBox="0 0 1792 1792" ><path d="M768 1664h896v-640h-416q-40 0-68-28t-28-68v-416h-384v1152zm256-1440v-64q0-13-9.5-22.5t-22.5-9.5h-704q-13 0-22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h704q13 0 22.5-9.5t9.5-22.5zm256 672h299l-299-299v299zm512 128v672q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-544q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h1088q40 0 68 28t28 68v328q21 13 36 28l408 408q28 28 48 76t20 88z"/></svg></button>'
copyIcon.onclick = (e) => {
copy(content)
if (showCopyNotification) {
this.notify('Saved to Clipboard!', {
body: 'Paste it wherever you want!',
silent: true
})
}
}
el.parentNode.appendChild(copyIcon)
el.innerHTML = ''
el.parentNode.className += ` cm-s-${codeBlockTheme} CodeMirror`
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`
}
CodeMirror.runMode(content, syntax.mime, el, {
tabSize: indentSize
})
@@ -273,7 +362,7 @@ export default class MarkdownPreview extends React.Component {
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('.flowchart'), (el) => {
Raphael.setWindow(this.getWindow())
try {
let diagram = flowchart.parse(decodeHTMLEntities(el.innerHTML))
let diagram = flowchart.parse(htmlTextHelper.decodeEntities(el.innerHTML))
el.innerHTML = ''
diagram.drawSVG(el, opts)
_.forEach(el.querySelectorAll('a'), (el) => {
@@ -289,7 +378,7 @@ export default class MarkdownPreview extends React.Component {
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('.sequence'), (el) => {
Raphael.setWindow(this.getWindow())
try {
let diagram = SequenceDiagram.parse(decodeHTMLEntities(el.innerHTML))
let diagram = SequenceDiagram.parse(htmlTextHelper.decodeEntities(el.innerHTML))
el.innerHTML = ''
diagram.drawSVG(el, {theme: 'simple'})
_.forEach(el.querySelectorAll('a'), (el) => {
@@ -325,6 +414,26 @@ export default class MarkdownPreview extends React.Component {
}
}
preventImageDroppedHandler (e) {
e.preventDefault()
e.stopPropagation()
}
notify (title, options) {
if (global.process.platform === 'win32') {
options.icon = path.join('file://', global.__dirname, '../../resources/app.png')
}
return new window.Notification(title, options)
}
handlelinkClick (e) {
const noteHash = e.target.href.split('/').pop()
const regexIsNoteLink = /^(.{20})-(.{20})$/
if (regexIsNoteLink.test(noteHash)) {
eventEmitter.emit('list:jump', noteHash)
}
}
render () {
let { className, style, tabIndex } = this.props
return (
@@ -346,5 +455,7 @@ MarkdownPreview.propTypes = {
onMouseUp: PropTypes.func,
onMouseDown: PropTypes.func,
className: PropTypes.string,
value: PropTypes.string
value: PropTypes.string,
showCopyNotification: PropTypes.bool,
storagePath: PropTypes.string
}

View File

@@ -0,0 +1,18 @@
import React, {PropTypes} from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './ModalEscButton.styl'
const ModalEscButton = ({
handleEscButtonClick
}) => (
<button styleName='escButton' onClick={handleEscButtonClick}>
<div styleName='esc-mark'>×</div>
<div styleName='esc-text'>esc</div>
</button>
)
ModalEscButton.propTypes = {
handleEscButtonClick: PropTypes.func.isRequired
}
export default CSSModules(ModalEscButton, styles)

View File

@@ -0,0 +1,16 @@
.escButton
height 50px
position absolute
background-color transparent
color $ui-inactive-text-color
border none
top 1px
right 10px
text-align center
width top-bar--height
height top-bar-height
.esc-mark
font-size 28px
margin-top -5px
margin-bottom -7px

View File

@@ -0,0 +1,29 @@
/**
* @fileoverview Micro component for toggle SideNav
*/
import React, { PropTypes } from 'react'
import styles from './NavToggleButton.styl'
import CSSModules from 'browser/lib/CSSModules'
/**
* @param {boolean} isFolded
* @param {Function} handleToggleButtonClick
*/
const NavToggleButton = ({isFolded, handleToggleButtonClick}) => (
<button styleName='navToggle'
onClick={(e) => handleToggleButtonClick(e)}
>
{isFolded
? <i className='fa fa-angle-double-right' />
: <i className='fa fa-angle-double-left' />
}
</button>
)
NavToggleButton.propTypes = {
isFolded: PropTypes.bool.isRequired,
handleToggleButtonClick: PropTypes.func.isRequired
}
export default CSSModules(NavToggleButton, styles)

View File

@@ -0,0 +1,22 @@
.navToggle
navButtonColor()
display block
position absolute
left 5px
bottom 5px
border-radius 16.5px
height 34px
width 34px
line-height 32px
padding 0
body[data-theme="white"]
navWhiteButtonColor()
body[data-theme="dark"]
.navToggle
&:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
transition 0.15s
color $ui-dark-text-color

View File

@@ -4,7 +4,9 @@
import React, { PropTypes } from 'react'
import { isArray } from 'lodash'
import CSSModules from 'browser/lib/CSSModules'
import { getTodoStatus } from 'browser/lib/getTodoStatus'
import styles from './NoteItem.styl'
import TodoProcess from './TodoProcess'
/**
* @description Tag element component.
@@ -13,7 +15,7 @@ import styles from './NoteItem.styl'
*/
const TagElement = ({ tagName }) => (
<span styleName='item-bottom-tagList-item' key={tagName}>
{tagName}
#{tagName}
</span>
)
@@ -40,9 +42,10 @@ const TagElementList = (tags) => {
* @param {Object} note
* @param {Function} handleNoteClick
* @param {Function} handleNoteContextMenu
* @param {Function} handleDragStart
* @param {string} dateDisplay
*/
const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteContextMenu }) => (
const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteContextMenu, handleDragStart, pathname }) => (
<div styleName={isActive
? 'item--active'
: 'item'
@@ -50,10 +53,14 @@ const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteCont
key={`${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)}
draggable='true'
>
<div styleName='item-wrapper'>
<div styleName='item-bottom-time'>{dateDisplay}</div>
{note.type === 'SNIPPET_NOTE'
? <i styleName='item-title-icon' className='fa fa-fw fa-code' />
: <i styleName='item-title-icon' className='fa fa-fw fa-file-text-o' />
}
<div styleName='item-title'>
{note.title.trim().length > 0
? note.title
@@ -61,23 +68,25 @@ const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteCont
}
</div>
<div styleName='item-bottom-time'>{dateDisplay}</div>
{note.isStarred
? <img styleName='item-star' src='../resources/icon/icon-starred.svg' /> : ''
}
{note.isPinned && !pathname.match(/\/home|\/starred|\/trash/)
? <i styleName='item-pin' className='fa fa-thumb-tack' /> : ''
}
{note.type === 'MARKDOWN_NOTE'
? <TodoProcess todoStatus={getTodoStatus(note.content)} />
: ''
}
<div styleName='item-bottom'>
<div styleName='item-bottom-tagList'>
{note.tags.length > 0
? TagElementList(note.tags)
: ''
: <span styleName='item-bottom-tagList-empty' />
}
</div>
</div>
{note.type === 'SNIPPET_NOTE'
? <i styleName='item-title-icon' className='fa fa-fw fa-code' />
: <i styleName='item-title-icon' className='fa fa-fw fa-file-text-o' />
}
{note.isStarred
? <i styleName='item-star' className='fa fa-star' /> : ''
}
</div>
</div>
)
@@ -91,10 +100,13 @@ NoteItem.propTypes = {
type: PropTypes.string.isRequired,
title: PropTypes.string.isrequired,
tags: PropTypes.array,
isStarred: PropTypes.bool.isRequired
isStarred: PropTypes.bool.isRequired,
isTrashed: PropTypes.bool.isRequired
}),
handleNoteClick: PropTypes.func.isRequired,
handleNoteContextMenu: PropTypes.func.isRequired
handleNoteContextMenu: PropTypes.func.isRequired,
handleDragStart: PropTypes.func.isRequired,
handleDragEnd: PropTypes.func.isRequired
}
export default CSSModules(NoteItem, styles)

View File

@@ -7,63 +7,82 @@ $control-height = 30px
.item
position relative
padding 0 25px
padding 0 20px
user-select none
cursor pointer
background-color $ui-noteList-backgroundColor
transition background-color 0.15s
transition 0.2s
&:hover
background-color alpha($ui-active-color, 20%)
&:active
background-color $ui-active-color
color white
background-color alpha($ui-button--active-backgroundColor, 20%)
.item-title
.item-title-empty
.item-bottom-tagList-empty
.item-bottom-time
.item-title-icon
color white
.item-bottom-time
transition 0.15s
color $ui-text-color
.item-bottom-tagList-item
background-color transparent
color white
background-color alpha(white, 0.6)
color $ui-text-color
.item-star
color $ui-favorite-star-button-color
&:active
background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-text-color
.item-title
.item-title-icon
.item-bottom-time
transition 0.15s
color $ui-text-color
.item-bottom-tagList-item
background-color alpha(white, 0.6)
color $ui-text-color
.item-wrapper
padding 20px 0
padding 15px 0
border-bottom $ui-border
position relative
.item--active
@extend .item
background-color $ui-active-color
color white
background-color alpha($ui-button--active-backgroundColor, 60%)
color $ui-text-color
.item-title
.item-title-empty
.item-bottom-tagList-empty
.item-bottom-time
.item-title-icon
color white
color $ui-text-color
.item-bottom-tagList-item
background-color transparent
color white
background-color alpha(white, 0.6)
color $ui-text-color
.item-wrapper
border-color transparent
.item-star
color $ui-favorite-star-button-color
&:hover
background-color $ui-active-color
.item-title
font-size 14px
height 40px
box-sizing border-box
line-height 24px
padding-top 5px
padding-bottom 20px
overflow ellipsis
color $ui-text-color
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
position absolute
top 20px
right 25px
font-size 14px
position relative
font-size 12px
color $ui-inactive-text-color
.item-title
font-size 15px
font-weight 700
position relative
top -12px
left 20px
padding-right 15px
padding-bottom 4px
overflow ellipsis
color $ui-inactive-text-color
.item-title-empty
@@ -73,8 +92,7 @@ $control-height = 30px
.item-bottom
position relative
bottom 0px
margin-top 2px
height 20px
margin-top 10px
font-size 12px
line-height 20px
overflow ellipsis
@@ -83,41 +101,63 @@ $control-height = 30px
.item-bottom-tagList
flex 1
overflow ellipsis
line-height 20px
color #FFFFFF
line-height 25px
padding-left 2px
margin-right 40px
.item-bottom-tagList-item
font-size 12px
font-size 11px
margin-right 8px
padding 0 10px
height 20px
padding 0
box-sizing border-box
border-radius 20px
border-radius 2px
padding 4px
vertical-align middle
background-color $ui-tag-backgroundColor
color #FFFFFF
.item-bottom-tagList-empty
background-color white
color $ui-inactive-text-color
vertical-align middle
font-size 10px
margin-left 5px
.item-bottom-time
color $ui-inactive-text-color
font-size 12px
font-size 13px
padding-left 2px
padding-bottom 2px
.item-star
position absolute
top 20px
right 29px
right -6px
bottom 23px
width 16px
height 16px
color alpha($ui-favorite-star-button-color, 60%)
font-size 12px
padding 0
border-radius 17px
.item-pin
position absolute
right 0px
bottom 2px
width 34px
height 34px
color $ui-favorite-star-button-color
color #E54D42
font-size 14px
padding 0
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"]
.root
border-color $ui-dark-borderColor
@@ -126,42 +166,66 @@ body[data-theme="dark"]
.item
border-color $ui-dark-borderColor
background-color $ui-dark-noteList-backgroundColor
&:active
background-color $ui-active-color
&:hover
background-color alpha($ui-active-color, 20%)
transition 0.15s
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
color $ui-dark-text-color
.item-title
.item-title-icon
.item-bottom-time
transition 0.15s
color $ui-dark-text-color
.item-bottom-tagList-item
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-title
.item-title-icon
.item-bottom-time
transition 0.15s
color $ui-dark-text-color
.item-bottom-tagList-item
transition 0.15s
background-color alpha(white, 10%)
color $ui-dark-text-color
.item-wrapper
border-color $ui-dark-borderColor
border-color alpha($ui-dark-button--active-backgroundColor, 60%)
.item--active
@extend .item
border-color $ui-dark-borderColor
background-color $ui-active-color
background-color $ui-dark-button--active-backgroundColor
.item-wrapper
border-color transparent
.item-title
color white
.item-title-icon
.item-bottom-time
color $ui-dark-text-color
.item-bottom-tagList-item
background-color transparent
color white
.item-bottom-tagList-empty
color white
background-color alpha(white, 10%)
color $ui-dark-text-color
&:hover
background-color $ui-active-color
background-color alpha($ui-dark-button--active-backgroundColor, 60%)
color #c0392b
.item-bottom-tagList-item
background-color alpha(#fff, 20%)
.item-title
color $ui-dark-text-color
color $ui-inactive-text-color
.item-title-icon
color $ui-darkinactive-text-color
color $ui-inactive-text-color
.item-title-empty
color $ui-dark-inactive-text-color
color $ui-inactive-text-color
.item-bottom-tagList-item
background-color $ui-dark-tag-backgroundColor
color $ui-dark-text-color
background-color alpha($ui-dark-button--active-backgroundColor, 40%)
color $ui-inactive-text-color
.item-bottom-tagList-empty
color $ui-inactive-text-color

View File

@@ -11,8 +11,9 @@ import styles from './NoteItemSimple.styl'
* @param {Object} note
* @param {Function} handleNoteClick
* @param {Function} handleNoteContextMenu
* @param {Function} handleDragStart
*/
const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu }) => (
const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu, handleDragStart }) => (
<div styleName={isActive
? 'item-simple--active'
: 'item-simple'
@@ -20,6 +21,8 @@ const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu
key={`${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)}
draggable='true'
>
<div styleName='item-simple-title'>
{note.type === 'SNIPPET_NOTE'
@@ -43,7 +46,8 @@ NoteItemSimple.propTypes = {
title: PropTypes.string.isrequired
}),
handleNoteClick: PropTypes.func.isRequired,
handleNoteContextMenu: PropTypes.func.isRequired
handleNoteContextMenu: PropTypes.func.isRequired,
handleDragStart: PropTypes.func.isRequired
}
export default CSSModules(NoteItemSimple, styles)

View File

@@ -7,43 +7,56 @@ $control-height = 30px
.item-simple
position relative
padding 0 25px
padding 0 20px
user-select none
cursor pointer
background-color $ui-noteList-backgroundColor
transition background-color 0.15s
transition 0.2s
&:hover
background-color alpha($ui-active-color, 20%)
&:active
background-color $ui-active-color
color white
background-color alpha($ui-button--active-backgroundColor, 20%)
.item-simple-title
.item-simple-title-empty
.item-simple-title-icon
color white
color $ui-text-color
&:active
background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-text-color
.item-simple-title
.item-simple-title-empty
.item-simple-title-icon
color $ui-text-color
.item-simple--active
@extend .item-simple
background-color $ui-active-color
color white
background-color alpha($ui-button--active-backgroundColor, 60%)
color $ui-text-color
.item-simple-title
.item-simple-title-empty
border-color transparent
color white
color $ui-text-color
.item-simple-title-icon
color white
color $ui-text-color
&:hover
background-color $ui-active-color
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
font-size 14px
font-size 13px
height 40px
box-sizing border-box
line-height 24px
padding-top 8px
overflow ellipsis
color $ui-text-color
color $ui-inactive-text-color
border-bottom $ui-border
position relative
.item-simple-title-icon
font-size 12px
@@ -54,6 +67,20 @@ $control-height = 30px
font-weight normal
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"]
.root
border-color $ui-dark-borderColor
@@ -62,25 +89,54 @@ body[data-theme="dark"]
.item-simple
border-color $ui-dark-borderColor
background-color $ui-dark-noteList-backgroundColor
&:active
background-color $ui-active-color
&:hover
background-color alpha($ui-active-color, 20%)
transition 0.15s
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
color $ui-dark-text-color
.item-simple-title
.item-simple-title-icon
.item-simple-bottom-time
transition 0.15s
color $ui-dark-text-color
.item-simple-bottom-tagList-item
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-icon
.item-simple-bottom-time
transition 0.15s
color $ui-dark-text-color
.item-simple-bottom-tagList-item
transition 0.15s
background-color alpha(white, 10%)
color $ui-dark-text-color
.item-simple--active
@extend .item-simple
border-color $ui-dark-borderColor
background-color $ui-active-color
.item-simple-title
.item-simple-title-empty
color white
background-color $ui-dark-button--active-backgroundColor
.item-simple-wrapper
border-color transparent
.item-simple-title
.item-simple-title-icon
.item-simple-bottom-time
color $ui-dark-text-color
.item-simple-bottom-tagList-item
background-color alpha(white, 10%)
color $ui-dark-text-color
&:hover
background-color $ui-active-color
background-color alpha($ui-dark-button--active-backgroundColor, 60%)
color #c0392b
.item-simple-bottom-tagList-item
background-color alpha(#fff, 20%)
.item-simple-title
color $ui-dark-text-color
border-color $ui-dark-borderColor
color $ui-inactive-text-color
border-color alpha($ui-dark-button--active-backgroundColor, 60%)
.item-simple-title-icon
color $ui-darkinactive-text-color

View File

@@ -1,24 +0,0 @@
import React, { PropTypes } from 'react'
import md5 from 'md5'
export default class ProfileImage extends React.Component {
render () {
let className = this.props.className == null ? 'ProfileImage' : 'ProfileImage ' + this.props.className
let email = this.props.email != null ? this.props.email : ''
let src = 'http://www.gravatar.com/avatar/' + md5(email.trim().toLowerCase()) + '?s=' + this.props.size
return (
<img
className={className}
width={this.props.size}
height={this.props.size}
src={src} />
)
}
}
ProfileImage.propTypes = {
email: PropTypes.string,
size: PropTypes.string,
className: PropTypes.string
}

View File

@@ -0,0 +1,55 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './RealtimeNotification.styl'
const electron = require('electron')
const { shell } = electron
class RealtimeNotification extends React.Component {
constructor (props) {
super(props)
this.state = {
notifications: []
}
}
componentDidMount () {
this.fetchNotifications()
}
fetchNotifications () {
const notificationsUrl = 'https://raw.githubusercontent.com/BoostIO/notification/master/notification.json'
fetch(notificationsUrl)
.then(response => {
return response.json()
})
.then(json => {
this.setState({notifications: json.notifications})
})
}
handleLinkClick (e) {
shell.openExternal(e.currentTarget.href)
e.preventDefault()
}
render () {
const { notifications } = this.state
const link = notifications.length > 0
? <a styleName='notification-link' href={notifications[0].linkUrl}
onClick={(e) => this.handleLinkClick(e)}
>
Info: {notifications[0].text}
</a>
: ''
return (
<div styleName='notification-area' style={this.props.style}>{link}</div>
)
}
}
RealtimeNotification.propTypes = {}
export default CSSModules(RealtimeNotification, styles)

View File

@@ -0,0 +1,34 @@
.notification-area
z-index 1000
font-size 12px
position absolute
bottom 20px
width 100%
float left
height 30px
background-color none
.notification-link
position absolute
text-decoration none
color #282A36
font-size 14px
border 1px solid #6FA8E6
background-color alpha(#6FA8E6, 0.2)
padding 5px 12px
border-radius 2px
transition 0.2s
&:hover
color #1378BD
body[data-theme="dark"]
.notification-area
background-color none
.notification-link
color #fff
border 1px solid alpha(#5CB85C, 0.6)
background-color alpha(#5CB85C, 0.2)
transition 0.2s
&:hover
color #5CB85C

View File

@@ -15,21 +15,53 @@ import styles from './SideNavFilter.styl'
*/
const SideNavFilter = ({
isFolded, isHomeActive, handleAllNotesButtonClick,
isStarredActive, handleStarredButtonClick
isStarredActive, handleStarredButtonClick, isTrashedActive, handleTrashedButtonClick, counterDelNote,
counterTotalNote, counterStarredNote
}) => (
<div styleName={isFolded ? 'menu--folded' : 'menu'}>
<button styleName={isHomeActive ? 'menu-button--active' : 'menu-button'}
onClick={handleAllNotesButtonClick}
>
<i className='fa fa-book 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='counters'>{counterTotalNote}</span>
</button>
<button styleName={isStarredActive ? 'menu-button--active' : 'menu-button'}
<button styleName={isStarredActive ? 'menu-button-star--active' : 'menu-button'}
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='counters'>{counterStarredNote}</span>
</button>
<button styleName={isTrashedActive ? 'menu-button-trash--active' : 'menu-button'}
onClick={handleTrashedButtonClick}
>
<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='counters'>{counterDelNote}</span>
</button>
</div>
)
@@ -38,7 +70,9 @@ SideNavFilter.propTypes = {
isHomeActive: PropTypes.bool.isRequired,
handleAllNotesButtonClick: PropTypes.func.isRequired,
isStarredActive: PropTypes.bool.isRequired,
handleStarredButtonClick: PropTypes.func.isRequired
isTrashedActive: PropTypes.bool.isRequired,
handleStarredButtonClick: PropTypes.func.isRequired,
handleTrashdButtonClick: PropTypes.func.isRequired
}
export default CSSModules(SideNavFilter, styles)

View File

@@ -3,22 +3,55 @@
.menu-button
navButtonColor()
height 32px
padding 0 15px
height 36px
padding 0 15px 0 20px
font-size 14px
width 100%
text-align left
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
background-color $ui-button--active-backgroundColor
color $ui-button--active-color
SideNavFilter()
color #1EC38B
background-color alpha($ui-button-default--active-backgroundColor, 20%)
.menu-button-label, .counters
color #1EC38B
&:hover
background-color $ui-button--active-backgroundColor
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 5px
margin-left 10px
flex 1
.menu--folded
@extend .menu
@@ -27,6 +60,7 @@
&:hover .menu-button-label
transition opacity 0.15s
opacity 1
.menu-button-label
position fixed
display inline-block
@@ -36,23 +70,112 @@
margin-top -8px
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
font-size 13px
.counters
display none
body[data-theme="dark"]
body[data-theme="white"]
.menu-button
navDarkButtonColor()
navWhiteButtonColor()
.counters
color $ui-inactive-text-color
.menu-button--active
@extend .menu-button
background-color $ui-dark-button--active-backgroundColor
color $ui-dark-button--active-color
color #e74c3c
background-color $ui-button--active-backgroundColor
.menu-button-label
color $ui-text-color
&:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #e74c3c
.menu-button-label
color $ui-text-color
&:active, &:active:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #e74c3c
.menu-button-label
color $ui-text-color
.menu-button-star--active
@extend .menu-button
color #F9BF3B
background-color $ui-button--active-backgroundColor
.menu-button-label
color $ui-text-color
&:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #F9BF3B
.menu-button-label
color $ui-text-color
&:active, &:active:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #F9BF3B
.menu-button-label
color $ui-text-color
.menu-button-trash--active
@extend .menu-button
color #5D9E36
background-color $ui-button--active-backgroundColor
.menu-button-label
color $ui-text-color
&:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #5D9E36
.menu-button-label
color $ui-text-color
&:active, &:active:hover
background-color alpha($ui-button--active-backgroundColor, 50%)
color #5D9E36
.menu-button-label
color $ui-text-color
body[data-theme="dark"]
.menu-button
&:active
background-color $ui-dark-button--active-backgroundColor
color $ui-dark-text-color
&:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
color $ui-dark-text-color
.menu-button--active
color #c0392b
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 #c0392b
.menu-button-label
color $ui-dark-text-color
.menu-button-star--active
color $ui-favorite-star-button-color
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 $ui-favorite-star-button-color
.menu-button-label
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

View File

@@ -96,6 +96,7 @@ class SnippetTab extends React.Component {
{!this.state.isRenaming
? <button styleName='button'
onClick={(e) => this.handleClick(e)}
onDoubleClick={(e) => this.handleRenameClick(e)}
onContextMenu={(e) => this.handleContextMenu(e)}
>
{snippet.name.trim().length > 0

View File

@@ -60,7 +60,7 @@ body[data-theme="dark"]
&:hover
background-color darken($ui-dark-button--hover-backgroundColor, 15%)
&:active
color white
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.root--active
@@ -73,7 +73,7 @@ body[data-theme="dark"]
&:hover
background-color darken($ui-dark-button--hover-backgroundColor, 15%)
&:active
color white
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.button
@@ -83,9 +83,9 @@ body[data-theme="dark"]
transition color background-color 0.15s
border-left 4px solid transparent
&:hover
color white
color $ui-dark-text-color
background-color $ui-dark-button--hover-backgroundColor
.input
background-color $ui-dark-button--hover-backgroundColor
color white
color $ui-dark-text-color

View File

@@ -14,11 +14,14 @@ import { isNumber } from 'lodash'
* @param {string} folderColor
* @param {boolean} isFolded
* @param {number} noteCount
* @param {Function} handleDrop
* @param {Function} handleDragEnter
* @param {Function} handleDragOut
* @return {React.Component}
*/
const StorageItem = ({
isActive, handleButtonClick, handleContextMenu, folderName,
folderColor, isFolded, noteCount
folderColor, isFolded, noteCount, handleDrop, handleDragEnter, handleDragLeave
}) => (
<button styleName={isActive
? 'folderList-item--active'
@@ -26,13 +29,14 @@ const StorageItem = ({
}
onClick={handleButtonClick}
onContextMenu={handleContextMenu}
onDrop={handleDrop}
onDragEnter={handleDragEnter}
onDragLeave={handleDragLeave}
>
<span styleName={isFolded
? 'folderList-item-name--folded' : 'folderList-item-name'
}
style={{borderColor: folderColor}}
>
{isFolded ? folderName.substring(0, 1) : folderName}
}>
<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}
</span>
{(!isFolded && isNumber(noteCount)) &&
<span styleName='folderList-item-noteCount'>{noteCount}</span>
@@ -52,6 +56,8 @@ StorageItem.propTypes = {
folderName: PropTypes.string.isRequired,
folderColor: PropTypes.string,
isFolded: PropTypes.bool.isRequired,
handleDragEnter: PropTypes.func.isRequired,
handleDragLeave: PropTypes.func.isRequired,
noteCount: PropTypes.number
}

View File

@@ -5,11 +5,10 @@
.folderList-item
display flex
width 100%
height 26px
height 34px
background-color transparent
color $ui-inactive-text-color
padding 0
margin-bottom 5px
text-align left
border none
overflow ellipsis
@@ -17,26 +16,28 @@
&:first-child
margin-top 0
&:hover
background-color $ui-button--hover-backgroundColor
color #1EC38B;
background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition background-color 0.15s
&:active
color $ui-button--active-color
background-color $ui-button--active-backgroundColor
color $$ui-button-default-color
background-color alpha($ui-button-default--active-backgroundColor, 20%)
.folderList-item--active
@extend .folderList-item
color $ui-button--active-color
background-color $ui-button--active-backgroundColor
color #1EC38B
background-color alpha($ui-button-default--active-backgroundColor, 20%)
&:hover
color $ui-button--active-color
background-color $ui-button--active-backgroundColor
color #1EC38B;
background-color alpha($ui-button-default--active-backgroundColor, 50%)
.folderList-item-name
display block
flex 1
padding 0 30px
padding 0 12px
height 26px
line-height 26px
border-width 0 0 0 3px
border-width 0 0 0 2px
border-style solid
border-color transparent
overflow hidden
@@ -46,7 +47,7 @@
float right
line-height 26px
padding-right 15px
font-size 12px
font-size 13px
.folderList-item-tooltip
tooltip()
@@ -67,4 +68,44 @@
.folderList-item-name--folded
@extend .folderList-item-name
padding-left 14px
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"]
.folderList-item
&:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
color $ui-dark-text-color
&:active
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.folderList-item--active
@extend .folderList-item
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
&:active
background-color alpha($ui-dark-button--active-backgroundColor, 50%)
&:hover
color $ui-dark-text-color
background-color alpha($ui-dark-button--active-backgroundColor, 50%)

View File

@@ -0,0 +1,23 @@
/**
* @fileoverview Micro component for showing StorageList
*/
import React, { PropTypes } from 'react'
import styles from './StorageList.styl'
import CSSModules from 'browser/lib/CSSModules'
/**
* @param {Array} storgaeList
*/
const StorageList = ({storageList}) => (
<div styleName='storageList'>
{storageList.length > 0 ? storageList : (
<div styleName='storgaeList-empty'>No storage mount.</div>
)}
</div>
)
StorageList.propTypes = {
storgaeList: PropTypes.arrayOf(PropTypes.element).isRequired
}
export default CSSModules(StorageList, styles)

View File

@@ -0,0 +1,20 @@
.storageList
absolute left right
bottom 37px
top 180px
overflow-y auto
.storageList-empty
padding 0 10px
margin-top 15px
line-height 24px
color $ui-inactive-text-color
body[data-theme="dark"]
.storageList-empty
color $ui-dark-inactive-text-color
.root-folded
.storageList-empty
white-space nowrap
transform rotate(90deg)

View File

@@ -0,0 +1,27 @@
/**
* @fileoverview Micro component for showing TagList.
*/
import React, { PropTypes } from 'react'
import styles from './TagListItem.styl'
import CSSModules from 'browser/lib/CSSModules'
/**
* @param {string} name
* @param {Function} handleClickTagListItem
* @param {bool} isActive
*/
const TagListItem = ({name, handleClickTagListItem, isActive}) => (
<button styleName={isActive ? 'tagList-item-active' : 'tagList-item'} onClick={() => handleClickTagListItem(name)}>
<span styleName='tagList-item-name'>
{`# ${name}`}
</span>
</button>
)
TagListItem.propTypes = {
name: PropTypes.string.isRequired,
handleClickTagListItem: PropTypes.func.isRequired
}
export default CSSModules(TagListItem, styles)

View File

@@ -0,0 +1,84 @@
.tagList-item
display flex
width 100%
height 26px
background-color transparent
color $ui-inactive-text-color
padding 0
margin-bottom 5px
text-align left
border none
overflow ellipsis
font-size 13px
&:first-child
margin-top 0
&:hover
color $ui-button-default-color
background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition background-color 0.15s
&:active, &:active:hover
color $ui-button-default-color
background-color $ui-button-default--active-backgroundColor
.tagList-item-active
background-color $ui-button-default--active-backgroundColor
display flex
width 100%
height 26px
padding 0
margin-bottom 5px
text-align left
border none
overflow ellipsis
font-size 13px
color $ui-button-default-color
&:hover
background-color alpha($ui-button-default--active-backgroundColor, 60%)
transition 0.2s
.tagList-item-name
display block
flex 1
padding 0 15px
height 26px
line-height 26px
border-width 0 0 0 2px
border-style solid
border-color transparent
overflow hidden
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"]
.tagList-item
color $ui-dark-inactive-text-color
&:hover
color $ui-dark-text-color
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
&:active
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.tagList-item-active
background-color $ui-dark-button--active-backgroundColor
color $ui-dark-text-color
&:active
background-color alpha($ui-dark-button--active-backgroundColor, 50%)
&:hover
color $ui-dark-text-color
background-color alpha($ui-dark-button--active-backgroundColor, 50%)

View File

@@ -0,0 +1,27 @@
/**
* @fileoverview Percentage of todo achievement.
*/
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './TodoListPercentage.styl'
/**
* @param {number} percentageOfTodo
*/
const TodoListPercentage = ({
percentageOfTodo
}) => (
<div styleName='percentageBar' style={{display: isNaN(percentageOfTodo) ? 'none' : ''}}>
<div styleName='progressBar' style={{width: `${percentageOfTodo}%`}}>
<p styleName='percentageText'>{percentageOfTodo}%</p>
</div>
</div>
)
TodoListPercentage.propTypes = {
percentageOfTodo: PropTypes.number.isRequired
}
export default CSSModules(TodoListPercentage, styles)

View File

@@ -0,0 +1,32 @@
.percentageBar
position absolute
top 50px
right 0px
left 0px
background-color #DADFE1
width 100%
height: 17px
font-size: 12px
z-index 100
border-radius 2px
.progressBar
background-color: #1EC38B
height 17px
border-radius 2px
transition 0.4s cubic-bezier(0.4, 0.4, 0, 1)
.percentageText
color #f4f4f4
padding: 2px 43%
font-weight 600
body[data-theme="dark"]
.percentageBar
background-color #363A3D
.progressBar
background-color: alpha(#939395, 50%)
.percentageText
color $ui-dark-text-color

View File

@@ -0,0 +1,33 @@
/**
* @fileoverview Percentage of todo achievement.
*/
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './TodoProcess.styl'
const TodoProcess = ({
todoStatus: {
total: totalTodo,
completed: completedTodo
}
}) => (
<div styleName='todo-process' style={{display: totalTodo > 0 ? '' : 'none'}}>
<div styleName='todo-process-text'>
<i className='fa fa-fw fa-check-square-o' />
{completedTodo} of {totalTodo}
</div>
<div styleName='todo-process-bar'>
<div styleName='todo-process-bar--inner' style={{width: parseInt(completedTodo / totalTodo * 100) + '%'}} />
</div>
</div>
)
TodoProcess.propTypes = {
todoStatus: {
total: PropTypes.number.isRequired,
completed: PropTypes.number.isRequired
}
}
export default CSSModules(TodoProcess, styles)

View File

@@ -0,0 +1,45 @@
.todo-process
font-size 12px
display flex
padding-top 15px
width 85%
.todo-process-text
display inline-block
padding-right 10px
white-space nowrap
text-overflow ellipsis
color $ui-inactive-text-color
i
color $ui-inactive-text-color
padding-right 5px
.todo-process-bar
display inline-block
margin auto
height 4px
border-radius 10px
background-color #DADFE1
border-radius 2px
flex-grow 1
border 1px solid alpha(#6C7A89, 10%)
.todo-process-bar--inner
height 100%
border-radius 5px
background-color #6C7A89
transition 0.3s
body[data-theme="dark"]
.todo-process
color $ui-dark-text-color
.todo-process-bar
background-color #363A3D
.todo-process-text
color $ui-inactive-text-color
.todo-process-bar--inner
background-color: alpha(#939395, 50%)

View File

@@ -54,7 +54,6 @@ body
font-family helvetica, arial, sans-serif
line-height 1.6
overflow-x hidden
user-select all
background-color $ui-noteDetail-backgroundColor
.katex
font 400 1.2em 'KaTeX_Main'
@@ -78,7 +77,6 @@ body
li
label.taskListItem
margin-left -2em
background-color white
div.math-rendered
text-align center
.math-failed
@@ -120,7 +118,7 @@ hr
h1, h2, h3, h4, h5, h6
font-weight bold
h1
font-size 2.25em
font-size 2.55em
padding-bottom 0.3em
line-height 1.2em
border-bottom solid 1px borderColor
@@ -195,6 +193,7 @@ ol
&>li>ul, &>li>ol
margin 0
code
color #CC305F
padding 0.2em 0.4em
background-color #f7f7f7
border-radius 3px
@@ -270,9 +269,19 @@ table
border-color borderColor
&:last-child
border-right solid 1px borderColor
kbd
background-color #fafbfc
border solid 1px borderColor
border-bottom-color btnColor
border-radius 3px
box-shadow inset 0 -1px 0 #959da5
display inline-block
font-size .8em
line-height 1
padding 3px 5px
themeDarkBackground = darken(#21252B, 10%)
themeDarkText = #DDDDDD
themeDarkText = #f9f9f9
themeDarkBorder = lighten(themeDarkBackground, 20%)
themeDarkPreview = $ui-dark-noteDetail-backgroundColor
themeDarkTableOdd = themeDarkPreview
@@ -290,8 +299,9 @@ body[data-theme="dark"]
background-color alpha(lighten(brandColor, 30%), 0.2) !important
code
color #EA6730
border-color darken(themeDarkBorder, 10%)
background-color lighten(themeDarkPreview, 10%)
background-color lighten(themeDarkPreview, 5%)
pre
border-color lighten(#21252B, 20%)
@@ -317,3 +327,6 @@ body[data-theme="dark"]
border-color themeDarkTableBorder
&:last-child
border-right solid 1px themeDarkTableBorder
kbd
background-color themeDarkBorder
color themeDarkText

View File

@@ -64,7 +64,7 @@ $list-width = 250px
.result-nav-storageList
absolute bottom left right
top 80px + 32px + 10px + 10px
top 110px + 32px + 10px + 10px + 20px
overflow-y auto
.result-list

View File

@@ -5,6 +5,7 @@ import MarkdownPreview from 'browser/components/MarkdownPreview'
import MarkdownEditor from 'browser/components/MarkdownEditor'
import CodeEditor from 'browser/components/CodeEditor'
import CodeMirror from 'codemirror'
import { findStorage } from 'browser/lib/findStorage'
const electron = require('electron')
const { clipboard } = electron
@@ -106,6 +107,8 @@ class NoteDetail extends React.Component {
let editorIndentSize = parseInt(config.editor.indentSize, 10)
if (!(editorFontSize > 0 && editorFontSize < 132)) editorIndentSize = 4
const storage = findStorage(note.storage)
if (note.type === 'SNIPPET_NOTE') {
let tabList = note.snippets.map((snippet, index) => {
let isActive = this.state.snippetIndex === index
@@ -143,6 +146,7 @@ class NoteDetail extends React.Component {
config={config}
value={snippet.content}
ref={'code-' + index}
storageKey={note.storage}
/>
: <CodeEditor styleName='tabView-content'
mode={snippet.mode}
@@ -192,6 +196,8 @@ class NoteDetail extends React.Component {
lineNumber={config.preview.lineNumber}
indentSize={editorIndentSize}
value={note.content}
showCopyNotification={config.ui.showCopyNotification}
storagePath={storage.path}
/>
)
}

View File

@@ -2,6 +2,7 @@
.root
absolute top bottom left right
bottom 30px
left $note-detail-left-margin
right $note-detail-right-margin
height 100%

View File

@@ -70,7 +70,6 @@ class NoteList extends React.Component {
dateDisplay={dateDisplay}
key={key}
handleNoteClick={(e) => this.props.handleNoteClick(e, _index)}
handleNoteContextMenu={() => ''}
/>
)
})

View File

@@ -10,6 +10,7 @@ import StorageSection from './StorageSection'
import NoteList from './NoteList'
import NoteDetail from './NoteDetail'
import SideNavFilter from 'browser/components/SideNavFilter'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
require('!!style!css!stylus?sourceMap!../main/global.styl')
require('../lib/customMeta')
@@ -68,7 +69,7 @@ class FinderMain extends React.Component {
handleWindowBlur (e) {
this.setState({
search: '',
search: ''
})
}
@@ -94,6 +95,7 @@ class FinderMain extends React.Component {
if (e.keyCode === 13) {
this.refs.detail.saveToClipboard()
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('COPY_FINDER')
hideFinder()
e.preventDefault()
}

View File

@@ -84,6 +84,8 @@ nodeIpc.connectTo(
const { config } = payload
if (config.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark')
} else if (config.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else {
document.body.setAttribute('data-theme', 'default')
}

21
browser/lib/RcParser.js Normal file
View File

@@ -0,0 +1,21 @@
import path from 'path'
import sander from 'sander'
const BOOSTNOTERC = '.boostnoterc'
const homePath = global.process.env.HOME || global.process.env.USERPROFILE
const _boostnotercPath = path.join(homePath, BOOSTNOTERC)
export function parse (boostnotercPath = _boostnotercPath) {
if (!sander.existsSync(boostnotercPath)) return {}
try {
return JSON.parse(sander.readFileSync(boostnotercPath).toString())
} catch (e) {
console.warn(e)
console.warn('Your .boostnoterc is broken so it\'s not used.')
return {}
}
}
export default {
parse
}

View File

@@ -10,6 +10,7 @@ const themes = fs.readdirSync(themePath)
.map((themePath) => {
return themePath.substring(0, themePath.lastIndexOf('.'))
})
themes.splice(themes.indexOf('solarized'), 1, 'solarized dark', 'solarized light')
const consts = {
FOLDER_COLORS: [

View File

@@ -8,7 +8,7 @@ import moment from 'moment'
* @param {mixed}
* @return {string}
*/
export function getLastUpdated (date) {
export function formatDate (date) {
const m = moment(date)
if (!m.isValid()) {
throw Error('Invalid argument.')

View File

@@ -0,0 +1,33 @@
export function findNoteTitle (value) {
let splitted = value.split('\n')
let title = null
let isInsideCodeBlock = false
splitted.some((line, index) => {
let trimmedLine = line.trim()
let trimmedNextLine = splitted[index + 1] === undefined ? '' : splitted[index + 1].trim()
if (trimmedLine.match('```')) {
isInsideCodeBlock = !isInsideCodeBlock
}
if (isInsideCodeBlock === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match(/^=+$/))) {
title = trimmedLine
return true
}
})
if (title === null) {
title = ''
splitted.some((line) => {
if (line.trim().length > 0) {
title = line.trim()
return true
}
})
}
return title
}
export default {
findNoteTitle
}

View File

@@ -0,0 +1,14 @@
const _ = require('lodash')
export function findStorage (storageKey) {
const cachedStorageList = JSON.parse(localStorage.getItem('storages'))
if (!_.isArray(cachedStorageList)) throw new Error('Target storage doesn\'t exist.')
const storage = _.find(cachedStorageList, {key: storageKey})
if (storage === undefined) throw new Error('Target storage doesn\'t exist.')
return storage
}
export default {
findStorage
}

View File

@@ -0,0 +1,25 @@
export function getTodoStatus (content) {
let splitted = content.split('\n')
let numberOfTodo = 0
let numberOfCompletedTodo = 0
splitted.forEach((line) => {
let trimmedLine = line.trim()
if (trimmedLine.match(/^[\+\-\*] \[\s|x\] ./)) {
numberOfTodo++
}
if (trimmedLine.match(/^[\+\-\*] \[x\] ./)) {
numberOfCompletedTodo++
}
})
return {
total: numberOfTodo,
completed: numberOfCompletedTodo
}
}
export function getTodoPercentageOfCompleted (content) {
const state = getTodoStatus(content)
return Math.floor(state.completed / state.total * 100)
}

View File

@@ -0,0 +1,45 @@
/**
* @fileoverview Text trimmer for html.
*/
/**
* @param {string} text
* @return {string}
*/
export function decodeEntities (text) {
var entities = [
['apos', '\''],
['amp', '&'],
['lt', '<'],
['gt', '>'],
['#63', '\\?'],
['#36', '\\$']
]
for (var i = 0, max = entities.length; i < max; ++i) {
text = text.replace(new RegExp(`&${entities[i][0]};`, 'g'), entities[i][1])
}
return text
}
export function encodeEntities (text) {
const entities = [
['\'', 'apos'],
['<', 'lt'],
['>', 'gt'],
['\\?', '#63'],
['\\$', '#36']
]
entities.forEach((entity) => {
text = text.replace(new RegExp(entity[0], 'g'), `&${entity[1]};`)
})
return text
}
export default {
decodeEntities,
encodeEntities
}

View File

@@ -3,6 +3,7 @@ import emoji from 'markdown-it-emoji'
import math from '@rokt33r/markdown-it-math'
import _ from 'lodash'
// FIXME We should not depend on global variable.
const katex = window.katex
function createGutter (str) {
@@ -19,6 +20,7 @@ var md = markdownit({
linkify: true,
html: true,
xhtmlOut: true,
breaks: true,
highlight: function (str, lang) {
if (lang === 'flowchart') {
return `<pre class="flowchart">${str}</pre>`
@@ -56,7 +58,20 @@ md.use(math, {
return output
}
})
md.use(require('markdown-it-imsize'))
md.use(require('markdown-it-footnote'))
md.use(require('markdown-it-multimd-table'))
md.use(require('markdown-it-named-headers'), {
slugify: (header) => {
return encodeURI(header.trim()
.replace(/[\]\[\!\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~]/g, '')
.replace(/\s+/g, '-'))
.replace(/\-+$/, '')
}
})
md.use(require('markdown-it-kbd'))
md.use(require('markdown-it-plantuml'))
// Override task item
md.block.ruler.at('paragraph', function (state, startLine/*, endLine */) {
let content, terminate, i, l, token
@@ -123,42 +138,20 @@ md.renderer.render = function render (tokens, options, env) {
let result = originalRender.call(md.renderer, tokens, options, env)
return result
}
// FIXME We should not depend on global variable.
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) {
return md.normalizeLinkText(linkText)
}
const markdown = {
render: function markdown (content) {
if (!_.isString(content)) content = ''
return md.render(content)
const renderedContent = md.render(content)
return renderedContent
},
strip
normalizeLinkText
}
export default markdown

View 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
}

43
browser/lib/search.js Normal file
View File

@@ -0,0 +1,43 @@
import _ from 'lodash'
export default function searchFromNotes (notes, search) {
if (search.trim().length === 0) return []
const searchBlocks = search.split(' ').filter(block => { return block !== '' })
let foundNotes = findByWord(notes, searchBlocks[0])
searchBlocks.forEach((block) => {
foundNotes = findByWord(foundNotes, block)
if (block.match(/^#.+/)) {
foundNotes = foundNotes.concat(findByTag(notes, block))
}
})
return foundNotes
}
function findByTag (notes, block) {
const tag = block.match(/#(.+)/)[1]
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
return notes.filter((note) => {
if (!_.isArray(note.tags)) return false
return note.tags.some((_tag) => {
return _tag.match(regExp)
})
})
}
function findByWord (notes, block) {
let regExp = new RegExp(_.escapeRegExp(block), 'i')
return notes.filter((note) => {
if (_.isArray(note.tags) && note.tags.some((_tag) => {
return _tag.match(regExp)
})) {
return true
}
if (note.type === 'SNIPPET_NOTE') {
return note.description.match(regExp)
} else if (note.type === 'MARKDOWN_NOTE') {
return note.content.match(regExp)
}
return false
})
}

View File

@@ -1,8 +1,8 @@
.root
absolute top bottom right
border-width 1px 0
border-style solid
border-color $ui-borderColor
display flex
align-items center
justify-content center
.empty
height 320px
@@ -11,14 +11,14 @@
.empty-message
width 100%
font-size 42px
line-height 72px
font-size 36px
font-weight 600
line-height 56px
text-align center
color $ui-inactive-text-color
body[data-theme="dark"]
.root
border-color $ui-dark-borderColor
background-color $ui-dark-backgroundColor
.empty-message
color $ui-dark-inactive-text-color

View File

@@ -3,7 +3,9 @@
*/
// Margin on the left side and the right side for NoteDetail component.
$note-detail-left-margin = 25px
$note-detail-right-margin = 25px
$note-detail-left-margin = 100px
$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

View File

@@ -259,12 +259,11 @@ class FolderSelect extends React.Component {
{optionList}
</div>
</div>
: <div styleName='idle'>
: <div styleName='idle' style={{color: currentOption.folder.color}}>
<div styleName='idle-label'>
<span styleName='idle-label-name'
style={{color: currentOption.folder.color}}
>
{currentOption.folder.name} /
<i className='fa fa-folder' />
<span styleName='idle-label-name'>
{currentOption.folder.name}
</span>
</div>
</div>

View File

@@ -1,21 +1,22 @@
.root
position relative
border solid 1px transparent
line-height 34px
vertical-align middle
border-radius 2px
transition 0.15s
user-select none
margin-right 10px
&:hover
background-color $ui-button--hover-backgroundColor
.root--search, .root--focus
@extend .root
background-color $ui-noteDetail-backgroundColor = #F4F4F4
background-color $ui-noteDetail-backgroundColor = #fff
border-color $ui-input--focus-borderColor
width 100px
width 154px
height 30px
&:hover
border-color $ui-input--focus-borderColor
border-color $ui-input--focus-borderColor = #fff
.idle
position relative
@@ -24,13 +25,16 @@
.idle-label
right 20px
overflow ellipsis
display flex
align-items center
.idle-label-name
font-size 16px
padding 2px
font-size 13px
font-weight 600
margin-left 4px
.idle-label-name-surfix
font-size 10px
font-size 15px
color $ui-inactive-text-color
margin-left 5px
.idle-caret
@@ -38,40 +42,42 @@
height 34px
width 20px
line-height 34px
.search
absolute top left right bottom
line-height 34px
.search-input
vertical-align middle
position relative
top -2px
top 0
font-size 14px
outline none
border none
height 20px
line-height 20px
width 100%
background-color transparent
padding 0 10px
.search-optionList
position fixed
position absolute
top 30px
max-height 450px
min-width 150px
overflow auto
z-index 200
border $ui-border
background-color white
border-radius 2px
padding 10px 6px
.search-optionList-item
width 140px
height 34px
width 250px
display flex
align-items center
box-sizing border-box
padding 0 5px
padding 0
margin-bottom 10px
overflow ellipsis
cursor pointer
&:hover
background-color $ui-button--hover-backgroundColor
background-color $ui-button--hover-backgroundColor
.search-optionList-item--active
@extend .search-optionList-item
@@ -81,13 +87,17 @@
background-color $ui-button--active-backgroundColor
color $ui-button--active-color
.search-optionList-item-name
border-left solid 4px transparent
padding 2px 5px
border-left solid 3px transparent
padding 6px
.search-optionList-item-name-surfix
font-size 10px
color $ui-inactive-text-color
margin-left 5px
body[data-theme="dark"]
.root
color $ui-dark-text-color

View File

@@ -0,0 +1,19 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './InfoButton.styl'
const InfoButton = ({
onClick
}) => (
<button styleName='control-infoButton'
onClick={(e) => onClick(e)}
>
<img className='infoButton' src='../resources/icon/icon-info.svg' />
</button>
)
InfoButton.propTypes = {
onClick: PropTypes.func.isRequired
}
export default CSSModules(InfoButton, styles)

View File

@@ -0,0 +1,11 @@
.control-infoButton
top 10px
margin-bottom 10px
topBarButtonLight()
.infoButton
padding 0px
body[data-theme="dark"]
.control-infoButton
topBarButtonDark()

View File

@@ -0,0 +1,90 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './InfoPanel.styl'
const InfoPanel = ({
storageName, folderName, noteLink, updatedAt, createdAt, exportAsMd, exportAsTxt, wordCount, letterCount, type, print
}) => (
<div className='infoPanel' styleName='control-infoButton-panel' style={{display: 'none'}}>
<div>
<p styleName='modification-date'>{updatedAt}</p>
<p styleName='modification-date-desc'>MODIFICATION DATE</p>
</div>
<hr />
{type === 'SNIPPET_NOTE'
? ''
: <div styleName='count-wrap'>
<div styleName='count-number'>
<p styleName='infoPanel-defaul-count'>{wordCount}</p>
<p styleName='infoPanel-sub-count'>Words</p>
</div>
<div styleName='count-number'>
<p styleName='infoPanel-defaul-count'>{letterCount}</p>
<p styleName='infoPanel-sub-count'>Letters</p>
</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'>
<button styleName='export--enable' onClick={(e) => exportAsMd(e)}>
<i className='fa fa-file-code-o fa-fw' />
<p>.md</p>
</button>
<button styleName='export--enable' onClick={(e) => exportAsTxt(e)}>
<i className='fa fa-file-text-o fa-fw' />
<p>.txt</p>
</button>
<button styleName='export--enable' onClick={(e) => print(e)}>
<i className='fa fa-print fa-fw' />
<p>Print</p>
</button>
</div>
</div>
)
InfoPanel.propTypes = {
storageName: PropTypes.string.isRequired,
folderName: PropTypes.string.isRequired,
noteLink: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired,
createdAt: PropTypes.string.isRequired,
exportAsMd: PropTypes.func.isRequired,
exportAsTxt: PropTypes.func.isRequired,
wordCount: PropTypes.number,
letterCount: PropTypes.number,
type: PropTypes.string.isRequired,
print: PropTypes.func.isRequired
}
export default CSSModules(InfoPanel, styles)

View File

@@ -0,0 +1,163 @@
.control-infoPanel
position fixed
pointer-events none
top 50px
z-index 200
line-height normal
border-radius 4px
opacity 0
transition 0.2s
.control-infoButton-panel
z-index 200
margin-top 0px
right 0
position absolute
padding 20px 25px 0 25px
width 300px
height 350px
overflow auto
background-color $ui-noteList-backgroundColor
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
z-index 200
margin-top 0px
right 0px
position absolute
padding 20px 25px 0 25px
width 300px
background-color $ui-noteList-backgroundColor
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
.count-wrap
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
color $ui-text-color
.infoPanel-sub-count
font-size 16px
color $ui-inactive-text-color
padding-bottom 8px
.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
font-weight 600
font-size 14px
width 70px
background-color rgba(226,33,113,0.1)
border none
outline none
border-radius 2px
margin-right 5px
padding 2px 5px
[id=export-wrap]
height 90px
display flex
justify-content center
margin 20px 0 10px 0
button
outline none
font-size 48px
color #A0A0A0
background-color transparent
border none
margin 0 5px
border-radius 5px
&:hover
transition 0.2s
background-color alpha($ui-button--hover-backgroundColor, 30%)
color $ui-inactive-text-color
p
font-size 13px
color #A0A0A0
font-weight light
&:hover
color $ui-inactive-text-color
.export--enable
cursor pointer
.export--unable
cursor not-allowed
body[data-theme="dark"]
.control-infoButton-panel
background-color $ui-dark-noteList-backgroundColor
.control-infoButton-panel-trash
background-color $ui-dark-noteList-backgroundColor
.modification-date
color $ui-dark-text-color
.modification-date-desc
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
[id=export-wrap]
button
color $ui-dark-inactive-text-color
&:hover
background-color alpha($ui-dark-borderColor, 20%)
color $ui-dark-text-color
p
color $ui-dark-inactive-text-color
&:hover
color $ui-dark-text-color

View File

@@ -0,0 +1,59 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './InfoPanel.styl'
const InfoPanelTrashed = ({
storageName, folderName, updatedAt, createdAt, exportAsMd, exportAsTxt
}) => (
<div className='infoPanel' styleName='control-infoButton-panel-trash' style={{display: 'none'}}>
<div>
<p styleName='modification-date'>{updatedAt}</p>
<p styleName='modification-date-desc'>MODIFICATION DATE</p>
</div>
<hr />
<div>
<p styleName='infoPanel-default'>{storageName}</p>
<p styleName='infoPanel-sub'>STORAGE</p>
</div>
<div>
<p styleName='infoPanel-default'><text styleName='infoPanel-trash'>Trash</text>{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 id='export-wrap'>
<button styleName='export--enable' onClick={(e) => exportAsMd(e)}>
<i className='fa fa-file-code-o fa-fw' />
<p>.md</p>
</button>
<button styleName='export--enable' onClick={(e) => exportAsTxt(e)}>
<i className='fa fa-file-text-o fa-fw' />
<p>.txt</p>
</button>
<button styleName='export--unable'>
<i className='fa fa-file-pdf-o fa-fw' />
<p>.pdf</p>
</button>
</div>
</div>
)
InfoPanelTrashed.propTypes = {
storageName: PropTypes.string.isRequired,
folderName: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired,
createdAt: PropTypes.string.isRequired,
exportAsMd: PropTypes.func.isRequired,
exportAsTxt: PropTypes.func.isRequired
}
export default CSSModules(InfoPanelTrashed, styles)

View File

@@ -1,27 +0,0 @@
/**
* @fileoverview Component for show updated date of the detail.
*/
import React, { PropTypes } from 'react'
import { getLastUpdated } from 'browser/lib/date-formatter'
import CSSModules from 'browser/lib/CSSModules'
import styles from './LastUpdatedString.styl'
const LastUpdatedString = ({ date }) => {
let text = ''
try {
text = `Last updated at ${getLastUpdated(date)}`
} catch (e) {
text = ''
}
return (
<p styleName='info-right-date'>{text}</p>
)
}
LastUpdatedString.propTypes = {
date: PropTypes.string
}
export default CSSModules(LastUpdatedString, styles)

View File

@@ -1,10 +0,0 @@
.info-right-date
display inline
line-height 24px
padding-right 25px
font-size 11px
color $ui-button-color
body[data-theme="dark"]
.info-right-date
color $ui-dark-button-color

View File

@@ -2,15 +2,26 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './MarkdownNoteDetail.styl'
import MarkdownEditor from 'browser/components/MarkdownEditor'
import TodoListPercentage from 'browser/components/TodoListPercentage'
import StarButton from './StarButton'
import TagSelect from './TagSelect'
import FolderSelect from './FolderSelect'
import dataApi from 'browser/main/lib/dataApi'
import { hashHistory } from 'react-router'
import ee from 'browser/main/lib/eventEmitter'
import markdown from 'browser/lib/markdown'
import markdown from 'browser/lib/markdownTextHelper'
import StatusBar from '../StatusBar'
import _ from 'lodash'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import TrashButton from './TrashButton'
import PermanentDeleteButton from './PermanentDeleteButton'
import InfoButton from './InfoButton'
import InfoPanel from './InfoPanel'
import InfoPanelTrashed from './InfoPanelTrashed'
import { formatDate } from 'browser/lib/date-formatter'
import { getTodoPercentageOfCompleted } from 'browser/lib/getTodoStatus'
import striptags from 'striptags'
const electron = require('electron')
const { remote } = electron
@@ -25,15 +36,23 @@ class MarkdownNoteDetail extends React.Component {
note: Object.assign({
title: '',
content: ''
}, props.note)
}, props.note),
isLockButtonShown: false,
isLocked: false
}
this.dispatchTimer = null
this.toggleLockButton = this.handleToggleLockButton.bind(this)
}
focus () {
this.refs.content.focus()
}
componentDidMount () {
ee.on('topbar:togglelockbutton', this.toggleLockButton)
}
componentWillReceiveProps (nextProps) {
if (nextProps.note.key !== this.props.note.key && !this.isMovingNote) {
if (this.saveQueue != null) this.saveNow()
@@ -41,7 +60,7 @@ class MarkdownNoteDetail extends React.Component {
note: Object.assign({}, nextProps.note)
}, () => {
this.refs.content.reload()
this.refs.tags.reset()
if (this.refs.tags) this.refs.tags.reset()
})
}
}
@@ -50,42 +69,16 @@ class MarkdownNoteDetail extends React.Component {
if (this.saveQueue != null) this.saveNow()
}
findTitle (value) {
let splitted = value.split('\n')
let title = null
for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
if (trimmedLine.match(/^# .+/)) {
title = trimmedLine.substring(1, trimmedLine.length).trim()
break
}
}
if (title == null) {
for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
if (trimmedLine.length > 0) {
title = trimmedLine
break
}
}
if (title == null) {
title = ''
}
}
title = markdown.strip(title)
return title
componentDidUnmount () {
ee.off('topbar:togglelockbutton', this.toggleLockButton)
}
handleChange (e) {
let { note } = this.state
note.content = this.refs.content.value
note.tags = this.refs.tags.value
note.title = this.findTitle(note.content)
if (this.refs.tags) note.tags = this.refs.tags.value
note.title = markdown.strip(striptags(findNoteTitle(note.content)))
note.updatedAt = new Date()
this.setState({
@@ -114,6 +107,7 @@ class MarkdownNoteDetail extends React.Component {
type: 'UPDATE_NOTE',
note: note
})
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
})
}
@@ -152,6 +146,7 @@ class MarkdownNoteDetail extends React.Component {
handleStarButtonClick (e) {
let { note } = this.state
if (!note.isStarred) AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
note.isStarred = !note.isStarred
@@ -166,23 +161,26 @@ class MarkdownNoteDetail extends React.Component {
}
handleContextButtonClick (e) {
let menu = new Menu()
menu.append(new MenuItem({
label: 'Delete',
click: (e) => this.handleDeleteMenuClick(e)
}))
menu.popup(remote.getCurrentWindow())
exportAsMd () {
ee.emit('export:save-md')
}
handleDeleteMenuClick (e) {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete a note',
detail: 'This work cannot be undone.',
buttons: ['Confirm', 'Cancel']
})
if (index === 0) {
exportAsTxt () {
ee.emit('export:save-text')
}
handleTrashButtonClick (e) {
let { note } = this.state
const { isTrashed } = note
if (isTrashed) {
let dialogueButtonIndex = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Confirm note deletion',
detail: 'This will permanently remove this note.',
buttons: ['Confirm', 'Cancel']
})
if (dialogueButtonIndex === 1) return
let { note, dispatch } = this.props
dataApi
.deleteNote(note.storage, note.key)
@@ -195,53 +193,190 @@ class MarkdownNoteDetail extends React.Component {
})
}
ee.once('list:moved', dispatchHandler)
ee.emit('list:next')
})
} else {
note.isTrashed = true
this.setState({
note
}, () => {
this.save()
})
}
ee.emit('list:next')
}
handleUndoButtonClick (e) {
let { note } = this.state
note.isTrashed = false
this.setState({
note
}, () => {
this.save()
this.refs.content.reload()
ee.emit('list:next')
})
}
handleFullScreenButton (e) {
ee.emit('editor:fullscreen')
}
handleLockButtonMouseDown (e) {
e.preventDefault()
ee.emit('editor:lock')
this.setState({ isLocked: !this.state.isLocked })
if (this.state.isLocked) this.focus()
}
getToggleLockButton () {
return this.state.isLocked ? '../resources/icon/icon-lock.svg' : '../resources/icon/icon-unlock.svg'
}
handleDeleteKeyDown (e) {
if (e.keyCode === 27) this.handleDeleteCancelButtonClick(e)
}
handleToggleLockButton (event, noteStatus) {
// first argument event is not used
if (this.props.config.editor.switchPreview === 'BLUR' && noteStatus === 'CODE') {
this.setState({isLockButtonShown: true})
} else {
this.setState({isLockButtonShown: false})
}
}
handleFocus (e) {
this.focus()
}
handleInfoButtonClick (e) {
const infoPanel = document.querySelector('.infoPanel')
if (infoPanel.style) infoPanel.style.display = infoPanel.style.display === 'none' ? 'inline' : 'none'
}
print (e) {
ee.emit('print')
}
render () {
let { data, config } = this.props
let { data, config, location } = this.props
let { note } = this.state
let storageKey = note.storage
let folderKey = note.folder
let options = []
data.storageMap.forEach((storage, index) => {
storage.folders.forEach((folder) => {
options.push({
storage: storage,
folder: folder
})
})
})
let currentOption = options.filter((option) => option.storage.key === storageKey && option.folder.key === folderKey)[0]
const trashTopBar = <div styleName='info'>
<div styleName='info-left'>
<i styleName='undo-button'
className='fa fa-undo fa-fw'
onClick={(e) => this.handleUndoButtonClick(e)}
/>
</div>
<div styleName='info-right'>
<PermanentDeleteButton onClick={(e) => this.handleTrashButtonClick(e)} />
<InfoButton
onClick={(e) => this.handleInfoButtonClick(e)}
/>
<InfoPanelTrashed
storageName={currentOption.storage.name}
folderName={currentOption.folder.name}
updatedAt={formatDate(note.updatedAt)}
createdAt={formatDate(note.createdAt)}
exportAsMd={this.exportAsMd}
exportAsTxt={this.exportAsTxt}
/>
</div>
</div>
const detailTopBar = <div styleName='info'>
<div styleName='info-left'>
<div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder}
ref='folder'
data={data}
onChange={(e) => this.handleFolderChange(e)}
/>
</div>
<TagSelect
ref='tags'
value={this.state.note.tags}
onChange={(e) => this.handleChange(e)}
/>
<TodoListPercentage
percentageOfTodo={getTodoPercentageOfCompleted(note.content)}
/>
</div>
<div styleName='info-right'>
<InfoButton
onClick={(e) => this.handleInfoButtonClick(e)}
/>
<StarButton
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
{(() => {
const imgSrc = `${this.getToggleLockButton()}`
const lockButtonComponent =
<button styleName='control-lockButton'
onFocus={(e) => this.handleFocus(e)}
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
>
<img styleName='iconInfo' src={imgSrc} />
</button>
return (
this.state.isLockButtonShown ? lockButtonComponent : ''
)
})()}
<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
storageName={currentOption.storage.name}
folderName={currentOption.folder.name}
noteLink={`[${note.title}](${location.query.key})`}
updatedAt={formatDate(note.updatedAt)}
createdAt={formatDate(note.createdAt)}
exportAsMd={this.exportAsMd}
exportAsTxt={this.exportAsTxt}
wordCount={note.content.split(' ').length}
letterCount={note.content.replace(/\r?\n/g, '').length}
type={note.type}
print={this.print}
/>
</div>
</div>
return (
<div className='NoteDetail'
style={this.props.style}
styleName='root'
>
<div styleName='info'>
<div styleName='info-left'>
<StarButton styleName='info-left-button'
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
<div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder}
ref='folder'
data={data}
onChange={(e) => this.handleFolderChange(e)}
/>
</div>
<TagSelect
ref='tags'
value={this.state.note.tags}
onChange={(e) => this.handleChange(e)}
/>
</div>
<div styleName='info-right'>
<button styleName='info-right-button'
onClick={(e) => this.handleContextButtonClick(e)}
>
<i className='fa fa-ellipsis-v' />
</button>
</div>
</div>
{location.pathname === '/trashed' ? trashTopBar : detailTopBar}
<div styleName='body'>
<MarkdownEditor
@@ -249,6 +384,7 @@ class MarkdownNoteDetail extends React.Component {
styleName='body-noteEditor'
config={config}
value={this.state.note.content}
storageKey={this.state.note.storage}
onChange={(e) => this.handleChange(e)}
ignorePreviewPointerEvents={this.props.ignorePreviewPointerEvents}
/>

View File

@@ -3,24 +3,54 @@
.root
absolute top right bottom
border-width 0 0 1px
border-style solid
border-color $ui-borderColor
border-left 1px solid alpha(#DEDEDE, 60%)
background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow
box-shadow none
padding 20px 40px
.lock-button
padding-bottom 3px
.control-lockButton
top 160px
margin-bottom 10px
topBarButtonLight()
.trashed-infopanel
top 40px
position relative
.control-fullScreenButton
top 80px
topBarButtonLight()
.body
absolute left right
left $note-detail-left-margin
right $note-detail-right-margin
left 0
right 0
top $info-height + $info-margin-under-border
bottom $statusBar-height
max-width 600px
margin 0 auto
.body-noteEditor
absolute top bottom left right
body[data-theme="white"]
.root
box-shadow $note-detail-box-shadow
border none
body[data-theme="dark"]
.root
border-color $ui-dark-borderColor
background-color $ui-dark-noteDetail-backgroundColor
box-shadow none
border none
.control-lockButton
topBarButtonDark()
.control-lockButton-tooltip
darkTooltip()
.control-fullScreenButton
topBarButtonDark()

View File

@@ -1,33 +1,30 @@
@import('DetailVars')
$info-height = 60px
$info-margin-under-border = 27px
$info-height = 50px
$info-margin-under-border = 30px
.info
absolute top left right
left $note-detail-left-margin
right $note-detail-right-margin
left 0
right 0
height $info-height
border-bottom $ui-border
border-bottom 1px solid #eee
background-color $ui-noteDetail-backgroundColor
width 100%
display flex
align-items center
.info-left
float left
padding 0 5px
margin 0px 2px
padding 0 10px
width 100%
display flex
align-items center
.info-left-top
display inline-block
height $info-height
line-height $info-height
.info-left-top-folderSelect
display inline-block
padding 0 3px
height 34px
line-height 34px
vertical-align middle
border-radius 3px
display flex
align-items center
justify-content center
.info-left-button
width 34px
@@ -35,39 +32,47 @@ $info-margin-under-border = 27px
navButtonColor()
color $ui-favorite-star-button-color
font-size 14px
line-height 0
margin 13px 2px
padding 0
border-radius 17px
&:hover .info-right-button-tooltip
&:hover .info-left-button-tooltip
opacity 1
&:focus
border-color $ui-favorite-star-button-color
&:active, &:active:hover
background-color $ui-favorite-star-button-color
color $ui-button--active-color
color $ui-button--color
.info-right
position absolute
right 0
top 0
background $ui-noteDetail-backgroundColor
right 40px
top 60px
bottom 1px
padding-left 30px
z-index 101
.info-right-button
.undo-button
width 34px
height 34px
border-radius 17px
font-size 14px
margin 13px 7px
padding 0
margin 5px 0px
border none
color $ui-button-color
display flex
align-items center
justify-content center
fill $ui-button-color
background-color transparent
cursor pointer
&:active
border-color $ui-button--active-backgroundColor
&:hover
opacity 1
background-color $ui-button--hover-backgroundColor
background-color alpha($ui-button--hover-backgroundColor, 60%)
transition 0.2s
.control-lockButton-tooltip
opacity 1
body[data-theme="dark"]
.info
@@ -89,10 +94,5 @@ body[data-theme="dark"]
.info-right
background-color $ui-dark-noteDetail-backgroundColor
.info-right-button
navDarkButtonColor()
border-color $ui-dark-borderColor
&:active
border-color $ui-dark-button--focus-borderColor
&:focus
border-color $ui-button--focus-borderColor
.undo-button
topBarButtonDark()

View 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)

View File

@@ -15,6 +15,14 @@ import StatusBar from '../StatusBar'
import context from 'browser/lib/context'
import ConfigManager from 'browser/main/lib/ConfigManager'
import _ from 'lodash'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import TrashButton from './TrashButton'
import PermanentDeleteButton from './PermanentDeleteButton'
import InfoButton from './InfoButton'
import InfoPanel from './InfoPanel'
import InfoPanelTrashed from './InfoPanelTrashed'
import { formatDate } from 'browser/lib/date-formatter'
function pass (name) {
switch (name) {
@@ -51,7 +59,7 @@ class SnippetNoteDetail extends React.Component {
}
componentWillReceiveProps (nextProps) {
if (nextProps.note.key !== this.props.note.key) {
if (nextProps.note.key !== this.props.note.key && !this.isMovingNote) {
if (this.saveQueue != null) this.saveNow()
let nextNote = Object.assign({
description: ''
@@ -66,7 +74,7 @@ class SnippetNoteDetail extends React.Component {
snippets.forEach((snippet, index) => {
this.refs['code-' + index].reload()
})
this.refs.tags.reset()
if (this.refs.tags) this.refs.tags.reset()
})
}
}
@@ -75,41 +83,13 @@ class SnippetNoteDetail extends React.Component {
if (this.saveQueue != null) this.saveNow()
}
findTitle (value) {
let splitted = value.split('\n')
let title = null
for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
if (trimmedLine.match(/^# .+/)) {
title = trimmedLine.substring(1, trimmedLine.length).trim()
break
}
}
if (title == null) {
for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
if (trimmedLine.length > 0) {
title = trimmedLine
break
}
}
if (title == null) {
title = ''
}
}
return title
}
handleChange (e) {
let { note } = this.state
note.tags = this.refs.tags.value
if (this.refs.tags) note.tags = this.refs.tags.value
note.description = this.refs.description.value
note.updatedAt = new Date()
note.title = this.findTitle(note.description)
note.title = findNoteTitle(note.description)
this.setState({
note
@@ -137,6 +117,7 @@ class SnippetNoteDetail extends React.Component {
type: 'UPDATE_NOTE',
note: note
})
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
})
}
@@ -175,6 +156,7 @@ class SnippetNoteDetail extends React.Component {
handleStarButtonClick (e) {
let { note } = this.state
if (!note.isStarred) AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
note.isStarred = !note.isStarred
@@ -189,21 +171,18 @@ class SnippetNoteDetail extends React.Component {
}
handleContextButtonClick (e) {
context.popup([{
label: 'Delete',
click: (e) => this.handleDeleteMenuClick(e)
}])
}
handleTrashButtonClick (e) {
let { note } = this.state
const { isTrashed } = note
handleDeleteMenuClick (e) {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete a note',
detail: 'This work cannot be undone.',
buttons: ['Confirm', 'Cancel']
})
if (index === 0) {
if (isTrashed) {
let dialogueButtonIndex = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Confirm note deletion',
detail: 'This will permanently remove this note.',
buttons: ['Confirm', 'Cancel']
})
if (dialogueButtonIndex === 1) return
let { note, dispatch } = this.props
dataApi
.deleteNote(note.storage, note.key)
@@ -216,9 +195,34 @@ class SnippetNoteDetail extends React.Component {
})
}
ee.once('list:moved', dispatchHandler)
ee.emit('list:next')
})
} else {
note.isTrashed = true
this.setState({
note
}, () => {
this.save()
})
}
ee.emit('list:next')
}
handleUndoButtonClick (e) {
let { note } = this.state
note.isTrashed = false
this.setState({
note
}, () => {
this.save()
ee.emit('list:next')
})
}
handleFullScreenButton (e) {
ee.emit('editor:fullscreen')
}
handleTabPlusButtonClick (e) {
@@ -250,25 +254,30 @@ class SnippetNoteDetail extends React.Component {
}
deleteSnippetByIndex (index) {
let snippets = this.state.note.snippets.slice()
const snippets = this.state.note.snippets.slice()
snippets.splice(index, 1)
this.state.note.snippets = snippets
let snippetIndex = this.state.snippetIndex >= snippets.length
const note = Object.assign({}, this.state.note, {snippets})
const snippetIndex = this.state.snippetIndex >= snippets.length
? snippets.length - 1
: this.state.snippetIndex
this.setState({
note: this.state.note,
snippetIndex
this.setState({ note, snippetIndex }, () => {
this.save()
this.refs['code-' + this.state.snippetIndex].reload()
})
}
renameSnippetByIndex (index, name) {
let snippets = this.state.note.snippets.slice()
const snippets = this.state.note.snippets.slice()
snippets[index].name = name
let syntax = CodeMirror.findModeByFileName(name.trim())
let mode = syntax != null ? syntax.name : null
if (mode != null) snippets[index].mode = mode
this.state.note.snippets = snippets
const syntax = CodeMirror.findModeByFileName(name.trim())
const mode = syntax != null ? syntax.name : null
if (mode != null) {
snippets[index].mode = mode
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('SNIPPET_LANG', {
name: mode
})
}
this.setState({note: Object.assign(this.state.note, {snippets: snippets})})
this.setState({
note: this.state.note
@@ -281,13 +290,17 @@ class SnippetNoteDetail extends React.Component {
return (e) => {
let snippets = this.state.note.snippets.slice()
snippets[index].mode = name
this.state.note.snippets = snippets
this.setState({note: Object.assign(this.state.note, {snippets: snippets})})
this.setState({
note: this.state.note
}, () => {
this.save()
})
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('SELECT_LANG', {
name
})
}
}
@@ -295,7 +308,7 @@ class SnippetNoteDetail extends React.Component {
return (e) => {
let snippets = this.state.note.snippets.slice()
snippets[index].content = this.refs['code-' + index].value
this.state.note.snippets = snippets
this.setState({note: Object.assign(this.state.note, {snippets: snippets})})
this.setState({
note: this.state.note
}, () => {
@@ -459,10 +472,27 @@ class SnippetNoteDetail extends React.Component {
this.refs['code-' + this.state.snippetIndex].focus()
}
handleInfoButtonClick (e) {
const infoPanel = document.querySelector('.infoPanel')
if (infoPanel.style) infoPanel.style.display = infoPanel.style.display === 'none' ? 'inline' : 'none'
}
showWarning () {
dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Sorry!',
detail: 'md/text import is available only a markdown note.',
buttons: ['OK']
})
}
render () {
let { data, config } = this.props
let { data, config, location } = this.props
let { note } = this.state
let storageKey = note.storage
let folderKey = note.folder
let editorFontSize = parseInt(config.editor.fontSize, 10)
if (!(editorFontSize > 0 && editorFontSize < 101)) editorFontSize = 14
let editorIndentSize = parseInt(config.editor.indentSize, 10)
@@ -500,6 +530,7 @@ class SnippetNoteDetail extends React.Component {
onChange={(e) => this.handleCodeChange(index)(e)}
ref={'code-' + index}
ignorePreviewPointerEvents={this.props.ignorePreviewPointerEvents}
storageKey={storageKey}
/>
: <CodeEditor styleName='tabView-content'
mode={snippet.mode}
@@ -517,41 +548,93 @@ class SnippetNoteDetail extends React.Component {
</div>
})
let options = []
data.storageMap.forEach((storage, index) => {
storage.folders.forEach((folder) => {
options.push({
storage: storage,
folder: folder
})
})
})
let currentOption = options.filter((option) => option.storage.key === storageKey && option.folder.key === folderKey)[0]
const trashTopBar = <div styleName='info'>
<div styleName='info-left'>
<i styleName='undo-button'
className='fa fa-undo fa-fw'
onClick={(e) => this.handleUndoButtonClick(e)}
/>
</div>
<div styleName='info-right'>
<PermanentDeleteButton onClick={(e) => this.handleTrashButtonClick(e)} />
<InfoButton
onClick={(e) => this.handleInfoButtonClick(e)}
/>
<InfoPanelTrashed
storageName={currentOption.storage.name}
folderName={currentOption.folder.name}
updatedAt={formatDate(note.updatedAt)}
createdAt={formatDate(note.createdAt)}
exportAsMd={this.showWarning}
exportAsTxt={this.showWarning}
/>
</div>
</div>
const detailTopBar = <div styleName='info'>
<div styleName='info-left'>
<div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder}
ref='folder'
data={data}
onChange={(e) => this.handleFolderChange(e)}
/>
</div>
<TagSelect
ref='tags'
value={this.state.note.tags}
onChange={(e) => this.handleChange(e)}
/>
</div>
<div styleName='info-right'>
<InfoButton
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
storageName={currentOption.storage.name}
folderName={currentOption.folder.name}
noteLink={`[${note.title}](${location.query.key})`}
updatedAt={formatDate(note.updatedAt)}
createdAt={formatDate(note.createdAt)}
exportAsMd={this.showWarning}
exportAsTxt={this.showWarning}
type={note.type}
/>
</div>
</div>
return (
<div className='NoteDetail'
style={this.props.style}
styleName='root'
onKeyDown={(e) => this.handleKeyDown(e)}
>
<div styleName='info'>
<div styleName='info-left'>
<StarButton styleName='info-left-button'
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
<div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder}
ref='folder'
data={data}
onChange={(e) => this.handleFolderChange(e)}
/>
</div>
<TagSelect
ref='tags'
value={this.state.note.tags}
onChange={(e) => this.handleChange(e)}
/>
</div>
<div styleName='info-right'>
<button styleName='info-right-button'
onClick={(e) => this.handleContextButtonClick(e)}
>
<i className='fa fa-ellipsis-v' />
</button>
</div>
</div>
{location.pathname === '/trashed' ? trashTopBar : detailTopBar}
<div styleName='body'>
<div styleName='description'>

View File

@@ -3,37 +3,36 @@
.root
absolute top bottom right
border-width 0 0 1px
border-style solid
border-color $ui-borderColor
border-left 1px solid alpha(#DEDEDE, 60%)
background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow
box-shadow none
.body
absolute left right
left $note-detail-left-margin
right $note-detail-right-margin
left $snippet-note-detail-left-margin
right $snippet-note-detail-right-margin
top $info-height + $info-margin-under-border
bottom $statusBar-height
background-color $ui-noteDetail-backgroundColor
.body .description
absolute top left right
height 80px
height 50px
.body .description textarea
outline none
display block
height 100%
width 100%
resize none
border none
padding 10px
border 1px solid $ui-borderColor
padding 2px 5px
line-height 1.6
background-color $ui-noteDetail-backgroundColor
.tabList
absolute left right
top 80px
top 55px
height 30px
display flex
background-color $ui-noteDetail-backgroundColor
@@ -44,33 +43,42 @@
overflow hidden
.tabList .plusButton
navButtonColor()
navWhiteButtonColor()
width 30px
.tabView
absolute left right bottom
top 130px
top 100px
.tabView-content
absolute top left right bottom
.override
absolute bottom left
bottom 1px
left 60px
height 23px
z-index 1
z-index 101
button
navButtonColor()
height 24px
border-width 0 1px 0 0
border-style solid
border-color $ui-borderColor
padding 0 6px
&:hover
color $ui-active-color
&:active .update-icon
color white
color $ui-active-color
.control-fullScreenButton
top 80px
margin-bottom 10px
topBarButtonLight()
body[data-theme="white"]
.root
box-shadow $note-detail-box-shadow
border none
body[data-theme="dark"]
.root
border-color $ui-dark-borderColor
border none
background-color $ui-dark-noteDetail-backgroundColor
box-shadow none
@@ -79,7 +87,8 @@ body[data-theme="dark"]
.body .description textarea
background-color $ui-dark-noteDetail-backgroundColor
color white
color $ui-dark-text-color
border 1px solid $ui-dark-borderColor
.tabList
background-color $ui-button--active-backgroundColor
@@ -93,3 +102,10 @@ body[data-theme="dark"]
.override
button
border-color $ui-dark-borderColor
&:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
transition 0.15s
color $ui-dark-text-color
.control-fullScreenButton
topBarButtonDark()

View File

@@ -47,10 +47,10 @@ class StarButton extends React.Component {
onMouseLeave={(e) => this.handleMouseLeave(e)}
onClick={this.props.onClick}
>
<i styleName='icon'
className={this.state.isActive || this.props.isActive
? 'fa fa-star'
: 'fa fa-star-o'
<img styleName='icon'
src={this.state.isActive || this.props.isActive
? '../resources/icon/icon-starred.svg'
: '../resources/icon/icon-star.svg'
}
/>
</button>

View File

@@ -1,20 +1,24 @@
.root
left 7px
top 0
padding 0
top 45px
topBarButtonLight()
&:hover
.icon
transform rotate(-72deg)
.tooltip
opacity 1
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)
.root--active
@extend .root
transition 0.15s
color $ui-favorite-star-button-color
&:hover
color $ui-favorite-star-button-color
.icon
transform rotate(-72deg)
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)
.icon
transition transform 0.15s
body[data-theme="dark"]
.root
topBarButtonDark()
&:hover
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)

View File

@@ -2,6 +2,7 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './TagSelect.styl'
import _ from 'lodash'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
class TagSelect extends React.Component {
constructor (props) {
@@ -56,6 +57,7 @@ class TagSelect extends React.Component {
}
submitTag () {
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_TAG')
let { value } = this.props
let newTag = this.refs.newTag.value.trim().replace(/ +/g, '_')
@@ -107,11 +109,11 @@ class TagSelect extends React.Component {
<span styleName='tag'
key={tag}
>
<span styleName='tag-label'>{tag}</span>
<span styleName='tag-label'>#{tag}</span>
<button styleName='tag-removeButton'
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>
</span>
)

View File

@@ -1,9 +1,9 @@
.root
display inline-block
top 19px
display flex
align-items center
user-select none
vertical-align middle
width 300px
width 100%
overflow-x scroll
white-space nowrap
@@ -11,79 +11,46 @@
display none
.tag
display inline-block
margin 0 2px
padding-left 10px
vertical-align middle
height 20px
background-color $ui-tag-backgroundColor
border-radius 20px
overflow hidden
display flex
align-items center
margin 0px 2px
padding 2px 4px
background-color alpha($ui-tag-backgroundColor, 3%)
border-radius 4px
position relative
clearfix()
.tag-removeButton
float right
height 20px
width 18px
margin 0
padding 0
border-style solid
border-width 0
border-radius 20px
line-height 18px
background-color transparent
color $ui-button-color
position absolute
right 6px
.tag-removeButton-icon
width 5px
padding-right 4px
.tag-label
font-size 12px
font-weight bold
color: #FFFFFF
float left
height 20px
line-height 20px
padding 0 6px
font-size 13px
color: $ui-text-color
padding 4px 16px 4px 8px
.newTag
display inline-block
margin 0 2px
vertical-align middle
height 24px
box-sizing borde-box
box-sizing border-box
border none
border-bottom $ui-border
background-color transparent
outline none
padding 0 4px
&:focus
border-color $ui-input--focus-borderColor = #369DCD
&:disabled
background-color $ui-input--disabled-backgroundColor = #DDD
.add-tag-button
display inline
margin-left 5px
width 20px
height 20px
border none
border-radius 20px
padding 0
color #FFFFFF
&:hover
background-color rgba(0, 0, 0, 0.3)
&:active, &:active:hover
background-color rgba(0, 0, 0, 0.5)
color $ui-button--active-color
font-size 13px
body[data-theme="dark"]
.icon
color $ui-dark-button-color
.tag
background-color $ui-dark-tag-backgroundColor
background-color alpha($ui-dark-tag-backgroundColor, 60%)
.tag-removeButton
border-color $ui-button--focus-borderColor
@@ -94,17 +61,6 @@ body[data-theme="dark"]
color $ui-dark-text-color
.newTag
border-color $ui-dark-borderColor
border-color none
background-color transparent
color $ui-dark-text-color
&:focus
border-color $ui-input--focus-borderColor = #369DCD
&:disabled
background-color $ui-input--disabled-backgroundColor = #DDD
.add-tag-button
&:hover
background-color rgba(255, 255, 255, 0.3)
&:active, &:active:hover
background-color rgba(255, 255, 255, 0.5)
color $ui-button--active-color
color $ui-dark-text-color

View File

@@ -0,0 +1,19 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './TrashButton.styl'
const TrashButton = ({
onClick
}) => (
<button styleName='control-trashButton'
onClick={(e) => onClick(e)}
>
<img styleName='iconInfo' src='../resources/icon/icon-trash.svg' />
</button>
)
TrashButton.propTypes = {
onClick: PropTypes.func.isRequired
}
export default CSSModules(TrashButton, styles)

View File

@@ -0,0 +1,15 @@
.control-trashButton
top 120px
margin-bottom 10px
topBarButtonLight()
.control-trashButton--in-trash
top 60px
topBarButtonLight()
.trashButton
padding 0px
body[data-theme="dark"]
.control-trashButton
topBarButtonDark()

View File

@@ -17,7 +17,7 @@ class Detail extends React.Component {
this.refs.root != null && this.refs.root.focus()
}
this.deleteHandler = () => {
this.refs.root != null && this.refs.root.handleDeleteMenuClick()
this.refs.root != null && this.refs.root.handleTrashButtonClick()
}
}
@@ -49,7 +49,7 @@ class Detail extends React.Component {
tabIndex='0'
>
<div styleName='empty'>
<div styleName='empty-message'>{OSX ? 'Command(⌘)' : 'Ctrl(^)'} + N<br />to create a new post</div>
<div styleName='empty-message'>{OSX ? 'Command(⌘)' : 'Ctrl(^)'} + N<br />to create a new note</div>
</div>
<StatusBar
{..._.pick(this.props, ['config', 'location', 'dispatch'])}

View File

@@ -11,24 +11,31 @@ import _ from 'lodash'
import ConfigManager from 'browser/main/lib/ConfigManager'
import modal from 'browser/main/lib/modal'
import InitModal from 'browser/main/modals/InitModal'
import mixpanel from 'browser/main/lib/mixpanel'
function focused () {
mixpanel.track('MAIN_FOCUSED')
}
import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig'
import eventEmitter from 'browser/main/lib/eventEmitter'
class Main extends React.Component {
constructor (props) {
super(props)
if (process.env.NODE_ENV === 'production') {
mobileAnalytics.initAwsMobileAnalytics()
}
let { config } = props
this.state = {
isRightSliderFocused: false,
listWidth: config.listWidth,
navWidth: config.navWidth,
isLeftSliderFocused: false
isLeftSliderFocused: false,
fullScreen: false,
noteDetailWidth: 0,
mainBodyWidth: 0
}
this.toggleFullScreen = () => this.handleFullScreenButton()
}
getChildContext () {
@@ -45,6 +52,8 @@ class Main extends React.Component {
if (config.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark')
} else if (config.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else {
document.body.setAttribute('data-theme', 'default')
}
@@ -63,11 +72,11 @@ class Main extends React.Component {
}
})
window.addEventListener('focus', focused)
eventEmitter.on('editor:fullscreen', this.toggleFullScreen)
}
componentWillUnmount () {
window.removeEventListener('focus', focused)
eventEmitter.off('editor:fullscreen', this.toggleFullScreen)
}
handleLeftSlideMouseDown (e) {
@@ -144,9 +153,40 @@ class Main extends React.Component {
}
}
handleFullScreenButton (e) {
this.setState({ fullScreen: !this.state.fullScreen }, () => {
const noteDetail = document.querySelector('.NoteDetail')
const noteList = document.querySelector('.NoteList')
const mainBody = document.querySelector('#main-body')
if (this.state.fullScreen) {
this.hideLeftLists(noteDetail, noteList, mainBody)
} else {
this.showLeftLists(noteDetail, noteList, mainBody)
}
})
}
hideLeftLists (noteDetail, noteList, mainBody) {
this.setState({noteDetailWidth: noteDetail.style.left})
this.setState({mainBodyWidth: mainBody.style.left})
noteDetail.style.left = '0px'
mainBody.style.left = '0px'
noteList.style.display = 'none'
}
showLeftLists (noteDetail, noteList, mainBody) {
noteDetail.style.left = this.state.noteDetailWidth
mainBody.style.left = this.state.mainBodyWidth
noteList.style.display = 'inline'
}
render () {
let { config } = this.props
// the width of the navigation bar when it is folded/collapsed
const foldedNavigationWidth = 44
return (
<div
className='Main'
@@ -173,8 +213,9 @@ class Main extends React.Component {
</div>
}
<div styleName={config.isSideNavFolded ? 'body--expanded' : 'body'}
id='main-body'
ref='body'
style={{left: config.isSideNavFolded ? 44 : this.state.navWidth}}
style={{left: config.isSideNavFolded ? foldedNavigationWidth : this.state.navWidth}}
>
<TopBar style={{width: this.state.listWidth}}
{..._.pick(this.props, [

View File

@@ -13,10 +13,12 @@
absolute top bottom
top -2px
width 0
z-index 0
.slider-right
@extend .slider
width 1px
z-index 0
.slider--active
@extend .slider

View File

@@ -0,0 +1,73 @@
.root
position relative
background-color $ui-noteList-backgroundColor
height $topBar-height - 1
margin-left: auto;
width: 64px;
.root--expanded
@extend .root
$control-height = 34px
.control
position absolute
top 13px
right 7px
height $control-height
display flex
.control-newNoteButton
display block
width 32px
height $control-height - 2
navButtonColor()
font-size 16px
line-height 28px
padding 0
&:active
border-color $ui-button--active-backgroundColor
&:hover .control-newNoteButton-tooltip
opacity 1
.control-newNoteButton-tooltip
tooltip()
position absolute
pointer-events none
top 26px
right -43px
width 124px
z-index 200
padding 5px
line-height normal
border-radius 2px
opacity 0
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"]
.root, .root--expanded
background-color $ui-dark-noteList-backgroundColor
.control
border-color $ui-dark-borderColor
.control-newNoteButton
color $ui-inactive-text-color
border-color $ui-dark-borderColor
background-color $ui-dark-noteList-backgroundColor
&:hover
transition 0.15s
color $ui-dark-text-color
&:active
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
border-color $ui-dark-button--active-backgroundColor
.control-newNoteButton-tooltip
darkTooltip()

View File

@@ -0,0 +1,106 @@
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './NewNoteButton.styl'
import _ from 'lodash'
import modal from 'browser/main/lib/modal'
import NewNoteModal from 'browser/main/modals/NewNoteModal'
import { hashHistory } from 'react-router'
import eventEmitter from 'browser/main/lib/eventEmitter'
import dataApi from 'browser/main/lib/dataApi'
const { remote } = require('electron')
const { dialog } = remote
const OSX = window.process.platform === 'darwin'
class NewNoteButton extends React.Component {
constructor (props) {
super(props)
this.state = {
}
this.newNoteHandler = () => {
this.handleNewNoteButtonClick()
}
}
componentDidMount () {
eventEmitter.on('top:new-note', this.newNoteHandler)
}
componentWillUnmount () {
eventEmitter.off('top:new-note', this.newNoteHandler)
}
handleNewNoteButtonClick (e) {
const { config, location, dispatch } = this.props
const { storage, folder } = this.resolveTargetFolder()
modal.open(NewNoteModal, {
storage: storage.key,
folder: folder.key,
dispatch,
location
})
}
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 to create a note')
const folder = _.find(storage.folders, {key: params.folderKey}) || storage.folders[0]
if (folder == null) this.showMessageBox('No folder to create a note')
return {
storage,
folder
}
}
showMessageBox (message) {
dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: message,
buttons: ['OK']
})
}
render () {
const { config, style } = this.props
return (
<div className='NewNoteButton'
styleName={config.isSideNavFolded ? 'root--expanded' : 'root'}
style={style}
>
<div styleName='control'>
<button styleName='control-newNoteButton'
onClick={(e) => this.handleNewNoteButtonClick(e)}>
<img styleName='iconTag' src='../resources/icon/icon-newnote.svg' />
<span styleName='control-newNoteButton-tooltip'>
Make a Note {OSX ? '⌘' : '^'} + n
</span>
</button>
</div>
</div>
)
}
}
NewNoteButton.propTypes = {
dispatch: PropTypes.func,
config: PropTypes.shape({
isSideNavFolded: PropTypes.bool
})
}
export default CSSModules(NewNoteButton, styles)

View File

@@ -17,54 +17,75 @@ $control-height = 30px
.control-sortBy
flex 1
padding-left 25px
padding-left 22px
.control-sortBy-select
margin-left 0
font-size 12px
appearance: none;
margin-left 5px
color $ui-inactive-text-color
padding 0
border none
background-color transparent
font-size 10px
outline none
cursor pointer
font-size 12px
&:hover
transition 0.2s
color $ui-text-color
.control-button-area
margin-right 12px
.control-button
width 25px
padding 0
background-color transparent
border none
color $ui-inactive-text-color
color alpha($ui-inactive-text-color, 60%)
transition 0.15s
&:active, &:active:hover
color $ui-active-color
color $ui-inactive-text-color
&:hover
color $ui-text-color
color $ui-inactive-text-color
.control-button--active
@extend .control-button
color $ui-active-color
color $ui-inactive-text-color
&:hover
color $ui-active-color
color $ui-inactive-text-color
.list
absolute left right bottom
top $control-height
overflow auto
body[data-theme="white"]
.root
background-color $ui-white-noteList-backgroundColor
.control
background-color $ui-white-noteList-backgroundColor
body[data-theme="dark"]
.root
border-color $ui-dark-borderColor
background-color $ui-dark-noteList-backgroundColor
.control
background-color $ui-dark-noteList-backgroundColor
.control
background-color $ui-dark-noteList-backgroundColor
border-color $ui-dark-borderColor
.control-sortBy-select
&:hover
transition 0.2s
color $ui-dark-text-color
.control-button
color $ui-dark-inactive-text-color
&:hover
color $ui-dark-text-color
.control-button--active
color $ui-dark-text-color
&:active
color $ui-dark-text-color

View File

@@ -8,6 +8,13 @@ import dataApi from 'browser/main/lib/dataApi'
import ConfigManager from 'browser/main/lib/ConfigManager'
import NoteItem from 'browser/components/NoteItem'
import NoteItemSimple from 'browser/components/NoteItemSimple'
import searchFromNotes from 'browser/lib/search'
import fs from 'fs'
import { hashHistory } from 'react-router'
import markdown from 'browser/lib/markdown'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
import stripgtags from 'striptags'
import store from 'browser/main/store'
const { remote } = require('electron')
const { Menu, MenuItem, dialog } = remote
@@ -38,12 +45,16 @@ class NoteList extends React.Component {
this.focusHandler = () => {
this.refs.list.focus()
}
this.alertIfSnippetHnalder = () => {
this.alertIfSnippetHandler = () => {
this.alertIfSnippet()
}
this.importFromFileHandler = this.importFromFile.bind(this)
this.jumpNoteByHash = this.jumpNoteByHashHandler.bind(this)
this.state = {
}
this.contextNotes = []
}
componentDidMount () {
@@ -51,7 +62,9 @@ class NoteList extends React.Component {
ee.on('list:next', this.selectNextNoteHandler)
ee.on('list:prior', this.selectPriorNoteHandler)
ee.on('list:focus', this.focusHandler)
ee.on('list:isMarkdownNote', this.alertIfSnippetHnalder)
ee.on('list:isMarkdownNote', this.alertIfSnippetHandler)
ee.on('import:file', this.importFromFileHandler)
ee.on('list:jump', this.jumpNoteByHash)
}
componentWillReceiveProps (nextProps) {
@@ -70,7 +83,9 @@ class NoteList extends React.Component {
ee.off('list:next', this.selectNextNoteHandler)
ee.off('list:prior', this.selectPriorNoteHandler)
ee.off('list:focus', this.focusHandler)
ee.off('list:isMarkdownNote', this.alertIfSnippetHnalder)
ee.off('list:isMarkdownNote', this.alertIfSnippetHandler)
ee.off('import:file', this.importFromFileHandler)
ee.off('list:jump', this.jumpNoteByHash)
}
componentDidUpdate (prevProps) {
@@ -78,6 +93,7 @@ class NoteList extends React.Component {
if (this.notes.length > 0 && location.query.key == null) {
let { router } = this.context
if (!location.pathname.match(/\/searched/)) this.contextNotes = this.getContextNotes()
router.replace({
pathname: location.pathname,
query: {
@@ -89,9 +105,7 @@ class NoteList extends React.Component {
// Auto scroll
if (_.isString(location.query.key) && prevProps.location.query.key === location.query.key) {
let targetIndex = _.findIndex(this.notes, (note) => {
return note != null && note.storage + '-' + note.key === location.query.key
})
const targetIndex = this.getTargetIndex()
if (targetIndex > -1) {
let list = this.refs.list
let item = list.childNodes[targetIndex]
@@ -117,9 +131,7 @@ class NoteList extends React.Component {
let { router } = this.context
let { location } = this.props
let targetIndex = _.findIndex(this.notes, (note) => {
return note.storage + '-' + note.key === location.query.key
})
let targetIndex = this.getTargetIndex()
if (targetIndex === 0) {
return
@@ -142,9 +154,7 @@ class NoteList extends React.Component {
let { router } = this.context
let { location } = this.props
let targetIndex = _.findIndex(this.notes, (note) => {
return note.storage + '-' + note.key === location.query.key
})
let targetIndex = this.getTargetIndex()
if (targetIndex === this.notes.length - 1) {
targetIndex = 0
@@ -163,6 +173,29 @@ class NoteList extends React.Component {
ee.emit('list:moved')
}
jumpNoteByHashHandler (event, noteHash) {
// first argument event isn't used.
if (this.notes === null || this.notes.length === 0) {
return
}
const { router } = this.context
const { location } = this.props
let targetIndex = this.getTargetIndex()
if (targetIndex < 0) targetIndex = 0
router.push({
pathname: location.pathname,
query: {
key: this.notes[targetIndex].storage + '-' + this.notes[targetIndex].key
}
})
ee.emit('list:moved')
}
handleNoteListKeyDown (e) {
if (e.metaKey || e.ctrlKey) return true
@@ -194,37 +227,76 @@ class NoteList extends React.Component {
getNotes () {
let { data, params, location } = this.props
let { router } = this.context
if (location.pathname.match(/\/home/)) {
return data.noteMap.map((note) => note)
if (location.pathname.match(/\/home/) || location.pathname.match(/\alltags/)) {
const allNotes = data.noteMap.map((note) => note)
this.contextNotes = allNotes
return allNotes
}
if (location.pathname.match(/\/starred/)) {
return data.starredSet.toJS()
.map((uniqueKey) => data.noteMap.get(uniqueKey))
const starredNotes = data.starredSet.toJS().map((uniqueKey) => data.noteMap.get(uniqueKey))
this.contextNotes = starredNotes
return starredNotes
}
let storageKey = params.storageKey
let folderKey = params.folderKey
let storage = data.storageMap.get(storageKey)
if (storage == null) return []
let folder = _.find(storage.folders, {key: folderKey})
if (folder == null) {
let storageNoteSet = data.storageNoteMap
.get(storage.key)
if (storageNoteSet == null) storageNoteSet = []
return storageNoteSet
.map((uniqueKey) => data.noteMap.get(uniqueKey))
if (location.pathname.match(/\/searched/)) {
const searchInputText = document.getElementsByClassName('searchInput')[0].value
if (searchInputText === '') {
return this.sortByPin(this.contextNotes)
}
return searchFromNotes(this.contextNotes, searchInputText)
}
let folderNoteKeyList = data.folderNoteMap
.get(storage.key + '-' + folder.key)
if (location.pathname.match(/\/trashed/)) {
const trashedNotes = data.trashedSet.toJS().map((uniqueKey) => data.noteMap.get(uniqueKey))
this.contextNotes = trashedNotes
return trashedNotes
}
return folderNoteKeyList != null
? folderNoteKeyList
.map((uniqueKey) => data.noteMap.get(uniqueKey))
: []
if (location.pathname.match(/\/tags/)) {
return data.noteMap.map(note => {
return note
}).filter(note => {
return note.tags.includes(params.tagname)
})
}
return this.getContextNotes()
}
// get notes in the current folder
getContextNotes () {
const { data, params } = this.props
const storageKey = params.storageKey
const folderKey = params.folderKey
const storage = data.storageMap.get(storageKey)
if (storage === undefined) return []
const folder = _.find(storage.folders, {key: folderKey})
if (folder === undefined) {
const storageNoteSet = data.storageNoteMap.get(storage.key) || []
return storageNoteSet.map((uniqueKey) => data.noteMap.get(uniqueKey))
}
const folderNoteKeyList = data.folderNoteMap.get(`${storage.key}-${folder.key}`) || []
return folderNoteKeyList.map((uniqueKey) => data.noteMap.get(uniqueKey))
}
sortByPin (unorderedNotes) {
const pinnedNotes = []
const unpinnedNotes = []
unorderedNotes.forEach((note) => {
if (note.isPinned) {
pinnedNotes.push(note)
} else {
unpinnedNotes.push(note)
}
})
return pinnedNotes.concat(unpinnedNotes)
}
handleNoteClick (e, uniqueKey) {
@@ -239,49 +311,6 @@ class NoteList extends React.Component {
})
}
handleNoteContextMenu (e, uniqueKey) {
let menu = new Menu()
menu.append(new MenuItem({
label: 'Delete Note',
click: (e) => this.handleDeleteNote(e, uniqueKey)
}))
menu.popup()
}
handleDeleteNote (e, uniqueKey) {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete a note',
detail: 'This work cannot be undone.',
buttons: ['Confirm', 'Cancel']
})
if (index === 0) {
let { dispatch, location } = this.props
let splitted = uniqueKey.split('-')
let storageKey = splitted.shift()
let noteKey = splitted.shift()
dataApi
.deleteNote(storageKey, noteKey)
.then((data) => {
let dispatchHandler = () => {
dispatch({
type: 'DELETE_NOTE',
storageKey: data.storageKey,
noteKey: data.noteKey
})
}
if (location.query.key === uniqueKey) {
ee.once('list:moved', dispatchHandler)
ee.emit('list:next')
} else {
dispatchHandler()
}
})
}
}
handleSortByChange (e) {
let { dispatch } = this.props
@@ -310,29 +339,199 @@ class NoteList extends React.Component {
})
}
alertIfSnippet() {
let { location } = this.props
const targetIndex = _.findIndex(this.notes, (note) => {
return `${note.storage}-${note.key}` === location.query.key
})
alertIfSnippet () {
const targetIndex = this.getTargetIndex()
if (this.notes[targetIndex].type === 'SNIPPET_NOTE') {
dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Sorry!',
detail: 'md/text import is available only a markdown note.'
detail: 'md/text import is available only a markdown note.',
buttons: ['OK', 'Cancel']
})
}
}
handleDragStart (e, note) {
const noteData = JSON.stringify(note)
e.dataTransfer.setData('note', noteData)
}
handleNoteContextMenu (e, uniqueKey) {
const { location } = this.props
const note = this.notes.find((note) => {
const noteKey = `${note.storage}-${note.key}`
return noteKey === uniqueKey
})
const pinLabel = note.isPinned ? 'Remove pin' : 'Pin to Top'
const deleteLabel = 'Delete Note'
const menu = new Menu()
if (!location.pathname.match(/\/home|\/starred|\/trash/)) {
menu.append(new MenuItem({
label: pinLabel,
click: (e) => this.pinToTop(e, uniqueKey)
}))
}
menu.append(new MenuItem({
label: deleteLabel,
click: (e) => this.deleteNote(e, uniqueKey)
}))
menu.popup()
}
pinToTop (e, uniqueKey) {
const { data, params } = this.props
const storageKey = params.storageKey
const folderKey = params.folderKey
const currentStorage = data.storageMap.get(storageKey)
const currentFolder = _.find(currentStorage.folders, {key: folderKey})
this.handleNoteClick(e, uniqueKey)
const targetIndex = this.getTargetIndex()
let note = this.notes[targetIndex]
note.isPinned = !note.isPinned
dataApi
.updateNote(note.storage, note.key, note)
.then((note) => {
store.dispatch({
type: 'UPDATE_NOTE',
note: note
})
})
}
deleteNote (e, uniqueKey) {
this.handleNoteClick(e, uniqueKey)
ee.emit('detail:delete')
}
importFromFile () {
const { dispatch, location } = this.props
const options = {
filters: [
{ name: 'Documents', extensions: ['md', 'txt'] }
],
properties: ['openFile', 'multiSelections']
}
dialog.showOpenDialog(remote.getCurrentWindow(), options, (filepaths) => {
this.addNotesFromFiles(filepaths)
})
}
handleDrop (e) {
e.preventDefault()
const { location } = this.props
const filepaths = Array.from(e.dataTransfer.files).map(file => { return file.path })
if (!location.pathname.match(/\/trashed/)) this.addNotesFromFiles(filepaths)
}
// Add notes to the current folder
addNotesFromFiles (filepaths) {
const { dispatch, location } = this.props
const { storage, folder } = this.resolveTargetFolder()
if (filepaths === undefined) return
filepaths.forEach((filepath) => {
fs.readFile(filepath, (err, data) => {
if (err) throw Error('File reading error: ', err)
const content = data.toString()
const newNote = {
content: content,
folder: folder.key,
title: markdown.strip(findNoteTitle(content)),
type: 'MARKDOWN_NOTE'
}
dataApi.createNote(storage.key, newNote)
.then((note) => {
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: `${note.storage}-${note.key}`}
})
})
})
})
}
getTargetIndex () {
const { location } = this.props
const targetIndex = _.findIndex(this.notes, (note) => {
return `${note.storage}-${note.key}` === location.query.key
})
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 () {
let { location, notes, config } = this.props
let { location, notes, config, dispatch } = this.props
let sortFunc = config.sortBy === 'CREATED_AT'
? sortByCreatedAt
: config.sortBy === 'ALPHABETICAL'
? sortByAlphabetical
: sortByUpdatedAt
this.notes = notes = this.getNotes()
.sort(sortFunc)
const sortedNotes = location.pathname.match(/\/home|\/starred|\/trash/)
? this.getNotes().sort(sortFunc)
: this.sortByPin(this.getNotes().sort(sortFunc))
this.notes = notes = sortedNotes.filter((note) => {
// this is for the trash box
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
.map(note => {
@@ -345,7 +544,7 @@ class NoteList extends React.Component {
const dateDisplay = moment(
config.sortBy === 'CREATED_AT'
? note.createdAt : note.updatedAt
).fromNow()
).fromNow('D')
const key = `${note.storage}-${note.key}`
if (isDefault) {
@@ -355,8 +554,10 @@ class NoteList extends React.Component {
note={note}
dateDisplay={dateDisplay}
key={key}
handleNoteClick={this.handleNoteClick.bind(this)}
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
handleNoteClick={this.handleNoteClick.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
pathname={location.pathname}
/>
)
}
@@ -366,8 +567,9 @@ class NoteList extends React.Component {
isActive={isActive}
note={note}
key={key}
handleNoteClick={this.handleNoteClick.bind(this)}
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
handleNoteClick={this.handleNoteClick.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
/>
)
})
@@ -376,35 +578,38 @@ class NoteList extends React.Component {
<div className='NoteList'
styleName='root'
style={this.props.style}
onDrop={(e) => this.handleDrop(e)}
>
<div styleName='control'>
<div styleName='control-sortBy'>
Sort by
<i className='fa fa-angle-down' />
<select styleName='control-sortBy-select'
value={config.sortBy}
onChange={(e) => this.handleSortByChange(e)}
>
<option value='UPDATED_AT'>Updated Time</option>
<option value='CREATED_AT'>Created Time</option>
<option value='ALPHABETICAL'>Alphabetical</option>
<option value='UPDATED_AT'>Updated</option>
<option value='CREATED_AT'>Created</option>
<option value='ALPHABETICAL'>Alphabetically</option>
</select>
</div>
<button styleName={config.listStyle === 'DEFAULT'
? 'control-button--active'
: 'control-button'
}
onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')}
>
<i className='fa fa-th-large' />
</button>
<button styleName={config.listStyle === 'SMALL'
? 'control-button--active'
: 'control-button'
}
onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')}
>
<i className='fa fa-list-ul' />
</button>
<div styleName='control-button-area'>
<button styleName={config.listStyle === 'DEFAULT'
? 'control-button--active'
: 'control-button'
}
onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')}
>
<img styleName='iconTag' src='../resources/icon/icon-column.svg' />
</button>
<button styleName={config.listStyle === 'SMALL'
? 'control-button--active'
: 'control-button'
}
onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')}
>
<img styleName='iconTag' src='../resources/icon/icon-column-list.svg' />
</button>
</div>
</div>
<div styleName='list'
ref='list'

View File

@@ -1,57 +1,84 @@
.root
absolute top left bottom
width $sideNav-width
background-color $ui-backgroundColor
background-color #2E3235
user-select none
color $ui-text-color
height: 100vh
display: flex
flex-direction column
.top
height $topBar-height
padding-bottom 15px
.top-menu
.top-menu-preference
navButtonColor()
height $topBar-height
padding 0 15px
font-size 14px
width 100%
text-align left
position absolute
top 22px
right 10px
width 2em
background-color transparent
&:hover
color $ui-button-default--active-backgroundColor
background-color transparent
&:active, &:active:hover
color $ui-button-default--active-backgroundColor
.switch-buttons
background-color transparent
border 0
margin 24px auto 4px 14px
display flex
text-align center
.non-active-button
color $ui-inactive-text-color
font-size 16px
border 0
background-color transparent
transition 0.2s
display flex
text-align center
margin-right 4px;
&:hover
color alpha(#239F86, 60%)
.active-button
@extend .non-active-button
color $ui-button-default--active-backgroundColor
.top-menu-label
margin-left 5px
overflow ellipsis
opacity 0
.storageList
absolute left right
bottom 37px
top 160px
.tabBody
flex 1
display flex
flex-direction column
.tag-title
padding-left 15px
padding-bottom 13px
p
color $ui-button-default-color
.tagList
overflow-y auto
.storageList-empty
padding 0 10px
margin-top 15px
line-height 24px
color $ui-inactive-text-color
.navToggle
navButtonColor()
display block
position absolute
right 5px
bottom 5px
border-radius 16.5px
height 34px
width 34px
line-height 32px
padding 0
flex: 1
.root--folded
@extend .root
width 44px
.storageList-empty
white-space nowrap
transform rotate(90deg)
height 100vh
width $sideNav--folded-width
background-color #2E3235
.switch-buttons
display none
.top
height 60px
.top-menu
width 44px - 1
position static
width $sideNav--folded-width
height 60px
text-align center
&:hover .top-menu-label
transition opacity 0.15s
@@ -60,44 +87,54 @@
position fixed
display inline-block
height 30px
left 32px
left $sideNav--folded-width
padding 0 10px
margin-top -8px
opacity 0
margin-left 0
overflow hidden
background-color $ui-tooltip-backgroundColor
z-index 10
color white
line-height 30px
border-top-right-radius 2px
border-bottom-right-radius 2px
pointer-events none
font-size 12px
.menu-button, .menu-button--active
text-align center
&:hover .menu-button-label
transition opacity 0.15s
opacity 1
font-size 13px
.top-menu-preference
position absolute
left 11px
.menu-button-label
position fixed
display inline-block
height 32px
left 44px
padding 0 10px
margin-top -8px
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="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"]
.root, .root--folded
@@ -108,12 +145,21 @@ body[data-theme="dark"]
.top
border-color $ui-dark-borderColor
.top-menu
.top-menu-preference
navDarkButtonColor()
background-color transparent
&:active
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
background-color transparent
&:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
background-color transparent
.storageList-empty
color $ui-dark-inactive-text-color
.navToggle
navDarkButtonColor()
.non-active-button
color alpha($ui-dark-text-color, 60%)
&:hover
color alpha(#0B99F1, 60%)
.tag-title
p
color alpha($ui-dark-text-color, 60%)

View File

@@ -7,6 +7,7 @@ import CreateFolderModal from 'browser/main/modals/CreateFolderModal'
import RenameFolderModal from 'browser/main/modals/RenameFolderModal'
import dataApi from 'browser/main/lib/dataApi'
import StorageItemChild from 'browser/components/StorageItem'
import eventEmitter from 'browser/main/lib/eventEmitter'
const { remote } = require('electron')
const { Menu, MenuItem, dialog } = remote
@@ -113,7 +114,7 @@ class StorageItem extends React.Component {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete Folder',
detail: 'This work will deletes all notes in the folder and can not be undone.',
detail: 'This will delete all notes in the folder and can not be undone.',
buttons: ['Confirm', 'Cancel']
})
@@ -131,16 +132,68 @@ class StorageItem extends React.Component {
}
}
handleDragEnter (e) {
e.dataTransfer.setData('defaultColor', e.target.style.backgroundColor)
e.target.style.backgroundColor = 'rgba(129, 130, 131, 0.08)'
}
handleDragLeave (e) {
e.target.style.opacity = '1'
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
}
handleDrop (e, storage, folder, dispatch, location) {
e.target.style.opacity = '1'
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
const noteData = JSON.parse(e.dataTransfer.getData('note'))
const newNoteData = Object.assign({}, noteData, {storage: storage, folder: folder.key})
if (folder.key === noteData.folder) return
dataApi
.createNote(storage.key, newNoteData)
.then((note) => {
dataApi
.deleteNote(noteData.storage, noteData.key)
.then((data) => {
let dispatchHandler = () => {
dispatch({
type: 'DELETE_NOTE',
storageKey: data.storageKey,
noteKey: data.noteKey
})
}
eventEmitter.once('list:moved', dispatchHandler)
eventEmitter.emit('list:next')
})
.catch((err) => {
console.error(err)
})
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: `${note.storage}-${note.key}`}
})
})
}
render () {
let { storage, location, isFolded, data } = this.props
let { folderNoteMap } = data
let { storage, location, isFolded, data, dispatch } = this.props
let { folderNoteMap, trashedSet } = data
let folderList = storage.folders.map((folder) => {
let isActive = !!(location.pathname.match(new RegExp('\/storages\/' + storage.key + '\/folders\/' + folder.key)))
let noteSet = folderNoteMap.get(storage.key + '-' + folder.key)
let noteCount = noteSet != null
? noteSet.size
: 0
let noteCount = 0
if (noteSet) {
let trashedNoteCount = 0
const noteKeys = noteSet.map(noteKey => { return noteKey })
trashedSet.toJS().forEach(trashedKey => {
if (noteKeys.some(noteKey => { return noteKey === trashedKey })) trashedNoteCount++
})
noteCount = noteSet.size - trashedNoteCount
}
return (
<StorageItemChild
key={folder.key}
@@ -151,6 +204,9 @@ class StorageItem extends React.Component {
folderColor={folder.color}
isFolded={isFolded}
noteCount={noteCount}
handleDrop={(e) => this.handleDrop(e, storage, folder, dispatch, location)}
handleDragEnter={this.handleDragEnter}
handleDragLeave={this.handleDragLeave}
/>
)
})
@@ -170,9 +226,9 @@ class StorageItem extends React.Component {
<button styleName='header-toggleButton'
onMouseDown={(e) => this.handleToggleButtonClick(e)}
>
<i className={this.state.isOpen
? 'fa fa-caret-down'
: 'fa fa-caret-right'
<img src={this.state.isOpen
? '../resources/icon/icon-down.svg'
: '../resources/icon/icon-right.svg'
}
/>
</button>
@@ -181,7 +237,7 @@ class StorageItem extends React.Component {
<button styleName='header-addFolderButton'
onClick={(e) => this.handleAddFolderButtonClick(e)}
>
<i className='fa fa-plus' />
<img styleName='iconTag' src='../resources/icon/icon-plus.svg' />
</button>
}

View File

@@ -1,84 +1,80 @@
.root
width 100%
user-select none
padding-top 20px
.header
position relative
height 26px
height 36px
width 100%
margin-bottom 5px
transition 0.15s
&:hover
background-color $ui-button--hover-backgroundColor
&:active
.header-toggleButton
.header-addFolderButton
color white
&:active
color $ui-active-color
display flex
align-items center
.header--active
@extend .header
.header-info
color $ui-button--active-color
background-color $ui-button--active-backgroundColor
margin-bottom 5px
background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition color background-color 0.15s
display flex
align-items center
.header-toggleButton
.header-info
.header-addFolderButton
color white
&:active
&:hover
&:hover:active
color white
color #1EC38B
.header-toggleButton
navButtonColor()
position absolute
left 0
width 25px
height 26px
height 25px
padding 0
border none
color $ui-inactive-text-color
background-color transparent
border-radius 50%
&:hover
transition 0.2s
background-color alpha($ui-button-default--hover-backgroundColor, 40%)
color $ui-text-color
&:active
color $ui-active-color
.header-info
navButtonColor()
display block
width 100%
height 30px
height 36px
padding-left 25px
padding-right 10px
line-height 26px
padding-right 15px
line-height 22px
cursor pointer
font-size 14px
border none
overflow ellipsis
text-align left
font-weight 600;
background-color transparent
color $ui-inactive-text-color
&:active
color $ui-button--active-color
background-color $ui-button--active-backgroundColor
&: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
font-size 10px
margin 0 5px
.header-addFolderButton
navButtonColor()
position absolute
right 0
right 7px
width 25px
height 26px
height 25px
padding 0
border none
color $ui-inactive-text-color
background-color transparent
border-radius 50%
&:hover
color $ui-text-color
&:active
color $ui-active-color
transition 0.2s
.root--folded
@extend .root
@@ -107,17 +103,78 @@
font-size 10px
margin 0 5px
body[data-theme="dark"]
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
.header-addFolderButton
color $ui-dark-inactive-text-color
navWhiteButtonColor()
&:hover
color $ui-dark-text-color
&:active
color $ui-dark-active-color
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"]
.header--active
background-color $ui-dark-button--active-backgroundColor
transition color background-color 0.15s
.header--active
.header-toggleButton
.header-addFolderButton
color white
color $ui-dark-text-color
.header--active
.header-info
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
&:active
color white
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.header--active
.header-addFolderButton
color $ui-dark-text-color
.header-toggleButton
&:hover
transition 0.2s
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
.header-info
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
&:hover
transition 0.2s
color $ui-dark-text-color
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
&:active, &:active:hover
color $ui-dark-text-color
background-color $ui-dark-button--active-backgroundColor
.header-addFolderButton
&:hover
transition 0.2s
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

View File

@@ -5,10 +5,23 @@ import { openModal } from 'browser/main/lib/modal'
import PreferencesModal from '../modals/PreferencesModal'
import ConfigManager from 'browser/main/lib/ConfigManager'
import StorageItem from './StorageItem'
import TagListItem from 'browser/components/TagListItem'
import SideNavFilter from 'browser/components/SideNavFilter'
import StorageList from 'browser/components/StorageList'
import NavToggleButton from 'browser/components/NavToggleButton'
import EventEmitter from 'browser/main/lib/eventEmitter'
class SideNav extends React.Component {
// TODO: should not use electron stuff v0.7
componentDidMount () {
EventEmitter.on('side:preferences', this.handleMenuButtonClick)
}
componentWillUnmount () {
EventEmitter.off('side:preferences', this.handleMenuButtonClick)
}
handleMenuButtonClick (e) {
openModal(PreferencesModal)
}
@@ -33,12 +46,99 @@ class SideNav extends React.Component {
})
}
handleTrashedButtonClick (e) {
let { router } = this.context
router.push('/trashed')
}
handleSwitchFoldersButtonClick () {
const { router } = this.context
router.push('/home')
}
handleSwitchTagsButtonClick () {
const { router } = this.context
router.push('/alltags')
}
SideNavComponent (isFolded, storageList) {
let { location, data } = this.props
const isHomeActive = !!location.pathname.match(/^\/home$/)
const isStarredActive = !!location.pathname.match(/^\/starred$/)
const isTrashedActive = !!location.pathname.match(/^\/trashed$/)
let component
// TagsMode is not selected
if (!location.pathname.match('/tags') && !location.pathname.match('/alltags')) {
component = (
<div>
<SideNavFilter
isFolded={isFolded}
isHomeActive={isHomeActive}
handleAllNotesButtonClick={(e) => this.handleHomeButtonClick(e)}
isStarredActive={isStarredActive}
isTrashedActive={isTrashedActive}
handleStarredButtonClick={(e) => this.handleStarredButtonClick(e)}
handleTrashedButtonClick={(e) => this.handleTrashedButtonClick(e)}
counterTotalNote={data.noteMap._map.size}
counterStarredNote={data.starredSet._set.size}
counterDelNote={data.trashedSet._set.size}
/>
<StorageList storageList={storageList} />
<NavToggleButton isFolded={isFolded} handleToggleButtonClick={this.handleToggleButtonClick.bind(this)} />
</div>
)
} else {
component = (
<div styleName='tabBody'>
<div styleName='tag-title'>
<p>Tags</p>
</div>
<div styleName='tagList'>
{this.tagListComponent(data)}
</div>
</div>
)
}
return component
}
tagListComponent () {
const { data, location } = this.props
let tagList = data.tagNoteMap.map((tag, key) => {
return key
})
return (
tagList.map(tag => (
<TagListItem
name={tag}
handleClickTagListItem={this.handleClickTagListItem.bind(this)}
isActive={this.getTagActive(location.pathname, tag)}
key={tag}
/>
))
)
}
getTagActive (path, tag) {
const pathSegments = path.split('/')
const pathTag = pathSegments[pathSegments.length - 1]
return pathTag === tag
}
handleClickTagListItem (name) {
const { router } = this.context
router.push(`/tags/${name}`)
}
render () {
let { data, location, config, dispatch } = this.props
let isFolded = config.isSideNavFolded
let isHomeActive = !!location.pathname.match(/^\/home$/)
let isStarredActive = !!location.pathname.match(/^\/starred$/)
let storageList = data.storageMap.map((storage, key) => {
return <StorageItem
@@ -52,6 +152,7 @@ class SideNav extends React.Component {
})
let style = {}
if (!isFolded) style.width = this.props.width
const isTagActive = location.pathname.match(/tag/)
return (
<div className='SideNav'
styleName={isFolded ? 'root--folded' : 'root'}
@@ -59,35 +160,31 @@ class SideNav extends React.Component {
style={style}
>
<div styleName='top'>
<button styleName='top-menu'
onClick={(e) => this.handleMenuButtonClick(e)}
>
<i className='fa fa-navicon fa-fw' />
<span styleName='top-menu-label'>Menu</span>
</button>
<div styleName='switch-buttons'>
<button styleName={isTagActive ? 'non-active-button' : 'active-button'} onClick={this.handleSwitchFoldersButtonClick.bind(this)}>
<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>
<button styleName='top-menu-preference'
onClick={(e) => this.handleMenuButtonClick(e)}
>
<img styleName='iconTag' src='../resources/icon/icon-setting.svg' />
</button>
</div>
</div>
<SideNavFilter
isFolded={isFolded}
isHomeActive={isHomeActive}
handleAllNotesButtonClick={(e) => this.handleHomeButtonClick(e)}
isStarredActive={isStarredActive}
handleStarredButtonClick={(e) => this.handleStarredButtonClick(e)}
/>
<div styleName='storageList'>
{storageList.length > 0 ? storageList : (
<div styleName='storageList-empty'>No storage mount.</div>
)}
</div>
<button styleName='navToggle'
onClick={(e) => this.handleToggleButtonClick(e)}
>
{isFolded
? <i className='fa fa-angle-double-right' />
: <i className='fa fa-angle-double-left' />
}
</button>
{this.SideNavComponent(isFolded, storageList)}
</div>
)
}

View File

@@ -1,12 +1,11 @@
@import('../Detail/DetailVars')
.root
absolute bottom left right
height $statusBar-height
background-color $ui-noteDetail-backgroundColor
border-top $ui-border
position absolute
bottom 10px
right 10px
z-index 100
display flex
box-shadow $note-detail-box-shadow
.blank
flex 1
@@ -23,11 +22,19 @@
.zoom
navButtonColor()
height 24px
border-width 0 1px
border-style solid
border-color $ui-borderColor
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
navButtonColor()
height 24px
@@ -42,12 +49,16 @@
body[data-theme="dark"]
.root
background-color $ui-dark-noteDetail-backgroundColor
border-color $ui-dark-borderColor
box-shadow none
.zoom
border-color $ui-dark-borderColor
background-color transparent
color #f9f9f9
&:hover
transition 0.15s
color $ui-dark-text-color
.help
navButtonColor()

View File

@@ -2,7 +2,6 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './StatusBar.styl'
import ZoomManager from 'browser/main/lib/ZoomManager'
import LastUpdatedString from '../Detail/LastUpdatedString'
const electron = require('electron')
const { remote, ipcRenderer } = electron
@@ -56,20 +55,16 @@ class StatusBar extends React.Component {
<button styleName='zoom'
onClick={(e) => this.handleZoomButtonClick(e)}
>
<i className='fa fa-search-plus' />&nbsp;
{Math.floor(config.zoom * 100)}%
<img src='../resources/icon/icon-zoom.svg' />
<span>{Math.floor(config.zoom * 100)}%</span>
</button>
<div styleName='blank' />
{status.updateReady
? <button onClick={this.updateApp} styleName='update'>
<i styleName='update-icon' className='fa fa-cloud-download' /> Ready to Update!
</button>
: null
}
<LastUpdatedString date={this.props.date} />
</div>
)
}

View File

@@ -19,37 +19,37 @@ $control-height = 34px
.control-search
height 32px
width 1px
flex 1
background-color white
position relative
.control-search-icon
absolute top bottom left
line-height 32px
width 35px
color $ui-inactive-text-color
background-color $ui-noteList-backgroundColor
.control-search-input
display block
absolute top bottom right
left 30px
width 100%
padding-left 12px
background-color $ui-noteList-backgroundColor
input
width 100%
height 100%
outline none
border none
color $ui-text-color
font-size 18px
padding-bottom 2px
background-color $ui-noteList-backgroundColor
.control-search-optionList
position fixed
z-index 200
width 275px
height 175px
width 500px
height 250px
overflow-y auto
background-color $modal-background
border-radius 2px
box-shadow 2px 2px 10px gray
border-none
box-shadow 0 0 1px rgba(76,86,103,.25), 0 2px 18px rgba(31,37,50,.32)
.control-search-optionList-item
height 50px
@@ -59,10 +59,10 @@ $control-height = 34px
cursor pointer
overflow ellipsis
&:hover
background-color alpha($ui-active-color, 10%)
background-color alpha(#D4D4D4, 30%)
.control-search-optionList-item-folder
border-left 4px solid transparent
border-left 2px solid transparent
padding 2px 5px
color $ui-text-color
overflow ellipsis
@@ -91,9 +91,7 @@ $control-height = 34px
width 32px
height $control-height - 2
navButtonColor()
border $ui-border
border-radius 32px
font-size 14px
font-size 16px
line-height 28px
padding 0
&:active
@@ -114,6 +112,21 @@ $control-height = 34px
opacity 0
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"]
.root, .root--expanded
background-color $ui-dark-noteList-backgroundColor
@@ -131,6 +144,7 @@ body[data-theme="dark"]
background-color $ui-dark-noteList-backgroundColor
.control-search-input
background-color $ui-dark-noteList-backgroundColor
input
background-color $ui-dark-noteList-backgroundColor
color $ui-dark-text-color
@@ -144,7 +158,7 @@ body[data-theme="dark"]
.control-search-optionList-item
border-color $ui-dark-borderColor
&:hover
background-color lighten($ui-dark-button--hover-backgroundColor, 15%)
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
.control-search-optionList-item-folder
color $ui-dark-text-color
.control-search-optionList-item-folder-surfix
@@ -159,10 +173,14 @@ body[data-theme="dark"]
color $ui-inactive-text-color
.control-newPostButton
colorDarkDefaultButton()
color $ui-inactive-text-color
border-color $ui-dark-borderColor
background-color $ui-dark-noteList-backgroundColor
&:hover
transition 0.15s
color $ui-dark-text-color
&:active
background-color alpha($ui-dark-button--active-backgroundColor, 20%)
border-color $ui-dark-button--active-backgroundColor
.control-newPostButton-tooltip

View File

@@ -2,12 +2,12 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './TopBar.styl'
import _ from 'lodash'
import modal from 'browser/main/lib/modal'
import NewNoteModal from 'browser/main/modals/NewNoteModal'
import { hashHistory } from 'react-router'
import ee from 'browser/main/lib/eventEmitter'
import ConfigManager from 'browser/main/lib/ConfigManager'
import dataApi from 'browser/main/lib/dataApi'
import NewNoteButton from 'browser/main/NewNoteButton'
const { remote } = require('electron')
const { dialog } = remote
const OSX = window.process.platform === 'darwin'
@@ -18,11 +18,10 @@ class TopBar extends React.Component {
this.state = {
search: '',
searchOptions: [],
searchPopupOpen: false
}
this.newNoteHandler = () => {
this.handleNewPostButtonClick()
isSearching: false,
isAlphabet: false,
isIME: false,
isConfirmTranslation: false
}
this.focusSearchHandler = () => {
@@ -31,150 +30,67 @@ class TopBar extends React.Component {
}
componentDidMount () {
ee.on('top:new-note', this.newNoteHandler)
ee.on('top:focus-search', this.focusSearchHandler)
}
componentWillUnmount () {
ee.off('top:new-note', this.newNoteHandler)
ee.off('top:focus-search', this.focusSearchHandler)
}
handleNewPostButtonClick (e) {
let { config } = this.props
handleKeyDown (e) {
// reset states
this.setState({
isAlphabet: false,
isIME: false
})
switch (config.ui.defaultNote) {
case 'MARKDOWN_NOTE':
this.createNote('MARKDOWN_NOTE')
break
case 'SNIPPET_NOTE':
this.createNote('SNIPPET_NOTE')
break
case 'ALWAYS_ASK':
default:
let { dispatch, location } = this.props
let { storage, folder } = this.resolveTargetFolder()
modal.open(NewNoteModal, {
storage: storage.key,
folder: folder.key,
dispatch,
location
})
// When the key is an alphabet, del, enter or ctr
if (e.keyCode <= 90 || e.keyCode >= 186 && e.keyCode <= 222) {
this.setState({
isAlphabet: true
})
// When the key is an IME input (Japanese, Chinese)
} else if (e.keyCode === 229) {
this.setState({
isIME: true
})
}
}
resolveTargetFolder () {
let { data, params } = this.props
let storage = data.storageMap.get(params.storageKey)
handleKeyUp (e) {
const { router } = this.context
// reset states
this.setState({
isConfirmTranslation: false
})
// Find first storage
if (storage == null) {
for (let kv of data.storageMap) {
storage = kv[1]
break
}
}
if (storage == null) window.alert('No storage to create a note')
let folder = _.find(storage.folders, {key: params.folderKey})
if (folder == null) folder = storage.folders[0]
if (folder == null) window.alert('No folder to create a note')
return {
storage,
folder
// When the key is translation confirmation (Enter, Space)
if (this.state.isIME && (e.keyCode === 32 || e.keyCode === 13)) {
this.setState({
isConfirmTranslation: true
})
router.push('/searched')
this.setState({
search: this.refs.searchInput.value
})
}
}
handleSearchChange (e) {
const { router } = this.context
if (this.state.isAlphabet || this.state.isConfirmTranslation) {
router.push('/searched')
} else {
e.preventDefault()
}
this.setState({
search: this.refs.searchInput.value
})
}
getOptions () {
let { data } = this.props
let { search } = this.state
let notes = data.noteMap.map((note) => note)
if (search.trim().length === 0) return []
let searchBlocks = search.split(' ')
searchBlocks.forEach((block) => {
if (block.match(/^!#.+/)) {
let tag = block.match(/^!#(.+)/)[1]
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
notes = notes
.filter((note) => {
if (!_.isArray(note.tags)) return false
return note.tags.some((_tag) => {
return _tag.match(regExp)
})
})
} else if (block.match(/^!.+/)) {
let block = block.match(/^!(.+)/)[1]
let regExp = new RegExp(_.escapeRegExp(block), 'i')
notes = notes.filter((note) => {
if (!_.isArray(note.tags) || !note.tags.some((_tag) => {
return _tag.match(regExp)
})) {
return true
}
if (note.type === 'SNIPPET_NOTE') {
return !note.description.match(regExp)
} else if (note.type === 'MARKDOWN_NOTE') {
return !note.content.match(regExp)
}
return false
})
} else if (block.match(/^#.+/)) {
let tag = block.match(/#(.+)/)[1]
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
notes = notes
.filter((note) => {
if (!_.isArray(note.tags)) return false
return note.tags.some((_tag) => {
return _tag.match(regExp)
})
})
} else {
let regExp = new RegExp(_.escapeRegExp(block), 'i')
notes = notes.filter((note) => {
if (_.isArray(note.tags) && note.tags.some((_tag) => {
return _tag.match(regExp)
})) {
return true
}
if (note.type === 'SNIPPET_NOTE') {
return note.description.match(regExp)
} else if (note.type === 'MARKDOWN_NOTE') {
return note.content.match(regExp)
}
return false
})
}
})
return notes
}
handleOptionClick (uniqueKey) {
return (e) => {
this.setState({
searchPopupOpen: false
}, () => {
let { location } = this.props
hashHistory.push({
pathname: location.pathname,
query: {
key: uniqueKey
}
})
})
}
}
handleSearchFocus (e) {
this.setState({
searchPopupOpen: true
isSearching: true
})
}
handleSearchBlur (e) {
@@ -191,67 +107,13 @@ class TopBar extends React.Component {
}
if (!isStillFocused) {
this.setState({
searchPopupOpen: false
isSearching: false
})
}
}
createNote (noteType) {
let { dispatch, location } = this.props
if (noteType !== 'MARKDOWN_NOTE' && noteType !== 'SNIPPET_NOTE') throw new Error('Invalid note type.')
let { storage, folder } = this.resolveTargetFolder()
let newNote = noteType === 'MARKDOWN_NOTE'
? {
type: 'MARKDOWN_NOTE',
folder: folder.key,
title: '',
content: ''
}
: {
type: 'SNIPPET_NOTE',
folder: folder.key,
title: '',
description: '',
snippets: [{
name: '',
mode: 'text',
content: ''
}]
}
dataApi
.createNote(storage.key, newNote)
.then((note) => {
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: note.storage + '-' + note.key}
})
ee.emit('detail:focus')
})
}
setDefaultNote (defaultNote) {
let { config, dispatch } = this.props
let ui = Object.assign(config.ui)
ui.defaultNote = defaultNote
ConfigManager.set({
ui
})
dispatch({
type: 'SET_UI',
config: ConfigManager.get()
})
}
handleOnSearchFocus () {
if (this.state.searchPopupOpen) {
if (this.state.isSearching) {
this.refs.search.childNodes[0].blur()
} else {
this.refs.search.childNodes[0].focus()
@@ -259,28 +121,7 @@ class TopBar extends React.Component {
}
render () {
let { config, style, data } = this.props
let searchOptionList = this.getOptions()
.map((note) => {
let storage = data.storageMap.get(note.storage)
let folder = _.find(storage.folders, {key: note.folder})
return <div styleName='control-search-optionList-item'
key={note.storage + '-' + note.key}
onClick={(e) => this.handleOptionClick(note.storage + '-' + note.key)(e)}
>
<div styleName='control-search-optionList-item-folder'
style={{borderColor: folder.color}}>
{folder.name}
<span styleName='control-search-optionList-item-folder-surfix'>in {storage.name}</span>
</div>
{note.type === 'SNIPPET_NOTE'
? <i styleName='control-search-optionList-item-type' className='fa fa-code' />
: <i styleName='control-search-optionList-item-type' className='fa fa-file-text-o' />
}&nbsp;
{note.title}
</div>
})
let { config, style, data, location } = this.props
return (
<div className='TopBar'
styleName={config.isSideNavFolded ? 'root--expanded' : 'root'}
@@ -288,7 +129,6 @@ class TopBar extends React.Component {
>
<div styleName='control'>
<div styleName='control-search'>
<i styleName='control-search-icon' className='fa fa-search fa-fw' />
<div styleName='control-search-input'
onFocus={(e) => this.handleSearchFocus(e)}
onBlur={(e) => this.handleSearchBlur(e)}
@@ -299,17 +139,12 @@ class TopBar extends React.Component {
ref='searchInput'
value={this.state.search}
onChange={(e) => this.handleSearchChange(e)}
onKeyDown={(e) => this.handleKeyDown(e)}
onKeyUp={(e) => this.handleKeyUp(e)}
placeholder='Search'
type='text'
className='searchInput'
/>
{this.state.searchPopupOpen &&
<div styleName='control-search-optionList'>
{searchOptionList.length > 0
? searchOptionList
: <div styleName='control-search-optionList-empty'>Empty List</div>
}
</div>
}
</div>
{this.state.search > 0 &&
<button styleName='left-search-clearButton'
@@ -320,14 +155,17 @@ class TopBar extends React.Component {
}
</div>
<button styleName='control-newPostButton'
onClick={(e) => this.handleNewPostButtonClick(e)}>
<i className='fa fa-plus' />
<span styleName='control-newPostButton-tooltip'>
Make a Note {OSX ? '⌘' : '^'} + n
</span>
</button>
</div>
{location.pathname === '/trashed' ? ''
: <NewNoteButton
{..._.pick(this.props, [
'dispatch',
'data',
'config',
'params',
'location'
])}
/>}
</div>
)
}

View File

@@ -1,6 +1,6 @@
global-reset()
DEFAULT_FONTS = 'Lato', helvetica, arial, sans-serif
DEFAULT_FONTS = 'OpenSans', helvetica, arial, sans-serif
html, body
width 100%
@@ -11,7 +11,8 @@ body
font-family DEFAULT_FONTS
color textColor
font-size fontSize
font-weight 400
font-weight 200
-webkit-font-smoothing antialiased
button, input, select, textarea
font-family DEFAULT_FONTS
@@ -64,7 +65,7 @@ textarea.block-input
fullsize()
modalZIndex= 1000
modalBackColor = transparentify(white, 65%)
modalBackColor = white
.ace_focus
outline-color rgb(59, 153, 252)
outline-offset 0px
@@ -86,12 +87,12 @@ modalBackColor = transparentify(white, 65%)
body[data-theme="dark"]
.ModalBase
.modalBack
background-color alpha(black, 60%)
background-color $ui-dark-backgroundColor
.CodeMirror
font-family inherit !important
line-height 1.4em
height 100%
height 96%
.CodeMirror > div > textarea
margin-bottom -1em
.CodeMirror-focused .CodeMirror-selected
@@ -102,3 +103,10 @@ body[data-theme="dark"]
background #B1D7FE
::selection
background #B1D7FE
.sortableItemHelper
z-index modalZIndex + 5
body[data-theme="dark"]
.sortableItemHelper
color: $ui-dark-text-color

View File

@@ -23,6 +23,19 @@ document.addEventListener('dragover', function (e) {
e.stopPropagation()
})
document.addEventListener('click', function (e) {
const className = e.target.className
if (!className && typeof (className) !== 'string') return
const isInfoButton = className.includes('infoButton')
const offsetParent = e.target.offsetParent
const isInfoPanel = offsetParent !== null
? offsetParent.className.includes('infoPanel')
: false
if (isInfoButton || isInfoPanel) return
const infoPanel = document.querySelector('.infoPanel')
if (infoPanel) infoPanel.style.display = 'none'
})
let el = document.getElementById('content')
const history = syncHistoryWithStore(hashHistory, store)
@@ -50,6 +63,13 @@ ReactDOM.render((
<IndexRedirect to='/home' />
<Route path='home' />
<Route path='starred' />
<Route path='searched' />
<Route path='trashed' />
<Route path='alltags' />
<Route path='tags'>
<IndexRedirect to='/alltags' />
<Route path=':tagname' />
</Route>
<Route path='storages'>
<IndexRedirect to='/home' />
<Route path=':storageKey'>

View File

@@ -0,0 +1,74 @@
const AWS = require('aws-sdk')
const AMA = require('aws-sdk-mobile-analytics')
const ConfigManager = require('browser/main/lib/ConfigManager')
const remote = require('electron').remote
const os = require('os')
AWS.config.region = 'us-east-1'
if (process.env.NODE_ENV === 'production' && ConfigManager.default.get().amaEnabled) {
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxx'
})
const validPlatformName = convertPlatformName(os.platform())
const mobileAnalyticsClient = new AMA.Manager({
appId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
appTitle: 'xxxxxxxxxx',
appVersionName: remote.app.getVersion().toString(),
platform: validPlatformName
})
}
function convertPlatformName (platformName) {
if (platformName === 'darwin') {
return 'MacOS'
} else if (platformName === 'win32') {
return 'Windows'
} else if (platformName === 'linux') {
return 'Linux'
} else {
return ''
}
}
function initAwsMobileAnalytics () {
if (process.env.NODE_ENV !== 'production' || !ConfigManager.default.get().amaEnabled) return
AWS.config.credentials.get((err) => {
if (!err) {
console.log('Cognito Identity ID: ' + AWS.config.credentials.identityId)
recordDynamicCustomEvent('APP_STARTED')
recordStaticCustomEvent()
}
})
}
function recordDynamicCustomEvent (type, options = {}) {
if (process.env.NODE_ENV !== 'production' || !ConfigManager.default.get().amaEnabled) return
try {
mobileAnalyticsClient.recordEvent(type, options)
} catch (analyticsError) {
if (analyticsError instanceof ReferenceError) {
console.log(analyticsError.name + ': ' + analyticsError.message)
}
}
}
function recordStaticCustomEvent () {
if (process.env.NODE_ENV !== 'production' || !ConfigManager.default.get().amaEnabled) return
try {
mobileAnalyticsClient.recordEvent('UI_COLOR_THEME', {
uiColorTheme: ConfigManager.default.get().ui.theme
})
} catch (analyticsError) {
if (analyticsError instanceof ReferenceError) {
console.log(analyticsError.name + ': ' + analyticsError.message)
}
}
}
module.exports = {
initAwsMobileAnalytics,
recordDynamicCustomEvent
}

View File

@@ -1,9 +1,13 @@
import _ from 'lodash'
import RcParser from 'browser/lib/RcParser'
const OSX = global.process.platform === 'darwin'
const win = global.process.platform === 'win32'
const electron = require('electron')
const { ipcRenderer } = electron
const consts = require('browser/lib/consts')
const path = require('path')
const fs = require('fs')
let isInitialized = false
@@ -14,28 +18,30 @@ export const DEFAULT_CONFIG = {
navWidth: 200,
sortBy: 'UPDATED_AT', // 'CREATED_AT', 'UPDATED_AT', 'APLHABETICAL'
listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL'
amaEnabled: true,
hotkey: {
toggleFinder: OSX ? 'Cmd + Alt + S' : 'Super + Alt + S',
toggleMain: OSX ? 'Cmd + Alt + L' : 'Super + Alt + E',
toggleMain: OSX ? 'Cmd + Alt + L' : 'Super + Alt + E'
},
ui: {
theme: 'default',
showCopyNotification: true,
disableDirectWrite: false,
defaultNote: 'ALWAYS_ASK' // 'ALWAYS_ASK', 'SNIPPET_NOTE', 'MARKDOWN_NOTE'
},
editor: {
theme: 'default',
theme: 'base16-light',
keyMap: 'sublime',
fontSize: '14',
fontFamily: 'Monaco, Consolas',
fontFamily: win ? 'Segoe UI' : 'Monaco, Consolas',
indentType: 'space',
indentSize: '2',
switchPreview: 'BLUR' // Available value: RIGHTCLICK, BLUR
},
preview: {
fontSize: '14',
fontFamily: 'Lato',
codeBlockTheme: 'elegant',
fontFamily: win ? 'Segoe UI' : 'Lato',
codeBlockTheme: 'dracula',
lineNumber: true
}
}
@@ -55,17 +61,17 @@ function _save (config) {
}
function get () {
let config = window.localStorage.getItem('config')
const rawStoredConfig = window.localStorage.getItem('config')
const storedConfig = Object.assign({}, DEFAULT_CONFIG, JSON.parse(rawStoredConfig))
let config = storedConfig
try {
config = Object.assign({}, DEFAULT_CONFIG, JSON.parse(config))
config.hotkey = Object.assign({}, DEFAULT_CONFIG.hotkey, config.hotkey)
config.ui = Object.assign({}, DEFAULT_CONFIG.ui, config.ui)
config.editor = Object.assign({}, DEFAULT_CONFIG.editor, config.editor)
config.preview = Object.assign({}, DEFAULT_CONFIG.preview, config.preview)
const boostnotercConfig = RcParser.parse()
config = assignConfigValues(storedConfig, boostnotercConfig)
if (!validate(config)) throw new Error('INVALID CONFIG')
} catch (err) {
console.warn('Boostnote resets the malformed configuration.')
console.warn('Boostnote resets the invalid configuration.')
config = DEFAULT_CONFIG
_save(config)
}
@@ -85,7 +91,11 @@ function get () {
: 'default'
if (config.editor.theme !== 'default') {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + config.editor.theme + '.css')
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')
}
}
}
@@ -100,6 +110,8 @@ function set (updates) {
if (newConfig.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark')
} else if (newConfig.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else {
document.body.setAttribute('data-theme', 'default')
}
@@ -116,7 +128,11 @@ function set (updates) {
: 'default'
if (newTheme !== 'default') {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css')
if (newTheme.startsWith('solarized')) {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/solarized.css')
} else {
editorTheme.setAttribute('href', '../node_modules/codemirror/theme/' + newTheme + '.css')
}
}
ipcRenderer.send('config-renew', {
@@ -124,6 +140,15 @@ function set (updates) {
})
}
function assignConfigValues (originalConfig, rcConfig) {
let config = Object.assign({}, DEFAULT_CONFIG, originalConfig, rcConfig)
config.hotkey = Object.assign({}, DEFAULT_CONFIG.hotkey, originalConfig.hotkey, rcConfig.hotkey)
config.ui = Object.assign({}, DEFAULT_CONFIG.ui, originalConfig.ui, rcConfig.ui)
config.editor = Object.assign({}, DEFAULT_CONFIG.editor, originalConfig.editor, rcConfig.editor)
config.preview = Object.assign({}, DEFAULT_CONFIG.preview, originalConfig.preview, rcConfig.preview)
return config
}
export default {
get,
set,

View File

@@ -0,0 +1,33 @@
const fs = require('fs')
const path = require('path')
const _ = require('lodash')
const sander = require('sander')
const { findStorage } = require('browser/lib/findStorage')
/**
* @description To copy an image and return the path.
* @param {String} filePath
* @param {String} storageKey
* @return {String} an image path
*/
function copyImage (filePath, storageKey) {
return new Promise((resolve, reject) => {
try {
const targetStorage = findStorage(storageKey)
const inputImage = fs.createReadStream(filePath)
const imageExt = path.extname(filePath)
const imageName = Math.random().toString(36).slice(-16)
const basename = `${imageName}${imageExt}`
const imageDir = path.join(targetStorage.path, 'images')
if (!fs.existsSync(imageDir)) fs.mkdirSync(imageDir)
const outputImage = fs.createWriteStream(path.join(imageDir, basename))
inputImage.pipe(outputImage)
resolve(basename)
} catch (e) {
return reject(e)
}
})
}
module.exports = copyImage

View File

@@ -3,6 +3,7 @@ const keygen = require('browser/lib/keygen')
const path = require('path')
const resolveStorageData = require('./resolveStorageData')
const CSON = require('@rokt33r/season')
const { findStorage } = require('browser/lib/findStorage')
/**
* @param {String} storageKey
@@ -29,11 +30,7 @@ function createFolder (storageKey, input) {
if (!_.isString(input.name)) throw new Error('Name must be a string.')
if (!_.isString(input.color)) throw new Error('Color must be a string.')
rawStorages = JSON.parse(localStorage.getItem('storages'))
if (!_.isArray(rawStorages)) throw new Error('Target storage doesn\'t exist.')
targetStorage = _.find(rawStorages, {key: storageKey})
if (targetStorage == null) throw new Error('Target storage doesn\'t exist.')
targetStorage = findStorage(storageKey)
} catch (e) {
return Promise.reject(e)
}

View File

@@ -4,12 +4,14 @@ const _ = require('lodash')
const keygen = require('browser/lib/keygen')
const path = require('path')
const CSON = require('@rokt33r/season')
const { findStorage } = require('browser/lib/findStorage')
function validateInput (input) {
if (!_.isArray(input.tags)) input.tags = []
input.tags = input.tags.filter((tag) => _.isString(tag) && tag.trim().length > 0)
if (!_.isString(input.title)) input.title = ''
input.isStarred = !!input.isStarred
input.isTrashed = !!input.isTrashed
switch (input.type) {
case 'MARKDOWN_NOTE':
@@ -37,11 +39,7 @@ function createNote (storageKey, input) {
input = Object.assign({}, input)
validateInput(input)
let cachedStorageList = JSON.parse(localStorage.getItem('storages'))
if (!_.isArray(cachedStorageList)) throw new Error('Target storage doesn\'t exist.')
targetStorage = _.find(cachedStorageList, {key: storageKey})
if (targetStorage == null) throw new Error('Target storage doesn\'t exist.')
targetStorage = findStorage(storageKey)
} catch (e) {
return Promise.reject(e)
}

View File

@@ -4,6 +4,7 @@ const resolveStorageData = require('./resolveStorageData')
const resolveStorageNotes = require('./resolveStorageNotes')
const CSON = require('@rokt33r/season')
const sander = require('sander')
const { findStorage } = require('browser/lib/findStorage')
/**
* @param {String} storageKey
@@ -21,11 +22,7 @@ function deleteFolder (storageKey, folderKey) {
let rawStorages
let targetStorage
try {
rawStorages = JSON.parse(localStorage.getItem('storages'))
if (!_.isArray(rawStorages)) throw new Error('Target storage doesn\'t exist.')
targetStorage = _.find(rawStorages, {key: storageKey})
if (targetStorage == null) throw new Error('Target storage doesn\'t exist.')
targetStorage = findStorage(storageKey)
} catch (e) {
return Promise.reject(e)
}

View File

@@ -2,15 +2,12 @@ const resolveStorageData = require('./resolveStorageData')
const _ = require('lodash')
const path = require('path')
const sander = require('sander')
const { findStorage } = require('browser/lib/findStorage')
function deleteNote (storageKey, noteKey) {
let targetStorage
try {
let cachedStorageList = JSON.parse(localStorage.getItem('storages'))
if (!_.isArray(cachedStorageList)) throw new Error('Target storage doesn\'t exist.')
targetStorage = _.find(cachedStorageList, {key: storageKey})
if (targetStorage == null) throw new Error('Target storage doesn\'t exist.')
targetStorage = findStorage(storageKey)
} catch (e) {
return Promise.reject(e)
}

Some files were not shown because too many files have changed in this diff Show More