Skip to content

Commit

Permalink
Radix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Nov 23, 2023
1 parent 394ae81 commit b089cf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 48 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src/components/nav-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const NavBar = ({ clickthrough }: { clickthrough: boolean }) => {
)}
</div>
<div className="hidden md:flex">
<button>
<button className="px-4">
<Pin
size={20}
onClick={() => {
Expand Down
52 changes: 5 additions & 47 deletions apps/desktop/src/views/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useNavigate } from "react-router-dom";
import { Button } from "@radix-ui/themes";
import { Button, Slider } from "@radix-ui/themes";
import { useAppStore } from "../store";
import { LogicalSize, LogicalPosition, currentMonitor, appWindow } from "@tauri-apps/api/window";
import { useEffect, useRef, useState } from "react";
Expand All @@ -12,7 +12,7 @@ export const SettingsView = () => {
const { me } = useAppStore();
const lastSizeRef = useRef<LogicalSize | null>(null);
const lastWindowPosRef = useRef<LogicalPosition | null>(null);
const [scaleFactor, setScaleFactor] = useState(1);
const [scaleFactor, setScaleFactor] = useState(10);

useEffect(() => {
const alignAndSaveWindow = async () => {
Expand Down Expand Up @@ -70,56 +70,14 @@ export const SettingsView = () => {
<label className="flex items-center gap-2">
<span>Scale</span>
</label>
<Slider value={[scaleFactor]} max={20} onValueChange={([value]) => setScaleFactor(value)} />
{scaleFactor}

{/* <div> */}
{/* <div className="flex flex-col gap-2 mb-2"> */}
{/* <Button */}
{/* className="w-full" */}
{/* onClick={async () => { */}
{/* if (!paths.configDir) return; */}
{/* await shell.open(paths.configDir); */}
{/* }} */}
{/* > */}
{/* Open App Dir */}
{/* </Button> */}
{/* <Button */}
{/* className="w-full" */}
{/* onClick={async () => { */}
{/* await invoke("open_devtools"); */}
{/* }} */}
{/* > */}
{/* Open Devtools */}
{/* </Button> */}
{/* </div> */}
{/* </div> */}
{/* <div> */}
{/* <div className=""> */}
{/* <textarea */}
{/* className="bg-zinc-600 w-full min-h-[300px]" */}
{/* readOnly */}
{/* value={JSON.stringify(me, null, 2)} */}
{/* ></textarea> */}
{/* <Button */}
{/* disabled={!me?.id} */}
{/* className="w-full" */}
{/* intent="danger" */}
{/* onClick={() => { */}
{/* localStorage.removeItem("discord_access_token"); */}
{/* setMe(null); */}
{/* navigate("/"); */}
{/* }} */}
{/* > */}
{/* logout */}
{/* </Button> */}
{/* </div> */}
{/* </div> */}
{/**/}
<hr className="my-8 border-gray-700" />
</div>

<div className="">
<div className="flex justify-end">
<Button
className="w-full"
onClick={() => {
if (!me?.id) return navigate("/");
navigate("/channel");
Expand Down

0 comments on commit b089cf5

Please sign in to comment.