* Make thread screen as default screen * Blank state when user have not any model * Cleanup topbar thread screen * Improve style right panel * Add instructions right panel * Styling thread list history * Resolve conflict * Default title new thread * Fix trigger panel sidebar * Make default right panel false when no activethread * Fix CI test * chore: assistant instruction with system prompt * Fix title and blank state explore the hub * Claenup style thread screen and add buble message for assitant * Remove unused import * Styling more menus on thread list and right panel, and make max height textarea 400 pixel * Finished revamp ui thread * Finished system monitor UI * Style box running models * Make animate right panel more smooth * Add status arround textarea for starting model info * Temporary disable hide left panel * chore: system resource monitoring update * copy nits * chore: typo * Reverse icon chevron accordion * Move my models into setting page --------- Co-authored-by: Louis <louis@jan.ai> Co-authored-by: 0xSage <n@pragmatic.vc>
38 lines
908 B
TypeScript
38 lines
908 B
TypeScript
import { BrowserWindow } from 'electron'
|
|
|
|
/**
|
|
* Manages the current window instance.
|
|
*/
|
|
export class WindowManager {
|
|
public static instance: WindowManager = new WindowManager()
|
|
public currentWindow?: BrowserWindow
|
|
|
|
constructor() {
|
|
if (WindowManager.instance) {
|
|
return WindowManager.instance
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Creates a new window instance.
|
|
* @param {Electron.BrowserWindowConstructorOptions} options - The options to create the window with.
|
|
* @returns The created window instance.
|
|
*/
|
|
createWindow(options?: Electron.BrowserWindowConstructorOptions | undefined) {
|
|
this.currentWindow = new BrowserWindow({
|
|
width: 1200,
|
|
minWidth: 1200,
|
|
height: 800,
|
|
show: false,
|
|
trafficLightPosition: {
|
|
x: 10,
|
|
y: 15,
|
|
},
|
|
titleBarStyle: 'hidden',
|
|
vibrancy: 'sidebar',
|
|
...options,
|
|
})
|
|
return this.currentWindow
|
|
}
|
|
}
|