feat: add ability to change password

This commit is contained in:
2025-03-16 18:11:28 +01:00
parent 39630725a4
commit 4252e737d7
6 changed files with 127 additions and 57 deletions

View File

@@ -3,6 +3,7 @@ import { useSession } from "./Session";
import { User } from "./api";
import { useTheme } from "./ThemeProvider";
import { colourTheme, darkTheme, normalTheme, rainbowTheme } from "./themes";
import { useNavigate } from "react-router";
interface ContextMenuItem {
label: string;
@@ -35,6 +36,7 @@ const UserInfo = (user: User) => {
export default function Avatar() {
const { user, onLogout } = useSession();
const { theme, setTheme } = useTheme();
const navigate = useNavigate();
const [contextMenu, setContextMenu] = useState<{
open: boolean;
allowOpen: boolean;
@@ -46,6 +48,7 @@ export default function Avatar() {
const contextMenuItems: ContextMenuItem[] = [
{ label: "view Profile", onClick: handleViewProfile },
{ label: "change password", onClick: () => navigate("/changepassword") },
{
label: "change theme",
onClick: () => {