Skip to content

Commit abb22d7

Browse files
committed
Add 'about' tab and icon. Update version to 0.4.5
1 parent 1665170 commit abb22d7

File tree

9 files changed

+114
-6
lines changed

9 files changed

+114
-6
lines changed

_locales/en/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"startHereLabel": {
121121
"message": "Start",
122122
"description": "Label for the start here button."
123+
},
124+
"aboutLabel": {
125+
"message": "About",
126+
"description": "Label for the about button."
123127
}
124128

125129
}

_locales/es/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,9 @@
120120
"startHereLabel": {
121121
"message": "Empezar",
122122
"description": "Etiqueta para el enlace de inicio."
123+
},
124+
"aboutLabel": {
125+
"message": "Acerca de",
126+
"description": "Etiqueta para la pestaña 'Acerca de'."
123127
}
124128
}

_locales/fr/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,9 @@
120120
"startHereLabel": {
121121
"message": "Commencez",
122122
"description": "Libellé pour le lien de démarrage."
123+
},
124+
"aboutLabel": {
125+
"message": "À propos",
126+
"description": "Libellé pour l'onglet À propos."
123127
}
124128
}

extension.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
<img src="icons/settings.svg" alt="Settings icon"/>
1515
<span class="button-text"></span>
1616
</button>
17+
<button id="aboutTab" class="tabLink" role="tab" aria-selected="false" aria-controls="aboutContent">
18+
<img src="icons/info.svg" alt="About icon"/>
19+
<span class="button-text"></span>
20+
</button>
21+
1722
</div>
1823
<div id="tabContent">
1924
<div id="popupContent" class="tabContent" role="tabpanel" aria-labelledby="popupTab">
@@ -62,6 +67,15 @@
6267
<div id="saveError" class="error-badge" role="alert"></div>
6368
</form>
6469
</div>
70+
<div id="aboutContent" class="tabContent" role="tabpanel" aria-labelledby="aboutTab" style="display: none;">
71+
<img src="icons/icon128.png" alt="Extension Logo" class="about-logo" />
72+
73+
<a href="https://github.com/imigueldiaz" target="_blank" rel="noopener noreferrer"><h2>Ignacio de Miguel Diaz</h2></a>
74+
<h3><a href="https://github.com/imigueldiaz/firefox-quick-abstract" target="_blank" rel="noopener noreferrer"><span id="extensionName"></span></a></h3>
75+
<p><a href="" id="versionLink" target="_blank" rel="noopener noreferrer">Version <span id="version"></span></a></p>
76+
<a href="LICENSE" target="_blank" rel="noopener noreferrer">MIT License</a>
77+
</div>
78+
6579
</div>
6680
<script type="text/javascript" src="lib/purify.min.js"></script>
6781
<script type="text/javascript" src="extension.js"></script>

icons/info.svg

