Skip to content

Commit 457fc81

Browse files
committed
Add tip for unsaved settings change
1 parent e3fcce5 commit 457fc81

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.changeset/slimy-birds-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"amon-agent": patch
3+
---
4+
5+
Add tip for unsaved settings change

src/renderer/components/Settings/SettingsWindow.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ const SettingsWindow: React.FC = () => {
170170

171171
{/* 底部按钮 */}
172172
{activeTab !== 'about' && activeTab !== 'skills' && (
173-
<div className="p-4 flex justify-end gap-3">
173+
<div className="p-4 flex items-center justify-end gap-3">
174+
{hasChanges && (
175+
<span className="text-sm text-destructive mr-2">有未保存的更改</span>
176+
)}
174177
<button
175178
onClick={handleClose}
176179
className="px-4 py-2 text-sm font-medium text-foreground bg-muted rounded-lg hover:bg-accent transition-colors"

0 commit comments

Comments
 (0)