fix: export attachTreeItemActionButton/LongPress from viewer.js, import in sidebar.js
This commit is contained in:
parent
a91dfa65fc
commit
7d13585b11
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user