fix: share dialog not opening + connect to backend API
- Fix showShareDialog: add try-catch, null checks, prevent textContent from destroying header icon (use span child instead) - Capture file/folder target before closeContextMenu to prevent race - createSharedLink now calls real backend POST /api/shares instead of localStorage-only mock (still caches locally for offline compat) - Fix share_handler.rs: use OptionalAuthUser instead of AuthUser to prevent 401 when auth is disabled (same pattern as delete/trash) - Add null-safety to closeShareDialog - Reset new-share-section on dialog open
This commit is contained in:
+2
-2
@@ -204,8 +204,8 @@ const ui = {
|
||||
contextMenus.closeShareDialog();
|
||||
});
|
||||
|
||||
document.getElementById('share-confirm-btn').addEventListener('click', () => {
|
||||
contextMenus.createSharedLink();
|
||||
document.getElementById('share-confirm-btn').addEventListener('click', async () => {
|
||||
await contextMenus.createSharedLink();
|
||||
});
|
||||
|
||||
document.getElementById('copy-share-btn').addEventListener('click', async () => {
|
||||
|
||||
Reference in New Issue
Block a user