selecting conversation and expanding the window nicely
This commit is contained in:
@@ -4,10 +4,22 @@
|
||||
enum Channels {
|
||||
ACTIVATE_LOG_IN = "ACTIVATE_LOG_IN",
|
||||
AUTH_TOKENS = "AUTH_TOKENS",
|
||||
RESIZE_WINDOW = "RESIZE_WINDOW",
|
||||
}
|
||||
|
||||
export enum STORE_ITEMS {
|
||||
AUTH_TOKENS = "AUTH_TOKENS",
|
||||
}
|
||||
|
||||
export const Dimensions = {
|
||||
default: {
|
||||
height: 600,
|
||||
width: 500,
|
||||
},
|
||||
selectedConvo: {
|
||||
height: 600,
|
||||
width: 900,
|
||||
},
|
||||
};
|
||||
|
||||
export default Channels;
|
||||
|
||||
+4
-1
@@ -8,9 +8,12 @@ declare global {
|
||||
initiateLogin(): void;
|
||||
};
|
||||
store: {
|
||||
get(val: STORE_ITEMS): any;
|
||||
get(val: STORE_ITEMS): Promise<any>;
|
||||
set(property: STORE_ITEMS, val: any): void;
|
||||
};
|
||||
window: {
|
||||
resizeWindow(newDimensions: { width: number; height: number }): void;
|
||||
};
|
||||
on(channel: Channels, func: any): void;
|
||||
once(channel: Channels, func: any): void;
|
||||
};
|
||||
|
||||
@@ -19,6 +19,12 @@ const electronAPI = {
|
||||
// Other method you want to add like has(), reset(), etc.
|
||||
},
|
||||
|
||||
window: {
|
||||
resizeWindow(newDimensions: { width: number; height: number }) {
|
||||
ipcRenderer.send(Channels.RESIZE_WINDOW, newDimensions);
|
||||
},
|
||||
},
|
||||
|
||||
on(channel: Channels, func: any) {
|
||||
const validChannels = ["ipc-example"];
|
||||
// if (validChannels.includes(channel)) {
|
||||
|
||||
Reference in New Issue
Block a user