merge: upstream
This commit is contained in:
parent
34b4646b9f
commit
6a94a52131
60 changed files with 741 additions and 190 deletions
|
|
@ -132,6 +132,7 @@ import { langmap } from '@/scripts/langmap.js';
|
|||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
|
||||
|
|
@ -158,7 +159,7 @@ const profile = reactive({
|
|||
lang: $i.lang,
|
||||
isBot: $i.isBot ?? false,
|
||||
isCat: $i.isCat ?? false,
|
||||
speakAsCat: $i.speakAsCat,
|
||||
speakAsCat: $i.speakAsCat ?? false,
|
||||
});
|
||||
|
||||
watch(() => profile, () => {
|
||||
|
|
@ -190,6 +191,7 @@ function saveFields() {
|
|||
os.apiWithDialog('i/update', {
|
||||
fields: fields.value.filter(field => field.name !== '' && field.value !== '').map(field => ({ name: field.name, value: field.value })),
|
||||
});
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
|
@ -217,6 +219,7 @@ function save() {
|
|||
isCat: !!profile.isCat,
|
||||
speakAsCat: !!profile.speakAsCat,
|
||||
});
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
claimAchievement('profileFilled');
|
||||
if (profile.name === 'syuilo' || profile.name === 'しゅいろ') {
|
||||
claimAchievement('setNameToSyuilo');
|
||||
|
|
@ -248,6 +251,7 @@ function changeAvatar(ev) {
|
|||
});
|
||||
$i.avatarId = i.avatarId;
|
||||
$i.avatarUrl = i.avatarUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
claimAchievement('profileFilled');
|
||||
});
|
||||
}
|
||||
|
|
@ -278,6 +282,7 @@ function changeBanner(ev) {
|
|||
});
|
||||
$i.bannerId = i.bannerId;
|
||||
$i.bannerUrl = i.bannerUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
});
|
||||
},
|
||||
}, {
|
||||
|
|
@ -288,6 +293,7 @@ function changeBanner(ev) {
|
|||
});
|
||||
$i.bannerId = i.bannerId;
|
||||
$i.bannerUrl = i.bannerUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
},
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
} else {
|
||||
|
|
@ -312,6 +318,7 @@ function changeBanner(ev) {
|
|||
});
|
||||
$i.bannerId = i.bannerId;
|
||||
$i.bannerUrl = i.bannerUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -342,6 +349,7 @@ function changeBackground(ev) {
|
|||
});
|
||||
$i.backgroundId = i.backgroundId;
|
||||
$i.backgroundUrl = i.backgroundUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
});
|
||||
},
|
||||
}, {
|
||||
|
|
@ -352,6 +360,7 @@ function changeBackground(ev) {
|
|||
});
|
||||
$i.backgroundId = i.backgroundId;
|
||||
$i.backgroundUrl = i.backgroundUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
},
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
} else {
|
||||
|
|
@ -376,6 +385,7 @@ function changeBackground(ev) {
|
|||
});
|
||||
$i.backgroundId = i.backgroundId;
|
||||
$i.backgroundUrl = i.backgroundUrl;
|
||||
globalEvents.emit('requestClearPageCache');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue