From 623c265adcbf5d5391ad2c71519ef58f8178a956 Mon Sep 17 00:00:00 2001 From: benweet Date: Mon, 12 Mar 2018 00:45:54 +0000 Subject: [PATCH] Temporary folder --- src/components/Editor.vue | 5 +- src/components/Explorer.vue | 7 +- src/components/ExplorerNode.vue | 2 +- src/components/Layout.vue | 5 +- src/components/NavigationBar.vue | 16 +- src/components/Preview.vue | 13 +- src/components/StatusBar.vue | 4 +- src/components/Toc.vue | 4 +- src/components/common/PreviewClassApplier.js | 13 +- src/components/gutters/CommentList.vue | 6 +- src/components/gutters/CurrentDiscussion.vue | 3 +- .../gutters/PreviewNewDiscussionButton.vue | 2 +- src/components/menus/HistoryMenu.vue | 14 +- src/components/menus/MainMenu.vue | 8 +- src/components/menus/PublishMenu.vue | 168 +++++++++--------- src/components/menus/SyncMenu.vue | 136 +++++++------- src/components/modals/common/ModalInner.vue | 1 + src/services/cledit/cleditSelectionMgr.js | 11 +- src/services/editorSvc.js | 65 ++++--- src/services/editorSvcUtils.js | 18 +- src/services/localDbSvc.js | 10 ++ src/services/markdownConversionSvc.js | 2 + src/services/optional/scrollSync.js | 16 +- src/services/publishSvc.js | 5 + src/services/sectionUtils.js | 11 +- src/services/syncSvc.js | 103 ++++++----- src/services/tempFileSvc.js | 113 ++++++++++++ src/services/utils.js | 8 +- src/store/content.js | 8 + src/store/data.js | 18 +- src/store/explorer.js | 69 ++++--- src/store/file.js | 1 + src/store/index.js | 14 +- src/store/layout.js | 12 +- src/store/modal.js | 13 +- src/store/moduleTemplate.js | 40 ++--- 36 files changed, 598 insertions(+), 346 deletions(-) create mode 100644 src/services/tempFileSvc.js diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 158cb97a..86ea3b37 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -3,7 +3,7 @@

     
- +
@@ -19,6 +19,9 @@ export default { EditorNewDiscussionButton, }, computed: { + ...mapGetters('file', [ + 'isCurrentTemp', + ]), ...mapGetters('layout', [ 'styles', ]), diff --git a/src/components/Explorer.vue b/src/components/Explorer.vue index e9bcfd75..584ed25c 100644 --- a/src/components/Explorer.vue +++ b/src/components/Explorer.vue @@ -19,7 +19,7 @@ -
+
@@ -34,6 +34,9 @@ export default { ExplorerNode, }, computed: { + ...mapState([ + 'light', + ]), ...mapState('explorer', [ 'newChildNode', ]), @@ -58,7 +61,7 @@ export default { }, }, created() { - this.$store.watch( + this.$watch( () => this.$store.getters['file/current'].id, (currentFileId) => { this.$store.commit('explorer/setSelectedId', currentFileId); diff --git a/src/components/ExplorerNode.vue b/src/components/ExplorerNode.vue index ac299288..5172298e 100644 --- a/src/components/ExplorerNode.vue +++ b/src/components/ExplorerNode.vue @@ -1,5 +1,5 @@ @@ -78,6 +78,9 @@ export default { FindReplace, }, computed: { + ...mapState([ + 'light', + ]), ...mapState('content', [ 'revisionContent', ]), diff --git a/src/components/NavigationBar.vue b/src/components/NavigationBar.vue index f50033cb..d351162a 100644 --- a/src/components/NavigationBar.vue +++ b/src/components/NavigationBar.vue @@ -2,11 +2,13 @@