From 8984e3131df7e7511b7977e3008ea307ee5944c7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 28 Apr 2018 02:29:17 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A2=E3=83=90=E3=82=A4=E3=83=AB=E7=89=88?= =?UTF-8?q?=E3=81=AE=E3=83=80=E3=83=BC=E3=82=AF=E3=83=A2=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit など --- .../views/components/reaction-picker.vue | 2 +- .../views/components/note-detail.sub.vue | 41 ++++++----- .../desktop/views/components/note-detail.vue | 50 +++++++------ .../desktop/views/components/notes.note.vue | 2 +- src/client/app/mobile/script.ts | 8 +- .../views/components/note-detail.sub.vue | 26 ++++--- .../mobile/views/components/note-detail.vue | 73 ++++++++++--------- .../app/mobile/views/components/note.sub.vue | 17 +++-- .../app/mobile/views/components/note.vue | 36 ++++----- .../app/mobile/views/components/notes.vue | 10 +-- .../mobile/views/components/notification.vue | 18 +++-- .../mobile/views/components/notifications.vue | 23 +++--- .../app/mobile/views/components/ui.header.vue | 2 +- .../app/mobile/views/components/ui.nav.vue | 49 +++++++++---- src/client/app/mobile/views/pages/note.vue | 43 +++++------ src/client/app/mobile/views/pages/user.vue | 7 +- .../app/mobile/views/pages/user/home.vue | 3 + 17 files changed, 227 insertions(+), 183 deletions(-) diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue index ba87ae349..e2c8a6ed3 100644 --- a/src/client/app/common/views/components/reaction-picker.vue +++ b/src/client/app/common/views/components/reaction-picker.vue @@ -120,7 +120,7 @@ root(isDark) z-index 10000 width 100% height 100% - background rgba(0, 0, 0, 0.1) + background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1) opacity 0 > .popover diff --git a/src/client/app/desktop/views/components/note-detail.sub.vue b/src/client/app/desktop/views/components/note-detail.sub.vue index cbea77ae7..fb3342130 100644 --- a/src/client/app/desktop/views/components/note-detail.sub.vue +++ b/src/client/app/desktop/views/components/note-detail.sub.vue @@ -16,7 +16,9 @@
- +
+ +
@@ -40,10 +42,10 @@ export default Vue.extend({ - - diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue index f5153bad6..266644cf8 100644 --- a/src/client/app/desktop/views/components/note-detail.vue +++ b/src/client/app/desktop/views/components/note-detail.vue @@ -38,7 +38,9 @@
- +
+ +
@@ -214,12 +216,12 @@ export default Vue.extend({ - - diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue index 6d0e0c8f5..9e7a7a6d2 100644 --- a/src/client/app/desktop/views/components/notes.note.vue +++ b/src/client/app/desktop/views/components/notes.note.vue @@ -434,7 +434,7 @@ root(isDark) margin 0 .5em 0 0 padding 1px 6px font-size 12px - color isDark ? #758188 :#aaa + color isDark ? #758188 : #aaa border solid 1px isDark ? #57616f : #ddd border-radius 3px diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index 1de489197..2e9805e0d 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -55,15 +55,15 @@ init((launch) => { { path: '/signup', name: 'signup', component: MkSignup }, { path: '/i/settings', component: MkSettings }, { path: '/i/settings/profile', component: MkProfileSetting }, - { path: '/i/notifications', component: MkNotifications }, - { path: '/i/messaging', component: MkMessaging }, + { path: '/i/notifications', name: 'notifications', component: MkNotifications }, + { path: '/i/messaging', name: 'messaging', component: MkMessaging }, { path: '/i/messaging/:user', component: MkMessagingRoom }, - { path: '/i/drive', component: MkDrive }, + { path: '/i/drive', name: 'drive', component: MkDrive }, { path: '/i/drive/folder/:folder', component: MkDrive }, { path: '/i/drive/file/:file', component: MkDrive }, { path: '/selectdrive', component: MkSelectDrive }, { path: '/search', component: MkSearch }, - { path: '/othello', component: MkOthello }, + { path: '/othello', name: 'othello', component: MkOthello }, { path: '/othello/:game', component: MkOthello }, { path: '/@:user', component: MkUser }, { path: '/@:user/followers', component: MkFollowers }, diff --git a/src/client/app/mobile/views/components/note-detail.sub.vue b/src/client/app/mobile/views/components/note-detail.sub.vue index 06f442d30..683b5ffd1 100644 --- a/src/client/app/mobile/views/components/note-detail.sub.vue +++ b/src/client/app/mobile/views/components/note-detail.sub.vue @@ -27,23 +27,22 @@ export default Vue.extend({ - diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue index 62dd9184c..5d593c02d 100644 --- a/src/client/app/mobile/views/components/note-detail.vue +++ b/src/client/app/mobile/views/components/note-detail.vue @@ -34,7 +34,9 @@
- +
+ +
{{ tag }}
@@ -209,15 +211,18 @@ export default Vue.extend({ - - diff --git a/src/client/app/mobile/views/components/note.sub.vue b/src/client/app/mobile/views/components/note.sub.vue index 759de4746..38659143a 100644 --- a/src/client/app/mobile/views/components/note.sub.vue +++ b/src/client/app/mobile/views/components/note.sub.vue @@ -27,7 +27,7 @@ export default Vue.extend({ +.sub[data-darkmode] + root(true) +.sub:not([data-darkmode]) + root(false) + + diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue index 5772fb2b7..e7a43f798 100644 --- a/src/client/app/mobile/views/components/note.vue +++ b/src/client/app/mobile/views/components/note.vue @@ -261,7 +261,7 @@ root(isDark) padding 8px 16px line-height 28px color #9dbb00 - background linear-gradient(to bottom, #edfde2 0%, #fff 100%) + background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%) @media (min-width 500px) padding 16px @@ -325,9 +325,9 @@ root(isDark) display block float left margin 0 10px 8px 0 - position -webkit-sticky - position sticky - top 62px + //position -webkit-sticky + //position sticky + //top 62px @media (min-width 500px) margin-right 16px @@ -365,7 +365,7 @@ root(isDark) margin 0 0.5em 0 0 padding 0 overflow hidden - color #627079 + color isDark ? #fff : #627079 font-size 1em font-weight bold text-decoration none @@ -378,15 +378,15 @@ root(isDark) margin 0 0.5em 0 0 padding 1px 6px font-size 12px - color #aaa - border solid 1px #ddd + color isDark ? #758188 : #aaa + border solid 1px isDark ? #57616f : #ddd border-radius 3px > .username margin 0 0.5em 0 0 overflow hidden text-overflow ellipsis - color #ccc + color isDark ? #606984 : #ccc > .info margin-left auto @@ -394,10 +394,10 @@ root(isDark) > .mobile margin-right 6px - color #c0c0c0 + color isDark ? #606984 : #c0c0c0 > .created-at - color #c0c0c0 + color isDark ? #606984 : #c0c0c0 > .body @@ -434,7 +434,7 @@ root(isDark) padding 0 overflow-wrap break-word font-size 1.1em - color #717171 + color isDark ? #fff : #717171 >>> .title display block @@ -442,7 +442,7 @@ root(isDark) padding 4px font-size 90% text-align center - background #eef1f3 + background isDark ? #2f3944 : #eef1f3 border-radius 4px >>> .code @@ -451,12 +451,12 @@ root(isDark) >>> .quote margin 8px padding 6px 12px - color #aaa - border-left solid 3px #eee + color isDark ? #6f808e : #aaa + border-left solid 3px isDark ? #637182 : #eee > .reply margin-right 8px - color #717171 + color isDark ? #99abbf : #717171 > .rp margin-left 4px @@ -528,7 +528,7 @@ root(isDark) > .mk-note-preview padding 16px - border dashed 1px #c0dac6 + border dashed 1px isDark ? #4e945e : #c0dac6 border-radius 8px > .app @@ -543,14 +543,14 @@ root(isDark) border none box-shadow none font-size 1em - color #ddd + color isDark ? #606984 : #ddd cursor pointer &:not(:last-child) margin-right 28px &:hover - color #666 + color isDark ? #9198af : #666 > .count display inline diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue index ecd9c8cf2..58069b06e 100644 --- a/src/client/app/mobile/views/components/notes.vue +++ b/src/client/app/mobile/views/components/notes.vue @@ -202,10 +202,10 @@ export default Vue.extend({ root(isDark) background isDark ? #282C37 : #fff border-radius 8px - box-shadow 0 0 2px rgba(0, 0, 0, 0.1) + box-shadow 0 0 2px rgba(#000, 0.1) @media (min-width 500px) - box-shadow 0 8px 32px rgba(0, 0, 0, 0.1) + box-shadow 0 8px 32px rgba(#000, 0.1) .transition .mk-notes-enter @@ -222,9 +222,9 @@ root(isDark) line-height 32px text-align center font-size 0.9em - color #aaa - background #fdfdfd - border-bottom solid 1px #eaeaea + color isDark ? #666b79 : #aaa + background isDark ? #242731 : #fdfdfd + border-bottom solid 1px isDark ? #1c2023 : #eaeaea span margin 0 16px diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue index 793f34fe8..a4e6b027e 100644 --- a/src/client/app/mobile/views/components/notification.vue +++ b/src/client/app/mobile/views/components/notification.vue @@ -91,8 +91,7 @@ export default Vue.extend({ +.mk-notification[data-darkmode] + root(true) +.mk-notification:not([data-darkmode]) + root(false) + + diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue index 7a878740c..a0d893864 100644 --- a/src/client/app/mobile/views/components/notifications.vue +++ b/src/client/app/mobile/views/components/notifications.vue @@ -103,9 +103,9 @@ export default Vue.extend({ diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue index 89edcf5a9..1e6c7b085 100644 --- a/src/client/app/mobile/views/components/ui.header.vue +++ b/src/client/app/mobile/views/components/ui.header.vue @@ -150,7 +150,7 @@ root(isDark) top 0 z-index 1024 width 100% - //box-shadow 0 1px 0 rgba(#000, 0.075) + box-shadow 0 1px 0 rgba(#000, 0.075) &, * user-select none diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index 68cdacb3b..2ea4364fb 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -15,19 +15,20 @@

%i18n:@about%

@@ -113,6 +114,9 @@ export default Vue.extend({ }, onOthelloNoInvites() { this.hasGameInvitations = false; + }, + dark() { + (this as any)._updateDarkmode_(!(this as any)._darkmode_); } } }); @@ -121,7 +125,9 @@ export default Vue.extend({ diff --git a/src/client/app/mobile/views/pages/note.vue b/src/client/app/mobile/views/pages/note.vue index 7bcc5e71f..aff0d5aa5 100644 --- a/src/client/app/mobile/views/pages/note.vue +++ b/src/client/app/mobile/views/pages/note.vue @@ -2,11 +2,13 @@ %fa:R sticky-note%%i18n:@title%
- %fa:angle-up%%i18n:@next%
- %fa:angle-down%%i18n:@prev% +
@@ -52,33 +54,24 @@ export default Vue.extend({ diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue index abd4b5bd8..d2688a0f3 100644 --- a/src/client/app/mobile/views/pages/user.vue +++ b/src/client/app/mobile/views/pages/user.vue @@ -135,7 +135,7 @@ root(isDark) > .banner padding-bottom 33.3% - background-color isDark ? #0e0e0e : #cacaca + background-color isDark ? #5f7273 : #cacaca background-size cover background-position center @@ -162,6 +162,7 @@ root(isDark) left -2px bottom -2px width 100% + background isDark ? #191b22 : #ececed border 3px solid isDark ? #191b22 : #ececed border-radius 6px @@ -195,8 +196,8 @@ root(isDark) margin-left 8px padding 2px 4px font-size 12px - color #657786 - background #f8f8f8 + color isDark ? #657786 : #fff + background isDark ? #f8f8f8 : #a7bec7 border-radius 4px > .description diff --git a/src/client/app/mobile/views/pages/user/home.vue b/src/client/app/mobile/views/pages/user/home.vue index f4191edbb..d9bb8041e 100644 --- a/src/client/app/mobile/views/pages/user/home.vue +++ b/src/client/app/mobile/views/pages/user/home.vue @@ -61,6 +61,9 @@ export default Vue.extend({ > .mk-note-detail margin 0 0 8px 0 + @media (min-width 500px) + margin 0 0 16px 0 + > section background #eee border-radius 8px