From c88e737a84190acb0ab8f1502b3aeacb6c2f2e44 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 20 Mar 2020 22:37:44 +0900 Subject: [PATCH] wip --- locales/ja-JP.yml | 1 - src/client/app.vue | 79 +++----------------------- src/client/pages/drive.vue | 2 +- src/client/pages/messaging-room.vue | 2 +- src/client/pages/preferences/index.vue | 6 -- src/client/store.ts | 1 - src/client/themes/_dark.json5 | 3 +- src/client/themes/_light.json5 | 3 +- 8 files changed, 13 insertions(+), 84 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 3f70c8dbb..3e5712087 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -439,7 +439,6 @@ serverLogs: "サーバーログ" deleteAll: "全て削除" showFixedPostForm: "タイムライン上部に投稿フォームを表示する" newNoteRecived: "新しいノートがあります" -useNotificationsPopup: "通知一覧をポップアップで表示" sounds: "サウンド" listen: "聴く" none: "なし" diff --git a/src/client/app.vue b/src/client/app.vue index b0c92105e..4e5dfbd18 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -51,11 +51,7 @@ {{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }} @@ -173,7 +164,6 @@ import { v4 as uuid } from 'uuid'; import i18n from './i18n'; import { host, instanceName } from './config'; import { search } from './scripts/search'; -import contains from './scripts/contains'; import MkToast from './components/toast.vue'; const DESKTOP_THRESHOLD = 1100; @@ -183,7 +173,6 @@ export default Vue.extend({ components: { XClock: () => import('./components/header-clock.vue').then(m => m.default), - XNotifications: () => import('./components/notifications.vue').then(m => m.default), MkButton: () => import('./components/ui/button.vue').then(m => m.default), XDraggable: () => import('vuedraggable'), }, @@ -194,7 +183,6 @@ export default Vue.extend({ pageKey: 0, showNav: false, searching: false, - notificationsOpen: false, accounts: [], lists: [], connection: null, @@ -226,23 +214,10 @@ export default Vue.extend({ watch:{ $route(to, from) { this.pageKey++; - this.notificationsOpen = false; this.showNav = false; this.canBack = (window.history.length > 0 && !['index'].includes(to.name)); }, - notificationsOpen(open) { - if (open) { - for (const el of Array.from(document.querySelectorAll('*'))) { - el.addEventListener('mousedown', this.onMousedown); - } - } else { - for (const el of Array.from(document.querySelectorAll('*'))) { - el.removeEventListener('mousedown', this.onMousedown); - } - } - }, - isDesktop() { if (this.isDesktop) this.adjustWidgetsWidth(); } @@ -568,15 +543,6 @@ export default Vue.extend({ this.$root.sound('notification'); }, - onMousedown(e) { - e.preventDefault(); - if (!contains(this.$refs.notifications.$el, e.target) && - !contains(this.$refs.notificationButton, e.target) && - !contains(this.$refs.notificationButton2, e.target) - ) this.notificationsOpen = false; - return false; - }, - widgetFunc(id) { const w = this.$refs[id][0]; if (w.func) w.func(); @@ -976,18 +942,20 @@ export default Vue.extend({ width: $main-width; min-width: $main-width; box-shadow: 1px 0 0 0 var(--divider), -1px 0 0 0 var(--divider); - background: var(--mainBg); @media (max-width: $side-hide-threshold) { min-width: 0; } > .content { - padding: 16px 0; - box-sizing: border-box; + > * { + &:not(.full) { + padding: var(--margin) 0; + } - @media (max-width: 500px) { - padding: 8px 0; + &:not(.naked) { + background: var(--pageBg); + } } } @@ -1178,34 +1146,5 @@ export default Vue.extend({ } } } - - > .notifications { - position: fixed; - top: 32px; - 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: auto; - - @media (max-width: 800px) { - width: 320px; - height: 350px; - } - - @media (max-width: 500px) { - width: 290px; - height: 310px; - } - } } diff --git a/src/client/pages/drive.vue b/src/client/pages/drive.vue index 7b648939f..8f8e949dc 100644 --- a/src/client/pages/drive.vue +++ b/src/client/pages/drive.vue @@ -1,5 +1,5 @@