Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa07fe0edd |
+20
-5
@@ -736,23 +736,33 @@ function newCleanupQuery() {
|
||||
});
|
||||
document.getElementById('cleanup-kinds').value = '';
|
||||
document.getElementById('cleanup-from-date').value = '';
|
||||
document.getElementById('cleanup-from-time').value = '';
|
||||
document.getElementById('cleanup-to-date').value = '';
|
||||
document.getElementById('cleanup-to-time').value = '';
|
||||
document.getElementById('cleanup-max-events').value = '0';
|
||||
document.getElementById('cleanup-results-group').style.display = 'none';
|
||||
document.getElementById('cleanup-name').focus();
|
||||
}
|
||||
|
||||
// ── Combine date + time inputs into a single datetime string ───────────
|
||||
function combineDateTime(dateId, timeId) {
|
||||
const dateVal = document.getElementById(dateId).value;
|
||||
const timeVal = document.getElementById(timeId).value;
|
||||
if (!dateVal) return '';
|
||||
return timeVal ? dateVal + ' ' + timeVal : dateVal;
|
||||
}
|
||||
|
||||
// ── Read filter values from the form ───────────────────────────────────
|
||||
function readCleanupFilters() {
|
||||
const followsEl = document.querySelector('input[name="cleanup-follows"]:checked');
|
||||
const follows_filter = followsEl ? followsEl.value : 'all';
|
||||
const kindsRaw = document.getElementById('cleanup-kinds').value.trim();
|
||||
const kinds = kindsRaw ? kindsRaw.split(',').map(s => parseInt(s.trim(), 10)).filter(n => !isNaN(n) && n > 0) : [];
|
||||
const fromDate = document.getElementById('cleanup-from-date').value;
|
||||
const toDate = document.getElementById('cleanup-to-date').value;
|
||||
const from_date = combineDateTime('cleanup-from-date', 'cleanup-from-time');
|
||||
const to_date = combineDateTime('cleanup-to-date', 'cleanup-to-time');
|
||||
const max_events = parseInt(document.getElementById('cleanup-max-events').value, 10) || 0;
|
||||
const name = document.getElementById('cleanup-name').value.trim();
|
||||
return { name, follows_filter, kinds, from_date: fromDate, to_date: toDate, max_events };
|
||||
return { name, follows_filter, kinds, from_date, to_date, max_events };
|
||||
}
|
||||
|
||||
// ── Preview ────────────────────────────────────────────────────────────
|
||||
@@ -950,8 +960,13 @@ async function loadSavedCleanupQuery(id) {
|
||||
r.checked = r.value === q.follows_filter;
|
||||
});
|
||||
document.getElementById('cleanup-kinds').value = (q.kinds || []).join(', ');
|
||||
document.getElementById('cleanup-from-date').value = q.from_date || '';
|
||||
document.getElementById('cleanup-to-date').value = q.to_date || '';
|
||||
// Split stored datetime into date + time parts
|
||||
const fromParts = (q.from_date || '').split(' ');
|
||||
document.getElementById('cleanup-from-date').value = fromParts[0] || '';
|
||||
document.getElementById('cleanup-from-time').value = fromParts[1] || '';
|
||||
const toParts = (q.to_date || '').split(' ');
|
||||
document.getElementById('cleanup-to-date').value = toParts[0] || '';
|
||||
document.getElementById('cleanup-to-time').value = toParts[1] || '';
|
||||
document.getElementById('cleanup-max-events').value = q.max_events;
|
||||
document.getElementById('cleanup-results-group').style.display = 'none';
|
||||
|
||||
|
||||
@@ -281,6 +281,39 @@ body {
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* Cleanup Date/Time Inputs */
|
||||
.datetime-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.cleanup-date-input {
|
||||
font-family: var(--font-family);
|
||||
font-size: 13px;
|
||||
padding: 4px 6px;
|
||||
border: var(--border-width) solid var(--border-color);
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--secondary-color);
|
||||
color: var(--primary-color);
|
||||
width: 160px;
|
||||
}
|
||||
.cleanup-time-input {
|
||||
font-family: var(--font-family);
|
||||
font-size: 13px;
|
||||
padding: 4px 6px;
|
||||
border: var(--border-width) solid var(--border-color);
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--secondary-color);
|
||||
color: var(--primary-color);
|
||||
width: 110px;
|
||||
}
|
||||
.datetime-hint {
|
||||
font-size: 11px;
|
||||
color: var(--muted-color);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Cleanup Confirmation Modal */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
|
||||
+12
-4
@@ -453,12 +453,20 @@ $display_name = $relay_version ? ($relay_name . ' ' . $relay_version) : $relay_n
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cleanup-from-date">From (delete events after this datetime):</label>
|
||||
<input type="text" id="cleanup-from-date" placeholder="YYYY-MM-DD HH:MM (leave empty for no bound)" style="width:320px;font-family:monospace">
|
||||
<label>From (delete events after this):</label>
|
||||
<div class="datetime-group">
|
||||
<input type="date" id="cleanup-from-date" class="cleanup-date-input">
|
||||
<input type="time" id="cleanup-from-time" class="cleanup-time-input">
|
||||
<span class="datetime-hint">leave empty for no bound</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cleanup-to-date">To (delete events before this datetime):</label>
|
||||
<input type="text" id="cleanup-to-date" placeholder="YYYY-MM-DD HH:MM (leave empty for no bound)" style="width:320px;font-family:monospace">
|
||||
<label>To (delete events before this):</label>
|
||||
<div class="datetime-group">
|
||||
<input type="date" id="cleanup-to-date" class="cleanup-date-input">
|
||||
<input type="time" id="cleanup-to-time" class="cleanup-time-input">
|
||||
<span class="datetime-hint">leave empty for no bound</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cleanup-max-events">Max Events (0 = no limit):</label>
|
||||
|
||||
@@ -3969,3 +3969,42 @@ Stack trace:
|
||||
[Sun Aug 2 17:44:14 2026] 127.0.0.1:45466 Accepted
|
||||
[Sun Aug 2 17:44:14 2026] 127.0.0.1:45466 [200]: GET /api/cleanup_queries.php
|
||||
[Sun Aug 2 17:44:14 2026] 127.0.0.1:45466 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48586 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48586 [200]: GET /index.php
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48586 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48594 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48594 [200]: GET /assets/index.css
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48594 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48598 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48606 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48610 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48598 [200]: GET /assets/nostr.bundle.js
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48598 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48606 [200]: GET /assets/nostr-lite.js
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48610 [200]: GET /assets/app.js
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48606 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48610 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48624 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48624 [200]: GET /api/stats.php
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48624 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48632 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48638 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48632 [200]: GET /api/chart.php?range=hour
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48632 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48652 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48638 [200]: GET /favicon.ico
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48638 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48662 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48652 [200]: GET /api/stats.php
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48652 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48662 [200]: GET /api/chart.php?range=hour
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48662 Closing
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48674 Accepted
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48674 [200]: GET /api/chart.php?range=hour
|
||||
[Sun Aug 2 17:47:48 2026] 127.0.0.1:48674 Closing
|
||||
[Sun Aug 2 17:47:49 2026] 127.0.0.1:48686 Accepted
|
||||
[Sun Aug 2 17:47:49 2026] 127.0.0.1:48686 [404]: GET /api/profile.php?pubkey=8ff74724ed641b3c28e5a86d7c5cbc49c37638ace8c6c38935860e7a5eedde0e
|
||||
[Sun Aug 2 17:47:49 2026] 127.0.0.1:48686 Closing
|
||||
[Sun Aug 2 17:47:51 2026] 127.0.0.1:48698 Accepted
|
||||
[Sun Aug 2 17:47:51 2026] 127.0.0.1:48698 [200]: GET /api/cleanup_queries.php
|
||||
[Sun Aug 2 17:47:51 2026] 127.0.0.1:48698 Closing
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@
|
||||
// Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||
#define CRELAY_VERSION_MAJOR 2
|
||||
#define CRELAY_VERSION_MINOR 1
|
||||
#define CRELAY_VERSION_PATCH 34
|
||||
#define CRELAY_VERSION "v2.1.34"
|
||||
#define CRELAY_VERSION_PATCH 35
|
||||
#define CRELAY_VERSION "v2.1.35"
|
||||
|
||||
// Relay metadata (authoritative source for NIP-11 information)
|
||||
#define RELAY_NAME "C-Relay-PG"
|
||||
|
||||
Reference in New Issue
Block a user