Skip to content

Commit dfb6420

Browse files
committed
Add quit buttons
1 parent 5d70750 commit dfb6420

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

apps/desktop/src/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
}
9090

9191
ul {
92-
list-style: circle;
92+
list-style: inside;
9393
}
9494

9595
.nice-scroll::-webkit-scrollbar {

apps/desktop/src/views/error.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Link } from "react-router-dom";
22
import { Button } from "@/components/ui/button";
33
import { useSetWindowSize } from "../hooks/use-set-size";
44
import { useAppStore } from "../store";
5+
import { exit } from "@tauri-apps/api/process";
56

67
export const ErrorView = () => {
78
useSetWindowSize({ width: 400, height: 600 });
@@ -26,10 +27,18 @@ export const ErrorView = () => {
2627
<p className="py-8">Please try restarting discord then try again</p>
2728
</div>
2829
)}
29-
<div className="pt-8 text-2xl flex items-center justify-center">
30+
<div className="pt-8 text-2xl flex flex-col gap-4 items-center justify-center">
3031
<Link to="/">
31-
<Button>Login to Discord</Button>
32+
<Button>Connect to Discord</Button>
3233
</Link>
34+
<Button
35+
variant="ghost"
36+
onClick={async () => {
37+
await exit();
38+
}}
39+
>
40+
Quit Overlayed
41+
</Button>
3342
</div>
3443
</div>
3544
);

apps/desktop/src/views/main.tsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useAppStore } from "../store";
22
import { useEffect } from "react";
33
import { Button } from "@/components/ui/button";
4+
import { exit } from "@tauri-apps/api/process";
45

56
export const MainView = () => {
67
const { resetErrors } = useAppStore();
@@ -13,24 +14,25 @@ export const MainView = () => {
1314
<div className="h-screen p-2 bg-zinc-900">
1415
<div className="pt-1 mb-3 font-bold text-2xl text-center">
1516
<p className="mb-2">Authorize Discord</p>
16-
<ul className="text-sm text-center">
17-
<li className="text-zinc-400">
18-
<p>Overlayed is not affiliated with Discord. Discord is a trademark of Discord Inc.</p>
19-
</li>
20-
</ul>
17+
<p className="text-sm text-center text-zinc-400">
18+
Overlayed is not affiliated with Discord. Discord is a trademark of Discord Inc.
19+
</p>
2120
<ul className="flex flex-col pl-10 gap-4 p-4 mt-6 text-xl text-left">
2221
<li>
2322
<p className="leading-8">Discord should have opened a popup</p>
2423
</li>
2524
<li>
26-
<p className="leading-8">Click &quot;Authorize&quot; within discord</p>
25+
<p className="leading-8">Click &quot;Authorize&quot; within Discord</p>
2726
</li>
2827
<li>
2928
<p className="leading-8">Join a voice channel</p>
3029
</li>
30+
<li>
31+
<p className="leading-8">Enjoy 🥳</p>
32+
</li>
3133
</ul>
3234

33-
<div className="pt-8 text-2xl flex items-center justify-center">
35+
<div className="pt-8 text-2xl flex flex-col gap-4 items-center justify-center">
3436
<Button
3537
onClick={() => {
3638
// TODO: this is a hack, it should be handled better
@@ -39,6 +41,15 @@ export const MainView = () => {
3941
>
4042
Try Again
4143
</Button>
44+
45+
<Button
46+
variant="ghost"
47+
onClick={async () => {
48+
await exit();
49+
}}
50+
>
51+
Quit Overlayed
52+
</Button>
4253
</div>
4354
</div>
4455
</div>

0 commit comments

Comments
 (0)