diff --git a/frontend/js/sidebar.js b/frontend/js/sidebar.js index 7d10879..b65b546 100644 --- a/frontend/js/sidebar.js +++ b/frontend/js/sidebar.js @@ -3,7 +3,7 @@ import { safeCreateIcons, getFileIcon } from './utils.js'; import { api } from './auth.js'; import { populateCustomDropdown } from './ui.js'; import { _populateRecentVaultFilter } from './config.js'; -import { el, icon, getVaultIcon, smallBadge } from './viewer.js'; +import { el, icon, getVaultIcon, smallBadge, attachTreeItemActionButton, attachTreeItemLongPress } from './viewer.js'; // --------------------------------------------------------------------------- // Vault context switching diff --git a/frontend/js/viewer.js b/frontend/js/viewer.js index 1bde725..dc846d1 100644 --- a/frontend/js/viewer.js +++ b/frontend/js/viewer.js @@ -647,7 +647,7 @@ function getContextMenuPositionFromElement(target) { }; } -function attachTreeItemActionButton(itemEl, vault, path, type, isReadonly) { +export function attachTreeItemActionButton(itemEl, vault, path, type, isReadonly) { const button = document.createElement("button"); button.type = "button"; button.className = "tree-item-action-btn"; @@ -668,7 +668,7 @@ function attachTreeItemActionButton(itemEl, vault, path, type, isReadonly) { }, 0); } -function attachTreeItemLongPress(itemEl, getMenuData) { +export function attachTreeItemLongPress(itemEl, getMenuData) { let pressTimer = null; let pressHandled = false; let startX = 0;