initial commit 3??

This commit is contained in:
2026-01-30 14:10:11 -06:00
parent 34bbe8e98f
commit f2a75c954f
42 changed files with 3935 additions and 1 deletions
+41
View File
@@ -0,0 +1,41 @@
import { type Component, createSignal, Show, onMount, onCleanup } from 'solid-js';
import { Layout } from './components/Layout';
import { CriticalView } from './views/CriticalView';
import { UrgencyView } from './views/UrgencyView';
import { PriorityView } from './views/PriorityView';
import { MatrixView } from './views/MatrixView';
import { SettingsView } from './views/SettingsView';
import { AuthCallback } from './components/Auth';
import { pb } from './lib/pocketbase';
import { initStore } from './store';
const App: Component = () => {
// Basic routing state
const [currentView, setCurrentView] = createSignal("matrix");
const [isAuthenticated, setIsAuthenticated] = createSignal(pb.authStore.isValid);
onMount(() => {
const removeListener = pb.authStore.onChange((token) => {
setIsAuthenticated(!!token);
if (token) {
initStore();
}
}, true);
onCleanup(() => removeListener());
});
return (
<Show when={isAuthenticated()} fallback={<AuthCallback onSuccess={() => { }} />}>
<Layout currentView={currentView()} setView={setCurrentView}>
<Show when={currentView() === "critical"}><CriticalView /></Show>
<Show when={currentView() === "urgency"}><UrgencyView /></Show>
<Show when={currentView() === "priority"}><PriorityView /></Show>
<Show when={currentView() === "matrix"}><MatrixView /></Show>
<Show when={currentView() === "settings"}><SettingsView /></Show>
</Layout>
</Show>
);
};
export default App;