expanded log activity

This commit is contained in:
tom.hempel
2026-06-01 22:46:48 +02:00
parent da394c5525
commit e5ac069dc4
6 changed files with 62 additions and 41 deletions

View File

@ -1,4 +1,4 @@
import { apiGet, apiPost, apiPut, apiDelete } from '../api.js';
import { apiGet, apiPost, apiPut, apiDelete, apiDownloadFetch } from '../api.js';
import { canEdit, pageHeaderHTML, showToast } from '../app.js';
import {
SOURCE_LANG,
@ -406,10 +406,7 @@ function bindTranslationBundleActions() {
const prev = exportBtn.textContent;
exportBtn.textContent = 'Preparing…';
try {
const token = localStorage.getItem('qdb_token');
const res = await fetch('../api/translations?exportBundle=1', {
headers: { Authorization: `Bearer ${token}` },
});
const res = await apiDownloadFetch('../api/translations?exportBundle=1');
if (!res.ok) {
const err = await res.json().catch(() => ({}));
throw new Error(err.error?.message || err.error || 'Export failed');