summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkPaginationControl.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-06-28 21:38:54 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-06-28 21:38:54 +0900
commit3c6f07fc8cccdcbbd1826ec42e34c423cf433105 (patch)
treeeab19a341585a5abb7b84c0eadffec85b10b5590 /packages/frontend/src/components/MkPaginationControl.vue
parentenhance(frontend): improve modlog pagination (diff)
downloadmisskey-3c6f07fc8cccdcbbd1826ec42e34c423cf433105.tar.gz
misskey-3c6f07fc8cccdcbbd1826ec42e34c423cf433105.tar.bz2
misskey-3c6f07fc8cccdcbbd1826ec42e34c423cf433105.zip
feat: モデログを検索できるように
Diffstat (limited to 'packages/frontend/src/components/MkPaginationControl.vue')
-rw-r--r--packages/frontend/src/components/MkPaginationControl.vue18
1 files changed, 16 insertions, 2 deletions
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,13 +9,23 @@ 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"
:modelValue="formatDateTimeString(new Date(date), 'yyyy-MM-dd')"
@@ -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>