Das DocuWare-Passwort wird nicht mehr in storage.local abgelegt. Das Hintergrundskript fungiert als Auth-Broker und hält den OAuth-Token nur im Speicher der TB-Sitzung. Der Ablage-Dialog fragt das Passwort einmalig per Overlay ab, holt darüber den Token und verwirft das Passwort sofort. - store.js: password aus DEFAULTS entfernt; Settings.set() löscht password defensiv - auth.js: setToken/currentToken für Token-Transfer, Cookie-Modus als Sentinel - background.js: Broker (auth:status/auth:logon/auth:logout) - dialog: ensureAuth() + Passwort-Overlay statt direktem Auth.logon - options: Passwort nur transient für Test/Diagnose, nicht gespeichert; Export ohne Passwort - manifest: lib/store.js + lib/auth.js ins Hintergrundskript geladen Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
92 lines
4.4 KiB
HTML
92 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>DocuWare Ablage – Einstellungen</title>
|
||
<style>
|
||
body { font: 14px/1.5 system-ui, sans-serif; max-width: 560px; margin: 24px auto; padding: 0 16px; color: #1a1a1a; }
|
||
h1 { font-size: 20px; }
|
||
fieldset { border: 1px solid #ddd; border-radius: 8px; margin: 16px 0; padding: 12px 16px; }
|
||
legend { font-weight: 600; padding: 0 6px; }
|
||
label { display: block; margin: 10px 0 4px; font-weight: 500; }
|
||
input[type="text"], input[type="password"], input[type="url"] { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
|
||
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
|
||
.row { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
|
||
button { padding: 8px 16px; border: 0; border-radius: 6px; background: #2563eb; color: #fff; font-weight: 600; cursor: pointer; }
|
||
button.secondary { background: #e5e7eb; color: #111; }
|
||
#status { font-size: 13px; min-height: 18px; }
|
||
.ok { color: #15803d; } .err { color: #b91c1c; }
|
||
.hint { font-size: 12px; color: #666; margin-top: 2px; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<h1>DocuWare Ablage – Einstellungen</h1>
|
||
|
||
<fieldset>
|
||
<legend>Verbindung</legend>
|
||
<label for="serverUrl">Server-URL</label>
|
||
<input type="url" id="serverUrl" placeholder="https://docuware.example.com" />
|
||
<div class="hint">Basis-URL ohne <code>/DocuWare/Platform</code>.</div>
|
||
|
||
<label for="organization">Organisation</label>
|
||
<input type="text" id="organization" />
|
||
|
||
<label for="username">Benutzername</label>
|
||
<input type="text" id="username" autocomplete="username" />
|
||
|
||
<label for="password">Passwort</label>
|
||
<input type="password" id="password" autocomplete="off" />
|
||
<div class="hint">Wird <strong>nicht gespeichert</strong> – nur zum Anmelden/Testen für
|
||
diese Sitzung. Im Ablage-Fenster wird es 1× pro Sitzung abgefragt.</div>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend>Standardwerte</legend>
|
||
<label for="defaultCabinet">Standard-Ziel (Archiv oder Briefkorb)</label>
|
||
<select id="defaultCabinet" style="width:100%;padding:7px;border:1px solid #ccc;border-radius:6px;">
|
||
<option value="">— keiner —</option>
|
||
</select>
|
||
<div class="hint">Liste wird nach erfolgreichem Verbindungstest gefüllt.</div>
|
||
|
||
<div class="check"><input type="checkbox" id="storeEml" /> <label for="storeEml" style="margin:0">E-Mail als .eml ablegen</label></div>
|
||
<div class="check"><input type="checkbox" id="storePdf" /> <label for="storePdf" style="margin:0">E-Mail als PDF ablegen</label></div>
|
||
<div class="check"><input type="checkbox" id="storeAttachments" /> <label for="storeAttachments" style="margin:0">Anhänge separat ablegen</label></div>
|
||
<div class="check"><input type="checkbox" id="tagOnSuccess" /> <label for="tagOnSuccess" style="margin:0">Mail nach Ablage als „DocuWare" markieren</label></div>
|
||
</fieldset>
|
||
|
||
<div class="row">
|
||
<button id="save">Speichern</button>
|
||
<button id="test" class="secondary">Verbindung testen</button>
|
||
<span id="status"></span>
|
||
</div>
|
||
|
||
<fieldset>
|
||
<legend>Einstellungen sichern</legend>
|
||
<div class="hint">Exportiert/importiert die Einstellungen (Server, Organisation,
|
||
Benutzer, Standardwerte) als Datei. <strong>Das Passwort ist nicht enthalten</strong>
|
||
und muss nach einer Neuinstallation einmal neu eingegeben werden.</div>
|
||
<div class="row">
|
||
<button id="exportBtn" class="secondary">Exportieren</button>
|
||
<button id="importBtn" class="secondary">Importieren</button>
|
||
<input type="file" id="importFile" accept="application/json,.json" style="display:none" />
|
||
</div>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend>Diagnose (für Entwicklung)</legend>
|
||
<div class="hint">Analysiert den Store-Dialog des oben gewählten Standard-Ziels und
|
||
zeigt die Rohstruktur (Felder, Auswahllisten, Defaults). Inhalt bitte kopieren und
|
||
an den Entwickler geben.</div>
|
||
<div class="row">
|
||
<button id="diagBtn" class="secondary">Store-Dialog analysieren</button>
|
||
</div>
|
||
<textarea id="diag" readonly style="width:100%;height:240px;margin-top:10px;font:12px/1.4 monospace;border:1px solid #ccc;border-radius:6px;padding:8px;display:none;"></textarea>
|
||
</fieldset>
|
||
|
||
<script src="../lib/store.js"></script>
|
||
<script src="../lib/auth.js"></script>
|
||
<script src="../lib/docuware.js"></script>
|
||
<script src="options.js"></script>
|
||
</body>
|
||
</html>
|