aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/layouts/BasicLayout.tsx
diff options
context:
space:
mode:
authorshu <nvcsadjkojf@outlook.com>2026-09-06 19:41:09 +0800
committershu <nvcsadjkojf@outlook.com>2026-09-06 19:41:09 +0800
commit4c4215882e16992fdc054d364af2e3a0ef6f1a22 (patch)
tree69e3732feb999e786ce5c051ec98a060073d9842 /src/layouts/BasicLayout.tsx
parent61c1674e439dd791aee4fdc72e5738bbefed13e9 (diff)
支持环境变量配置路由模式和资源路径并更新菜单图标HEADmain
新增默认环境配置,通过 VITE_ROUTER_MODE 切换 Hash 与 History 路由,默认使用 Hash;通过 VITE_BASE_URL 配置资源基础路径,默认使用 /。 补充本地环境覆盖、构建方式及部署注意事项文档,保持 .env.local 不纳入版本控制。 桌面侧栏按钮改用 SidebarSimpleIcon,展开时填充、折叠时描边,保留无障碍状态描述。 验证:pnpm lint、pnpm build 和 git diff --check 通过。构建仍有现存的主包超过 500 kB 提示。
Diffstat (limited to 'src/layouts/BasicLayout.tsx')
-rw-r--r--src/layouts/BasicLayout.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx
index 9851fd4..512da63 100644
--- a/src/layouts/BasicLayout.tsx
+++ b/src/layouts/BasicLayout.tsx
@@ -14,7 +14,7 @@ import {
useMantineTheme,
} from '@mantine/core'
import { useDisclosure, useMediaQuery } from '@mantine/hooks'
-import { CaretLeftIcon, CaretRightIcon } from '@phosphor-icons/react'
+import { SidebarSimpleIcon } from '@phosphor-icons/react'
import { NavLink as RouterNavLink, Outlet, useLocation, useMatches } from 'react-router'
import { pageRoutes } from '../routes.ts'
import type { PageRoute } from '../routes.ts'
@@ -181,9 +181,11 @@ export function BasicLayout() {
aria-expanded={sidebarOpened}
aria-controls="desktop-navigation"
>
- {sidebarOpened
- ? <CaretLeftIcon size={20} aria-hidden="true" />
- : <CaretRightIcon size={20} aria-hidden="true" />}
+ <SidebarSimpleIcon
+ size={20}
+ weight={sidebarOpened ? 'fill' : 'regular'}
+ aria-hidden="true"
+ />
</ActionIcon>
<Burger
opened={opened}