From 1dfcb9e83e08712f024b99ca142859e8ff0c8813 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 20 Apr 2018 07:45:37 +0900 Subject: [PATCH] [wip] darkmode --- locales/en.yml | 1 + locales/fr.yml | 1 + locales/ja.yml | 1 + .../app/common/views/components/messaging.vue | 33 +++-- .../views/components/reaction-picker.vue | 19 ++- .../views/components/reactions-viewer.vue | 33 +++-- .../views/components/twitter-setting.vue | 2 - .../app/common/views/widgets/donation.vue | 16 ++- src/client/app/common/views/widgets/nav.vue | 29 ++-- src/client/app/common/views/widgets/rss.vue | 68 +++++---- .../views/widgets/server.cpu-memory.vue | 11 +- src/client/app/desktop/ui.styl | 70 ++++++++-- .../views/components/context-menu.menu.vue | 14 +- .../desktop/views/components/context-menu.vue | 10 +- .../desktop/views/components/drive.file.vue | 10 +- .../app/desktop/views/components/drive.vue | 14 +- .../views/components/follow-button.vue | 22 +-- .../desktop/views/components/note-preview.vue | 21 +-- .../views/components/notes.note.sub.vue | 20 +-- .../desktop/views/components/notes.note.vue | 15 +- .../views/components/notifications.vue | 22 +-- .../desktop/views/components/post-form.vue | 2 +- .../desktop/views/components/renote-form.vue | 59 ++------ .../desktop/views/components/repost-form.vue | 131 ------------------ .../desktop/views/components/settings.api.vue | 2 - .../app/desktop/views/components/settings.vue | 4 +- .../views/components/ui.header.account.vue | 52 +++++-- .../components/ui.header.notifications.vue | 17 ++- .../app/desktop/views/widgets/messaging.vue | 25 +--- .../app/desktop/views/widgets/trends.vue | 103 ++++++-------- .../app/desktop/views/widgets/users.vue | 111 +++++++-------- 31 files changed, 448 insertions(+), 490 deletions(-) delete mode 100644 src/client/app/desktop/views/components/repost-form.vue diff --git a/locales/en.yml b/locales/en.yml index 81357c075..33b46e1b9 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -370,6 +370,7 @@ desktop/views/components/ui.header.account.vue: customize: "Customize" settings: "Settings" signout: "Sign out" + dark: "Fall in dark" desktop/views/components/ui.header.nav.vue: home: "Home" diff --git a/locales/fr.yml b/locales/fr.yml index 8fb754344..a475b65d4 100644 --- a/locales/fr.yml +++ b/locales/fr.yml @@ -370,6 +370,7 @@ desktop/views/components/ui.header.account.vue: customize: "Modifications" settings: "Réglages" signout: "Déconnexion" + dark: "Fall in dark" desktop/views/components/ui.header.nav.vue: home: "Accueil" diff --git a/locales/ja.yml b/locales/ja.yml index 2f69a6f3d..9cbdb7993 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -370,6 +370,7 @@ desktop/views/components/ui.header.account.vue: customize: "カスタマイズ" settings: "設定" signout: "サインアウト" + dark: "闇に飲まれる" desktop/views/components/ui.header.nav.vue: home: "ホーム" diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue index f74d9643e..6f799b34b 100644 --- a/src/client/app/common/views/components/messaging.vue +++ b/src/client/app/common/views/components/messaging.vue @@ -169,7 +169,7 @@ export default Vue.extend({ diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue index 267eeb3a1..ba87ae349 100644 --- a/src/client/app/common/views/components/reaction-picker.vue +++ b/src/client/app/common/views/components/reaction-picker.vue @@ -110,7 +110,7 @@ export default Vue.extend({ $border-color = rgba(27, 31, 35, 0.15) -.mk-reaction-picker +root(isDark) position initial > .backdrop @@ -124,9 +124,10 @@ $border-color = rgba(27, 31, 35, 0.15) opacity 0 > .popover + $bgcolor = isDark ? #2c303c : #fff position absolute z-index 10001 - background #fff + background $bgcolor border 1px solid $border-color border-radius 4px box-shadow 0 3px 12px rgba(27, 31, 35, 0.15) @@ -159,15 +160,15 @@ $border-color = rgba(27, 31, 35, 0.15) border-top solid $balloon-size transparent border-left solid $balloon-size transparent border-right solid $balloon-size transparent - border-bottom solid $balloon-size #fff + border-bottom solid $balloon-size $bgcolor > p display block margin 0 padding 8px 10px font-size 14px - color #586069 - border-bottom solid 1px #e1e4e8 + color isDark ? #d6dce2 : #586069 + border-bottom solid 1px isDark ? #1c2023 : #e1e4e8 > div padding 4px @@ -182,10 +183,16 @@ $border-color = rgba(27, 31, 35, 0.15) border-radius 2px &:hover - background #eee + background isDark ? #252731 : #eee &:active background $theme-color box-shadow inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15) +.mk-reaction-picker[data-darkmode] + root(true) + +.mk-reaction-picker:not([data-darkmode]) + root(false) + diff --git a/src/client/app/common/views/components/reactions-viewer.vue b/src/client/app/common/views/components/reactions-viewer.vue index 1afcf525d..97cb6be17 100644 --- a/src/client/app/common/views/components/reactions-viewer.vue +++ b/src/client/app/common/views/components/reactions-viewer.vue @@ -1,15 +1,15 @@ @@ -27,9 +27,10 @@ export default Vue.extend({ diff --git a/src/client/app/common/views/components/twitter-setting.vue b/src/client/app/common/views/components/twitter-setting.vue index 6ca1037ab..ab07e6d09 100644 --- a/src/client/app/common/views/components/twitter-setting.vue +++ b/src/client/app/common/views/components/twitter-setting.vue @@ -50,8 +50,6 @@ export default Vue.extend({ diff --git a/src/client/app/common/views/widgets/nav.vue b/src/client/app/common/views/widgets/nav.vue index 7bd5a7832..0cbf7c158 100644 --- a/src/client/app/common/views/widgets/nav.vue +++ b/src/client/app/common/views/widgets/nav.vue @@ -1,7 +1,7 @@