chore: clean up

This commit is contained in:
2024-01-03 11:03:56 +07:00
parent 698f5a5d6d
commit 9f27d68533
29 changed files with 322 additions and 1944 deletions

View File

@@ -7,7 +7,6 @@ export * from "./user";
export * from "./titlebar";
export * from "./layouts/app";
export * from "./layouts/auth";
export * from "./layouts/composer";
export * from "./layouts/home";
export * from "./layouts/settings";
export * from "./mentions";

View File

@@ -1,52 +0,0 @@
import { NavLink, Outlet, useLocation } from 'react-router-dom';
import { twMerge } from 'tailwind-merge';
export function ComposerLayout() {
const location = useLocation();
return (
<div className="container mx-auto h-full px-8 pt-8">
<div className="mb-8 flex h-10 shrink-0 items-center gap-3">
{location.pathname !== '/new/privkey' ? (
<div className="flex h-10 items-center gap-2 rounded-lg bg-neutral-100 px-0.5 dark:bg-neutral-800">
<NavLink
to="/new/"
end
className={({ isActive }) =>
twMerge(
'inline-flex h-9 w-20 items-center justify-center rounded-lg text-sm font-medium',
isActive ? 'bg-white shadow dark:bg-black' : 'bg-transparent'
)
}
>
Post
</NavLink>
<NavLink
to="/new/article"
className={({ isActive }) =>
twMerge(
'inline-flex h-9 w-20 items-center justify-center rounded-lg text-sm font-medium',
isActive ? 'bg-white shadow dark:bg-black' : 'bg-transparent'
)
}
>
Article
</NavLink>
<NavLink
to="/new/file"
className={({ isActive }) =>
twMerge(
'inline-flex h-9 w-28 items-center justify-center rounded-lg text-sm font-medium',
isActive ? 'bg-white shadow dark:bg-black' : 'bg-transparent'
)
}
>
File Sharing
</NavLink>
</div>
) : null}
</div>
<Outlet />
</div>
);
}

View File

@@ -5,19 +5,17 @@ import {
HomeIcon,
NwcFilledIcon,
NwcIcon,
PlusIcon,
RelayFilledIcon,
RelayIcon,
SearchIcon,
} from "@lume/icons";
import { cn } from "@lume/utils";
import { Link, NavLink } from "react-router-dom";
import { NavLink } from "react-router-dom";
import { ActiveAccount } from "./account/active";
export function Navigation() {
return (
<div className="flex h-full w-20 shrink-0 flex-col justify-between px-4 py-3">
<div className="flex flex-1 flex-col gap-5">
<div className="flex flex-col justify-between w-20 h-full px-4 py-3 shrink-0">
<div className="flex flex-col flex-1 gap-5">
<NavLink
to="/"
preventScrollReset={true}
@@ -34,7 +32,7 @@ export function Navigation() {
)}
>
{isActive ? (
<HomeFilledIcon className="size-6 text-black dark:text-white" />
<HomeFilledIcon className="text-black size-6 dark:text-white" />
) : (
<HomeIcon className="size-6" />
)}
@@ -102,7 +100,7 @@ export function Navigation() {
)}
>
{isActive ? (
<DepotFilledIcon className="size-6 text-black dark:text-white" />
<DepotFilledIcon className="text-black size-6 dark:text-white" />
) : (
<DepotIcon className="size-6" />
)}
@@ -136,7 +134,7 @@ export function Navigation() {
)}
>
{isActive ? (
<NwcFilledIcon className="size-6 text-black dark:text-white" />
<NwcFilledIcon className="text-black size-6 dark:text-white" />
) : (
<NwcIcon className="size-6" />
)}
@@ -155,19 +153,7 @@ export function Navigation() {
)}
</NavLink>
</div>
<div className="flex shrink-0 flex-col gap-3 p-1">
<Link
to="/new/"
className="flex aspect-square h-auto w-full items-center justify-center rounded-xl bg-black/10 text-black hover:bg-blue-500 hover:text-white dark:bg-white/10 dark:text-white dark:hover:bg-blue-500"
>
<PlusIcon className="h-5 w-5" />
</Link>
<Link
to="/nwc"
className="flex aspect-square h-auto w-full items-center justify-center rounded-xl bg-black/10 hover:bg-blue-500 hover:text-white dark:bg-white/10 dark:hover:bg-blue-500"
>
<SearchIcon className="h-5 w-5" />
</Link>
<div className="flex flex-col gap-3 p-1 shrink-0">
<ActiveAccount />
</div>
</div>