diff --git a/package-lock.json b/package-lock.json index a8eb16c5..a9c08ad5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -594,7 +594,7 @@ }, "@braintree/sanitize-url": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz", "integrity": "sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==" }, "@mrmlnc/readdir-enhanced": { diff --git a/src/components/ExplorerNode.vue b/src/components/ExplorerNode.vue index e3771a3f..20ec317d 100644 --- a/src/components/ExplorerNode.vue +++ b/src/components/ExplorerNode.vue @@ -236,6 +236,10 @@ $item-font-size: 14px; .explorer-node--trash, .explorer-node--temp { color: rgba(0, 0, 0, 0.5); + + .app--dark & { + color: rgba(255, 255, 255, 0.5); + } } .explorer-node--folder > .explorer-node__item, diff --git a/src/components/Layout.vue b/src/components/Layout.vue index 924d2ee4..1bf6e3d2 100644 --- a/src/components/Layout.vue +++ b/src/components/Layout.vue @@ -208,6 +208,10 @@ $preview-background-dark: #252525; .layout__panel--explorer, .layout__panel--side-bar { background-color: #ddd; + + .app--dark & { + background-color: #383c4a; + } } .layout__panel--find-replace { diff --git a/src/components/Modal.vue b/src/components/Modal.vue index d5df5403..ceca41a2 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -273,6 +273,10 @@ export default { position: relative; overflow: hidden; + .app--dark & { + background-color: #383c4a; + } + &::before { content: ''; position: absolute; diff --git a/src/components/NavigationBar.vue b/src/components/NavigationBar.vue index be3b9266..14219bbf 100644 --- a/src/components/NavigationBar.vue +++ b/src/components/NavigationBar.vue @@ -7,6 +7,7 @@ @@ -187,6 +188,9 @@ export default { publishSvc.requestPublish(); } }, + switchTheme() { + store.dispatch('data/switchThemeSetting'); + }, pagedownClick(name) { if (store.getters['content/isCurrentEditable']) { const text = editorSvc.clEditor.getContent(); @@ -309,6 +313,18 @@ export default { padding: 0 4px; width: 38px; + &.navigation-bar__button--theme { + width: 34px; + padding: 0 7px; + opacity: 0.85; + + &:active, + &:focus, + &:hover { + opacity: 1; + } + } + &.navigation-bar__button--stackedit { opacity: 0.85; diff --git a/src/components/Tour.vue b/src/components/Tour.vue index c9ad7069..c1f529a8 100644 --- a/src/components/Tour.vue +++ b/src/components/Tour.vue @@ -12,7 +12,7 @@

您的Markdown编辑器

-

StackEdit实时将Markdown转换为HTML。

+

StackEdit中文版实时将Markdown转换为HTML。

点击 切换侧边预览

@@ -21,7 +21,7 @@

文件资源管理器

-

StackEdit可以管理文档空间中的多个文件和文件夹。

+

StackEdit中文版可以管理文档空间中的多个文件和文件夹。

点击 打开文件资源管理器。

@@ -29,17 +29,26 @@
-

更多!

-

StackEdit还可以同步和发布文件,管理协作文档空间...

+

切换侧边栏!

+

StackEdit中文版还可以同步和发布文件,管理协作文档空间...

点击 浏览菜单。

+
+

切换主题!

+

StackEdit中文版可以切换黑白主题。

+

点击 切换主题。

+
+ + +
+

Enjoy!

-

如果您喜欢StackEdit中文版,请在Gitee仓库上点一下starred,谢谢!

+

如果您喜欢StackEdit中文版,请在Gitee仓库上点一下Star,谢谢!

@@ -57,6 +66,7 @@ const steps = [ 'editor', 'explorer', 'menu', + 'theme', 'end', ]; @@ -90,7 +100,8 @@ export default { break; } case 'editor': - case 'menu': { + case 'menu': + case 'theme': { style.left = `${anchorRect.left}px`; break; } @@ -139,6 +150,7 @@ export default { } $tour-step-background: transparentize(mix(#f3f3f3, $selection-highlighting-color, 75%), 0.025); +$tour-step-darkbackground: transparentize(mix(#4d4d4d, $selection-highlighting-color, 75%), 0.025); $tour-step-width: 240px; .tour-step__inner { @@ -151,6 +163,10 @@ $tour-step-width: 240px; text-align: center; border-radius: $border-radius-base; + .app--dark & { + background-color: $tour-step-darkbackground; + } + h2 { margin: 0; @@ -183,11 +199,16 @@ $tour-step-width: 240px; right: 0; border-top: 10px solid $tour-step-background; border-left: 10px solid transparent; + + .app--dark & { + border-top: 10px solid $tour-step-darkbackground; + } } } .tour-step--editor &, - .tour-step--menu & { + .tour-step--menu &, + .tour-step--theme & { right: 15px; border-top-right-radius: 0; @@ -196,6 +217,10 @@ $tour-step-width: 240px; right: -10px; border-top: 10px solid $tour-step-background; border-right: 10px solid transparent; + + .app--dark & { + border-top: 10px solid $tour-step-darkbackground; + } } } @@ -208,6 +233,10 @@ $tour-step-width: 240px; left: -10px; border-top: 10px solid $tour-step-background; border-left: 10px solid transparent; + + .app--dark & { + border-top: 10px solid $tour-step-darkbackground; + } } } } diff --git a/src/components/menus/common/MenuEntry.vue b/src/components/menus/common/MenuEntry.vue index 00072d09..36f0ca23 100644 --- a/src/components/menus/common/MenuEntry.vue +++ b/src/components/menus/common/MenuEntry.vue @@ -73,6 +73,10 @@ background-color: #fff; border-radius: 3px; opacity: 0.6; + + .app--dark & { + background-color: #000; + } } .menu-entry__label--warning { diff --git a/src/components/modals/providers/DropboxAccountModal.vue b/src/components/modals/providers/DropboxAccountModal.vue index d5c86755..1582662d 100644 --- a/src/components/modals/providers/DropboxAccountModal.vue +++ b/src/components/modals/providers/DropboxAccountModal.vue @@ -4,7 +4,7 @@ -

将您的Dropbox链接到StackEdit

+

将您的Dropbox链接到StackEdit中文版