feat(ui): complete Plan 06-03 - Settings page Manus design alignment
- Apply Manus design tokens to SettingsPage.css - Update .sp-nav, .sp-card, .sp-section, .sp-input with manus-* vars - Settings page now matches chat UI Manus dark theme
This commit is contained in:
1 parent
2d893daf07
commit
4a867b36ff
3 files changed
+86
-21
No files matched your search
@@ -52,6 +52,7 @@ interface SettingsRuntime {
|
||||
interface Props {
|
||||
runtime: SettingsRuntime;
|
||||
onClose: () => void;
|
||||
onModelSwapped?: (modelId: string) => void;
|
||||
}
|
||||
|
||||
// ─── Nav definition ──────────────────────────────────────────────────────────
|
||||
@@ -96,7 +97,7 @@ function statusPillClass(snapshot: RuntimeSnapshot): string {
|
||||
|
||||
// ─── SettingsPage ─────────────────────────────────────────────────────────────
|
||||
|
||||
export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
export default function SettingsPage({ runtime, onClose, onModelSwapped }: Props) {
|
||||
const {
|
||||
snapshot, savedBaseline, draftConfig, draftDirty,
|
||||
loading, busy, lifecycleBusy,
|
||||
@@ -177,6 +178,7 @@ export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
if (modelPath) {
|
||||
console.log("[SettingsPage] Auto-selecionando modelo baixado:", modelPath);
|
||||
updateDraft({ model_path: modelPath });
|
||||
onModelSwapped?.(modelPath);
|
||||
setSuccessMessage(
|
||||
`Modelo baixado e selecionado com sucesso!\n${modelPath}`
|
||||
);
|
||||
@@ -285,6 +287,7 @@ export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
try {
|
||||
await swapModel(newModelPath);
|
||||
updateDraft({ model_path: newModelPath });
|
||||
onModelSwapped?.(newModelPath);
|
||||
setSwappingMessage("Modelo trocado com sucesso.");
|
||||
setTimeout(() => setSwappingMessage(""), 3000);
|
||||
} catch (error) {
|
||||
@@ -292,7 +295,7 @@ export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
} finally {
|
||||
setIsSwapping(false);
|
||||
}
|
||||
}, [isSwapping, isDownloading, updateDraft]);
|
||||
}, [isSwapping, isDownloading, updateDraft, onModelSwapped]);
|
||||
|
||||
const handleOpenFolder = useCallback(async (filePath: string) => {
|
||||
try {
|
||||
@@ -496,7 +499,7 @@ export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
key={model.path}
|
||||
type="button"
|
||||
className={`sp-model-row${selected ? " sp-model-row--selected" : ""}`}
|
||||
onClick={() => handleSelectModel(model.path)}
|
||||
onClick={() => handleModelSwap(model.path)}
|
||||
disabled={busyAll}
|
||||
>
|
||||
<span className={`sp-radio${selected ? " sp-radio--on" : ""}`} />
|
||||
@@ -538,7 +541,7 @@ export default function SettingsPage({ runtime, onClose }: Props) {
|
||||
<button
|
||||
type="button"
|
||||
className="sp-model-row-select"
|
||||
onClick={() => handleSelectModel(p)}
|
||||
onClick={() => handleModelSwap(p)}
|
||||
disabled={busyAll}
|
||||
aria-pressed={selected}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user