v0.5.0-beta: merge-with-key import, prior_author provenance, beta versioning
Merge-with-key: decrypt exported posts using original identity seed, re-create under current identity with prior_author in BlobHeader for provenance tracking. Download page restructured with stable (v0.4.4) + beta (v0.5.0-beta) sections. Version bumped across all crates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8ef32e6df6
commit
97dc83f9f1
13 changed files with 311 additions and 10 deletions
|
|
@ -3379,6 +3379,10 @@ $('#import-btn').addEventListener('click', () => {
|
|||
<div id="import-action-box" style="display:none;text-align:left;margin-bottom:0.75rem">
|
||||
<label class="checkbox-label" style="font-size:0.8rem"><input type="radio" name="import-action" value="add_identity" /> Add as new identity (requires key in export)</label>
|
||||
<label class="checkbox-label" style="font-size:0.8rem"><input type="radio" name="import-action" value="import_posts" checked /> Import public posts into current identity</label>
|
||||
<label class="checkbox-label" style="font-size:0.8rem"><input type="radio" name="import-action" value="merge_key" /> Merge with decryption key (decrypt + re-create)</label>
|
||||
<div id="merge-key-input" style="display:none;margin-top:0.4rem">
|
||||
<input id="import-merge-key" type="text" placeholder="Original identity key (64 hex chars)" maxlength="64" style="width:100%;font-family:monospace;font-size:0.7rem" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex;gap:0.5rem;justify-content:center">
|
||||
<button class="btn btn-ghost btn-sm" id="import-preview">Preview</button>
|
||||
|
|
@ -3418,6 +3422,14 @@ $('#import-btn').addEventListener('click', () => {
|
|||
}
|
||||
});
|
||||
|
||||
// Show/hide merge key input based on selected action
|
||||
overlay.querySelectorAll('input[name="import-action"]').forEach(radio => {
|
||||
radio.addEventListener('change', () => {
|
||||
const mergeInput = overlay.querySelector('#merge-key-input');
|
||||
mergeInput.style.display = radio.value === 'merge_key' && radio.checked ? 'block' : 'none';
|
||||
});
|
||||
});
|
||||
|
||||
overlay.querySelector('#import-go').addEventListener('click', async () => {
|
||||
const zipPath = overlay.querySelector('#import-zip-path').value.trim();
|
||||
const action = overlay.querySelector('input[name="import-action"]:checked')?.value;
|
||||
|
|
@ -3429,6 +3441,10 @@ $('#import-btn').addEventListener('click', () => {
|
|||
let result;
|
||||
if (action === 'add_identity') {
|
||||
result = await invoke('import_as_new_identity', { zipPath });
|
||||
} else if (action === 'merge_key') {
|
||||
const keyHex = overlay.querySelector('#import-merge-key').value.trim();
|
||||
if (keyHex.length !== 64) { toast('Key must be 64 hex characters'); overlay.querySelector('#import-go').disabled = false; return; }
|
||||
result = await invoke('import_merge_with_key', { zipPath, keyHex });
|
||||
} else {
|
||||
result = await invoke('import_public_posts', { zipPath });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue