diff --git a/frontend/src/components/header.tsx b/frontend/src/components/header.tsx index 812de6d..cc5969b 100644 --- a/frontend/src/components/header.tsx +++ b/frontend/src/components/header.tsx @@ -43,14 +43,14 @@ export default function Header() {
  • - + Submit
  • @@ -60,7 +60,7 @@ export default function Header() {
  • - + Login
  • @@ -71,7 +71,7 @@ export default function Header() { diff --git a/frontend/src/components/profile-settings/index.tsx b/frontend/src/components/profile-settings/index.tsx index 07d1289..acbdee4 100644 --- a/frontend/src/components/profile-settings/index.tsx +++ b/frontend/src/components/profile-settings/index.tsx @@ -1,5 +1,4 @@ -import { useState, useEffect } from "react"; -import { useStore } from "@nanostores/react"; +import { useState } from "react"; import { userNameSchema } from "@tomodachi-share/shared/schemas"; @@ -8,8 +7,6 @@ import SubmitDialogButton from "./submit-dialog-button"; import DeleteAccount from "./delete-account"; import z from "zod"; import { useNavigate } from "react-router"; -import { session } from "../../session"; -import { type Theme, applyTheme } from "../../lib/theme"; interface Props { currentDescription: string | null | undefined; @@ -17,22 +14,12 @@ interface Props { export default function ProfileSettings({ currentDescription }: Props) { const navigate = useNavigate(); - const $session = useStore(session); const [description, setDescription] = useState(currentDescription); const [name, setName] = useState(""); - const [selectedTheme, setSelectedTheme] = useState("SYSTEM"); - const [themeSaveError, setThemeSaveError] = useState(undefined); const [descriptionChangeError, setDescriptionChangeError] = useState(undefined); const [nameChangeError, setNameChangeError] = useState(undefined); - // Initialize theme from session when it loads - useEffect(() => { - if ($session?.user?.theme) { - setSelectedTheme($session.user.theme); - } - }, [$session?.user?.theme]); - const handleSubmitDescriptionChange = async (close: () => void) => { const parsed = z.string().trim().max(256).safeParse(description); if (!parsed.success) { @@ -81,31 +68,11 @@ export default function ProfileSettings({ currentDescription }: Props) { navigate(0); }; - const handleThemeSave = async (close: () => void) => { - const response = await fetch(`${import.meta.env.VITE_API_URL}/api/auth/theme`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ theme: selectedTheme }), - credentials: "include", - }); - - if (!response.ok) { - const { error } = await response.json(); - setThemeSaveError(error); - return; - } - - // Apply the theme immediately - applyTheme(selectedTheme); - close(); - navigate(0); - }; - return (

    Settings

    -

    Update your account info, username, and site-wide theme.

    +

    Update your account info and username.

    {/* Separator */} @@ -172,39 +139,6 @@ export default function ProfileSettings({ currentDescription }: Props) {
    - {/* Separator - Personalization */} -
    -
    - Personalization -
    -
    - - {/* Theme Selection */} -
    -
    - -

    Choose your preferred color theme for the site

    -
    - -
    - - -
    -
    - {/* Separator - Danger Zone */}

    diff --git a/frontend/src/components/theme-toggle.tsx b/frontend/src/components/theme-toggle.tsx index b2ee2d9..2e73b6b 100644 --- a/frontend/src/components/theme-toggle.tsx +++ b/frontend/src/components/theme-toggle.tsx @@ -31,14 +31,8 @@ export default function ThemeToggle({ size = "md", className = "" }: ThemeToggle const getIcon = () => { if (theme === "DARK") return ; if (theme === "LIGHT") return ; - // SYSTEM or undefined - show both - return ( -
    - - / - -
    - ); + // SYSTEM or undefined - show computer/monitor icon + return ; }; const getTooltip = () => { diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index a3f6a22..b78097b 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -9,7 +9,7 @@ export default function IndexPage() {

    {searchParams.get("tags") ? `Miis tagged with '${searchParams.get("tags")}' - TomodachiShare` : "TomodachiShare - index mii list"}

    -

    We're currently going through some major code changes therefore some features won't work.

    +

    We're currently going through some major code changes therefore some features won't work.

    ); diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 864e649..8300a3f 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -12,13 +12,13 @@ export default function LoginPage() { return (
    -
    -

    Welcome to TomodachiShare!

    +
    +

    Welcome to TomodachiShare!

    -
    -
    +
    +
    Choose your login method -
    +
    @@ -48,13 +48,13 @@ export default function LoginPage() {
    -

    +

    By signing up, you agree to the{" "} - + Terms of Service {" "} and{" "} - + Privacy Policy . diff --git a/frontend/src/pages/mii.tsx b/frontend/src/pages/mii.tsx index a7b5e5b..8281de4 100644 --- a/frontend/src/pages/mii.tsx +++ b/frontend/src/pages/mii.tsx @@ -92,7 +92,7 @@ export default function MiiPage() {

    )} {mii.in_queue && ( -
    +

    This Mii is waiting to be manually reviewed and is hidden from the main page. The review could take between a few hours and a few days. @@ -102,9 +102,9 @@ export default function MiiPage() {

    )}
    -
    +
    {/* Mii Image */} -
    +
    {/* QR Code */} {mii.platform === "THREE_DS" ? ( -
    +
    ) : ( @@ -133,11 +133,11 @@ export default function MiiPage() { className="rounded-lg hover:brightness-90 mb-4 transition-all" /> )} -
    +
    {/* Mii Info */} {mii.platform === "THREE_DS" && ( -
      +
      • Name:{" "} @@ -154,10 +154,10 @@ export default function MiiPage() { )} {/* Mii Platform */} -
        -
        +
        +
        Platform -
        +
        @@ -171,7 +171,7 @@ export default function MiiPage() {
        @@ -179,7 +179,7 @@ export default function MiiPage() {
        @@ -187,10 +187,10 @@ export default function MiiPage() {
        {/* Mii Gender */} -
        -
        +
        +
        Gender -
        +
        @@ -208,7 +208,7 @@ export default function MiiPage() {
        @@ -216,7 +216,7 @@ export default function MiiPage() {
        @@ -225,7 +225,7 @@ export default function MiiPage() { {mii.platform !== "THREE_DS" && (
        @@ -236,10 +236,10 @@ export default function MiiPage() { {/* Makeup */} {mii.platform === "SWITCH" && ( <> -
        -
        +
        +
        Makeup -
        +
        @@ -259,7 +259,7 @@ export default function MiiPage() { {/* Full Makeup */}
        @@ -268,7 +268,7 @@ export default function MiiPage() { {/* Partial Makeup */}
        @@ -277,10 +277,10 @@ export default function MiiPage() { {/* No Makeup */}
        - +
        @@ -289,10 +289,10 @@ export default function MiiPage() {
        {/* Information */} -
        +
        {/* Submission name */} -

        {mii.name}

        +

        {mii.name}

        {/* Like button */}
        @@ -306,11 +306,11 @@ export default function MiiPage() {
        {/* Author and Created date */} -
        - +
        + By {mii.user.name} -

        +

        Created:{" "} {new Date(mii.createdAt).toLocaleString("en-GB", { day: "2-digit", @@ -330,7 +330,7 @@ export default function MiiPage() {

        {/* Buttons */} -
        +
        @@ -343,8 +343,8 @@ export default function MiiPage() { {/* Instructions */} {mii.platform === "SWITCH" && ( -
        -

        +
        +

        Instructions

        diff --git a/frontend/src/pages/submit.tsx b/frontend/src/pages/submit.tsx index 47f32c2..a808cde 100644 --- a/frontend/src/pages/submit.tsx +++ b/frontend/src/pages/submit.tsx @@ -173,7 +173,7 @@ export default function SubmitPage() { return (
        -
        +
        -

        +

        {name || "Mii name"}

        @@ -206,19 +206,19 @@ export default function SubmitPage() {

        Submit your Mii

        -

        Share your creation for others to see.

        +

        Share your creation for others to see.

        {/* Separator */} -
        -
        +
        +
        Info -
        +
        {/* Platform select */}
        -