MCPcopy Create free account
hub / github.com/error311/FileRise / handleLinkSelected

Function handleLinkSelected

public/js/fileActions.js:1314–1330  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1312}
1313
1314export function handleLinkSelected(e) {
1315 if (e) {
1316 e.preventDefault();
1317 e.stopImmediatePropagation();
1318 }
1319 const files = getSelectedFileObjects();
1320 if (files.length !== 1) {
1321 showToast(t("select_single_file") || "Select one file to link.", 'warning');
1322 return;
1323 }
1324 const fileObj = files[0];
1325 const folder = fileObj.folder || window.currentFolder || "root";
1326
1327 import('./fileLink.js?v={{APP_QVER}}')
1328 .then(mod => mod.openFileLinkModal(fileObj, folder))
1329 .catch(err => console.error("Failed to open file link modal", err));
1330}
1331
1332export async function handleToolbarMenuOpen(e) {
1333 if (e) {

Callers

nothing calls this directly

Calls 3

getSelectedFileObjectsFunction · 0.85
tFunction · 0.85
showToastFunction · 0.70

Tested by

no test coverage detected