diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index db80faf..089621d 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "chatnio", - "version": "3.10.3" + "version": "3.10.4" }, "tauri": { "allowlist": { diff --git a/app/src/assets/pages/home.less b/app/src/assets/pages/home.less index 6d5b4a7..07da847 100644 --- a/app/src/assets/pages/home.less +++ b/app/src/assets/pages/home.less @@ -337,16 +337,15 @@ margin: 0; background: hsl(var(--background)); transition: 0.2s ease-in-out; - transition-property: width, background, box-shadow, border-right, opacity; + transition-property: width, background, box-shadow; border-right: 0; pointer-events: none; - opacity: 0; + overflow-x: hidden; &.open { width: 260px; border-right: 1px solid hsl(var(--border)); pointer-events: auto; - opacity: 1; } &.hidden { @@ -362,10 +361,6 @@ padding: 4px; } - &.open .conversation-list { - opacity: 1; - } - .sidebar-menu { height: max-content; width: 100%; @@ -409,7 +404,6 @@ display: flex; flex-direction: column; gap: 6px; - opacity: 0; width: 100%; height: 100%; padding: 6px 0; @@ -603,6 +597,7 @@ button { margin: 0.5rem 0; + white-space: nowrap; } .space-footer { diff --git a/app/src/components/SelectGroup.tsx b/app/src/components/SelectGroup.tsx index bfa4eb2..dc4fa40 100644 --- a/app/src/components/SelectGroup.tsx +++ b/app/src/components/SelectGroup.tsx @@ -131,7 +131,7 @@ function SelectGroupMobile(props: SelectGroupProps) { props.onChange?.(value); }} > - + -
- - - -
+ ) : (
diff --git a/app/src/components/admin/MenuBar.tsx b/app/src/components/admin/MenuBar.tsx index 683a6c7..1261c68 100644 --- a/app/src/components/admin/MenuBar.tsx +++ b/app/src/components/admin/MenuBar.tsx @@ -18,25 +18,28 @@ import { useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { mobile } from "@/utils/device.ts"; import { cn } from "@/components/ui/lib/utils.ts"; -import { Button } from "@/components/ui/button.tsx"; type MenuItemProps = { title: string; icon: React.ReactNode; path: string; + exit?: boolean; }; -function MenuItem({ title, icon, path }: MenuItemProps) { +function MenuItem({ title, icon, path, exit }: MenuItemProps) { const location = useLocation(); const dispatch = useDispatch(); const active = useMemo( () => - location.pathname === `/admin${path}` || - location.pathname + "/" === `/admin${path}`, + !exit && + (location.pathname === `/admin${path}` || + location.pathname + "/" === `/admin${path}`), [location.pathname, path], ); const redirect = async () => { + if (exit) return await router.navigate("/"); + if (mobile) dispatch(closeMenu()); await router.navigate(`/admin${path}`); }; @@ -87,16 +90,7 @@ function MenuBar() { icon={} path={"/logger"} /> - -
- + } path={""} exit />
); } diff --git a/app/src/components/admin/UserTable.tsx b/app/src/components/admin/UserTable.tsx index f321ff8..575c4d9 100644 --- a/app/src/components/admin/UserTable.tsx +++ b/app/src/components/admin/UserTable.tsx @@ -38,8 +38,6 @@ import { CalendarCheck2, CalendarClock, CalendarOff, - ChevronLeft, - ChevronRight, CloudCog, CloudFog, KeyRound, @@ -59,6 +57,7 @@ import { getNumber, parseNumber } from "@/utils/base.ts"; import { useDeeptrain } from "@/conf/env.ts"; import { useSelector } from "react-redux"; import { selectUsername } from "@/store/auth.ts"; +import { PaginationAction } from "@/components/ui/pagination.tsx"; type OperationMenuProps = { user: UserData; @@ -435,27 +434,12 @@ function UserTable() { ))} -
- - - -
+ ) : loading ? (
diff --git a/app/src/components/ui/pagination.tsx b/app/src/components/ui/pagination.tsx index 62e618e..189e593 100644 --- a/app/src/components/ui/pagination.tsx +++ b/app/src/components/ui/pagination.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"; import { cn } from "@/components/ui/lib/utils"; -import { ButtonProps, buttonVariants } from "src/components/ui/button"; +import { ButtonProps, buttonVariants } from "@/components/ui/button"; const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (