mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
feat: align terminal font settings with appearance fonts
- Terminal font dropdown now uses mono fonts from UI font options - Unified font list between appearance section and terminal settings - Terminal font persisted to GlobalSettings for import/export support - Aligned global terminal settings popover with per-terminal popover: - Same settings in same order (Font Size, Run on New Terminal, Font Family, Scrollback, Line Height, Screen Reader) - Consistent styling (Radix Select instead of native select) - Added terminal padding (12px vertical, 16px horizontal) for readability
This commit is contained in:
@@ -35,6 +35,7 @@ const SETTINGS_FIELDS_TO_SYNC = [
|
||||
'theme',
|
||||
'fontFamilySans',
|
||||
'fontFamilyMono',
|
||||
'terminalFontFamily', // Maps to terminalState.fontFamily
|
||||
'sidebarOpen',
|
||||
'chatHistoryOpen',
|
||||
'maxConcurrency',
|
||||
@@ -159,6 +160,9 @@ export function useSettingsSync(): SettingsSyncState {
|
||||
if (field === 'currentProjectId') {
|
||||
// Special handling: extract ID from currentProject object
|
||||
updates[field] = appState.currentProject?.id ?? null;
|
||||
} else if (field === 'terminalFontFamily') {
|
||||
// Special handling: map terminalState.fontFamily to terminalFontFamily
|
||||
updates[field] = appState.terminalState.fontFamily;
|
||||
} else {
|
||||
updates[field] = appState[field as keyof typeof appState];
|
||||
}
|
||||
@@ -260,6 +264,8 @@ export function useSettingsSync(): SettingsSyncState {
|
||||
for (const field of SETTINGS_FIELDS_TO_SYNC) {
|
||||
if (field === 'currentProjectId') {
|
||||
updates[field] = appState.currentProject?.id ?? null;
|
||||
} else if (field === 'terminalFontFamily') {
|
||||
updates[field] = appState.terminalState.fontFamily;
|
||||
} else {
|
||||
updates[field] = appState[field as keyof typeof appState];
|
||||
}
|
||||
@@ -322,6 +328,12 @@ export function useSettingsSync(): SettingsSyncState {
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
} else if (field === 'terminalFontFamily') {
|
||||
// Special handling: compare terminalState.fontFamily
|
||||
if (newState.terminalState.fontFamily !== prevState.terminalState.fontFamily) {
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
const key = field as keyof typeof newState;
|
||||
if (newState[key] !== prevState[key]) {
|
||||
@@ -403,6 +415,8 @@ export async function forceSyncSettingsToServer(): Promise<boolean> {
|
||||
for (const field of SETTINGS_FIELDS_TO_SYNC) {
|
||||
if (field === 'currentProjectId') {
|
||||
updates[field] = appState.currentProject?.id ?? null;
|
||||
} else if (field === 'terminalFontFamily') {
|
||||
updates[field] = appState.terminalState.fontFamily;
|
||||
} else {
|
||||
updates[field] = appState[field as keyof typeof appState];
|
||||
}
|
||||
@@ -505,6 +519,13 @@ export async function refreshSettingsFromServer(): Promise<boolean> {
|
||||
worktreePanelCollapsed: serverSettings.worktreePanelCollapsed ?? false,
|
||||
lastProjectDir: serverSettings.lastProjectDir ?? '',
|
||||
recentFolders: serverSettings.recentFolders ?? [],
|
||||
// Terminal font (nested in terminalState)
|
||||
...(serverSettings.terminalFontFamily && {
|
||||
terminalState: {
|
||||
...currentAppState.terminalState,
|
||||
fontFamily: serverSettings.terminalFontFamily,
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
// Also refresh setup wizard state
|
||||
|
||||
Reference in New Issue
Block a user