Added modals for popups, and fixed root-level bug.

This commit is contained in:
sarah committed 2026-09-21 21:38:12 +02:00
1 parent 9736a55e00
commit 104198036a
11 files changed
+312 -62

No files matched your search

+4 -1
View File
@@ -7,6 +7,7 @@ import DirectoryPane from "./Components/DirectoryPane.jsx";
import TagPanel from "./Components/TagPanel.jsx";
import SettingsPanel from "./Components/SettingsPanel.jsx";
import LoginScreen from "./Components/LoginScreen.jsx";
import ErrorToast from "./Components/ErrorToast.jsx";
import {
EnsureDirectoryNote,
FetchAuthStatus,
@@ -69,6 +70,7 @@ export default function App() {
const [SidebarKey, SetSidebarKey] = useState(0);
const [Settings, SetSettings] = useState(null);
const [IsSettingsOpen, SetIsSettingsOpen] = useState(false);
const [ErrorMessage, SetErrorMessage] = useState(null);
useEffect(() => {
FetchAuthStatus().then((Status) => {
@@ -237,7 +239,7 @@ export default function App() {
const Created = await EnsureDirectoryNote(ActiveRoot, DirectoryPath);
HandleSelectDirectoryNote(DirectoryPath, Created.Name, Created.FileType);
} catch (Error) {
window.alert(Error.message);
SetErrorMessage(Error.message);
}
}
@@ -391,6 +393,7 @@ export default function App() {
OnProfileUpdated={HandleProfileUpdated}
/>
)}
<ErrorToast Message={ErrorMessage} OnDismiss={() => SetErrorMessage(null)} />
</div>
);
}