0.0.2
This commit is contained in:
@@ -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, };
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user