mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 17:55:52 +02:00
feat: モデログを検索できるように
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user