1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-23 19:18:44 +09:00
MisskeyIO/packages/frontend/src/pages/admin/queue.vue

57 lines
1.3 KiB
Vue
Raw Normal View History

<template>
<MkStickyContainer>
2022-06-25 23:01:40 +09:00
<template #header><XHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800">
2022-06-25 23:01:40 +09:00
<XQueue v-if="tab === 'deliver'" domain="deliver"/>
<XQueue v-else-if="tab === 'inbox'" domain="inbox"/>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
import { markRaw, onMounted, onBeforeUnmount, nextTick } from 'vue';
import XQueue from './queue.chart.vue';
import XHeader from './_header_.vue';
import MkButton from '@/components/MkButton.vue';
2021-11-12 02:02:25 +09:00
import * as os from '@/os';
2022-03-19 19:08:55 +09:00
import * as config from '@/config';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
2022-06-25 23:01:40 +09:00
let tab = $ref('deliver');
function clear() {
os.confirm({
type: 'warning',
title: i18n.ts.clearQueueConfirmTitle,
text: i18n.ts.clearQueueConfirmText,
}).then(({ canceled }) => {
if (canceled) return;
os.apiWithDialog('admin/queue/clear');
});
}
const headerActions = $computed(() => [{
asFullButton: true,
2022-12-20 15:24:31 +09:00
icon: 'ti ti-external-link',
text: i18n.ts.dashboard,
handler: () => {
window.open(config.url + '/queue', '_blank');
},
}]);
2022-06-25 23:01:40 +09:00
const headerTabs = $computed(() => [{
key: 'deliver',
title: 'Deliver',
}, {
key: 'inbox',
title: 'Inbox',
}]);
definePageMetadata({
title: i18n.ts.jobQueue,
2022-12-20 15:15:34 +09:00
icon: 'ti ti-clock-play',
});
</script>