starting off header with the full window dimensions

This commit is contained in:
talksik
2022-04-30 21:14:03 -05:00
parent b9141d643d
commit 66db28cd7c
14 changed files with 262 additions and 25 deletions
+21 -7
View File
@@ -12,14 +12,28 @@ export enum STORE_ITEMS {
AUTH_SESSION_JWT = "AUTH_SESSION_JWT",
}
export const Dimensions = {
default: {
height: 700,
width: 500,
export type Dimensions = {
height: number;
width: number;
};
export const DimensionPresets = {
terminal: {
height: 675,
width: 400,
},
selectedConvo: {
height: 700,
width: 900,
terminalDetailOrOverlay: {
height: 675,
width: 800,
},
terminalDetailOverlay: {
height: 675,
width: 1100,
},
// todo: typically just send whatever dimensions are needed
overlayMode: {
height: -1,
width: 300,
},
};
+2 -2
View File
@@ -1,6 +1,6 @@
import Channels, { Dimensions } from "./constants";
import { contextBridge, ipcRenderer } from "electron";
import Channels from "./constants";
import { STORE_ITEMS } from "./constants";
const electronAPI = {
@@ -20,7 +20,7 @@ const electronAPI = {
},
window: {
resizeWindow(newDimensions: { width: number; height: number }) {
resizeWindow(newDimensions: Dimensions) {
ipcRenderer.send(Channels.RESIZE_WINDOW, newDimensions);
},
},