mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
vault management
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
// Path shim - delegates to path-browserify (bundled via esbuild alias)
|
||||
// Configured for posix mode since vault paths are normalized to forward slashes.
|
||||
|
||||
import pathBrowserify from 'path';
|
||||
import pathBrowserify from "path";
|
||||
|
||||
export const pathShim = pathBrowserify;
|
||||
const _origBasename = pathBrowserify.basename;
|
||||
|
||||
export const pathShim = {
|
||||
...pathBrowserify,
|
||||
basename(p, ext) {
|
||||
// Vault root "/" should return the vault name for display purposes
|
||||
if (p === "/" && window.__currentVaultId) {
|
||||
return window.__currentVaultId;
|
||||
}
|
||||
return _origBasename(p, ext);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user