Download events, Delete all events.
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
|
||||
<div>
|
||||
<button class="button mt-3" @click="saveAll">Save all</button>
|
||||
<button class="button mt-3" @click="deleteAll">Delete all</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Alpine from 'alpinejs';
|
||||
import { deleteDB } from 'idb';
|
||||
import jsonFormatHighlight from 'json-format-highlight';
|
||||
import { getPublicKey } from 'nostr-tools';
|
||||
import { downloadAllContents, getHosts, sortByIndex } from './db';
|
||||
@@ -58,6 +59,13 @@ Alpine.data('eventLog', () => ({
|
||||
});
|
||||
},
|
||||
|
||||
async deleteAll() {
|
||||
if (confirm('Are you sure you want to delete ALL events?')) {
|
||||
await deleteDB('events');
|
||||
await this.reload();
|
||||
}
|
||||
},
|
||||
|
||||
quickKindSelect() {
|
||||
if (this.quickKind === '') return;
|
||||
const i = parseInt(this.quickKind);
|
||||
|
||||
Reference in New Issue
Block a user