user's own doll color scheme in neko

This commit is contained in:
2026-03-09 19:04:53 +08:00
parent d582ea7fe8
commit 02f1119254
4 changed files with 36 additions and 4 deletions

View File

@@ -8,6 +8,9 @@ export const commands = {
async getAppData() : Promise<UserData> {
return await TAURI_INVOKE("get_app_data");
},
async getActiveDollColorScheme() : Promise<DollColorSchemeDto | null> {
return await TAURI_INVOKE("get_active_doll_color_scheme");
},
async refreshAppData() : Promise<UserData> {
return await TAURI_INVOKE("refresh_app_data");
},

View File

@@ -15,8 +15,12 @@
let spriteUrl = $state("");
$effect(() => {
getSpriteSheetUrl().then((url) => {
spriteUrl = url;
$appData;
if (!$appData) return;
commands.getActiveDollColorScheme().then((colorScheme) => {
getSpriteSheetUrl(colorScheme ?? undefined).then((url) => {
spriteUrl = url;
});
});
});
</script>