fix fill out profile step of tutorial

This commit is contained in:
ThatOneCalculator 2022-11-14 17:45:11 -08:00
parent fa389fbb08
commit a5780a7319
3 changed files with 23 additions and 11 deletions

View file

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.119.0-calc.13-rc.3",
"version": "12.119.0-calc.13-rc.4",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -33,9 +33,8 @@
<h3>{{ i18n.ts._tutorial.step2_1 }}</h3>
<div>{{ i18n.ts._tutorial.step2_2 }}</div>
<br/>
<XSettings/>
<XSettings :save-button="true"/>
<br/>
<MkButton class="ok" primary @click="tutorial++"><i class="ph-check-bold ph-lg"></i> {{ i18n.ts.next }}</MkButton>
</div>
<div v-else-if="tutorial === 2" key="3" class="_content">
<h3>{{ i18n.ts._tutorial.step3_1 }}</h3>

View file

@ -1,5 +1,9 @@
<template>
<div class="_formRoot">
<div v-if="saveButton == true">
<MkButton primary rounded @click="save">{{ i18n.ts.save }}</MkButton>
</div>
<br/>
<div class="llvierxe" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
<div class="avatar">
<MkAvatar class="avatar" :user="$i" :disable-link="true" @click="changeAvatar"/>
@ -56,6 +60,9 @@
<FormSwitch v-model="profile.isCat" class="_formBlock">{{ i18n.ts.flagAsCat }}<template #caption>{{ i18n.ts.flagAsCatDescription }}</template></FormSwitch>
<FormSwitch v-model="profile.showTimelineReplies" class="_formBlock">{{ i18n.ts.flagShowTimelineReplies }}<template #caption>{{ i18n.ts.flagShowTimelineRepliesDescription }} {{ i18n.ts.reflectMayTakeTime }}</template></FormSwitch>
<FormSwitch v-model="profile.isBot" class="_formBlock">{{ i18n.ts.flagAsBot }}<template #caption>{{ i18n.ts.flagAsBotDescription }}</template></FormSwitch>
<div v-if="saveButton == true">
<MkButton primary rounded @click="save">{{ i18n.ts.save }}</MkButton>
</div>
</div>
</template>
@ -78,16 +85,22 @@ import { langmap } from '@/scripts/langmap';
import { definePageMetadata } from '@/scripts/page-metadata';
const profile = reactive({
name: $i.name,
description: $i.description,
location: $i.location,
birthday: $i.birthday,
lang: $i.lang,
isBot: $i.isBot,
isCat: $i.isCat,
showTimelineReplies: $i.showTimelineReplies,
name: $i?.name,
description: $i?.description,
location: $i?.location,
birthday: $i?.birthday,
lang: $i?.lang,
isBot: $i?.isBot,
isCat: $i?.isCat,
showTimelineReplies: $i?.showTimelineReplies,
});
const props = withDefaults(defineProps<{
saveButton?: boolean,
}>(), {});
let saveButton = $ref(props.saveButton ?? false);
watch(() => profile, () => {
save();
}, {