From eda2f587a389ecc67642b855c70d7aa65b41a38b Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Wed, 16 Apr 2025 16:47:03 +0900
Subject: enhance: コントロールパネルでジョブキューをクリアできるように
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/frontend/src/pages/admin/queue.vue | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'packages/frontend/src/pages/admin/queue.vue')

diff --git a/packages/frontend/src/pages/admin/queue.vue b/packages/frontend/src/pages/admin/queue.vue
index b5aee1e51e..ee56c258c9 100644
--- a/packages/frontend/src/pages/admin/queue.vue
+++ b/packages/frontend/src/pages/admin/queue.vue
@@ -10,14 +10,16 @@ SPDX-License-Identifier: AGPL-3.0-only
 		<XQueue v-if="tab === 'deliver'" domain="deliver"/>
 		<XQueue v-else-if="tab === 'inbox'" domain="inbox"/>
 		<br>
-		<MkButton @click="promoteAllQueues"><i class="ti ti-reload"></i> {{ i18n.ts.retryAllQueuesNow }}</MkButton>
+		<div class="_buttons">
+			<MkButton @click="promoteAllQueues"><i class="ti ti-reload"></i> {{ i18n.ts.retryAllQueuesNow }}</MkButton>
+			<MkButton danger @click="clear"><i class="ti ti-trash"></i> {{ i18n.ts.clearQueue }}</MkButton>
+		</div>
 	</MkSpacer>
 </MkStickyContainer>
 </template>
 
 <script lang="ts" setup>
 import { ref, computed } from 'vue';
-import * as config from '@@/js/config.js';
 import XQueue from './queue.chart.vue';
 import XHeader from './_header_.vue';
 import type { Ref } from 'vue';
@@ -38,7 +40,7 @@ function clear() {
 	}).then(({ canceled }) => {
 		if (canceled) return;
 
-		os.apiWithDialog('admin/queue/clear');
+		os.apiWithDialog('admin/queue/clear', { type: tab.value, state: '*' });
 	});
 }
 
-- 
cgit v1.2.3-freya

