This commit is contained in:
andbi 2025-11-19 20:22:22 -06:00
parent aa7c30950c
commit 72716e1c28
41 changed files with 15461 additions and 0 deletions

30
frontend/app/ui.ts Normal file
View file

@ -0,0 +1,30 @@
import ConfirmationModal from "./components/ConfirmationModal.vue";
import type { Runnable } from "./types";
// A sample global state of the web app
export class AppState {
constructor(public time: Date) {}
}
export interface NavRoute {
title: string;
path: string;
}
export interface ConfirmationDialog {
show(message: string, onSuccess: Runnable): void;
}
export const confirmationDialog: () => ConfirmationDialog = () => {
const overlay = useOverlay();
const modal = overlay.create(ConfirmationModal);
return {
async show(message: string, onSuccess: Runnable) {
const instance = modal.open({ message: message });
const result = await instance.result;
if (result) {
onSuccess();
}
},
};
};