Skip to content

Commit d288b68

Browse files
taneltmmrts
authored andcommitted
Fix extension should not have runtime dependencies
- Bootstrap removed from post-install page (installed.html) - Custom CSS written in it's place - should look nearly identical WE2-1046 Signed-off-by: Tanel Metsar <[email protected]>
1 parent cbca651 commit d288b68

File tree

5 files changed

+135
-62
lines changed

5 files changed

+135
-62
lines changed

package-lock.json

Lines changed: 0 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,5 @@
3737
"typescript": "^5.7.2",
3838
"typescript-eslint": "^8.19.1",
3939
"webextension-polyfill": "^0.12.0"
40-
},
41-
"dependencies": {
42-
"bootstrap": "^5.3.3"
4340
}
4441
}

scripts/build.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ const targets = {
115115
);
116116
await cp("./static/_locales", "./dist/firefox/_locales");
117117
await cp("./static/views", "./dist/firefox/views");
118-
await cp("./node_modules/bootstrap/dist/css/bootstrap.min.css", "./dist/firefox/views/bootstrap.min.css");
119118

120119
rem(
121120
"Setting up the Firefox manifest"

static/views/installed.css

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
:root {
2+
--color-background: #FFF;
3+
--color-primary: #0D6EFD;
4+
--color-secondary: #6C757D;
5+
--color-modal-border: #0000002D;
6+
--color-modal-separator: #DEE2E6;
7+
--color-text: #212529;
8+
--color-btn-text: #FFF;
9+
10+
font-family:
11+
system-ui,
12+
-apple-system,
13+
"Segoe UI",
14+
Roboto,
15+
"Helvetica Neue",
16+
"Noto Sans",
17+
"Liberation Sans",
18+
Arial,
19+
sans-serif,
20+
"Apple Color Emoji",
21+
"Segoe UI Emoji",
22+
"Segoe UI Symbol",
23+
"Noto Color Emoji";
24+
25+
color: var(--color-text);
26+
27+
margin: 0;
28+
height: 100vh;
29+
display: flex;
30+
justify-content: safe center;
31+
align-items: safe center;
32+
height: 100vh;
33+
}
34+
35+
a {
36+
color: var(--color-primary);
37+
}
38+
39+
ul {
40+
margin-top: 0;
41+
margin-bottom: 1rem;
42+
padding-left: 2rem;
43+
}
44+
45+
.modal {
46+
display: flex;
47+
box-sizing: border-box;
48+
max-width: 500px;
49+
flex-direction: column;
50+
height: fit-content;
51+
border-radius: 7px;
52+
border: 1px solid var(--color-modal-border);
53+
background-color: var(--color-background);
54+
55+
> * {
56+
padding: 1rem;
57+
}
58+
59+
.title {
60+
display: flex;
61+
align-items: center;
62+
box-sizing: border-box;
63+
height: 62px;
64+
font-size: 1.25rem;
65+
font-weight: 500;
66+
margin: 0;
67+
}
68+
69+
.content {
70+
line-height: 1.5;
71+
border-top: 1px solid var(--color-modal-separator);
72+
border-bottom: 1px solid var(--color-modal-separator);
73+
}
74+
75+
.footer {
76+
display: flex;
77+
justify-content: end;
78+
gap: 0.5rem;
79+
flex-wrap: wrap;
80+
81+
button {
82+
cursor: pointer;
83+
box-sizing: border-box;
84+
min-height: 38px;
85+
padding: 0.375rem 0.75rem;
86+
color: var(--color-btn-text);
87+
font-size: 1rem;
88+
background: var(--btn-bg);
89+
border: 1px solid var(--btn-bg);
90+
border-radius: 6px;
91+
outline: 4px solid transparent;
92+
transition: outline 0.25 ease-in;
93+
94+
&.btn-primary {
95+
--btn-bg: var(--color-primary);
96+
}
97+
98+
&.btn-secondary {
99+
--btn-bg: var(--color-secondary);
100+
}
101+
102+
&:hover,
103+
&:active,
104+
&:focus {
105+
background: color-mix(in srgb, var(--btn-bg), black 10%);
106+
border-color: color-mix(in srgb, var(--btn-bg), black 12%);
107+
}
108+
109+
&:focus-visible {
110+
outline-color: color-mix(in srgb, var(--btn-bg), white 50%);
111+
}
112+
}
113+
}
114+
}

static/views/installed.html

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="UTF-8">
55
<title>Web-eID Privacy</title>
6-
<link rel="stylesheet" href="./bootstrap.min.css" />
6+
<link rel="stylesheet" href="installed.css">
77
</head>
88
<body>
9-
<div class="modal d-block" tabindex="-1" role="dialog">
10-
<div class="modal-dialog modal-dialog-centered">
11-
<div class="modal-content">
12-
<div class="modal-header">
13-
<h5 id="title" class="modal-title">Web eID Data Protection Terms</h5>
14-
</div>
15-
<div class="modal-body" id="content">
16-
Web eID transmits the following data that personally identifies you to the e-service:
17-
<ul>
18-
<li>the user`s certificate for authentication or signing;</li>
19-
<li>URL of the website origin for authentication.</li>
20-
</ul>
21-
The transfer of personal data is necessary for the functioning of authentication and digital signing.
22-
Transmitted data is not stored.
23-
If you do not agree to the transfer of data then we recommend you to remove the Web eID extension.<br />
24-
Full details about the personal data we transmit and what we do with it are provided in our
25-
<a href="https://addons.mozilla.org/en-US/firefox/addon/web-eid-webextension/privacy/" target="_blank">Data Protection Terms</a>.
26-
</div>
27-
<div class="modal-footer">
28-
<button type="button" class="btn btn-secondary" id="uninstall">Remove Web eID</button>
29-
<button type="button" class="btn btn-primary" id="agree">Accept the terms</button>
30-
</div>
31-
</div>
9+
<div class="modal" tabindex="-1" role="dialog">
10+
<h1 id="title" class="title">Web eID Data Protection Terms</h1>
11+
12+
<div id="content" class="content">
13+
Web eID transmits the following data that personally identifies you to the e-service:
14+
<ul>
15+
<li>the user's certificate for authentication or signing;</li>
16+
<li>URL of the website origin for authentication.</li>
17+
</ul>
18+
The transfer of personal data is necessary for the functioning of authentication and digital signing.
19+
Transmitted data is not stored.
20+
If you do not agree to the transfer of data then we recommend you to remove the Web eID extension.<br />
21+
Full details about the personal data we transmit and what we do with it are provided in our
22+
<a href="https://addons.mozilla.org/en-US/firefox/addon/web-eid-webextension/privacy/" target="_blank">Data Protection Terms</a>.
23+
</div>
24+
25+
<div class="footer">
26+
<button type="button" class="btn btn-secondary" id="uninstall">Remove Web eID</button>
27+
<button type="button" class="btn btn-primary" id="agree">Accept the terms</button>
3228
</div>
3329
</div>
3430
<script src="installed.js"></script>

0 commit comments

Comments
 (0)