fix: add viewport meta tag (#7049)

* fix: add viewport meta tag

* fix: set zoom factor default to 1

* fix: adding zoom factor everywhere for now
This commit is contained in:
Mark Kim 2024-02-13 04:15:26 -05:00 committed by GitHub
parent 039c12160c
commit 444877e1e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,7 @@
http-equiv="Content-Security-Policy"
content="font-src 'self' data:; connect-src * data: api: insomnia-event-source:; default-src * insomnia://*; img-src blob: data: * insomnia://*; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src blob: data: mediastream: * insomnia://*;"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="./ui/css/styles.css" />
</head>

View File

@ -160,6 +160,7 @@ const _launchApp = async () => {
window = windowUtils.getOrCreateWindow();
windowUtils.createHiddenBrowserWindow();
window.webContents.send('shell:open', args.join());
window.webContents.setZoomFactor(1);
}
});
// Disable deep linking in playwright e2e tests in order to run multiple tests in parallel
@ -174,6 +175,8 @@ const _launchApp = async () => {
app.on('second-instance', (_1, args) => {
console.log('Second instance listener received:', args.join('||'));
window = windowUtils.getOrCreateWindow();
window.webContents.setZoomFactor(1);
if (window) {
if (window.isMinimized()) {
window.restore();
@ -185,10 +188,13 @@ const _launchApp = async () => {
window.webContents.send('shell:open', lastArg);
});
window = windowUtils.getOrCreateWindow();
window.webContents.setZoomFactor(1);
app.on('open-url', (_event, url) => {
console.log('[main] Open Deep Link URL', url);
window = windowUtils.getOrCreateWindow();
window.webContents.setZoomFactor(1);
if (window) {
if (window.isMinimized()) {
window.restore();
@ -202,6 +208,7 @@ const _launchApp = async () => {
}
} else {
window = windowUtils.getOrCreateWindow();
window.webContents.setZoomFactor(1);
}
// Don't send origin header from Insomnia because we're not technically using CORS