auto-git:
[add] scripts/ [add] src-tauri/ [add] tauriBridge.js [change] .gitignore [change] README.md [change] index.html [change] package.json [change] renderer.js [change] settings.html [unlink] editor-reword.js [unlink] main.js [unlink] preload.js [unlink] rebase-sequence-windows.js
This commit is contained in:
12
renderer.js
12
renderer.js
@@ -148,6 +148,17 @@ window.addEventListener('DOMContentLoaded', async () => {
|
||||
}
|
||||
}
|
||||
});
|
||||
window.addEventListener('tauri-folder-drop', async e => {
|
||||
const paths = Array.isArray(e.detail) ? e.detail : [];
|
||||
for (const folderPath of paths) {
|
||||
await window.electronAPI.addFolderByPath(folderPath);
|
||||
}
|
||||
if (paths.length) {
|
||||
await renderSidebar();
|
||||
const sel = await window.electronAPI.getSelected();
|
||||
if (sel) await renderContent(sel);
|
||||
}
|
||||
});
|
||||
|
||||
// Theme Setup (Sky = dynamic, Default/Grey = static)
|
||||
const DAY_COLOR = [173, 216, 230];
|
||||
@@ -530,6 +541,7 @@ window.addEventListener('DOMContentLoaded', async () => {
|
||||
|
||||
async function renderContent(folderObj, page) {
|
||||
closeDropdown();
|
||||
window.currentSelectedFolderObj = folderObj;
|
||||
const folder = folderObj.path;
|
||||
await updateInteractionBar(folderObj);
|
||||
titleEl.textContent = folder;
|
||||
|
||||
Reference in New Issue
Block a user