From 63296e7ad3081ef3e862ce44bee962d7660185ed Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Thu, 15 Oct 2026 12:57:26 +0200 Subject: [PATCH] Add CloudDrop log backfill and clear connection status --- lib/cloud-log-sync.js | 104 ++++++++++++++++++++++++++++++++++++++++-- lib/upload-log.js | 8 ++-- main.js | 13 ++++++ preload.js | 1 + renderer/app.js | 71 +++++++++++++++++++++++++--- renderer/i18n.js | 16 +++++++ renderer/styles.css | 32 ++++++++++--- 7 files changed, 226 insertions(+), 19 deletions(-) diff --git a/lib/cloud-log-sync.js b/lib/cloud-log-sync.js index c513411..33636a1 100644 --- a/lib/cloud-log-sync.js +++ b/lib/cloud-log-sync.js @@ -3,6 +3,7 @@ const path = require('node:path'); const { randomUUID, createHash } = require('node:crypto'); const { EventEmitter } = require('node:events'); const { ClouddropLogApi, CloudLogError } = require('./clouddrop-log-api'); +const { iterateUploadLogEntries } = require('./upload-log'); const MAX_DOCUMENT_BYTES = 700000; const hash = value => createHash('sha256').update(value).digest('hex'); @@ -35,6 +36,9 @@ class CloudLogSync extends EventEmitter { this.closed = false; this.retryBlocked = false; this.documentTime = 0; + this.backfillJob = null; + this.backfillContext = null; + this.backfillResult = null; } async initialize() { @@ -71,7 +75,9 @@ class CloudLogSync extends EventEmitter { ip: this.connection?.ip || settings.ip || '', pendingFiles: pending.length, lastSyncedAt: Math.max(0, ...docs.map(doc => Number(doc.lastSyncedAt) || 0)), - fileCount: docs.length + fileCount: docs.length, + backfillRunning: Boolean(this.backfillJob), + backfillResult: this.backfillResult ? { ...this.backfillResult } : null }; } @@ -158,7 +164,7 @@ class CloudLogSync extends EventEmitter { this.errorCode = this._errorCode(error); this.retryBlocked = blocksRetry(this.errorCode); this.notify(); - if (!blocksRetry(this.errorCode)) { + if (!this.closed && !blocksRetry(this.errorCode)) { this.timer = setTimeout(() => { this.timer = null; void this.start(); }, 30000); this.timer.unref?.(); } @@ -175,7 +181,7 @@ class CloudLogSync extends EventEmitter { }; } - async append(sourcePath, line) { + async append(sourcePath, line, trackBackfill = true) { await this.initialize(); const settings = this.loadSettings() || {}; if (!settings.enabled || !settings.accountId || typeof line !== 'string' || !line) return; @@ -193,6 +199,12 @@ class CloudLogSync extends EventEmitter { .find(doc => doc.accountId === settings.accountId && doc.source === hash('connection-check'))?.folderId; if (!connection.folderId) return; const source = hash(`${sourcePath}|${connection.ip}|${connection.folderId}`); + const backfill = this.backfillContext; + if (trackBackfill && backfill?.folderId === connection.folderId && backfill.accountId === settings.accountId) { + for (const entry of line.split(/\r?\n/).filter(Boolean)) { + backfill.counts.set(entry, (backfill.counts.get(entry) || 0) + 1); + } + } let doc = known.filter(item => item.source === source).sort((a, b) => b.createdAt - a.createdAt)[0]; if (!doc || Buffer.byteLength(doc.content) + Buffer.byteLength(line) > MAX_DOCUMENT_BYTES) { doc = this._newDocument(connection, source, path.basename(sourcePath, path.extname(sourcePath)), ''); @@ -206,6 +218,7 @@ class CloudLogSync extends EventEmitter { this.errorCode = this._errorCode(error); this.notify(); this.schedule(); + if (!trackBackfill) throw new CloudLogError('LOCAL_WRITE_FAILED'); }); } @@ -221,6 +234,90 @@ class CloudLogSync extends EventEmitter { return operation; } + backfill(sourcePath) { + if (this.backfillJob) return this.backfillJob; + const operation = this.control.then(() => this._backfill(sourcePath)); + this.backfillJob = operation.finally(() => { + this.backfillJob = null; + this.backfillContext = null; + this.notify(); + }); + this.control = this.backfillJob.catch(() => {}); + this.notify(); + return this.backfillJob; + } + + async _backfill(sourcePath) { + await this.initialize(); + if (this.closed || !this.loadSettings()?.enabled || !this.connection || this.retryBlocked) { + throw new CloudLogError('CONNECTION_REQUIRED'); + } + const connection = this.connection; + let file; + const result = { added: 0, skipped: 0 }; + this.backfillResult = null; + try { + file = await fs.open(sourcePath, 'r'); + const stat = await file.stat(); + if (!stat.isFile()) throw new CloudLogError('LOG_READ_FAILED'); + if (stat.size > 256 * 1024 * 1024) throw new CloudLogError('LOG_TOO_LARGE'); + if (stat.size === 0) { + this.backfillResult = result; + return result; + } + const counts = new Map(); + for (const doc of this.documents.values()) { + if (doc.accountId !== connection.accountId || doc.folderId !== connection.folderId) continue; + for (const line of doc.content.split(/\r?\n/).filter(Boolean)) { + counts.set(line, (counts.get(line) || 0) + 1); + if (counts.size > 250000) throw new CloudLogError('LOG_TOO_LARGE'); + } + } + this.backfillContext = { folderId: connection.folderId, accountId: connection.accountId, counts }; + const seen = new Map(); + let pending = ''; + let pendingLines = 0; + const savePending = async () => { + if (!pending) return; + const content = pending; + pending = ''; + pendingLines = 0; + await this.append(sourcePath, content, false); + }; + try { + for await (const entry of iterateUploadLogEntries(sourcePath, { + fs: { createReadStream: () => file.createReadStream({ encoding: 'utf8', highWaterMark: 32768, end: stat.size - 1, autoClose: false }) }, + includeLine: true, requireCompleteLines: true + })) { + if (this.closed) throw new CloudLogError('BACKFILL_CANCELED'); + if (!entry.confirmed) continue; + const count = (seen.get(entry.line) || 0) + 1; + seen.set(entry.line, count); + if (seen.size > 250000) throw new CloudLogError('LOG_TOO_LARGE'); + if (count <= (counts.get(entry.line) || 0)) { + result.skipped++; + continue; + } + counts.set(entry.line, (counts.get(entry.line) || 0) + 1); + pending += entry.line + '\n'; + pendingLines++; + result.added++; + if (pendingLines >= 100 || Buffer.byteLength(pending) >= 32768) await savePending(); + } + } finally { + await savePending(); + } + this.backfillResult = result; + this.schedule(0); + return { ...result }; + } catch (error) { + if (error instanceof CloudLogError) throw error; + throw new CloudLogError(error?.code === 'ENOENT' ? 'LOG_NOT_FOUND' : 'LOG_READ_FAILED'); + } finally { + if (file) await file.close(); + } + } + flushLocal() { const operation = this.localWrites.then(async () => { for (const id of [...this.dirty]) { @@ -298,6 +395,7 @@ class CloudLogSync extends EventEmitter { clearTimeout(this.timer); this.timer = null; this.controller?.abort(); + if (this.backfillJob) await this.backfillJob.catch(() => {}); if (this.worker) await this.worker; await this.flushLocal(); await this.diskWrites; diff --git a/lib/upload-log.js b/lib/upload-log.js index 4d48252..2419872 100644 --- a/lib/upload-log.js +++ b/lib/upload-log.js @@ -30,7 +30,7 @@ return { hoster, fileName, ts, confirmed }; } - async function* iterateBoundedUploadLogLines(chunks, maxLineLength) { + async function* iterateBoundedUploadLogLines(chunks, maxLineLength, requireCompleteLines) { let buffer = ''; for await (const chunk of chunks) { buffer += String(chunk); @@ -44,7 +44,7 @@ } if (buffer.length > maxLineLength) throw new Error('Upload-Log-Zeile ist zu lang'); } - if (buffer) yield buffer.replace(/\r$/, ''); + if (buffer && !requireCompleteLines) yield buffer.replace(/\r$/, ''); } async function* iterateBoundedUploadLogChunks(chunks, maxBytes, onBytes) { @@ -67,13 +67,13 @@ const maxBytes = Number.isFinite(Number(options.maxBytes)) ? Math.max(1, Math.floor(Number(options.maxBytes))) : 256 * 1024 * 1024; const yieldFn = typeof options.yieldFn === 'function' ? options.yieldFn : (() => new Promise(resolve => setImmediate(resolve))); const input = options.lines ? null : fsImpl.createReadStream(filePath, { encoding: 'utf8', highWaterMark: 32768 }); - const lines = options.lines || iterateBoundedUploadLogLines(iterateBoundedUploadLogChunks(input, maxBytes, options.onBytes), maxLineLength); + const lines = options.lines || iterateBoundedUploadLogLines(iterateBoundedUploadLogChunks(input, maxBytes, options.onBytes), maxLineLength, options.requireCompleteLines); let count = 0; try { for await (const line of lines) { if (String(line).length > maxLineLength) throw new Error('Upload-Log-Zeile ist zu lang'); const parsed = parseUploadLogLine(line); - if (parsed) yield parsed; + if (parsed) yield options.includeLine ? { ...parsed, line: String(line) } : parsed; count++; if (count % yieldEvery === 0) await yieldFn(); } diff --git a/main.js b/main.js index 22a396e..3349f2d 100644 --- a/main.js +++ b/main.js @@ -2060,6 +2060,19 @@ ipcMain.handle('cloud-log:configure', async (event, payload = {}) => { } }); +ipcMain.handle('cloud-log:backfill', async event => { + if (!isTrustedOnlineBackupIpcEvent(event)) return { ok: false, errorCode: 'ACCESS_DENIED' }; + assertConfigWriteAllowed(); + try { + await Promise.all([...cloudLogWrites]); + const result = await cloudLogSync.backfill(_cachedUploadLogTarget?.path || getLogFilePath()); + return { ok: true, result, status: cloudLogSync.status() }; + } catch (error) { + const allowed = ['CONNECTION_REQUIRED', 'LOG_NOT_FOUND', 'LOG_READ_FAILED', 'LOG_TOO_LARGE', 'LOCAL_WRITE_FAILED', 'BACKFILL_CANCELED']; + return { ok: false, errorCode: allowed.includes(error?.code) ? error.code : 'LOG_READ_FAILED', status: cloudLogSync.status() }; + } +}); + ipcMain.handle('save-config', async (_event, config) => { assertConfigWriteAllowed(); if (config?.globalSettings) config.globalSettings.cloudLogSync = configStore.load().globalSettings.cloudLogSync; diff --git a/preload.js b/preload.js index c223747..7e72e20 100644 --- a/preload.js +++ b/preload.js @@ -90,6 +90,7 @@ contextBridge.exposeInMainWorld('api', { importUploadLog: () => ipcRenderer.invoke('import-upload-log'), getCloudLogStatus: () => ipcRenderer.invoke('cloud-log:status'), configureCloudLog: (settings) => ipcRenderer.invoke('cloud-log:configure', settings), + backfillCloudLog: () => ipcRenderer.invoke('cloud-log:backfill'), onCloudLogStatus: callback => { const listener = (_event, status) => callback(status); ipcRenderer.on('cloud-log:status', listener); diff --git a/renderer/app.js b/renderer/app.js index 2f79cd5..f680e97 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -6404,6 +6404,7 @@ async function runHealthCheck(mode = 'manual', requestedHosters = null) { // --- Settings --- let cloudLogBusy = false; +let cloudLogBackfillBusy = false; let cloudLogLastStatus = null; const cloudLogErrors = { KEY_STORAGE_UNAVAILABLE: 'Der API-Key konnte nicht im sicheren Zugangsdaten-Speicher gesichert werden.', @@ -6422,7 +6423,12 @@ const cloudLogErrors = { INVALID_RESPONSE: 'Clouddrop hat eine unerwartete Antwort geliefert.', VERIFICATION_FAILED: 'Die Testdatei konnte nicht verifiziert werden.', RESPONSE_TOO_LARGE: 'Die Clouddrop-Antwort überschreitet die zulässige Größe.', - LINE_TOO_LARGE: 'Ein Log-Eintrag überschreitet die zulässige Größe.' + LINE_TOO_LARGE: 'Ein Log-Eintrag überschreitet die zulässige Größe.', + CONNECTION_REQUIRED: 'Bitte die CloudDrop-Verbindung zuerst prüfen und aktivieren.', + LOG_NOT_FOUND: 'Die aktuelle lokale Upload-Log-Datei wurde noch nicht angelegt.', + LOG_READ_FAILED: 'Die aktuelle lokale Upload-Log-Datei konnte nicht vollständig gelesen werden. Bereits übernommene Einträge bleiben gespeichert.', + LOG_TOO_LARGE: 'Die Upload-Log-Datei überschreitet das sichere Leselimit.', + BACKFILL_CANCELED: 'Die Nachsynchronisierung wurde beendet. Bereits übernommene Einträge bleiben gespeichert.' }; function renderCloudLogStatus(status) { @@ -6430,14 +6436,34 @@ function renderCloudLogStatus(status) { if (!status || !document.getElementById('cloudLogPhase')) return; const phases = { disabled: 'Inaktiv', checking: 'Verbindung wird geprüft…', ready: 'Aktiv', syncing: 'Wird synchronisiert…', error: 'Synchronisierung fehlgeschlagen' }; document.getElementById('cloudLogPhase').textContent = localizeUiText(phases[status.phase] || phases.disabled); + document.getElementById('cloudLogPhase').dataset.phase = status.phase || 'disabled'; + const keyState = document.getElementById('cloudLogKeyState'); + if (keyState) { + keyState.textContent = localizeUiText(status.hasApiKey ? 'API-Key gespeichert' : 'Kein API-Key gespeichert'); + keyState.dataset.saved = String(Boolean(status.hasApiKey)); + } document.getElementById('cloudLogIp').textContent = status.ip || '—'; document.getElementById('cloudLogLastSync').textContent = status.lastSyncedAt ? new Date(status.lastSyncedAt).toLocaleString(getUiLocale()) : localizeUiText('Noch nicht synchronisiert'); document.getElementById('cloudLogPending').textContent = (Number(status.pendingFiles) || 0).toLocaleString(getUiLocale()); const key = document.getElementById('cloudLogKeyInput'); key.placeholder = localizeUiText(status.hasApiKey ? 'Gespeicherten API-Key verwenden' : 'API-Key eingeben'); - document.getElementById('cloudLogActivateBtn').disabled = cloudLogBusy; - document.getElementById('cloudLogDisableBtn').disabled = cloudLogBusy || !status.enabled; + const busy = cloudLogBusy || cloudLogBackfillBusy || status.backfillRunning; + document.getElementById('cloudLogActivateBtn').disabled = busy; + document.getElementById('cloudLogDisableBtn').disabled = busy || !status.enabled; + const backfillButton = document.getElementById('cloudLogBackfillBtn'); + if (backfillButton) { + backfillButton.disabled = busy || !status.enabled || !['ready', 'syncing'].includes(status.phase); + backfillButton.textContent = localizeUiText(status.backfillRunning || cloudLogBackfillBusy ? 'Vorhandenes Log wird eingelesen…' : 'Vorhandenes Log nachsynchronisieren'); + } + const backfillResult = document.getElementById('cloudLogBackfillResult'); + if (backfillResult) { + backfillResult.hidden = !status.backfillResult; + backfillResult.textContent = status.backfillResult + ? localizeUiText('Neu übernommen') + ': ' + Number(status.backfillResult.added || 0).toLocaleString(getUiLocale()) + + ' · ' + localizeUiText('Bereits vorhanden') + ': ' + Number(status.backfillResult.skipped || 0).toLocaleString(getUiLocale()) + : ''; + } const error = document.getElementById('cloudLogError'); error.hidden = !status.errorCode; error.textContent = status.errorCode ? localizeUiText(cloudLogErrors[status.errorCode] || cloudLogErrors.CONNECTION_FAILED) : ''; @@ -6448,7 +6474,7 @@ async function refreshCloudLogStatus() { } async function configureCloudLog(enabled) { - if (cloudLogBusy) return; + if (cloudLogBusy || cloudLogBackfillBusy || cloudLogLastStatus?.backfillRunning) return; cloudLogBusy = true; const key = document.getElementById('cloudLogKeyInput'); document.getElementById('cloudLogActivateBtn').disabled = true; @@ -6469,6 +6495,28 @@ async function configureCloudLog(enabled) { } } +async function backfillCloudLog() { + if (cloudLogBusy || cloudLogBackfillBusy || cloudLogLastStatus?.backfillRunning) return; + cloudLogBackfillBusy = true; + renderCloudLogStatus(cloudLogLastStatus); + try { + const response = await window.api.backfillCloudLog(); + if (response?.status) renderCloudLogStatus(response.status); + if (response?.ok) { + showCopyToast(response.result?.added > 0 + ? 'Vorhandene Log-Einträge wurden zur Synchronisierung übernommen.' + : 'Keine fehlenden Log-Einträge gefunden.'); + } else { + showCopyToast(cloudLogErrors[response?.errorCode] || cloudLogErrors.LOG_READ_FAILED, 6500, 'error'); + } + } catch { + showCopyToast(cloudLogErrors.LOG_READ_FAILED, 6500, 'error'); + } finally { + cloudLogBackfillBusy = false; + await refreshCloudLogStatus(); + } +} + async function _renderLogPathsList(el) { if (!el || !window.api || !window.api.getLogPaths) return; try { @@ -6851,20 +6899,30 @@ function renderSettings() {
Clouddrop-Log-Synchronisierung
+
+
StatusInaktiv
+ Kein API-Key gespeichert +

Erfolgreiche Uploads automatisch als TXT in einem Clouddrop-Ordner mit der öffentlichen IP-Adresse dieses Geräts speichern. Die Übertragung beginnt mit der Aktivierung und folgt dem gewählten Log-Datei-Modus.

+
+

API-Key ohne Zielordner-Bindung verwenden. Bei der Prüfung wird eine leere Testdatei im IP-Ordner erstellt. Die öffentliche IP wird über ipify ermittelt.

-
Status
Inaktiv
IP-Ordner
—
Zuletzt synchronisiert
—
-
Ausstehende Dateien
0
+
Ausstehende Log-Dateien
0
+
+
Vorhandene Upload-Logs

Überträgt fehlende Einträge aus der aktuellen lokalen Log-Datei. Bereits übernommene Einträge werden übersprungen; laufende Uploads bleiben aktiv.

+ + +
@@ -7262,6 +7320,7 @@ function renderSettings() { void refreshCloudLogStatus(); document.getElementById('cloudLogActivateBtn')?.addEventListener('click', () => configureCloudLog(true)); document.getElementById('cloudLogDisableBtn')?.addEventListener('click', () => configureCloudLog(false)); + document.getElementById('cloudLogBackfillBtn')?.addEventListener('click', backfillCloudLog); const testWebhookBtn = document.getElementById('testWebhookBtn'); if (testWebhookBtn) { testWebhookBtn.addEventListener('click', async () => { diff --git a/renderer/i18n.js b/renderer/i18n.js index 9e73415..3e64d2c 100644 --- a/renderer/i18n.js +++ b/renderer/i18n.js @@ -25,6 +25,22 @@ ['IP-Ordner', 'IP folder'], ['Zuletzt synchronisiert', 'Last synced'], ['Ausstehende Dateien', 'Pending files'], + ['Ausstehende Log-Dateien', 'Pending log files'], + ['API-Key gespeichert', 'API key saved'], + ['Kein API-Key gespeichert', 'No API key saved'], + ['Vorhandene Upload-Logs', 'Existing upload logs'], + ['Vorhandenes Log nachsynchronisieren', 'Sync existing log entries'], + ['Vorhandenes Log wird eingelesen…', 'Reading existing log entries…'], + ['Überträgt fehlende Einträge aus der aktuellen lokalen Log-Datei. Bereits übernommene Einträge werden übersprungen; laufende Uploads bleiben aktiv.', 'Transfers missing entries from the current local log file. Previously imported entries are skipped; running uploads remain active.'], + ['Neu übernommen', 'Newly imported'], + ['Bereits vorhanden', 'Already present'], + ['Vorhandene Log-Einträge wurden zur Synchronisierung übernommen.', 'Existing log entries have been queued for synchronization.'], + ['Keine fehlenden Log-Einträge gefunden.', 'No missing log entries found.'], + ['Bitte die CloudDrop-Verbindung zuerst prüfen und aktivieren.', 'Please verify and enable the CloudDrop connection first.'], + ['Die aktuelle lokale Upload-Log-Datei wurde noch nicht angelegt.', 'The current local upload log file has not been created yet.'], + ['Die aktuelle lokale Upload-Log-Datei konnte nicht vollständig gelesen werden. Bereits übernommene Einträge bleiben gespeichert.', 'The current local upload log file could not be read completely. Previously imported entries remain saved.'], + ['Die Upload-Log-Datei überschreitet das sichere Leselimit.', 'The upload log file exceeds the safe reading limit.'], + ['Die Nachsynchronisierung wurde beendet. Bereits übernommene Einträge bleiben gespeichert.', 'Backfill has stopped. Previously imported entries remain saved.'], ['Noch nicht synchronisiert', 'Not synced yet'], ['Verbindung wird geprüft…', 'Checking connection…'], ['Wird synchronisiert…', 'Syncing…'], diff --git a/renderer/styles.css b/renderer/styles.css index 7d61055..b245d4b 100644 --- a/renderer/styles.css +++ b/renderer/styles.css @@ -5532,16 +5532,36 @@ input[type="checkbox"] { margin-bottom: 16px; } .cloud-log-settings > .hint { margin: 0 0 12px; line-height: 1.5; } -.cloud-log-key-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; } -.cloud-log-key-row label { flex: 0 0 160px; font-size: 12px; } -.cloud-log-key-row input { flex: 1 1 220px; min-width: 150px; } -.cloud-log-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; } +.cloud-log-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); } +.cloud-log-heading > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; } +.cloud-log-heading-label { font-size: 13px; color: var(--text-muted); } +.cloud-log-phase { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-input); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; } +.cloud-log-phase::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: currentColor; } +.cloud-log-phase[data-phase="ready"] { color: #a6e8c2; background: #23382e; border-color: #3e6650; } +.cloud-log-phase[data-phase="syncing"], .cloud-log-phase[data-phase="checking"] { color: #c6d8ff; background: #29354a; border-color: #51668a; } +.cloud-log-phase[data-phase="error"] { color: #ffb1b1; background: #432b2b; border-color: #754747; } +.cloud-log-key-state { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; line-height: 1.4; } +.cloud-log-key-state[data-saved="true"] { color: #a6e8c2; } +.cloud-log-key-state[data-saved="true"]::before { content: '✓'; font-weight: 700; } +.cloud-log-key-state[data-saved="false"] { color: var(--text-muted); } +.cloud-log-key-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 12px; } +.cloud-log-key-row label { font-size: 13px; } +.cloud-log-key-row input { width: 100%; min-width: 0; } +.cloud-log-key-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; } +.cloud-log-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin: 18px 0 0; } .cloud-log-status > div { min-width: 0; } .cloud-log-status dt { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; } -.cloud-log-status dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; } +.cloud-log-status dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; } +.cloud-log-backfill { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); } +.cloud-log-backfill > div { flex: 1 1 260px; min-width: 0; } +.cloud-log-backfill strong { font-size: 14px; } +.cloud-log-backfill .hint { margin: 6px 0 0; font-size: 12px; line-height: 1.6; } +.cloud-log-backfill > button { max-width: 100%; white-space: normal; min-height: 38px; } +.cloud-log-backfill > p { flex: 0 0 100%; } .cloud-log-settings #cloudLogError:not([hidden]) { margin: 12px 0 0; padding: 10px; border: 1px solid var(--border); border-radius: 5px; } @media (max-width: 900px) { - .cloud-log-key-row label { flex-basis: 100%; } + .cloud-log-key-row { grid-template-columns: minmax(0, 1fr); } + .cloud-log-key-actions { grid-column: 1; } .cloud-log-status { grid-template-columns: minmax(0, 1fr); } }