feat: removed btn, added icons and gradient in settings

This commit is contained in:
2025-05-05 14:24:43 +03:00
parent ae9eef1131
commit 4db7276166

View File

@@ -4,6 +4,7 @@ import { UrlsTitle } from "@/enums/urls";
import { useAppContext } from "@/providers/AuthProvider";
import { cn } from "@/utils/class-merge";
import { calculatePoints, getCurrentStatus } from "@/utils/status-system";
import { ArrowRightStartOnRectangleIcon, Cog8ToothIcon } from "@heroicons/react/24/outline";
import { FunctionComponent } from "preact";
import { useLocation } from "preact-iso";
import { useEffect, useState } from "preact/hooks";
@@ -33,8 +34,8 @@ const ProfileSettings: FunctionComponent = () => {
}
};
window.addEventListener('storage', handleStorage);
return () => window.removeEventListener('storage', handleStorage);
window.addEventListener("storage", handleStorage);
return () => window.removeEventListener("storage", handleStorage);
}, []);
return (
@@ -58,17 +59,18 @@ const ProfileSettings: FunctionComponent = () => {
<div class={classes.profile_container}>
<div class={classes.settings_block}>
<div class={classes.settings_block__buttons}>
<Button>Сменить тему</Button>
<Button>Настройки</Button>
<Button className="flex flex-row items-center justify-center gap-2">
<Cog8ToothIcon class="size-8" /> Настройки
</Button>
<Button
color="secondary"
className="flex flex-row items-center justify-center gap-2 bg-[linear-gradient(180.00deg,rgba(246,255,211,0.7),rgba(195,229,253,0.7)_100%)]"
onClick={() => {
isLoggedIn.value = false;
localStorage.setItem("loggedIn", "false");
route("/login", true);
}}
>
Выйти
<ArrowRightStartOnRectangleIcon class="size-8" /> Выйти
</Button>
</div>
</div>