Is there any way to set the root folder to "Files" instead of "My files" ?
Currently I can only add some new folder under "My files" and then add files under new folder. Also another question related to using custom icons
Is it possible to use CustomIcon from existing libraries , I saw the sample code below
<script>
import { Filemanager } from "wx-svelte-filemanager";
const server = "https://some-backend-url";
let rawData = $state([]);
fetch(server + "/files")
.then((data) => data.json())
.then((data) => (rawData = data));
function iconsURL(file, size) {
if (file.type !== "file") return server + `/icons/${size}/${file.type}.svg`;
return server + `/icons/${size}/${file.ext}.svg`;
}
</script>
<Filemanager data={rawData} previews={previewURL} icons={iconsURL} />
But I would like to use @mdi/js icons like example below
<script lang="ts">
import { page } from "$app/stores";
import Button, { Label, Icon } from '@smui/button';
import { mdiChevronLeft } from '@mdi/js';
export let text: string;
export let url: string | undefined;
if (!url) {
const path = $page.url.pathname;
const ind = path.lastIndexOf("/");
if (ind > 0) {
url = path.substring(0, ind);
}
}
</script>
<div class="backlink">
<Button href={url}>
<Icon tag="svg" viewBox="0 0 24 24">
<path fill="currentColor" d={mdiChevronLeft} />
</Icon>
<Label>{text}</Label>
</Button>
</div>