refactor components

This commit is contained in:
syuilo 2021-09-30 00:50:45 +09:00
parent 0d3a36e519
commit 1ac1a968b9
179 changed files with 2611 additions and 2386 deletions

View file

@ -1,33 +1,33 @@
<template>
<FormBase>
<FormGroup>
<div class="_formItem _formPanel llvierxe" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
<div class="_debobigegoItem _debobigegoPanel llvierxe" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
<MkAvatar class="avatar" :user="$i"/>
</div>
<FormButton @click="changeAvatar" primary>{{ $ts._profile.changeAvatar }}</FormButton>
<FormButton @click="changeBanner" primary>{{ $ts._profile.changeBanner }}</FormButton>
</FormGroup>
<FormInput v-model:value="name" :max="30" manual-save>
<FormInput v-model="name" :max="30" manual-save>
<span>{{ $ts._profile.name }}</span>
</FormInput>
<FormTextarea v-model:value="description" :max="500" tall manual-save>
<FormTextarea v-model="description" :max="500" tall manual-save>
<span>{{ $ts._profile.description }}</span>
<template #desc>{{ $ts._profile.youCanIncludeHashtags }}</template>
</FormTextarea>
<FormInput v-model:value="location" manual-save>
<FormInput v-model="location" manual-save>
<span>{{ $ts.location }}</span>
<template #prefix><i class="fas fa-map-marker-alt"></i></template>
</FormInput>
<FormInput v-model:value="birthday" type="date" manual-save>
<FormInput v-model="birthday" type="date" manual-save>
<span>{{ $ts.birthday }}</span>
<template #prefix><i class="fas fa-birthday-cake"></i></template>
</FormInput>
<FormSelect v-model:value="lang">
<FormSelect v-model="lang">
<template #label>{{ $ts.language }}</template>
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
</FormSelect>
@ -37,23 +37,23 @@
<template #caption>{{ $ts._profile.metadataDescription }}</template>
</FormGroup>
<FormSwitch v-model:value="isCat">{{ $ts.flagAsCat }}<template #desc>{{ $ts.flagAsCatDescription }}</template></FormSwitch>
<FormSwitch v-model="isCat">{{ $ts.flagAsCat }}<template #desc>{{ $ts.flagAsCatDescription }}</template></FormSwitch>
<FormSwitch v-model:value="isBot">{{ $ts.flagAsBot }}<template #desc>{{ $ts.flagAsBotDescription }}</template></FormSwitch>
<FormSwitch v-model="isBot">{{ $ts.flagAsBot }}<template #desc>{{ $ts.flagAsBotDescription }}</template></FormSwitch>
<FormSwitch v-model:value="alwaysMarkNsfw">{{ $ts.alwaysMarkSensitive }}</FormSwitch>
<FormSwitch v-model="alwaysMarkNsfw">{{ $ts.alwaysMarkSensitive }}</FormSwitch>
</FormBase>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import FormButton from '@client/components/form/button.vue';
import FormInput from '@client/components/form/input.vue';
import FormTextarea from '@client/components/form/textarea.vue';
import FormSwitch from '@client/components/form/switch.vue';
import FormSelect from '@client/components/form/select.vue';
import FormBase from '@client/components/form/base.vue';
import FormGroup from '@client/components/form/group.vue';
import FormButton from '@client/components/debobigego/button.vue';
import FormInput from '@client/components/debobigego/input.vue';
import FormTextarea from '@client/components/debobigego/textarea.vue';
import FormSwitch from '@client/components/debobigego/switch.vue';
import FormSelect from '@client/components/debobigego/select.vue';
import FormBase from '@client/components/debobigego/base.vue';
import FormGroup from '@client/components/debobigego/group.vue';
import { host, langs } from '@client/config';
import { selectFile } from '@client/scripts/select-file';
import * as os from '@client/os';
@ -76,7 +76,8 @@ export default defineComponent({
return {
[symbols.PAGE_INFO]: {
title: this.$ts.profile,
icon: 'fas fa-user'
icon: 'fas fa-user',
bg: 'var(--bg)'
},
host,
langs,