From 3c6f07fc8cccdcbbd1826ec42e34c423cf433105 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Sat, 28 Jun 2025 21:38:54 +0900
Subject: feat: モデログを検索できるように
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../frontend/src/components/MkPaginationControl.vue    | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

(limited to 'packages/frontend/src/components/MkPaginationControl.vue')

diff --git a/packages/frontend/src/components/MkPaginationControl.vue b/packages/frontend/src/components/MkPaginationControl.vue
index ce19005504..8eab987d2a 100644
--- a/packages/frontend/src/components/MkPaginationControl.vue
+++ b/packages/frontend/src/components/MkPaginationControl.vue
@@ -9,12 +9,22 @@ SPDX-License-Identifier: AGPL-3.0-only
 		<MkSelect v-model="order" :class="$style.order" :items="[{ label: i18n.ts._order.newest, value: 'newest' }, { label: i18n.ts._order.oldest, value: 'oldest' }]">
 			<template #prefix><i class="ti ti-arrows-sort"></i></template>
 		</MkSelect>
-		<MkButton v-if="canSearch" v-tooltip="i18n.ts.search" iconOnly transparent rounded :active="search" @click="search = !search"><i class="ti ti-search"></i></MkButton>
+		<MkButton v-if="canSearch" v-tooltip="i18n.ts.search" iconOnly transparent rounded :active="searchOpened" @click="searchOpened = !searchOpened"><i class="ti ti-search"></i></MkButton>
 		<MkButton v-if="canFilter" v-tooltip="i18n.ts.filter" iconOnly transparent rounded :active="filterOpened" @click="filterOpened = !filterOpened"><i class="ti ti-filter"></i></MkButton>
 		<MkButton v-tooltip="i18n.ts.dateAndTime" iconOnly transparent rounded :active="date != null" @click="date = date == null ? Date.now() : null"><i class="ti ti-calendar-clock"></i></MkButton>
 		<MkButton v-tooltip="i18n.ts.reload" iconOnly transparent rounded @click="emit('reload')"><i class="ti ti-refresh"></i></MkButton>
 	</div>
 
+	<MkInput
+		v-if="searchOpened"
+		v-model="q"
+		type="search"
+		debounce
+	>
+		<template #label>{{ i18n.ts.search }}</template>
+		<template #prefix><i class="ti ti-search"></i></template>
+	</MkInput>
+
 	<MkInput
 		v-if="date != null"
 		type="date"
@@ -50,7 +60,7 @@ const emit = defineEmits<{
 	(ev: 'reload'): void;
 }>();
 
-const search = ref(false);
+const searchOpened = ref(false);
 const filterOpened = ref(props.filterOpened);
 
 const order = defineModel<'newest' | 'oldest'>('order', {
@@ -60,6 +70,10 @@ const order = defineModel<'newest' | 'oldest'>('order', {
 const date = defineModel<number | null>('date', {
 	default: null,
 });
+
+const q = defineModel<string | null>('q', {
+	default: null,
+});
 </script>
 
 <style lang="scss" module>
-- 
cgit v1.2.3-freya

