- commit
- 3e42afaa7c64e4ba3a140aa945ff0008ea5a621b
- parent
- 589d4dbd26d4cd3369335d0cb5c5ad5d7baef7e6
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-04-19 06:46
add refresh button
Diffstat
| M | _locales/en/messages.json | 1 | + |
| M | content/js/main.js | 4 | ++++ |
| M | content/main.html | 1 | + |
| M | content/material-icons.svg | 1 | + |
| M | content/style.css | 3 | +++ |
| M | scripts/get-material-icons.sh | 2 | +- |
6 files changed, 11 insertions, 1 deletions
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
@@ -1,4 +1,5 @@ 1 1 { -1 2 "refresh": {"message": "refresh"}, 2 3 "replyList": {"message": "reply to list"}, 3 4 "replyAll": {"message": "reply all"}, 4 5 "reply": {"message": "reply"},
diff --git a/content/js/main.js b/content/js/main.js
@@ -3,6 +3,10 @@ 3 3 import createMessageElement from './message.js'; 4 4 import * as util from './util.js'; 5 5 -1 6 document.querySelector('.conversation__refresh').append( -1 7 util.createIcon('refresh', browser.i18n.getMessage('refresh')) -1 8 ); -1 9 6 10 var initialIDs = (util.getParams().ids || '').split(','); 7 11 8 12 var container = document.querySelector('.conversation__main');
diff --git a/content/main.html b/content/main.html
@@ -8,6 +8,7 @@ 8 8 <body> 9 9 <header class="conversation__header"> 10 10 <h1 class="conversation__subject">Loading…</h1> -1 11 <a class="conversation__refresh button" href=""></a> 11 12 </header> 12 13 <main class="conversation__main"></main> 13 14 <script src="js/main.js" type="module"></script>
diff --git a/content/material-icons.svg b/content/material-icons.svg
@@ -7,6 +7,7 @@ 7 7 <path id="lock" d="M240-80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h40v-80q0-83 58.5-141.5T480-920q83 0 141.5 58.5T680-720v80h40q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Zm240-200q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM360-640h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80Z"/> 8 8 <path id="reply" d="M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z"/> 9 9 <path id="reply_all" d="M320-280 80-520l240-240 57 56-184 184 184 184-57 56Zm480 80v-160q0-50-35-85t-85-35H433l144 144-57 56-240-240 240-240 57 56-144 144h247q83 0 141.5 58.5T880-360v160h-80Z"/> -1 10 <path id="refresh" d="M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z"/> 10 11 <path id="menu" d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"/> 11 12 <path id="list" d="M280-600v-80h560v80H280Zm0 160v-80h560v80H280Zm0 160v-80h560v80H280ZM160-600q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640q0 17-11.5 28.5T160-600Zm0 160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520q17 0 28.5 11.5T200-480q0 17-11.5 28.5T160-440Zm0 160q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360q17 0 28.5 11.5T200-320q0 17-11.5 28.5T160-280Z"/> 12 13 <path id="forward" d="m640-280-57-56 184-184-184-184 57-56 240 240-240 240ZM80-200v-160q0-83 58.5-141.5T280-560h247L383-704l57-56 240 240-240 240-57-56 144-144H280q-50 0-85 35t-35 85v160H80Z"/>
diff --git a/content/style.css b/content/style.css
@@ -76,7 +76,10 @@ body {
76 76 }
77 77
78 78 .conversation__header {
-1 79 display: flex;
-1 80 justify-content: space-between;
79 81 padding: 1em;
-1 82 gap: 1em;
80 83 background-color: var(--bg);
81 84 color: var(--fg);
82 85 border-block-end: 1px solid var(--border);
diff --git a/scripts/get-material-icons.sh b/scripts/get-material-icons.sh
@@ -2,7 +2,7 @@ 2 2 3 3 echo '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' 4 4 echo ' <!-- Material icons are published under Apache License Version 2.0. https://material.io/icons/ -->'5 -1 for icon in attachment code open_in_new star lock reply reply_all menu list forward create mode_heat; do-1 5 for icon in attachment code open_in_new star lock reply reply_all refresh menu list forward create mode_heat; do 6 6 wget -q "https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/${icon}/fill1/24px.svg" -O - \ 7 7 | grep -o '<path.*/>' \ 8 8 | sed "s/<path/ <path id=\"${icon}\"/"