Lines changed: 1 addition & 0 deletions
Loading

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "__MSG_extensionName__",
4-
"version": "0.4.4",
4+
"version": "0.4.5",
55
"description": "__MSG_extensionDescription__",
66
"default_locale": "en",
77
"permissions": [

options.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ document.addEventListener("DOMContentLoaded", function() {
8989
document.getElementById('modelLabel').textContent = browser.i18n.getMessage('modelLabel');
9090
document.getElementById('tempLabel').textContent = browser.i18n.getMessage('temperatureLabel');
9191
document.querySelector('#save .button-text').textContent = browser.i18n.getMessage('saveLabel');
92-
9392
// Set the window title
9493
window.title = browser.i18n.getMessage('extensionName');
9594
});

popup.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,19 @@ document.addEventListener("DOMContentLoaded", function() {
342342
// Set the text of the buttons and the title of the popup
343343
document.querySelector('#popupTab .button-text').textContent = browser.i18n.getMessage('startHereLabel');
344344
document.querySelector('#optionsTab .button-text').textContent = browser.i18n.getMessage('settingsLabel');
345+
document.querySelector('#aboutTab .button-text').textContent = browser.i18n.getMessage('aboutLabel');
345346

346347
document.querySelector('#copyMarkdown .button-text').textContent = browser.i18n.getMessage('copyMarkdownLabel');
347348
document.querySelector('#copyHtml .button-text').textContent = browser.i18n.getMessage('copyHtmlLabel');
348349
document.querySelector('#copyText .button-text').textContent = browser.i18n.getMessage('copyTextLabel');
349350
document.querySelector('#resume .button-text').textContent = browser.i18n.getMessage('summarizeLabel');
351+
352+
353+
const version = browser.runtime.getManifest().version;
354+
document.getElementById('version').textContent = version;
355+
document.getElementById('versionLink').href = `https://github.com/imigueldiaz/firefox-quick-abstract/releases/tag/v${version}`;
356+
document.getElementById('extensionName').innerText = browser.i18n.getMessage('extensionName');
357+
350358
document.title = browser.i18n.getMessage('extensionName');
351359

352360
loadInitialText();

style.css

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ body {
77
line-height: 1.5;
88
width: 550px;
99
height: 600px;
10+
display: flex;
11+
flex-direction: column;
1012
}
1113
body#popup {
1214
padding: 5px;
@@ -56,11 +58,12 @@ button img {
5658
height: 30px;
5759
width: 30px;
5860
filter: none;
59-
margin: 0;
60-
}
61-
#button-container button img {
62-
object-fit: contain!important;
61+
margin: 0;
62+
padding: 0;
63+
object-fit: contain!important;
64+
object-position: center;
6365
}
66+
6467
button.ok {
6568
background-color: #0A84FF;
6669
color: #FFFFFF;
@@ -232,6 +235,13 @@ button.ok:hover {
232235
margin-bottom: 3px;
233236
border-bottom: 1px solid #D7D7DB
234237
}
238+
239+
#tabContent {
240+
flex-grow: 1;
241+
display: flex;
242+
flex-direction: column;
243+
}
244+
235245
.tabLink {
236246
padding: 3px auto;
237247
background-color: #f1f1f1;
@@ -258,6 +268,55 @@ img#logo {
258268
filter: none
259269
}
260270

271+
.about-logo {
272+
display: block;
273+
margin: 20px auto;
274+
width: 128px;
275+
height: 128px;
276+
}
277+
278+
#aboutContent {
279+
margin: 100px auto;
280+
display: flex;
281+
flex-direction: column;
282+
justify-content: center;
283+
align-items: center;
284+
height: 330px;
285+
width: 330px;
286+
text-align: center;
287+
border: 1px solid #aaa;
288+
border-radius: 16px;
289+
background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
290+
background-size: 400% 400%;
291+
animation: gradientAnimation 10s ease infinite;
292+
}
293+
294+
#aboutContent h2, #aboutContent h3 {
295+
margin: 10px 0;
296+
}
297+
298+
#aboutContent a {
299+
color: #0A84FF;
300+
text-decoration: none;
301+
}
302+
303+
#aboutContent a:hover {
304+
text-decoration: underline;
305+
}
306+
307+
@keyframes gradientAnimation {
308+
0% {
309+
background-position: 0% 50%;
310+
}
311+
50% {
312+
background-position: 100% 50%;
313+
}
314+
100% {
315+
background-position: 0% 50%;
316+
}
317+
}
318+
319+
261320
@media (prefers-color-scheme: dark) {
262321
body {
263322
background-color: #1C1C1E;
@@ -328,5 +387,20 @@ img#logo {
328387
button img {
329388
filter: invert(100%);
330389
}
390+
#aboutContent a {
391+
color: #007AFF;
392+
}
393+
394+
#options-form label {
395+
display: block;
396+
margin-bottom: 8px;
397+
color: #F2F2F7;
398+
font-size: 13px;
399+
font-weight: bold;
400+
}
401+
#aboutContent {
402+
background: linear-gradient(45deg, #2c2c2e, #1c1c1e);
403+
border: 1px solid #333;
404+
}
331405

332406
}

0 commit comments

Comments
 (0)