You've already forked obsidian-visualiser
Add deletion of files, add slots to tree and a global icon by type. Project update needs rework.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { FileType } from "~/schemas/file";
|
||||
|
||||
export function unifySlug(slug: string | string[]): string
|
||||
{
|
||||
return (Array.isArray(slug) ? slug.join('/') : slug);
|
||||
@@ -43,4 +45,11 @@ export function clamp(x: number, min: number, max: number): number {
|
||||
if (x < min)
|
||||
return min;
|
||||
return x;
|
||||
}
|
||||
|
||||
export const iconByType: Record<FileType, string> = {
|
||||
'folder': 'lucide:folder',
|
||||
'canvas': 'ph:graph-light',
|
||||
'file': 'radix-icons:file',
|
||||
'markdown': 'radix-icons:file',
|
||||
}
|
||||
Reference in New Issue
Block a user