Update profile.vue

This commit is contained in:
syuilo 2025-02-22 21:03:41 +09:00
parent 4192d8b3c7
commit afc481d3db
1 changed files with 150 additions and 99 deletions

View File

@ -4,6 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
--> -->
<template> <template>
<SearchMarker path="/settings/profile" :label="i18n.ts.profile" :keywords="['profile']" icon="ti ti-user">
<div class="_gaps_m"> <div class="_gaps_m">
<div class="_panel"> <div class="_panel">
<div :class="$style.banner" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }"> <div :class="$style.banner" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
@ -18,34 +19,59 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</div> </div>
<SearchMarker> <SearchMarker
:label="i18n.ts._profile.name"
:keywords="['name']"
>
<MkInput v-model="profile.name" :max="30" manualSave :mfmAutocomplete="['emoji']"> <MkInput v-model="profile.name" :max="30" manualSave :mfmAutocomplete="['emoji']">
<template #label>{{ i18n.ts._profile.name }}</template> <template #label>{{ i18n.ts._profile.name }}</template>
</MkInput> </MkInput>
</SearchMarker> </SearchMarker>
<SearchMarker> <SearchMarker
:label="i18n.ts._profile.description"
:keywords="['description', 'bio']"
>
<MkTextarea v-model="profile.description" :max="500" tall manualSave mfmAutocomplete :mfmPreview="true"> <MkTextarea v-model="profile.description" :max="500" tall manualSave mfmAutocomplete :mfmPreview="true">
<template #label>{{ i18n.ts._profile.description }}</template> <template #label>{{ i18n.ts._profile.description }}</template>
<template #caption>{{ i18n.ts._profile.youCanIncludeHashtags }}</template> <template #caption>{{ i18n.ts._profile.youCanIncludeHashtags }}</template>
</MkTextarea> </MkTextarea>
</SearchMarker> </SearchMarker>
<SearchMarker
:label="i18n.ts.location"
:keywords="['location', 'locale']"
>
<MkInput v-model="profile.location" manualSave> <MkInput v-model="profile.location" manualSave>
<template #label>{{ i18n.ts.location }}</template> <template #label>{{ i18n.ts.location }}</template>
<template #prefix><i class="ti ti-map-pin"></i></template> <template #prefix><i class="ti ti-map-pin"></i></template>
</MkInput> </MkInput>
</SearchMarker>
<SearchMarker
:label="i18n.ts.birthday"
:keywords="['birthday', 'birthdate', 'age']"
>
<MkInput v-model="profile.birthday" type="date" manualSave> <MkInput v-model="profile.birthday" type="date" manualSave>
<template #label>{{ i18n.ts.birthday }}</template> <template #label>{{ i18n.ts.birthday }}</template>
<template #prefix><i class="ti ti-cake"></i></template> <template #prefix><i class="ti ti-cake"></i></template>
</MkInput> </MkInput>
</SearchMarker>
<SearchMarker
:label="i18n.ts.language"
:keywords="['language', 'locale']"
>
<MkSelect v-model="profile.lang"> <MkSelect v-model="profile.lang">
<template #label>{{ i18n.ts.language }}</template> <template #label>{{ i18n.ts.language }}</template>
<option v-for="x in Object.keys(langmap)" :key="x" :value="x">{{ langmap[x].nativeName }}</option> <option v-for="x in Object.keys(langmap)" :key="x" :value="x">{{ langmap[x].nativeName }}</option>
</MkSelect> </MkSelect>
</SearchMarker>
<SearchMarker
:label="i18n.ts._profile.metadataEdit"
:keywords="['metadata']"
>
<FormSlot> <FormSlot>
<MkFolder> <MkFolder>
<template #icon><i class="ti ti-list"></i></template> <template #icon><i class="ti ti-list"></i></template>
@ -90,7 +116,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkFolder> </MkFolder>
<template #caption>{{ i18n.ts._profile.metadataDescription }}</template> <template #caption>{{ i18n.ts._profile.metadataDescription }}</template>
</FormSlot> </FormSlot>
</SearchMarker>
<SearchMarker
:label="i18n.ts._profile.followedMessage"
:keywords="['follow', 'message', i18n.ts._profile.followedMessageDescription]"
>
<MkInput v-model="profile.followedMessage" :max="200" manualSave :mfmPreview="false"> <MkInput v-model="profile.followedMessage" :max="200" manualSave :mfmPreview="false">
<template #label>{{ i18n.ts._profile.followedMessage }}<span class="_beta">{{ i18n.ts.beta }}</span></template> <template #label>{{ i18n.ts._profile.followedMessage }}<span class="_beta">{{ i18n.ts.beta }}</span></template>
<template #caption> <template #caption>
@ -98,7 +129,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<div>{{ i18n.ts._profile.followedMessageDescriptionForLockedAccount }}</div> <div>{{ i18n.ts._profile.followedMessageDescriptionForLockedAccount }}</div>
</template> </template>
</MkInput> </MkInput>
</SearchMarker>
<SearchMarker
:label="i18n.ts.reactionAcceptance"
:keywords="['reaction']"
>
<MkSelect v-model="reactionAcceptance"> <MkSelect v-model="reactionAcceptance">
<template #label>{{ i18n.ts.reactionAcceptance }}</template> <template #label>{{ i18n.ts.reactionAcceptance }}</template>
<option :value="null">{{ i18n.ts.all }}</option> <option :value="null">{{ i18n.ts.all }}</option>
@ -107,16 +143,31 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="nonSensitiveOnlyForLocalLikeOnlyForRemote">{{ i18n.ts.nonSensitiveOnlyForLocalLikeOnlyForRemote }}</option> <option value="nonSensitiveOnlyForLocalLikeOnlyForRemote">{{ i18n.ts.nonSensitiveOnlyForLocalLikeOnlyForRemote }}</option>
<option value="likeOnly">{{ i18n.ts.likeOnly }}</option> <option value="likeOnly">{{ i18n.ts.likeOnly }}</option>
</MkSelect> </MkSelect>
</SearchMarker>
<SearchMarker :label="i18n.ts.advancedSettings">
<MkFolder> <MkFolder>
<template #label>{{ i18n.ts.advancedSettings }}</template> <template #label>{{ i18n.ts.advancedSettings }}</template>
<div class="_gaps_m"> <div class="_gaps_m">
<SearchMarker
:label="i18n.ts.flagAsCat"
:keywords="['cat', i18n.ts.flagAsCatDescription]"
>
<MkSwitch v-model="profile.isCat">{{ i18n.ts.flagAsCat }}<template #caption>{{ i18n.ts.flagAsCatDescription }}</template></MkSwitch> <MkSwitch v-model="profile.isCat">{{ i18n.ts.flagAsCat }}<template #caption>{{ i18n.ts.flagAsCatDescription }}</template></MkSwitch>
</SearchMarker>
<SearchMarker
:label="i18n.ts.flagAsBot"
:keywords="['bot', i18n.ts.flagAsBotDescription]"
>
<MkSwitch v-model="profile.isBot">{{ i18n.ts.flagAsBot }}<template #caption>{{ i18n.ts.flagAsBotDescription }}</template></MkSwitch> <MkSwitch v-model="profile.isBot">{{ i18n.ts.flagAsBot }}<template #caption>{{ i18n.ts.flagAsBotDescription }}</template></MkSwitch>
</SearchMarker>
</div> </div>
</MkFolder> </MkFolder>
</SearchMarker>
</div> </div>
</SearchMarker>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>