Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/client/bundle/assets/dark-xKCl86FP.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion ui/client/bundle/assets/index-B2gUmkKP.css

This file was deleted.

1 change: 1 addition & 0 deletions ui/client/bundle/assets/index-Ctiq_wy6.css

Large diffs are not rendered by default.

396 changes: 0 additions & 396 deletions ui/client/bundle/assets/index-GB6RffjZ.js

This file was deleted.

399 changes: 399 additions & 0 deletions ui/client/bundle/assets/index-_plQMveR.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ui/client/bundle/assets/light-DTph7AU2.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui/client/bundle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<title>Hera UI</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="alternate icon" type="image/png" href="/favicon.png">
<script type="module" crossorigin src="/assets/index-GB6RffjZ.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-B2gUmkKP.css">
<script type="module" crossorigin src="/assets/index-_plQMveR.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Ctiq_wy6.css">
</head>

<body>
Expand Down
23 changes: 17 additions & 6 deletions ui/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { Routes, Route } from 'react-router-dom';
import { CssBaseline, ThemeProvider } from '@mui/material';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { SnackbarProvider } from 'notistack';
import { Dashboard } from './Dashboard';
import { useAppTheme } from './theme';

export default function App() {
const theme = useAppTheme();
return (
<Routes>
<Route path="/:projectName/:docId" element={<Dashboard />} />
<Route path="/:projectName" element={<Dashboard />} />
<Route path="/" element={<Dashboard />} />
</Routes>
<ThemeProvider theme={theme}>
<CssBaseline />
<SnackbarProvider maxSnack={6} anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}>
<BrowserRouter>
<Routes>
<Route path="/:projectName/:docId" element={<Dashboard />} />
<Route path="/:projectName" element={<Dashboard />} />
<Route path="/" element={<Dashboard />} />
</Routes>
</BrowserRouter>
</SnackbarProvider>
</ThemeProvider>
);
}
7 changes: 4 additions & 3 deletions ui/client/src/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Paper, Typography } from '@mui/material';
import { Box, Paper, Typography, useTheme } from '@mui/material';
import { useState } from 'react';
import { useParams } from 'react-router-dom';
import { DashboardHeader } from './components/header/DashboardHeader';
Expand All @@ -7,11 +7,12 @@ import { FetchProjects } from './io/FetchProjects';
import { ProjectAutoReload } from './io/ProjectAutoReload';
import { useProjectStore } from './stores/useProjectStore';
import { ServerConstantReader } from './stores/useServerConstants';
import { tabKindCss } from './shared/tabKindConfig';
import { buildTabKindCss } from './shared/tabKindConfig';

export const Dashboard = () => {
const { projectName } = useParams<{ projectName: string }>();
const { getProject } = useProjectStore();
const dark = useTheme().palette.mode === 'dark';
const [treeCollapsed, setTreeCollapsed] = useState(false);
const [layoutResetSignal, setLayoutResetSignal] = useState(0);

Expand Down Expand Up @@ -45,7 +46,7 @@ export const Dashboard = () => {
{project
? (
<Box sx={{ position: 'relative', flex: 1, height: '100%' }}>
<style>{tabKindCss}</style>
<style>{buildTabKindCss(dark)}</style>
<ProjectLayout
project={project}
treeCollapsed={treeCollapsed}
Expand Down
2 changes: 1 addition & 1 deletion ui/client/src/buildNumber.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const buildNumber = '20260715.1';
export const buildNumber = '20260720.1';
6 changes: 4 additions & 2 deletions ui/client/src/components/details/DetailsViewNotebook.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box, CircularProgress, Typography } from '@mui/material';
import { useEffect, useState } from 'react';
import { BASEURL } from '../../shared/baseurl';
import { ThemeMode, useViewSettingsStore } from '../../stores/useViewSettingsStore';

export const DetailsViewNotebook = ({
rootDir,
Expand All @@ -11,6 +12,7 @@ export const DetailsViewNotebook = ({
}) => {
const [notebookUrl, setNotebookUrl] = useState<string | null>(null);
const [error, setError] = useState<string | null>(null);
const themeMode = useViewSettingsStore((s) => s.viewSettings.themeMode);

useEffect(() => {
let cancelled = false;
Expand All @@ -22,7 +24,7 @@ export const DetailsViewNotebook = ({
const r = await fetch(`${BASEURL}/jupyter/ensure`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ root_dir: rootDir }),
body: JSON.stringify({ root_dir: rootDir, dark: themeMode === ThemeMode.Dark }),
});
const data = await r.json();
if (cancelled) return;
Expand Down Expand Up @@ -52,7 +54,7 @@ export const DetailsViewNotebook = ({
})();

return () => { cancelled = true; };
}, [rootDir, resource]);
}, [rootDir, resource, themeMode]);

if (error) return <Typography color="error">{error}</Typography>;
if (!notebookUrl) return (
Expand Down
Loading
Loading