Merge branch 'dev'
CI/CD / deploy (push) Successful in 2m52s Details

This commit is contained in:
Jeff Emmett 2026-04-12 22:06:30 -04:00
commit 6c1c7a94b4
1 changed files with 7 additions and 2 deletions

View File

@ -268,7 +268,12 @@ export class FolkNotesApp extends HTMLElement {
this._render();
try {
const base = this._getApiBase();
const res = await fetch(`${base}/api/vault/upload`, { method: 'POST', body: fd });
const token = localStorage.getItem('encryptid-token');
const res = await fetch(`${base}/api/vault/upload`, {
method: 'POST',
body: fd,
headers: token ? { 'Authorization': `Bearer ${token}` } : {},
});
const data = await res.json();
if (res.ok) {
this._uploadStatus = `Vault uploaded: ${data.name ?? 'done'}`;
@ -534,7 +539,7 @@ ${this._uploadOpen ? this._renderUploadDialog() : ''}
</div>
<div class="field">
<label>Vault ZIP File</label>
<input type="file" name="vault" accept=".zip" required>
<input type="file" name="file" accept=".zip" required>
</div>
<div class="status-msg" id="upload-status">${escHtml(this._uploadStatus)}</div>
<div class="dialog-actions">