v0.1.0-pre.058
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: kb-app-demo-desktop/frontend/ts/demo_backfill.ts
|
||||
// version: 7
|
||||
// version: 8
|
||||
|
||||
import * as bootstrap from "bootstrap";
|
||||
import "simplebar";
|
||||
@@ -210,6 +210,17 @@ async function cancelBackfill(): Promise<void> {
|
||||
|
||||
async function loadOptions(): Promise<void> {
|
||||
const options = await invoke<DemoBackfillOptionsPayload>("demo_backfill_options");
|
||||
const optionsWithPrograms = options as DemoBackfillOptionsPayload & {
|
||||
programs: Array<{ code: string; programId: string }>;
|
||||
};
|
||||
const programOptions = element<HTMLDataListElement>("#programAddressOptions");
|
||||
programOptions.replaceChildren();
|
||||
for (const program of optionsWithPrograms.programs) {
|
||||
const option = document.createElement("option");
|
||||
option.value = program.programId;
|
||||
option.label = program.code;
|
||||
programOptions.append(option);
|
||||
}
|
||||
const roleSelect = element<HTMLSelectElement>("#backfillRoleSelect");
|
||||
roleSelect.replaceChildren();
|
||||
for (const role of options.roles) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// file: kb-app-demo-desktop/frontend/ts/splash.ts
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import type { SplashOrder } from "./bindings/kb_app_demo_desktop/splash/SplashOrder.ts";
|
||||
|
||||
@@ -105,6 +106,7 @@ async function initializeSplash(): Promise<void> {
|
||||
await listen<SplashOrder>("splash", event => {
|
||||
void handleSplashOrder(event.payload);
|
||||
});
|
||||
await invoke("splash_frontend_ready");
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
Reference in New Issue
Block a user