1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-05 03:05:52 +02:00
This commit is contained in:
syuilo
2025-08-26 13:34:41 +09:00
parent eb9915baf8
commit d6a1046361
41 changed files with 289 additions and 140 deletions

View File

@@ -52,7 +52,7 @@ export async function lookupUserByEmail() {
const user = await os.apiWithDialog('admin/accounts/find-by-email', { email: result });
os.pageWindow(`/admin/user/${user.id}`);
} catch (err) {
} catch (err: any) {
if (err.code === 'USER_NOT_FOUND') {
os.alert({
type: 'error',

View File

@@ -10,7 +10,7 @@ export const chartLegend = (legend: InstanceType<typeof MkChartLegend>) => ({
id: 'htmlLegend',
afterUpdate(chart, args, options) {
// Reuse the built-in legendItems generator
const items = chart.options.plugins.legend.labels.generateLabels(chart);
const items = chart.options.plugins!.legend!.labels!.generateLabels!(chart);
legend.update(chart, items);
},

View File

@@ -27,7 +27,7 @@ export async function load() {
scope: ['clickerGame'],
key: 'saveData',
});
} catch (err) {
} catch (err: any) {
if (err.code === 'NO_SUCH_KEY') {
saveData.value = {
gameVersion: 2,
@@ -43,20 +43,6 @@ export async function load() {
}
throw err;
}
// migration
if (saveData.value.gameVersion === 1) {
saveData.value = {
gameVersion: 2,
cookies: saveData.value.cookies,
totalCookies: saveData.value.cookies,
totalHandmadeCookies: saveData.value.cookies,
clicked: saveData.value.clicked,
achievements: [],
facilities: [],
};
save();
}
}
export async function save() {

View File

@@ -39,7 +39,7 @@ export async function getNoteClipMenu(props: {
}
}
const appearNote = getAppearNote(props.note);
const appearNote = getAppearNote(props.note) ?? props.note;
const clips = await clipsCache.fetch();
const menu: MenuItem[] = [...clips.map(clip => ({