mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
adress feedback
This commit is contained in:
@@ -75,7 +75,6 @@ export class WindowMain {
|
||||
pairwise(),
|
||||
concatMap(async ([lastValue, newValue]) => {
|
||||
if (lastValue && !newValue) {
|
||||
//console.log("Apply main window styles");
|
||||
// Reset the window state to the main window state
|
||||
applyMainWindowStyles(this.win, this.windowStates[mainWindowSizeKey]);
|
||||
// Because modal is used in front of another app, UX wise it makes sense to hide the main window when leaving modal mode.
|
||||
@@ -83,7 +82,6 @@ export class WindowMain {
|
||||
} else if (!lastValue && newValue) {
|
||||
// Apply the popup modal styles
|
||||
applyPopupModalStyles(this.win);
|
||||
//console.log("show the modal");
|
||||
this.win.show();
|
||||
}
|
||||
}),
|
||||
@@ -389,8 +387,8 @@ export class WindowMain {
|
||||
this.windowStates[configKey].displayBounds = screen.getDisplayMatching(bounds).bounds;
|
||||
|
||||
// Maybe store these as well?
|
||||
//console.log("isFocused", win.isFocused());
|
||||
//console.log("isVisible", win.isVisible());
|
||||
// win.isFocused();
|
||||
// win.isVisible();
|
||||
|
||||
if (!win.isMaximized() && !win.isMinimized() && !win.isFullScreen()) {
|
||||
this.windowStates[configKey].x = bounds.x;
|
||||
|
||||
@@ -29,15 +29,15 @@ export function applyMainWindowStyles(window: BrowserWindow, existingWindowState
|
||||
window.setMinimumSize(680, 500);
|
||||
|
||||
// need to guard against null/undefined values
|
||||
if (existingWindowState) {
|
||||
if (existingWindowState.width && existingWindowState.height) {
|
||||
window.setSize(existingWindowState.width, existingWindowState.height);
|
||||
}
|
||||
|
||||
if (existingWindowState.x && existingWindowState.y) {
|
||||
window.setPosition(existingWindowState.x, existingWindowState.y);
|
||||
}
|
||||
if (existingWindowState?.width && existingWindowState?.height) {
|
||||
window.setSize(existingWindowState.width, existingWindowState.height);
|
||||
}
|
||||
|
||||
if (existingWindowState?.x && existingWindowState?.y) {
|
||||
window.setPosition(existingWindowState.x, existingWindowState.y);
|
||||
}
|
||||
|
||||
window.setWindowButtonVisibility?.(true);
|
||||
window.setMenuBarVisibility?.(true);
|
||||
window.setResizable(true);
|
||||
|
||||
Reference in New Issue
Block a user