这是indexloc提供的服务,不要输入任何密码
Skip to content

Issue/400 move dark mode #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions hosting/src/app/(protected)/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import PageHeader from "@/components/common/PageHeader";
import DarkModeSwitcher from "@/components/Header/DarkModeSwitcher";
import {useAuthentication} from "@/hooks/useAuthentication";
import {useTanamUser} from "@/hooks/useTanamUser";
import Image from "next/image";
Expand Down Expand Up @@ -67,6 +68,7 @@ export default function Settings() {
</div>
</div>
</div>

<div className="col-span-5 xl:col-span-2">
<div className="rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="border-b border-stroke px-7 py-4 dark:border-strokedark">
Expand Down Expand Up @@ -124,6 +126,24 @@ export default function Settings() {
</div>
</div>
</div>

<div className="col-span-5 xl:col-span-2">
<div className="rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="border-b border-stroke px-7 py-4 dark:border-strokedark">
<h3 className="font-medium text-black dark:text-white">System</h3>
</div>
<div className="p-7">
<div className="mb-4 flex items-center gap-3">
<label className="mb-3 block text-sm font-medium text-black dark:text-white" htmlFor="emailAddress">
Dark mode
</label>
<div className="relative">
<DarkModeSwitcher />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</>
Expand Down
4 changes: 0 additions & 4 deletions hosting/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import DarkModeSwitcher from "@/components/Header/DarkModeSwitcher";
import DropdownUser from "@/components/Header/DropdownUser";
import Image from "next/image";
import Link from "next/link";
Expand Down Expand Up @@ -71,9 +70,6 @@ const Header = (props: {sidebarOpen: string | boolean | undefined; setSidebarOpe
</div>

<div className="flex items-center gap-2 2xsm:gap-4">
<ul className="flex items-center gap-2 2xsm:gap-4">
<DarkModeSwitcher />
</ul>
<DropdownUser />
</div>
</div>
Expand Down