2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-17 18:52:06 +00:00

feat: add bind for loading fastfiles to ModMan

This commit is contained in:
Jan Laupetin
2025-10-11 12:51:21 +01:00
parent 42473a7320
commit 4911cfa4c6
15 changed files with 215 additions and 1 deletions

View File

@@ -3,10 +3,15 @@ import { ref } from "vue";
import { webviewBinds } from "./native";
const lastPath = ref("");
const loadingFastFile = ref(false);
async function onOpenFastfileClick() {
lastPath.value =
(await webviewBinds.openFileDialog({ filters: [{ name: "Fastfiles", filter: "*.ff" }] })) ?? "";
loadingFastFile.value = true;
await webviewBinds.loadFastFile(lastPath.value);
loadingFastFile.value = false;
}
</script>
@@ -18,6 +23,7 @@ async function onOpenFastfileClick() {
<p>
<button @click="onOpenFastfileClick">Open fastfile</button>
<span>The last path: {{ lastPath }}</span>
<span>Loading: {{ loadingFastFile }}</span>
</p>
</main>
</template>

View File

@@ -0,0 +1,3 @@
export interface FastFileBinds {
loadFastFile(path: string): Promise<void>;
}

View File

@@ -1,7 +1,8 @@
import type { DialogBinds } from "./DialogBinds";
import type { FastFileBinds } from "./FastFileBinds";
export type NativeMethods = DialogBinds;
export type NativeMethods = DialogBinds & FastFileBinds;
interface NativeEventMap {