feat: add folder button to transcript modal
This commit is contained in:
@@ -8,6 +8,7 @@ const logoutBtn = document.getElementById('logout-btn');
|
||||
const modal = document.getElementById('modal');
|
||||
const modalTitle = document.getElementById('modal-title');
|
||||
const modalBody = document.getElementById('modal-body');
|
||||
const modalFolderBtn = document.getElementById('modal-folder-btn');
|
||||
const modalOpenBtn = document.getElementById('modal-open-btn');
|
||||
const modalCloseBtn = document.getElementById('modal-close-btn');
|
||||
let _modalPath = null;
|
||||
@@ -73,6 +74,9 @@ function closeModal() {
|
||||
modalCloseBtn.addEventListener('click', closeModal);
|
||||
modal.querySelector('.modal-backdrop').addEventListener('click', closeModal);
|
||||
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeModal(); });
|
||||
modalFolderBtn.addEventListener('click', () => {
|
||||
if (_modalPath) apiFetch('/open', { method: 'POST', body: JSON.stringify({ path: _modalPath, folder: true }) });
|
||||
});
|
||||
modalOpenBtn.addEventListener('click', () => {
|
||||
if (_modalPath) apiFetch('/open', { method: 'POST', body: JSON.stringify({ path: _modalPath }) });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user