Migrate to svelte 5
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { get } from "svelte/store";
|
||||
import { exportCharacterCard } from "./characterCards";
|
||||
import { VirtualWriter, isTauri, openURL } from "./storage/globalApi";
|
||||
import { sleep } from "./util";
|
||||
import { CurrentCharacter } from "./stores";
|
||||
import { DataBase, type character } from "./storage/database";
|
||||
import { DataBase, getCurrentCharacter, type character } from "./storage/database";
|
||||
import { alertStore } from "./alert";
|
||||
|
||||
let pong = false;
|
||||
@@ -17,7 +15,7 @@ window.addEventListener("message", (event) => {
|
||||
});
|
||||
|
||||
export async function shareRealmCardData():Promise<{ name: ArrayBuffer; data: ArrayBuffer; }> {
|
||||
const char = structuredClone(get(CurrentCharacter)) as character
|
||||
const char = structuredClone(getCurrentCharacter()) as character
|
||||
const trimedName = char.name.replace(/[^a-zA-Z0-9]/g, '') || 'character';
|
||||
const writer = new VirtualWriter()
|
||||
const namebuf = new TextEncoder().encode(trimedName + '.png')
|
||||
|
||||
Reference in New Issue
Block a user