mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-17 18:52:06 +00:00
feat: report on unlinking progress
This commit is contained in:
@@ -76,9 +76,13 @@ function onUnloadClicked(zoneName: string) {
|
||||
}
|
||||
|
||||
webviewAddEventListener("zoneLoadProgress", (dto) => {
|
||||
console.log(dto);
|
||||
lastPercentage.value = dto.percentage;
|
||||
});
|
||||
|
||||
webviewAddEventListener("zoneUnlinkProgress", (dto) => {
|
||||
lastPercentage.value = dto.percentage;
|
||||
console.log("unlink", dto);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
export interface ZoneUnlinkProgressDto {
|
||||
zoneName: string;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface UnlinkingBinds {
|
||||
unlinkZone(zoneName: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface UnlinkingEventMap {
|
||||
zoneUnlinkProgress: ZoneUnlinkProgressDto;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { DialogBinds } from "./DialogBinds";
|
||||
import type { UnlinkingBinds } from "./UnlinkingBinds";
|
||||
import type { UnlinkingBinds, UnlinkingEventMap } from "./UnlinkingBinds";
|
||||
import type { ZoneBinds, ZoneEventMap } from "./ZoneBinds";
|
||||
|
||||
export type NativeMethods = DialogBinds & UnlinkingBinds & ZoneBinds;
|
||||
|
||||
type NativeEventMap = ZoneEventMap;
|
||||
type NativeEventMap = UnlinkingEventMap & ZoneEventMap;
|
||||
|
||||
type WebViewExtensions = {
|
||||
webviewBinds: NativeMethods;
|
||||
|
||||
Reference in New Issue
Block a user