MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / updateBreadcrumbs

Function updateBreadcrumbs

frontend/src/hooks/useFileManager.ts:174–199  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

172 };
173
174 const updateBreadcrumbs = (path: string) => {
175 const breadcrumbPaths = parsePath(path);
176 breadcrumbs.length = 0;
177
178 if (breadcrumbPaths[0] !== "/") {
179 // win
180 currentDisk.value = breadcrumbPaths[0];
181 breadcrumbPaths[0] = "/";
182 breadcrumbPaths.forEach((p) => {
183 breadcrumbs.push({
184 path: `${currentDisk.value}:${p}`,
185 name: getLastNameFromPath(p),
186 disabled: false
187 });
188 });
189 } else {
190 currentDisk.value = t("TXT_CODE_28124988");
191 breadcrumbPaths.forEach((p) => {
192 breadcrumbs.push({
193 path: p,
194 name: getLastNameFromPath(p),
195 disabled: false
196 });
197 });
198 }
199 };
200
201 const handleChangeTab = async (key: string) => {
202 const path = currentTabs.value.find((tab) => tab.key === key)?.path || "";

Callers 3

handleChangeTabFunction · 0.85
getFileListFunction · 0.85
handleChangeDirFunction · 0.85

Calls 3

parsePathFunction · 0.85
getLastNameFromPathFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected