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