getting decent logic and types and stuff for resizing and windows
This commit is contained in:
@@ -13,25 +13,27 @@ export enum STORE_ITEMS {
|
||||
AUTH_SESSION_JWT = "AUTH_SESSION_JWT",
|
||||
}
|
||||
|
||||
export type Dimensions = {
|
||||
height: number;
|
||||
width: number;
|
||||
export type Dimensions = { height: number; width: number };
|
||||
|
||||
export interface DimensionChangeRequest {
|
||||
setAlwaysOnTop: boolean;
|
||||
dimensions: Dimensions;
|
||||
addDimensions: boolean;
|
||||
}
|
||||
|
||||
export const TERMINAL_PRESET: Dimensions = {
|
||||
height: 675,
|
||||
width: 400,
|
||||
};
|
||||
|
||||
export const DimensionPresets = {
|
||||
terminal: {
|
||||
height: 675,
|
||||
width: 400,
|
||||
},
|
||||
terminalAndDetails: {
|
||||
height: 675,
|
||||
width: 800,
|
||||
},
|
||||
// todo: typically just send whatever dimensions are needed
|
||||
overlayOnlyMode: {
|
||||
height: 800,
|
||||
width: 325,
|
||||
},
|
||||
export const TERMINAL_DETAILS_PRESET: Dimensions = {
|
||||
height: 675,
|
||||
width: 800,
|
||||
};
|
||||
|
||||
export const OVERLAY_ONLY_INITIAL_PRESET: Dimensions = {
|
||||
height: 50,
|
||||
width: 325,
|
||||
};
|
||||
|
||||
export default Channels;
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
import { Dimensions, DimensionChangeRequest } from "./constants";
|
||||
import { electronAPI } from "./preload";
|
||||
|
||||
export {};
|
||||
@@ -12,7 +13,7 @@ declare global {
|
||||
set(property: STORE_ITEMS, val: any): void;
|
||||
};
|
||||
window: {
|
||||
resizeWindow(newDimensions: { width: number; height: number }): void;
|
||||
resizeWindow(dimensionChangeRequest: DimensionChangeRequest): void;
|
||||
};
|
||||
on(channel: Channels, func: any): void;
|
||||
once(channel: Channels, func: any): void;
|
||||
|
||||
Reference in New Issue
Block a user