mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
remove additional debug output and revert popup-modal-style to match main
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
### TLDR
|
### TLDR
|
||||||
#### Build & run locally using `npm run electron:sandbox`
|
#### Build & run locally using `npm run electron:sandbox`
|
||||||
#### `build-desktop.yml` section `macos-package-mas` was modified:
|
#### `build-desktop.yml` section `macos-package-mas` was modified to support this in CI builds:
|
||||||
```
|
```
|
||||||
- name: Build Native Module
|
- name: Build Native Module
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-console */
|
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
@@ -55,17 +54,8 @@ export class ImportDesktopComponent {
|
|||||||
private async _onLoadProfilesFromBrowser(
|
private async _onLoadProfilesFromBrowser(
|
||||||
browser: string,
|
browser: string,
|
||||||
): Promise<chromium_importer.ProfileInfo[]> {
|
): Promise<chromium_importer.ProfileInfo[]> {
|
||||||
console.log("[SANDBOX] onLoadProfilesFromBrowser called for:", browser);
|
|
||||||
// Request browser access (required for sandboxed builds, no-op otherwise)
|
// Request browser access (required for sandboxed builds, no-op otherwise)
|
||||||
try {
|
await ipc.tools.chromiumImporter.requestBrowserAccess(browser);
|
||||||
console.log("[SANDBOX] Calling requestBrowserAccess...");
|
|
||||||
await ipc.tools.chromiumImporter.requestBrowserAccess(browser);
|
|
||||||
console.log("[SANDBOX] requestBrowserAccess completed successfully");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("[SANDBOX] requestBrowserAccess failed:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
console.log("[SANDBOX] Calling getAvailableProfiles...");
|
|
||||||
return ipc.tools.chromiumImporter.getAvailableProfiles(browser);
|
return ipc.tools.chromiumImporter.getAvailableProfiles(browser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,40 +42,14 @@ function positionWindow(window: BrowserWindow, position?: Position) {
|
|||||||
export function applyMainWindowStyles(window: BrowserWindow, existingWindowState: WindowState) {
|
export function applyMainWindowStyles(window: BrowserWindow, existingWindowState: WindowState) {
|
||||||
window.setMinimumSize(680, 500);
|
window.setMinimumSize(680, 500);
|
||||||
|
|
||||||
// need to guard against null/undefined values and ensure values are valid
|
// need to guard against null/undefined values
|
||||||
if (existingWindowState) {
|
|
||||||
if (
|
|
||||||
typeof existingWindowState.width === "number" &&
|
|
||||||
typeof existingWindowState.height === "number" &&
|
|
||||||
Number.isFinite(existingWindowState.width) &&
|
|
||||||
Number.isFinite(existingWindowState.height) &&
|
|
||||||
existingWindowState.width > 0 &&
|
|
||||||
existingWindowState.height > 0
|
|
||||||
) {
|
|
||||||
try {
|
|
||||||
// Ensure values are integers as Electron expects integer pixel values
|
|
||||||
window.setSize(
|
|
||||||
Math.round(existingWindowState.width),
|
|
||||||
Math.round(existingWindowState.height),
|
|
||||||
);
|
|
||||||
} catch {
|
|
||||||
// Silently fail - window will use default size
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (existingWindowState?.width && existingWindowState?.height) {
|
||||||
typeof existingWindowState.x === "number" &&
|
window.setSize(Math.floor(existingWindowState.width), Math.floor(existingWindowState.height));
|
||||||
typeof existingWindowState.y === "number" &&
|
}
|
||||||
Number.isFinite(existingWindowState.x) &&
|
|
||||||
Number.isFinite(existingWindowState.y)
|
if (existingWindowState?.x && existingWindowState?.y) {
|
||||||
) {
|
window.setPosition(Math.floor(existingWindowState.x), Math.floor(existingWindowState.y));
|
||||||
try {
|
|
||||||
// Ensure values are integers as Electron expects integer pixel values
|
|
||||||
window.setPosition(Math.round(existingWindowState.x), Math.round(existingWindowState.y));
|
|
||||||
} catch {
|
|
||||||
// Silently fail - window will use default position
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.setWindowButtonVisibility?.(true);
|
window.setWindowButtonVisibility?.(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user