Skip to content

Commit 5af6722

Browse files
⚡ refactor: major changes from discord review session
1 parent c53ec3a commit 5af6722

File tree

3 files changed

+53
-58
lines changed

3 files changed

+53
-58
lines changed

src/options/index.css

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,48 @@
22

33
html {
44
background-color: #1e1e1e;
5-
padding: 0;
6-
margin: 0;
75
color: white;
86
font-family: Manrope, Arial, Helvetica, sans-serif;
97
}
108

9+
body {
10+
width: 356px;
11+
height: 372px;
12+
padding-left: 16px;
13+
padding-right: 16px;
14+
padding-top: 8px;
15+
padding-bottom: 8px;
16+
margin: 0;
17+
}
18+
1119
label {
1220
color: #B2B1B1;
13-
font-size: 16px;
21+
font-size: 14px;
1422
}
1523

1624
input {
17-
width: 100%;
18-
display: block;
1925
background-color: #e6e6e6;
2026
height: 40px;
27+
display: block;
28+
padding-left: 12px;
29+
padding-right: 12px;
2130
border-radius: 12px;
2231
border: none;
2332
font-size: 18px;
2433
margin-bottom: 16px;
2534
margin-top: 8px;
26-
padding-left: 8px;
27-
}
28-
29-
body {
30-
width: 326px;
31-
height: 344px;
32-
padding: 8px 16px;
33-
padding-right: 30px;
34-
}
35-
36-
#main > * {
37-
margin-bottom: 8px;
3835
}
3936

4037
.hflex {
4138
display: flex;
4239
flex-direction: row;
4340
}
4441

42+
43+
.f-1 {
44+
flex: 1;
45+
}
46+
4547
.align-center {
4648
align-items: center;
4749
}
@@ -55,6 +57,10 @@ body {
5557
text-align: center;
5658
}
5759

60+
.header {
61+
margin-bottom: 12px;
62+
}
63+
5864
.icon-container {
5965
width: 46px;
6066
height: 46px;
@@ -80,18 +86,17 @@ body {
8086
font-size: 12px;
8187
align-self: flex-end;
8288
margin-bottom: 20px;
83-
margin-right: -16px !important;
8489
}
8590

8691
.full-w {
8792
width: 100%;
8893
}
8994

9095
.btn {
91-
background-color: #223544;
96+
background-color: #4856BA;
9297
height: 42px;
93-
font-size: 21px;
94-
border-radius: 18px;
98+
font-size: 18px;
99+
border-radius: 12px;
95100
font-weight: 500;
96101
text-align: center;
97102
cursor: pointer;
@@ -102,18 +107,13 @@ body {
102107
}
103108

104109
.btn:hover {
105-
background-color: rgb(53, 83, 106);
106-
}
107-
108-
.refresh {
109-
align-self: flex-end;
110-
margin-top: 8px;
111-
width: 36px !important;
110+
background-color: #5464db;
112111
}
113112

114113
.submit {
115-
margin-top: 20px;
116-
width: 100%;
114+
margin-top: 10px;
115+
letter-spacing: 1.2px;
116+
font-size: 16px;
117117
}
118118

119119
.tip {

src/options/index.html

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,34 @@
55
<link rel="stylesheet" href="./index.css" />
66
</head>
77

8-
<body>
9-
<div id="main">
10-
<div class="hflex align-center">
11-
<div class="icon-container">
12-
<img class="icon" src="../../icons/icon.png" />
13-
</div>
14-
<div class="vflex text-center">
15-
<p class="heading">MONGO IP UPDATER</p>
16-
<i class="lazy">&nbsp;&nbsp;&nbsp;for the supa hackas</i>
17-
</div>
8+
<body class="vflex">
9+
<div class="header hflex align-center">
10+
<div class="icon-container">
11+
<img class="icon" src="../../icons/icon.png" />
1812
</div>
19-
<div>
20-
<div class="hflex full-w">
21-
<div class="full-w">
22-
<label for="ip">Your IP Address</label>
23-
<input name="ip" id="ip" type="text" />
24-
</div>
25-
<div id="refresh-ip" class="btn refresh">🔄</div>
26-
</div>
27-
<label for="name">Name for the entry in Mongo's access list </label>
13+
<div class="vflex f-1 text-center">
14+
<p class="heading">MONGO IP UPDATER</p>
15+
<i class="lazy">&nbsp;&nbsp;&nbsp;for the supa hackas</i>
16+
</div>
17+
</div>
18+
<div>
19+
<div class="vflex">
20+
<label for="ip">Your IP address</label>
21+
<input name="ip" id="ip" type="text" />
22+
</div>
23+
24+
<div class="vflex">
25+
<label for="name">Name for entry</label>
2826
<input name="name" type="text" />
29-
<div class="btn submit" id="upsert">
30-
<p>Allow my IP 🪄</p>
31-
</div>
3227
</div>
33-
<div class="tip">
34-
💡 This can be done from any page on <b>MongoDB Cloud</b>
28+
29+
<div class="btn submit" id="upsert">
30+
<p>Add to access list</p>
3531
</div>
3632
</div>
33+
<div class="tip">
34+
💡 Tip: This can be done from any page on <b>MongoDB Cloud</b>
35+
</div>
3736
<div id="error"></div>
3837
</body>
3938
</html>

src/options/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,4 @@ document.addEventListener("DOMContentLoaded", function () {
5858
document.querySelector("#error").innerText = e.message;
5959
}
6060
});
61-
62-
document.querySelector("#refresh-ip")?.addEventListener("click", async () => {
63-
updateIpField();
64-
});
6561
});

0 commit comments

Comments
 (0)