diff --git a/apps/desktop/public/img/login.png b/apps/desktop/public/img/login.png deleted file mode 100644 index 48c205c2..00000000 Binary files a/apps/desktop/public/img/login.png and /dev/null differ diff --git a/apps/desktop/public/img/sad-face.svg b/apps/desktop/public/img/sad-face.svg new file mode 100644 index 00000000..6941d78e --- /dev/null +++ b/apps/desktop/public/img/sad-face.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/apps/desktop/public/img/sad.png b/apps/desktop/public/img/sad.png deleted file mode 100644 index 3129c402..00000000 Binary files a/apps/desktop/public/img/sad.png and /dev/null differ diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index a459ffa0..de56e41b 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -8,10 +8,13 @@ import { Error } from "./views/error"; import { NavBar } from "./components/nav-bar"; import { useClickthrough } from "./use-clickthrough"; import { useDisableContextMenu } from "./use-disable-context-menu"; +import { useSetWindowSize } from "./use-set-size"; function App() { useSocket(); useDisableContextMenu(); + useSetWindowSize({ width: 400, height: 600 }); + const { clickthrough } = useClickthrough(); return ( diff --git a/apps/desktop/src/components/nav-bar.tsx b/apps/desktop/src/components/nav-bar.tsx index 5146945f..75f46cf2 100644 --- a/apps/desktop/src/components/nav-bar.tsx +++ b/apps/desktop/src/components/nav-bar.tsx @@ -28,9 +28,13 @@ export const NavBar = ({ clickthrough }: { clickthrough: boolean }) => { data-tauri-drag-region className="w-8 h-8 mr-2" /> -
- {currentChannel?.name} -
+ {location.pathname === "/channel" ? ( +
+ {currentChannel?.name} +
+ ) : ( +
Overlayed
+ )}
+
diff --git a/apps/desktop/src/views/main.tsx b/apps/desktop/src/views/main.tsx index 1d16b70c..758241f4 100644 --- a/apps/desktop/src/views/main.tsx +++ b/apps/desktop/src/views/main.tsx @@ -1,37 +1,49 @@ -import { useNavigate } from "react-router-dom"; import { useSocket } from "../rpc/manager"; +import { useAppStore } from "../store"; +import { useEffect } from "react"; +import { useSetWindowSize } from "../use-set-size"; import { Button } from "../components/ui/button"; +import { Link } from "react-router-dom"; export const Main = () => { - const socket = useSocket(); - const navigate = useNavigate(); + useSocket(); + useSetWindowSize({ width: 400, height: 600 }); + const { resetErrors } = useAppStore(); + + useEffect(() => { + resetErrors(); + }, []); return (
- {!socket?.isConnected ? ( -
-
-
- ) : ( - <> -
-

Authorize Discord

-
+
+

Authorize Discord

+ + - login -
-

Request Prompt again

- -
- - )} +
+ +
+
); };