feat: add input bar offset setting for curved screen devices (#89)
Co-authored-by: auroraflux <auroraflux@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
auroraflux
parent
919eeea53b
commit
39b9f985ce
@@ -24,6 +24,7 @@ interface UIStore {
|
||||
activeMainTab: MainTab;
|
||||
pendingDiffFile: string | null;
|
||||
isMobile: boolean;
|
||||
isKeyboardOpen: boolean;
|
||||
isCommandPaletteOpen: boolean;
|
||||
isHelpDialogOpen: boolean;
|
||||
isAboutDialogOpen: boolean;
|
||||
@@ -40,6 +41,7 @@ interface UIStore {
|
||||
toolCallExpansion: 'collapsed' | 'activity' | 'detailed';
|
||||
fontSize: number;
|
||||
padding: number;
|
||||
inputBarOffset: number;
|
||||
|
||||
favoriteModels: Array<{ providerID: string; modelID: string }>;
|
||||
recentModels: Array<{ providerID: string; modelID: string }>;
|
||||
@@ -75,6 +77,8 @@ interface UIStore {
|
||||
setToolCallExpansion: (value: 'collapsed' | 'activity' | 'detailed') => void;
|
||||
setFontSize: (size: number) => void;
|
||||
setPadding: (size: number) => void;
|
||||
setInputBarOffset: (offset: number) => void;
|
||||
setKeyboardOpen: (open: boolean) => void;
|
||||
applyTypography: () => void;
|
||||
applyPadding: () => void;
|
||||
updateProportionalSidebarWidths: () => void;
|
||||
@@ -99,6 +103,7 @@ export const useUIStore = create<UIStore>()(
|
||||
activeMainTab: 'chat',
|
||||
pendingDiffFile: null,
|
||||
isMobile: false,
|
||||
isKeyboardOpen: false,
|
||||
isCommandPaletteOpen: false,
|
||||
isHelpDialogOpen: false,
|
||||
isAboutDialogOpen: false,
|
||||
@@ -114,6 +119,7 @@ export const useUIStore = create<UIStore>()(
|
||||
toolCallExpansion: 'collapsed',
|
||||
fontSize: 100,
|
||||
padding: 100,
|
||||
inputBarOffset: 0,
|
||||
favoriteModels: [],
|
||||
recentModels: [],
|
||||
diffLayoutPreference: 'dynamic',
|
||||
@@ -336,6 +342,14 @@ export const useUIStore = create<UIStore>()(
|
||||
set({ diffWrapLines: wrap });
|
||||
},
|
||||
|
||||
setInputBarOffset: (offset) => {
|
||||
set({ inputBarOffset: offset });
|
||||
},
|
||||
|
||||
setKeyboardOpen: (open) => {
|
||||
set({ isKeyboardOpen: open });
|
||||
},
|
||||
|
||||
toggleFavoriteModel: (providerID, modelID) => {
|
||||
set((state) => {
|
||||
const exists = state.favoriteModels.some(
|
||||
|
||||
Reference in New Issue
Block a user