mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-02-14 05:02:42 +00:00
refactor: update to Svelte 5 preview
feat: add charrecorder feat: dynamic os layouts for CC1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { share } from "$lib/share";
|
||||
import tippy from "tippy.js";
|
||||
import { setContext } from "svelte";
|
||||
import { mount, setContext, unmount } from "svelte";
|
||||
import Layout from "$lib/components/layout/Layout.svelte";
|
||||
import { charaFileToUriComponent } from "$lib/share/share-url";
|
||||
import SharePopup from "../SharePopup.svelte";
|
||||
@@ -25,17 +25,17 @@
|
||||
}),
|
||||
);
|
||||
await navigator.clipboard.writeText(url.toString());
|
||||
let shareComponent: SharePopup;
|
||||
let shareComponent: {};
|
||||
tippy(event.target as HTMLElement, {
|
||||
onCreate(instance) {
|
||||
const target = instance.popper.querySelector(".tippy-content")!;
|
||||
shareComponent = new SharePopup({ target });
|
||||
shareComponent = mount(SharePopup, { target });
|
||||
},
|
||||
onHidden(instance) {
|
||||
instance.destroy();
|
||||
},
|
||||
onDestroy() {
|
||||
shareComponent.$destroy();
|
||||
unmount(shareComponent);
|
||||
},
|
||||
}).show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user