From d1e9e74cb87463cb4b5d9c0f3a127e374a1a1e32 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 19 Feb 2020 06:16:49 +0900 Subject: [PATCH] Resolve #5978 --- locales/ja-JP.yml | 1 + src/client/app.vue | 43 +++++++++------ src/client/components/notifications.vue | 70 +++++++++++++------------ src/client/pages/notifications.vue | 42 +++++++++++++++ src/client/pages/settings/index.vue | 8 ++- src/client/router.ts | 1 + src/client/store.ts | 1 + 7 files changed, 114 insertions(+), 52 deletions(-) create mode 100644 src/client/pages/notifications.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 117a8f997b..5fcd562720 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -423,6 +423,7 @@ serverLogs: "サーバーログ" deleteAll: "全て削除" showFixedPostForm: "タイムライン上部に投稿フォームを表示する" newNoteRecived: "新しいノートがあります" +useNotificationsPopup: "通知一覧をポップアップで表示" _ago: unknown: "謎" diff --git a/src/client/app.vue b/src/client/app.vue index 9b0745d195..a3290486a7 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -50,21 +50,27 @@ {{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }} - - - {{ $t('messaging') }} - - - - {{ $t('drive') }} - - - {{ $t('followRequests') }} - - +
{{ $t('featured') }} @@ -143,7 +149,8 @@ - + + @@ -1206,15 +1213,17 @@ export default Vue.extend({ left: 0; right: 0; margin: 0 auto; + padding: 8px 8px 0 8px; z-index: 10001; width: 350px; height: 400px; + box-sizing: border-box; background: var(--vocsgcxy); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 6px; box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15); - overflow: hidden; + overflow: auto; @media (max-width: 800px) { width: 320px; diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index ff2fc4af8a..3c2eb1bd51 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -1,19 +1,17 @@ @@ -42,7 +40,7 @@ export default Vue.extend({ type: String, required: false }, - wide: { + page: { type: Boolean, required: false, default: false @@ -93,11 +91,15 @@ export default Vue.extend({ diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue new file mode 100644 index 0000000000..49e67bc8f7 --- /dev/null +++ b/src/client/pages/notifications.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index 986ade8ffc..b3ef4d17b9 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -20,7 +20,8 @@ {{ $t('useOsNativeEmojis') }} - {{ $t('showFixedPostForm') }} + {{ $t('showFixedPostForm') }} + {{ $t('useNotificationsPopup') }}
@@ -111,6 +112,11 @@ export default Vue.extend({ get() { return this.$store.state.device.showFixedPostForm; }, set(value) { this.$store.commit('device/set', { key: 'showFixedPostForm', value }); } }, + + useNotificationsPopup: { + get() { return this.$store.state.device.useNotificationsPopup; }, + set(value) { this.$store.commit('device/set', { key: 'useNotificationsPopup', value }); } + }, }, watch: { diff --git a/src/client/router.ts b/src/client/router.ts index 0a856d580d..86ef4c7056 100644 --- a/src/client/router.ts +++ b/src/client/router.ts @@ -27,6 +27,7 @@ export const router = new VueRouter({ { path: '/explore', component: page('explore') }, { path: '/explore/tags/:tag', props: true, component: page('explore') }, { path: '/search', component: page('search') }, + { path: '/my/notifications', component: page('notifications') }, { path: '/my/favorites', component: page('favorites') }, { path: '/my/messages', component: page('messages') }, { path: '/my/mentions', component: page('mentions') }, diff --git a/src/client/store.ts b/src/client/store.ts index 28c995132e..2d84b7b318 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -40,6 +40,7 @@ const defaultDeviceSettings = { animatedMfm: true, imageNewTab: false, showFixedPostForm: false, + useNotificationsPopup: true, userData: {}, };