3 Commits
v2.3.2 ... main

Author SHA1 Message Date
Kendrick Bollens
fa817050d8 Release v2.3.4 — QuickMove: "als gelesen" pro Aktion + dynamischer Button-Name
- QuickMove markiert Nachrichten als gelesen, pro Aktion ein-/ausschaltbar
  (Checkbox in den QuickMove-Einstellungen, Default an)
- Button-Label heißt wie die Aktion, wenn nur eine konfiguriert ist (setLabel)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:08:43 +02:00
Kendrick Bollens
f223f55933 Release v2.3.3
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 10:37:24 +02:00
Kendrick Bollens
0d05f9412c Release v2.3.2
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 10:28:37 +02:00
5 changed files with 118 additions and 63 deletions

View File

@@ -16,6 +16,8 @@ async function executeErledigtAction(tab, actionConfig) {
const storage = await browser.storage.local.get(['gitea_config', 'schlagwoerter_cache']); const storage = await browser.storage.local.get(['gitea_config', 'schlagwoerter_cache']);
const config = storage.gitea_config || {}; const config = storage.gitea_config || {};
const schlagwoerter = storage.schlagwoerter_cache; const schlagwoerter = storage.schlagwoerter_cache;
// "Als gelesen markieren" — pro Aktion konfigurierbar, standardmäßig an.
const markRead = (actionConfig || {}).markRead !== false;
// Apply user's tag // Apply user's tag
let tagKey = null; let tagKey = null;
@@ -33,6 +35,11 @@ async function executeErledigtAction(tab, actionConfig) {
} }
} }
// Mark as read (before the move, while the id is still valid in this folder)
if (markRead && !message.read) {
await messenger.messages.update(message.id, { read: true });
}
// Move to target folder // Move to target folder
if (actionConfig.targetFolder) { if (actionConfig.targetFolder) {
const folderInfo = JSON.parse(actionConfig.targetFolder); const folderInfo = JSON.parse(actionConfig.targetFolder);
@@ -42,6 +49,7 @@ async function executeErledigtAction(tab, actionConfig) {
// Feedback // Feedback
const parts = []; const parts = [];
if (tagKey) parts.push('markiert'); if (tagKey) parts.push('markiert');
if (markRead && !message.read) parts.push('gelesen');
if (actionConfig.targetFolder) parts.push('verschoben'); if (actionConfig.targetFolder) parts.push('verschoben');
const title = actionConfig.name || 'Erledigt'; const title = actionConfig.name || 'Erledigt';
browser.notifications.create({ browser.notifications.create({
@@ -68,12 +76,19 @@ messenger.messageDisplayAction.onClicked.addListener(async (tab) => {
async function updateErledigtPopup() { async function updateErledigtPopup() {
const result = await browser.storage.local.get('erledigt_config'); const result = await browser.storage.local.get('erledigt_config');
const actions = (result.erledigt_config || {}).actions || []; const actions = (result.erledigt_config || {}).actions || [];
const setLabel = (label) => {
// setLabel ist Thunderbird-spezifisch — defensiv prüfen, damit der Start nie bricht.
if (messenger.messageDisplayAction.setLabel) return messenger.messageDisplayAction.setLabel({ label });
};
if (actions.length > 1) { if (actions.length > 1) {
await messenger.messageDisplayAction.setPopup({ popup: 'message_popup.html' }); await messenger.messageDisplayAction.setPopup({ popup: 'message_popup.html' });
await messenger.messageDisplayAction.setTitle({ title: 'Aktion wählen' }); await messenger.messageDisplayAction.setTitle({ title: 'Aktion wählen' });
await setLabel('QuickMove');
} else { } else {
const name = actions[0]?.name || 'QuickMove';
await messenger.messageDisplayAction.setPopup({ popup: '' }); await messenger.messageDisplayAction.setPopup({ popup: '' });
await messenger.messageDisplayAction.setTitle({ title: actions[0]?.name || 'Erledigt' }); await messenger.messageDisplayAction.setTitle({ title: name });
await setLabel(name); // Button heißt wie die (einzige) Aktion
} }
} }

View File

@@ -1,61 +1,64 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "HPS Vorlagen & Signaturen", "name": "HPS Vorlagen & Signaturen",
"version": "2.3.1", "version": "2.3.4",
"description": "Vorlagen- und Signaturverwaltung für Hotel Park Soltau mit Git-Sync", "description": "Vorlagen- und Signaturverwaltung für Hotel Park Soltau mit Git-Sync",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "it@hotel-park-soltau.de", "id": "it@hotel-park-soltau.de",
"strict_min_version": "109.0", "strict_min_version": "109.0",
"update_url": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/raw/branch/main/updates.json" "update_url": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/raw/branch/main/updates.json"
} }
}, },
"permissions": [ "permissions": [
"compose", "compose",
"storage", "storage",
"notifications", "notifications",
"tabs", "tabs",
"accountsRead", "accountsRead",
"accountsIdentities", "accountsIdentities",
"messagesTagsList", "messagesTagsList",
"messagesTags", "messagesTags",
"messagesRead", "messagesRead",
"messagesUpdate", "messagesUpdate",
"messagesMove", "messagesMove",
"accountsFolders" "accountsFolders"
], ],
"optional_permissions": [ "optional_permissions": [
"*://*/*" "*://*/*"
], ],
"background": { "background": {
"scripts": ["lib/gitea-sync.js", "background.js"], "scripts": [
"persistent": true "lib/gitea-sync.js",
}, "background.js"
"browser_action": { ],
"default_icon": { "persistent": true
"16": "icons/icon.png", },
"32": "icons/icon.png" "browser_action": {
}, "default_icon": {
"default_title": "Vorlagen & Signaturen verwalten", "16": "icons/icon.png",
"default_label": "Vorlagen & Signaturen" "32": "icons/icon.png"
}, },
"compose_action": { "default_title": "Vorlagen & Signaturen verwalten",
"default_icon": { "default_label": "Vorlagen & Signaturen"
"16": "icons/icon.png", },
"32": "icons/icon.png" "compose_action": {
}, "default_icon": {
"default_popup": "popup.html", "16": "icons/icon.png",
"default_label": "Vorlagen" "32": "icons/icon.png"
}, },
"message_display_action": { "default_popup": "popup.html",
"default_icon": { "default_label": "Vorlagen"
"16": "icons/icon.png", },
"32": "icons/icon.png" "message_display_action": {
}, "default_icon": {
"default_label": "QuickMove" "16": "icons/icon.png",
}, "32": "icons/icon.png"
"options_ui": { },
"page": "templates_options/templates_options.html", "default_label": "QuickMove"
"browser_style": true },
} "options_ui": {
} "page": "templates_options/templates_options.html",
"browser_style": true
}
}

Binary file not shown.

View File

@@ -1879,6 +1879,12 @@ function renderErledigtAction(action, index) {
${erledigtFolderOptions} ${erledigtFolderOptions}
</select> </select>
</div> </div>
<div class="form-group" style="flex:0 0 auto;">
${index === 0 ? '<label>Gelesen</label>' : ''}
<label style="display:flex;align-items:center;gap:6px;height:34px;white-space:nowrap;font-size:13px;cursor:pointer;">
<input type="checkbox" class="erledigt-markread" ${action.markRead !== false ? 'checked' : ''}> als gelesen
</label>
</div>
<button type="button" class="btn btn-danger btn-sm erledigt-remove" title="Entfernen" style="margin-bottom:2px;">✕</button> <button type="button" class="btn btn-danger btn-sm erledigt-remove" title="Entfernen" style="margin-bottom:2px;">✕</button>
`; `;
if (action.targetFolder) { if (action.targetFolder) {
@@ -1900,10 +1906,11 @@ function getErledigtActionsFromForm() {
const actions = []; const actions = [];
const names = document.querySelectorAll('.erledigt-name'); const names = document.querySelectorAll('.erledigt-name');
const folders = document.querySelectorAll('.erledigt-folder'); const folders = document.querySelectorAll('.erledigt-folder');
const reads = document.querySelectorAll('.erledigt-markread');
for (let i = 0; i < names.length; i++) { for (let i = 0; i < names.length; i++) {
const name = names[i].value.trim(); const name = names[i].value.trim();
if (!name) continue; if (!name) continue;
actions.push({ name, targetFolder: folders[i].value || '' }); actions.push({ name, targetFolder: folders[i].value || '', markRead: reads[i] ? reads[i].checked : true });
} }
return actions; return actions;
} }

View File

@@ -2,6 +2,36 @@
"addons": { "addons": {
"it@hotel-park-soltau.de": { "it@hotel-park-soltau.de": {
"updates": [ "updates": [
{
"version": "2.3.4",
"update_link": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/releases/download/v2.3.4/templates-reply-hotel.xpi",
"update_hash": "sha256:1825f81c309c7d2be4bba048b1e41d0758bb145823b765c0dbb8add75cd4ad2e",
"applications": {
"gecko": {
"strict_min_version": "109.0"
}
}
},
{
"version": "2.3.3",
"update_link": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/releases/download/v2.3.3/templates-reply-hotel.xpi",
"update_hash": "sha256:7845dddcf7335f8e1411162a2aae821e9293a9de1c4bc4016cc357d2a159165a",
"applications": {
"gecko": {
"strict_min_version": "109.0"
}
}
},
{
"version": "2.3.2",
"update_link": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/releases/download/v2.3.2/templates-reply-hotel.xpi",
"update_hash": "sha256:8466d174aeda6c15577a45ed1cd442bc592d35a1da602d79b1f169ae3d012bd7",
"applications": {
"gecko": {
"strict_min_version": "109.0"
}
}
},
{ {
"version": "2.3.1", "version": "2.3.1",
"update_link": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/releases/download/v2.3.1/templates-reply-hotel.xpi", "update_link": "https://git.hotel-park-soltau.de/hps/hps-thunderbird-templates/releases/download/v2.3.1/templates-reply-hotel.xpi",