feat: show date and time in transcript list items
This commit is contained in:
+6
-1
@@ -121,6 +121,11 @@ async function loadTranscripts() {
|
|||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
div.className = 'transcript-item';
|
div.className = 'transcript-item';
|
||||||
|
|
||||||
|
const dateMatch = t.filename.match(/^(\d{4}-\d{2}-\d{2})-(\d{2})(\d{2})-/);
|
||||||
|
const dateEl = document.createElement('span');
|
||||||
|
dateEl.className = 'meta item-date';
|
||||||
|
dateEl.textContent = dateMatch ? `${dateMatch[1]} ${dateMatch[2]}:${dateMatch[3]}` : '';
|
||||||
|
|
||||||
const name = document.createElement('span');
|
const name = document.createElement('span');
|
||||||
name.className = 'name';
|
name.className = 'name';
|
||||||
name.textContent = t.filename.replace(/\.md$/, '').replace(/^\d{4}-\d{2}-\d{2}-\d{4}-/, '');
|
name.textContent = t.filename.replace(/\.md$/, '').replace(/^\d{4}-\d{2}-\d{2}-\d{4}-/, '');
|
||||||
@@ -159,7 +164,7 @@ async function loadTranscripts() {
|
|||||||
const actions = document.createElement('div');
|
const actions = document.createElement('div');
|
||||||
actions.className = 'item-actions';
|
actions.className = 'item-actions';
|
||||||
actions.append(reprocessBtn, delBtn);
|
actions.append(reprocessBtn, delBtn);
|
||||||
div.append(name, meta, actions);
|
div.append(dateEl, name, meta, actions);
|
||||||
return div;
|
return div;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -118,6 +118,7 @@
|
|||||||
.transcript-item:hover { border-color: var(--red); }
|
.transcript-item:hover { border-color: var(--red); }
|
||||||
.transcript-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.transcript-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.transcript-item .meta { color: var(--muted); font-size: 0.75rem; flex-shrink: 0; }
|
.transcript-item .meta { color: var(--muted); font-size: 0.75rem; flex-shrink: 0; }
|
||||||
|
.item-date { font-size: 0.75rem; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
|
||||||
.item-actions { display: flex; gap: 2px; flex-shrink: 0; }
|
.item-actions { display: flex; gap: 2px; flex-shrink: 0; }
|
||||||
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
|
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
|
||||||
.modal.hidden { display: none; }
|
.modal.hidden { display: none; }
|
||||||
|
|||||||
Reference in New Issue
Block a user