mirror of
https://git.srhtnin.garden/sarah/SaraView.git
synced 2026-10-14 18:38:11 +02:00
Added modals for popups, and fixed root-level bug.
This commit is contained in:
1 parent
9736a55e00
commit
104198036a
11 files changed
+312
-62
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user