Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bit-pm
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
燕伟桐
bit-pm
Commits
0e48d02a
提交
0e48d02a
authored
4月 21, 2025
作者:
Will Chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish UX for Settings pages; add Go Back button to setting page
上级
8373e20d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
11 行删除
+26
-11
ProviderSettingsPage.tsx
src/components/settings/ProviderSettingsPage.tsx
+1
-1
settings.tsx
src/pages/settings.tsx
+25
-10
没有找到文件。
src/components/settings/ProviderSettingsPage.tsx
浏览文件 @
0e48d02a
...
@@ -147,7 +147,7 @@ export function ProviderSettingsPage({ provider }: ProviderSettingsPageProps) {
...
@@ -147,7 +147,7 @@ export function ProviderSettingsPage({ provider }: ProviderSettingsPageProps) {
},
[
apiKeyInput
]);
},
[
apiKeyInput
]);
return
(
return
(
<
div
className=
"min-h-screen p
-8
"
>
<
div
className=
"min-h-screen p
x-8 py-4
"
>
<
div
className=
"max-w-4xl mx-auto"
>
<
div
className=
"max-w-4xl mx-auto"
>
<
Button
<
Button
onClick=
{
()
=>
router
.
history
.
back
()
}
onClick=
{
()
=>
router
.
history
.
back
()
}
...
...
src/pages/settings.tsx
浏览文件 @
0e48d02a
...
@@ -7,12 +7,16 @@ import { showSuccess, showError } from "@/lib/toast";
...
@@ -7,12 +7,16 @@ import { showSuccess, showError } from "@/lib/toast";
import
{
AutoApproveSwitch
}
from
"@/components/AutoApproveSwitch"
;
import
{
AutoApproveSwitch
}
from
"@/components/AutoApproveSwitch"
;
import
{
TelemetrySwitch
}
from
"@/components/TelemetrySwitch"
;
import
{
TelemetrySwitch
}
from
"@/components/TelemetrySwitch"
;
import
{
useSettings
}
from
"@/hooks/useSettings"
;
import
{
useSettings
}
from
"@/hooks/useSettings"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
ArrowLeft
}
from
"lucide-react"
;
import
{
useRouter
}
from
"@tanstack/react-router"
;
export
default
function
SettingsPage
()
{
export
default
function
SettingsPage
()
{
const
{
theme
,
setTheme
}
=
useTheme
();
const
{
theme
,
setTheme
}
=
useTheme
();
const
[
isResetDialogOpen
,
setIsResetDialogOpen
]
=
useState
(
false
);
const
[
isResetDialogOpen
,
setIsResetDialogOpen
]
=
useState
(
false
);
const
[
isResetting
,
setIsResetting
]
=
useState
(
false
);
const
[
isResetting
,
setIsResetting
]
=
useState
(
false
);
const
[
appVersion
,
setAppVersion
]
=
useState
<
string
|
null
>
(
null
);
const
[
appVersion
,
setAppVersion
]
=
useState
<
string
|
null
>
(
null
);
const
{
settings
}
=
useSettings
();
const
{
settings
}
=
useSettings
();
const
router
=
useRouter
();
useEffect
(()
=>
{
useEffect
(()
=>
{
// Fetch app version
// Fetch app version
...
@@ -49,18 +53,29 @@ export default function SettingsPage() {
...
@@ -49,18 +53,29 @@ export default function SettingsPage() {
};
};
return
(
return
(
<
div
className=
"min-h-screen p
-8
"
>
<
div
className=
"min-h-screen p
x-8 py-4
"
>
<
div
className=
"max-w-5xl mx-auto"
>
<
div
className=
"max-w-5xl mx-auto"
>
<
h1
className=
"text-3xl font-bold mb-8 text-gray-900 dark:text-white"
>
<
Button
Settings
onClick=
{
()
=>
router
.
history
.
back
()
}
</
h1
>
variant=
"outline"
size=
"sm"
className=
"flex items-center gap-2 mb-4 bg-(--background-lightest) py-5"
>
<
ArrowLeft
className=
"h-4 w-4"
/>
Go Back
</
Button
>
<
div
className=
"flex justify-between mb-4"
>
<
h1
className=
"text-3xl font-bold text-gray-900 dark:text-white"
>
Settings
</
h1
>
{
/* App Version Section */
}
{
/* App Version Section */
}
<
div
className=
"mb-6 flex items-center text-sm text-gray-500 dark:text-gray-400"
>
<
div
className=
"flex items-center text-sm text-gray-500 dark:text-gray-400"
>
<
span
className=
"mr-2 font-medium"
>
App Version:
</
span
>
<
span
className=
"mr-2 font-medium"
>
App Version:
</
span
>
<
span
className=
"bg-gray-100 dark:bg-gray-700 px-2 py-0.5 rounded text-gray-800 dark:text-gray-200 font-mono"
>
<
span
className=
"bg-gray-100 dark:bg-gray-700 px-2 py-0.5 rounded text-gray-800 dark:text-gray-200 font-mono"
>
{
appVersion
?
appVersion
:
"-"
}
{
appVersion
?
appVersion
:
"-"
}
</
span
>
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
"space-y-6"
>
<
div
className=
"space-y-6"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论