mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +00:00
improve search for some of our settings
* each `SearchMarker` can have at most 1 `SearchLabel` inside * `SearcMarker`+`MkFolder` need some attributes to play together
This commit is contained in:
parent
dd95d4a2d6
commit
8b9e789895
3 changed files with 43 additions and 35 deletions
|
@ -196,8 +196,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['pinned', 'list']">
|
||||
<MkFolder>
|
||||
<SearchMarker v-slot="slotProps" :keywords="['pinned', 'list']">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.pinnedList }}</SearchLabel></template>
|
||||
<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ -->
|
||||
<MkButton v-if="prefer.r.pinnedUserLists.value.length === 0" @click="setPinnedList()">{{ i18n.ts.add }}</MkButton>
|
||||
|
@ -436,9 +436,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
</div>
|
||||
|
||||
<SearchMarker :keywords="['default', 'note', 'visibility']">
|
||||
<SearchMarker v-slot="slotProps" :keywords="['default', 'note', 'visibility']">
|
||||
<MkDisableSection :disabled="rememberNoteVisibility">
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
|
||||
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
|
||||
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
|
||||
|
@ -850,24 +850,28 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['boost', 'show', 'visib', 'selector']">
|
||||
<SearchMarker v-slot="slotProps" :keywords="['boost', 'show', 'visib', 'selector']">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.boostSettings }}</SearchLabel></template>
|
||||
<div class="_gaps_m">
|
||||
<MkPreferenceContainer k="showVisibilitySelectorOnBoost">
|
||||
<MkSwitch v-model="showVisibilitySelectorOnBoost">
|
||||
<template #label><SearchLabel>{{ i18n.ts.showVisibilitySelectorOnBoost }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.showVisibilitySelectorOnBoostDescription }}</template>
|
||||
</MkSwitch>
|
||||
</MkPreferenceContainer>
|
||||
<MkPreferenceContainer k="visibilityOnBoost">
|
||||
<MkSelect v-model="visibilityOnBoost">
|
||||
<template #label><SearchLabel>{{ i18n.ts.visibilityOnBoost }}</SearchLabel></template>
|
||||
<option value="public">{{ i18n.ts._visibility['public'] }}</option>
|
||||
<option value="home">{{ i18n.ts._visibility['home'] }}</option>
|
||||
<option value="followers">{{ i18n.ts._visibility['followers'] }}</option>
|
||||
</MkSelect>
|
||||
</MkPreferenceContainer>
|
||||
<SearchMarker :keywords="['boost', 'show', 'visib', 'selector']">
|
||||
<MkPreferenceContainer k="showVisibilitySelectorOnBoost">
|
||||
<MkSwitch v-model="showVisibilitySelectorOnBoost">
|
||||
<template #label><SearchLabel>{{ i18n.ts.showVisibilitySelectorOnBoost }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.showVisibilitySelectorOnBoostDescription }}</template>
|
||||
</MkSwitch>
|
||||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
<SearchMarker :keywords="['boost', 'visib']">
|
||||
<MkPreferenceContainer k="visibilityOnBoost">
|
||||
<MkSelect v-model="visibilityOnBoost">
|
||||
<template #label><SearchLabel>{{ i18n.ts.visibilityOnBoost }}</SearchLabel></template>
|
||||
<option value="public">{{ i18n.ts._visibility['public'] }}</option>
|
||||
<option value="home">{{ i18n.ts._visibility['home'] }}</option>
|
||||
<option value="followers">{{ i18n.ts._visibility['followers'] }}</option>
|
||||
</MkSelect>
|
||||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
@ -899,8 +903,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['emoji', 'dictionary', 'additional', 'extra']">
|
||||
<MkFolder>
|
||||
<SearchMarker v-slot="slotProps" :keywords="['emoji', 'dictionary', 'additional', 'extra']">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.additionalEmojiDictionary }}</SearchLabel></template>
|
||||
<div class="_buttons">
|
||||
<template v-for="lang in emojiIndexLangs" :key="lang">
|
||||
|
|
|
@ -203,19 +203,21 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</FormSlot>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['federate', 'auth', 'fetch']">
|
||||
<MkFolder v-if="instance.federation !== 'none'">
|
||||
<SearchMarker v-slot="slotProps" :keywords="['federate', 'auth', 'fetch']">
|
||||
<MkFolder v-if="instance.federation !== 'none'" :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.authorizedFetchSection }}</SearchLabel></template>
|
||||
<template #suffix>{{ computedAllowUnsignedFetch !== 'always' ? i18n.ts.enabled : i18n.ts.disabled }}</template>
|
||||
|
||||
<MkRadios v-model="allowUnsignedFetch" @update:modelValue="save()">
|
||||
<template #label><SearchLabel>{{ i18n.ts.authorizedFetchLabel }}</SearchLabel></template>
|
||||
<template #caption><SearchKeyword>{{ i18n.ts.authorizedFetchDescription }}</SearchKeyword></template>
|
||||
<option value="never">{{ i18n.ts._authorizedFetchValue.never }} - {{ i18n.ts._authorizedFetchValueDescription.never }}</option>
|
||||
<option value="always">{{ i18n.ts._authorizedFetchValue.always }} - {{ i18n.ts._authorizedFetchValueDescription.always }}</option>
|
||||
<option value="essential">{{ i18n.ts._authorizedFetchValue.essential }} - {{ i18n.ts._authorizedFetchValueDescription.essential }}</option>
|
||||
<option value="staff">{{ i18n.ts._authorizedFetchValue.staff }} - {{ i18n.tsx._authorizedFetchValueDescription.staff({ value: i18n.ts._authorizedFetchValue[instance.allowUnsignedFetch] }) }}</option>
|
||||
</MkRadios>
|
||||
<SearchMarker :keywords="['federate', 'auth', 'fetch']">
|
||||
<MkRadios v-model="allowUnsignedFetch" @update:modelValue="save()">
|
||||
<template #label><SearchLabel>{{ i18n.ts.authorizedFetchLabel }}</SearchLabel></template>
|
||||
<template #caption><SearchKeyword>{{ i18n.ts.authorizedFetchDescription }}</SearchKeyword></template>
|
||||
<option value="never">{{ i18n.ts._authorizedFetchValue.never }} - {{ i18n.ts._authorizedFetchValueDescription.never }}</option>
|
||||
<option value="always">{{ i18n.ts._authorizedFetchValue.always }} - {{ i18n.ts._authorizedFetchValueDescription.always }}</option>
|
||||
<option value="essential">{{ i18n.ts._authorizedFetchValue.essential }} - {{ i18n.ts._authorizedFetchValueDescription.essential }}</option>
|
||||
<option value="staff">{{ i18n.ts._authorizedFetchValue.staff }} - {{ i18n.tsx._authorizedFetchValueDescription.staff({ value: i18n.ts._authorizedFetchValue[instance.allowUnsignedFetch] }) }}</option>
|
||||
</MkRadios>
|
||||
</SearchMarker>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkSelect>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['metadata']">
|
||||
<SearchMarker v-slot="slotProps" :keywords="['metadata']">
|
||||
<FormSlot>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ti ti-list"></i></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts._profile.metadataEdit }}</SearchLabel></template>
|
||||
<template #footer>
|
||||
|
@ -139,8 +139,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkSelect>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker>
|
||||
<MkFolder>
|
||||
<SearchMarker v-slot="slotProps">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #label><SearchLabel>{{ i18n.ts.advancedSettings }}</SearchLabel></template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
|
@ -149,6 +149,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label><SearchLabel>{{ i18n.ts.flagAsCat }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.flagAsCatDescription }}</template>
|
||||
</MkSwitch>
|
||||
</SearchMarker>
|
||||
<SearchMarker :keywords="['cat']">
|
||||
<MkSwitch v-if="profile.isCat" v-model="profile.speakAsCat">
|
||||
<template #label><SearchLabel>{{ i18n.ts.flagSpeakAsCat }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.flagSpeakAsCatDescription }}</template>
|
||||
|
|
Loading…
Add table
Reference in a new issue