fix: export attachTreeItemActionButton/LongPress from viewer.js, import in sidebar.js
CI / lint (push) Successful in 14s
CI / security (push) Successful in 8s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s

This commit is contained in:
2026-05-28 20:50:56 -04:00
parent a91dfa65fc
commit 7d13585b11
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { safeCreateIcons, getFileIcon } from './utils.js';
import { api } from './auth.js'; import { api } from './auth.js';
import { populateCustomDropdown } from './ui.js'; import { populateCustomDropdown } from './ui.js';
import { _populateRecentVaultFilter } from './config.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 // Vault context switching
+2 -2
View File
@@ -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"); const button = document.createElement("button");
button.type = "button"; button.type = "button";
button.className = "tree-item-action-btn"; button.className = "tree-item-action-btn";
@@ -668,7 +668,7 @@ function attachTreeItemActionButton(itemEl, vault, path, type, isReadonly) {
}, 0); }, 0);
} }
function attachTreeItemLongPress(itemEl, getMenuData) { export function attachTreeItemLongPress(itemEl, getMenuData) {
let pressTimer = null; let pressTimer = null;
let pressHandled = false; let pressHandled = false;
let startX = 0; let startX = 0;