This commit is contained in:
2026-04-20 20:14:40 +02:00
parent 4261291ac1
commit 176fe3db99
21 changed files with 1445 additions and 132 deletions

View File

@@ -1,3 +1,18 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type SplashOrder = { order: string, msg: string | null, status: string | null, };
/**
* Command payload sent from Rust to the splash frontend.
*/
export type SplashOrder = {
/**
* Splash command name such as `fadein`, `fadeout`, `add_msg`, or `add_log`.
*/
order: string,
/**
* Optional message payload attached to the command.
*/
msg: string | null,
/**
* Optional status payload attached to the command.
*/
status: string | null, };

View File

@@ -7,12 +7,13 @@ import ResizeObserver from "resize-observer-polyfill";
//import { listen, type UnlistenFn } from "@tauri-apps/api/event";
//import { error } from "@fltsci/tauri-plugin-tracing";
//import { info } from "@fltsci/tauri-plugin-tracing";
import { trace } from "@fltsci/tauri-plugin-tracing";
import { trace, takeoverConsole } from "@fltsci/tauri-plugin-tracing";
(window as Window & typeof globalThis & { bootstrap?: typeof bootstrap }).bootstrap = bootstrap;
(window as Window & typeof globalThis & { ResizeObserver?: typeof ResizeObserver }).ResizeObserver = ResizeObserver;
document.addEventListener("DOMContentLoaded", () => {
void takeoverConsole();
const sidebarToggle = document.querySelector<HTMLButtonElement>('#sidebarToggle');
if (sidebarToggle) {
// restaurer létat depuis localStorage

View File

@@ -1,7 +1,6 @@
// file: kb_app/frontend/ts/splash.ts
import { error } from "@fltsci/tauri-plugin-tracing";
import { info } from "@fltsci/tauri-plugin-tracing";
import { error, info, takeoverConsole } from "@fltsci/tauri-plugin-tracing";
import { listen } from '@tauri-apps/api/event';
import { SplashOrder } from './bindings/SplashOrder.ts';
@@ -90,7 +89,7 @@ listen("splash", (event) => {
//window.addEventListener('DOMContentLoaded', initialize);
document.addEventListener("DOMContentLoaded", () => {
void takeoverConsole();
info("window loaded");
});