Skip to content

Commit 0599bc8

Browse files
committed
fix(ui): auto-resize based on window inner width/height
1 parent b8b00e4 commit 0599bc8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/views/popup/index.html

+2-5
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@
4747

4848
#app-popup {
4949
display: flex;
50-
width: 45rem;
50+
width: 800px;
5151
max-width: 800px;
52-
height: 37rem;
52+
height:600px;
5353
max-height: 600px;
5454
overflow: hidden;
55-
transition:
56-
width 1s,
57-
height 2s;
5855
}
5956

6057
#app-skeleton-container {

src/views/popup/main.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import defineComponent from '~/web/define-component';
22

3+
const root = document?.getElementById('app-popup');
4+
5+
if (root) {
6+
root.style.width = `${window.innerWidth}px`;
7+
root.style.height = `${window.innerHeight}px`;
8+
}
9+
310
defineComponent({ baseUrl: import.meta.env.VITE_BASE })
411
.then(() => console.info('Web Component defined'))
512
.catch(err => console.error('Failed to define component', err));

0 commit comments

Comments
 (0)