2
0
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:
Jan Laupetin
2025-10-14 23:20:56 +01:00
parent 9fa41ca0d3
commit c6e9cbedda
159 changed files with 686 additions and 802 deletions

View File

@@ -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>

View File

@@ -1,3 +1,12 @@
export interface ZoneUnlinkProgressDto {
zoneName: string;
percentage: number;
}
export interface UnlinkingBinds {
unlinkZone(zoneName: string): Promise<void>;
}
export interface UnlinkingEventMap {
zoneUnlinkProgress: ZoneUnlinkProgressDto;
}

View File

@@ -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;