From 7eb6038f9291bfb88c989d53454796d7abc1b6ea Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 20 Feb 2021 11:05:46 +0900 Subject: :art: --- src/client/widgets/job-queue.vue | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/widgets/job-queue.vue b/src/client/widgets/job-queue.vue index 11bb20979b..b7bfb6de27 100644 --- a/src/client/widgets/job-queue.vue +++ b/src/client/widgets/job-queue.vue @@ -5,19 +5,19 @@
Process
-
{{ number(inbox.activeSincePrevTick) }}
+
{{ number(inbox.activeSincePrevTick) }}
Active
-
{{ number(inbox.active) }}
+
{{ number(inbox.active) }}
Delayed
-
{{ number(inbox.delayed) }}
+
{{ number(inbox.delayed) }}
Waiting
-
{{ number(inbox.waiting) }}
+
{{ number(inbox.waiting) }}
@@ -26,19 +26,19 @@
Process
-
{{ number(deliver.activeSincePrevTick) }}
+
{{ number(deliver.activeSincePrevTick) }}
Active
-
{{ number(deliver.active) }}
+
{{ number(deliver.active) }}
Delayed
-
{{ number(deliver.delayed) }}
+
{{ number(deliver.delayed) }}
Waiting
-
{{ number(deliver.waiting) }}
+
{{ number(deliver.waiting) }}
@@ -79,10 +79,15 @@ export default defineComponent({ waiting: 0, delayed: 0, }, + prev: {}, faExclamationTriangle, }; }, created() { + for (const domain of ['inbox', 'deliver']) { + this.prev[domain] = JSON.parse(JSON.stringify(this[domain])); + } + this.connection.on('stats', this.onStats); this.connection.on('statsLog', this.onStatsLog); @@ -99,6 +104,7 @@ export default defineComponent({ methods: { onStats(stats) { for (const domain of ['inbox', 'deliver']) { + this.prev[domain] = JSON.parse(JSON.stringify(this[domain])); this[domain].activeSincePrevTick = stats[domain].activeSincePrevTick; this[domain].active = stats[domain].active; this[domain].waiting = stats[domain].waiting; @@ -152,6 +158,16 @@ export default defineComponent({ > div:first-child { opacity: 0.7; } + + > div:last-child { + &.inc { + color: var(--warn); + } + + &.dec { + color: var(--success); + } + } } } } -- cgit v1.2.3-freya From 53c7077d1d78b535ab04a55ec5c508c1bab83034 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 20 Feb 2021 11:15:08 +0900 Subject: ChatUIで選択したタイムラインを記憶するように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/ui/chat/index.vue | 4 +++- src/client/ui/chat/store.ts | 4 ++++ src/client/ui/chat/widgets.vue | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/ui/chat/index.vue b/src/client/ui/chat/index.vue index 44f47447a7..1d455927a0 100644 --- a/src/client/ui/chat/index.vue +++ b/src/client/ui/chat/index.vue @@ -150,6 +150,7 @@ import { router } from '@/router'; import { sidebarDef } from '@/sidebar'; import { search } from '@/scripts/search'; import copyToClipboard from '@/scripts/copy-to-clipboard'; +import { store } from './store'; export default defineComponent({ components: { @@ -189,7 +190,7 @@ export default defineComponent({ data() { return { - tl: 'home', + tl: store.state.tl, lists: null, antennas: null, followedChannels: null, @@ -236,6 +237,7 @@ export default defineComponent({ this.currentChannel = channel; }); } + store.set('tl', this.tl); }, { immediate: true }); }, diff --git a/src/client/ui/chat/store.ts b/src/client/ui/chat/store.ts index a869debd61..389d56afb6 100644 --- a/src/client/ui/chat/store.ts +++ b/src/client/ui/chat/store.ts @@ -10,4 +10,8 @@ export const store = markRaw(new Storage('chatUi', { data: Record; }[] }, + tl: { + where: 'deviceAccount', + default: 'home' + }, })); diff --git a/src/client/ui/chat/widgets.vue b/src/client/ui/chat/widgets.vue index 6becaa22e3..6b12f9dac9 100644 --- a/src/client/ui/chat/widgets.vue +++ b/src/client/ui/chat/widgets.vue @@ -10,7 +10,7 @@ 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; -- cgit v1.2.3-freya From 3fa1d2bfc0aff0c94fd299f79e5e072161697bf3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 21 Feb 2021 13:38:03 +0900 Subject: fix for lint --- src/client/scripts/paging.ts | 2 -- src/server/api/stream/channels/messaging.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index a8f122412c..6e3da94124 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -192,8 +192,6 @@ export default (opts) => ({ this.items = this.items.slice(-opts.displayLimit); this.more = true; } - } else { - } this.items.push(item); // TODO diff --git a/src/server/api/stream/channels/messaging.ts b/src/server/api/stream/channels/messaging.ts index 7279da3ece..4c41dc820b 100644 --- a/src/server/api/stream/channels/messaging.ts +++ b/src/server/api/stream/channels/messaging.ts @@ -98,7 +98,7 @@ export default class extends Channel { @autobind public dispose() { this.subscriber.off(this.subCh, this.onEvent); - + clearInterval(this.emitTypersIntervalId); } } -- cgit v1.2.3-freya