summaryrefslogtreecommitdiff
path: root/packages/client/src/pages/admin/queue.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-06-20 17:38:49 +0900
committerGitHub <noreply@github.com>2022-06-20 17:38:49 +0900
commit699f24f3dcdb156838eb70602885c0b2cdd02cbc (patch)
tree45b28eeadbb7d9e7f3847bd04f75ed010153619a /packages/client/src/pages/admin/queue.vue
parentrefactor: チャットルームをComposition API化 (#8850) (diff)
downloadmisskey-699f24f3dcdb156838eb70602885c0b2cdd02cbc.tar.gz
misskey-699f24f3dcdb156838eb70602885c0b2cdd02cbc.tar.bz2
misskey-699f24f3dcdb156838eb70602885c0b2cdd02cbc.zip
refactor(client): Refine routing (#8846)
Diffstat (limited to 'packages/client/src/pages/admin/queue.vue')
-rw-r--r--packages/client/src/pages/admin/queue.vue57
1 files changed, 31 insertions, 26 deletions
diff --git a/packages/client/src/pages/admin/queue.vue b/packages/client/src/pages/admin/queue.vue
index 656b18199f..c2865525ab 100644
--- a/packages/client/src/pages/admin/queue.vue
+++ b/packages/client/src/pages/admin/queue.vue
@@ -1,24 +1,28 @@
<template>
-<MkSpacer :content-max="800">
- <XQueue :connection="connection" domain="inbox">
- <template #title>In</template>
- </XQueue>
- <XQueue :connection="connection" domain="deliver">
- <template #title>Out</template>
- </XQueue>
- <MkButton danger @click="clear()"><i class="fas fa-trash-alt"></i> {{ i18n.ts.clearQueue }}</MkButton>
-</MkSpacer>
+<MkStickyContainer>
+ <template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template>
+ <MkSpacer :content-max="800">
+ <XQueue :connection="connection" domain="inbox">
+ <template #title>In</template>
+ </XQueue>
+ <XQueue :connection="connection" domain="deliver">
+ <template #title>Out</template>
+ </XQueue>
+ <MkButton danger @click="clear()"><i class="fas fa-trash-alt"></i> {{ i18n.ts.clearQueue }}</MkButton>
+ </MkSpacer>
+</MkStickyContainer>
</template>
<script lang="ts" setup>
import { markRaw, onMounted, onBeforeUnmount, nextTick } from 'vue';
-import MkButton from '@/components/ui/button.vue';
import XQueue from './queue.chart.vue';
+import XHeader from './_header_.vue';
+import MkButton from '@/components/ui/button.vue';
import * as os from '@/os';
import { stream } from '@/stream';
-import * as symbols from '@/symbols';
import * as config from '@/config';
import { i18n } from '@/i18n';
+import { definePageMetadata } from '@/scripts/page-metadata';
const connection = markRaw(stream.useChannel('queueStats'));
@@ -38,7 +42,7 @@ onMounted(() => {
nextTick(() => {
connection.send('requestLog', {
id: Math.random().toString().substr(2, 8),
- length: 200
+ length: 200,
});
});
});
@@ -47,19 +51,20 @@ onBeforeUnmount(() => {
connection.dispose();
});
-defineExpose({
- [symbols.PAGE_INFO]: {
- title: i18n.ts.jobQueue,
- icon: 'fas fa-clipboard-list',
- bg: 'var(--bg)',
- actions: [{
- asFullButton: true,
- icon: 'fas fa-up-right-from-square',
- text: i18n.ts.dashboard,
- handler: () => {
- window.open(config.url + '/queue', '_blank');
- },
- }],
- }
+const headerActions = $computed(() => [{
+ asFullButton: true,
+ icon: 'fas fa-up-right-from-square',
+ text: i18n.ts.dashboard,
+ handler: () => {
+ window.open(config.url + '/queue', '_blank');
+ },
+}]);
+
+const headerTabs = $computed(() => []);
+
+definePageMetadata({
+ title: i18n.ts.jobQueue,
+ icon: 'fas fa-clipboard-list',
+ bg: 'var(--bg)',
});
</script>