mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
refactor(store): Extract default values into store/defaults/
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
apps/ui/src/store/defaults/background-settings.ts
Normal file
13
apps/ui/src/store/defaults/background-settings.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { BackgroundSettings } from '../types/ui-types';
|
||||
|
||||
// Default background settings for board backgrounds
|
||||
export const defaultBackgroundSettings: BackgroundSettings = {
|
||||
imagePath: null,
|
||||
cardOpacity: 100,
|
||||
columnOpacity: 100,
|
||||
columnBorderEnabled: true,
|
||||
cardGlassmorphism: true,
|
||||
cardBorderEnabled: true,
|
||||
cardBorderOpacity: 100,
|
||||
hideScrollbar: false,
|
||||
};
|
||||
2
apps/ui/src/store/defaults/constants.ts
Normal file
2
apps/ui/src/store/defaults/constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Maximum number of output lines to keep in init script state (prevents unbounded memory growth)
|
||||
export const MAX_INIT_OUTPUT_LINES = 500;
|
||||
3
apps/ui/src/store/defaults/index.ts
Normal file
3
apps/ui/src/store/defaults/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export { defaultBackgroundSettings } from './background-settings';
|
||||
export { defaultTerminalState } from './terminal-defaults';
|
||||
export { MAX_INIT_OUTPUT_LINES } from './constants';
|
||||
21
apps/ui/src/store/defaults/terminal-defaults.ts
Normal file
21
apps/ui/src/store/defaults/terminal-defaults.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { DEFAULT_FONT_VALUE } from '@/config/ui-font-options';
|
||||
import type { TerminalState } from '../types/terminal-types';
|
||||
|
||||
// Default terminal state values
|
||||
export const defaultTerminalState: TerminalState = {
|
||||
isUnlocked: false,
|
||||
authToken: null,
|
||||
tabs: [],
|
||||
activeTabId: null,
|
||||
activeSessionId: null,
|
||||
maximizedSessionId: null,
|
||||
defaultFontSize: 14,
|
||||
defaultRunScript: '',
|
||||
screenReaderMode: false,
|
||||
fontFamily: DEFAULT_FONT_VALUE,
|
||||
scrollbackLines: 5000,
|
||||
lineHeight: 1.0,
|
||||
maxSessions: 100,
|
||||
lastActiveProjectPath: null,
|
||||
openTerminalMode: 'newTab',
|
||||
};
|
||||
Reference in New Issue
Block a user