From d8fb729aee7ea30082f3df475e5a29f21925c2c7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 21 Feb 2021 13:34:00 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E8=AA=BF=E6=95=B4=E3=81=AA=E3=81=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/notes.vue | 4 ++-- src/client/init.ts | 3 +++ src/client/ui/chat/header-clock.vue | 24 +++++++++++++++++++++--- src/client/ui/chat/note.vue | 1 + src/client/ui/chat/notes.vue | 4 ++-- src/server/web/boot.js | 4 ++++ 6 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/client/components/notes.vue b/src/client/components/notes.vue index ebb87622af..332f00e5db 100644 --- a/src/client/components/notes.vue +++ b/src/client/components/notes.vue @@ -8,7 +8,7 @@
- + @@ -19,7 +19,7 @@
- + diff --git a/src/client/init.ts b/src/client/init.ts index c60b25359b..ce12849770 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -63,6 +63,9 @@ import { reloadChannel } from '@/scripts/unison-reload'; console.info(`Misskey v${version}`); +// boot.jsのやつを解除 +window.onerror = null; + if (_DEV_) { console.warn('Development mode!!!'); diff --git a/src/client/ui/chat/header-clock.vue b/src/client/ui/chat/header-clock.vue index 65573d460b..3488289c21 100644 --- a/src/client/ui/chat/header-clock.vue +++ b/src/client/ui/chat/header-clock.vue @@ -1,12 +1,15 @@ @@ -18,6 +21,9 @@ export default defineComponent({ data() { return { clock: null, + y: null, + m: null, + d: null, hh: null, mm: null, ss: null, @@ -34,6 +40,9 @@ export default defineComponent({ methods: { tick() { const now = new Date(); + this.y = now.getFullYear().toString(); + this.m = (now.getMonth() + 1).toString().padStart(2, '0'); + this.d = now.getDate().toString().padStart(2, '0'); this.hh = now.getHours().toString().padStart(2, '0'); this.mm = now.getMinutes().toString().padStart(2, '0'); this.ss = now.getSeconds().toString().padStart(2, '0'); @@ -42,3 +51,12 @@ export default defineComponent({ } }); + + diff --git a/src/client/ui/chat/note.vue b/src/client/ui/chat/note.vue index 315f5c91e3..9312b99d27 100644 --- a/src/client/ui/chat/note.vue +++ b/src/client/ui/chat/note.vue @@ -1091,6 +1091,7 @@ export default defineComponent({ > .poll { font-size: 80%; + max-width: 500px; } > .renote { diff --git a/src/client/ui/chat/notes.vue b/src/client/ui/chat/notes.vue index fb9f8fe260..3a169cc20a 100644 --- a/src/client/ui/chat/notes.vue +++ b/src/client/ui/chat/notes.vue @@ -8,7 +8,7 @@
- + @@ -19,7 +19,7 @@
- + diff --git a/src/server/web/boot.js b/src/server/web/boot.js index 2bd306ea94..993b770ab1 100644 --- a/src/server/web/boot.js +++ b/src/server/web/boot.js @@ -11,6 +11,10 @@ 'use strict'; +window.onerror = (e) => { + document.documentElement.innerHTML = '問題が発生しました。'; +}; + // ブロックの中に入れないと、定義した変数がブラウザのグローバルスコープに登録されてしまい邪魔なので (async () => { const v = localStorage.getItem('v') || VERSION;