Skip to content

Commit 5ed7cf7

Browse files
committed
🐛 更新测试页面
1 parent 6afc85b commit 5ed7cf7

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

app/src/pages/settings/about.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export default function About() {
102102
<h1
103103
className="text-panel-text text-3xl font-bold"
104104
onClick={() => {
105+
console.log("goto test");
105106
navigate("/test");
106107
}}
107108
>

app/src/pages/test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from "react";
22
import { Settings } from "../core/service/Settings";
3-
import { isLinux, isMac, isMobile, isWeb, isWindows } from "../utils/platform";
3+
import { isDesktop, isLinux, isMac, isMobile, isWeb, isWindows } from "../utils/platform";
44

55
export default function TestPage() {
66
useEffect(() => {
@@ -23,13 +23,12 @@ export default function TestPage() {
2323
return (
2424
<>
2525
<div className="px-4 pt-20">
26-
<p>当前主题: {theme}</p>
27-
<p>isMac: {isMac}</p>
26+
<p>当前主题: {theme.toString()}</p>
2827
<p>
29-
isWeb: {isWeb}, isMobile: {isMobile}
28+
isWeb: {isWeb.toString()}, isMobile: {isMobile.toString()}, isDesktop: {isDesktop.toString()}
3029
</p>
3130
<p>
32-
{isWindows}, {isLinux}
31+
isMac: {isMac.toString()}, isWindows: {isWindows.toString()}, isLinux: {isLinux.toString()}
3332
</p>
3433
</div>
3534
</>

app/src/router.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generouted, changes to this file will be overridden
22
/* eslint-disable */
33

4-
import { components, hooks, utils } from "@generouted/react-router/client";
4+
import { components, hooks, utils } from '@generouted/react-router/client'
55

66
export type Path =
77
| `/`
@@ -21,12 +21,14 @@ export type Path =
2121
| `/settings/visual`
2222
| `/test`
2323
| `/ui_test`
24-
| `/welcome`;
24+
| `/welcome`
2525

26-
export type Params = {};
26+
export type Params = {
27+
28+
}
2729

28-
export type ModalPath = never;
30+
export type ModalPath = never
2931

30-
export const { Link, Navigate } = components<Path, Params>();
31-
export const { useModals, useNavigate, useParams } = hooks<Path, Params, ModalPath>();
32-
export const { redirect } = utils<Path, Params>();
32+
export const { Link, Navigate } = components<Path, Params>()
33+
export const { useModals, useNavigate, useParams } = hooks<Path, Params, ModalPath>()
34+
export const { redirect } = utils<Path, Params>()

0 commit comments

Comments
 (0)