user's own doll color scheme in neko
This commit is contained in:
@@ -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");
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user