Skip to content

Commit f247978

Browse files
committed
style: improve popup page adaptation in complex situations
1 parent fe7c686 commit f247978

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

src/manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"action": {
2626
"default_popup": "popup.html"
2727
},
28+
"options_ui": {
29+
"page": "popup.html",
30+
"open_in_tab": true
31+
},
2832
"content_scripts": [
2933
{
3034
"matches": [

src/manifest.v2.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"browser_action": {
2626
"default_popup": "popup.html"
2727
},
28+
"options_ui": {
29+
"page": "popup.html",
30+
"open_in_tab": true
31+
},
2832
"content_scripts": [
2933
{
3034
"matches": [

src/popup/Popup.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function Donation() {
391391
>
392392
<img alt="buymeacoffee" src={bugmeacoffee} />
393393
</a>
394-
<hr />
394+
<br />
395395
<>
396396
Wechat Pay
397397
<img alt="wechatpay" src={wechatpay} />
@@ -465,7 +465,7 @@ function Popup() {
465465

466466
return (
467467
<div className="container">
468-
<form>
468+
<form style="width:100%;">
469469
<Tabs selectedTabClassName="popup-tab--selected">
470470
<TabList>
471471
<Tab className="popup-tab">General</Tab>
@@ -494,7 +494,7 @@ function Popup() {
494494
)}
495495
</Tabs>
496496
</form>
497-
<hr />
497+
<br />
498498
<Footer currentVersion={currentVersion} latestVersion={latestVersion} />
499499
</div>
500500
)

src/popup/styles.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@
2424
}
2525

2626
.container {
27-
width: 440px;
28-
height: 560px;
27+
display: flex;
28+
flex-direction: column;
29+
align-items: center;
30+
min-width: 440px;
31+
min-height: 560px;
32+
width: 100%;
33+
height: 100%;
2934
padding: 20px;
3035
overflow-y: auto;
3136
}
@@ -44,7 +49,7 @@
4449

4550
.footer {
4651
width: 90%;
47-
position: absolute;
52+
position: fixed;
4853
bottom: 10px;
4954
display: flex;
5055
flex-direction: row;
@@ -54,6 +59,7 @@
5459
border-radius: 5px;
5560
padding: 6px;
5661
z-index: 2147483647;
62+
font-size: 12px;
5763
}
5864

5965
.popup-tab {

0 commit comments

Comments
 (0)