diff --git a/Shared (Extension)/Resources/event_log.html b/Shared (Extension)/Resources/event_log.html index b1ec0ad..3e39cc5 100644 --- a/Shared (Extension)/Resources/event_log.html +++ b/Shared (Extension)/Resources/event_log.html @@ -52,6 +52,16 @@ +
+ + +
+
diff --git a/Shared (Extension)/Resources/event_log.js b/Shared (Extension)/Resources/event_log.js index adf3a88..797757d 100644 --- a/Shared (Extension)/Resources/event_log.js +++ b/Shared (Extension)/Resources/event_log.js @@ -1,7 +1,9 @@ import Alpine from 'alpinejs'; import { sortByIndex } from './db'; +import { KINDS } from './utils'; Alpine.data('eventLog', () => ({ + kinds: KINDS, events: [], view: 'created_at', max: 100, @@ -12,6 +14,7 @@ Alpine.data('eventLog', () => ({ toCreatedAt: new Date().toISOString().split('T')[0], // kind view + quickKind: '', fromKind: 0, toKind: 50000, @@ -29,6 +32,16 @@ Alpine.data('eventLog', () => ({ this.events = events; }, + quickKindSelect() { + if (this.quickKind === '') return; + const i = parseInt(this.quickKind); + this.fromKind = i; + this.toKind = i; + this.reload(); + }, + + // Properties + get fromTime() { let dt = new Date(this.fromCreatedAt); return Math.floor(dt.getTime() / 1000);