9a72f1c670
Portable Windows break timer to prevent RSI and eye strain. Tauri v2 + Svelte 5 + Tailwind CSS v4. No installer, no telemetry, no data leaves the machine. CC0 public domain.
24 lines
723 B
TypeScript
24 lines
723 B
TypeScript
import "./app.css";
|
|
import App from "./App.svelte";
|
|
import MiniTimer from "./lib/components/MiniTimer.svelte";
|
|
import BreakWindow from "./lib/components/BreakWindow.svelte";
|
|
import { mount } from "svelte";
|
|
|
|
const params = new URLSearchParams(window.location.search);
|
|
const isMini = params.has("mini");
|
|
const isBreak = params.has("break");
|
|
|
|
if (isMini || isBreak) {
|
|
// Transparent body so rounded shapes show through the transparent window
|
|
document.body.style.background = "transparent";
|
|
document.documentElement.style.background = "transparent";
|
|
}
|
|
|
|
const component = isMini ? MiniTimer : isBreak ? BreakWindow : App;
|
|
|
|
const app = mount(component, {
|
|
target: document.getElementById("app")!,
|
|
});
|
|
|
|
export default app;
|