Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Bugs fixes, optimizations, icons display, separe code in components

Smaug67390b88a95c0048
diff --git a/frontend/app/components/CommandCenter/index.vue b/frontend/app/components/CommandCenter/index.vue
index 662a0fe9..ace0540a 100644
--- a/frontend/app/components/CommandCenter/index.vue
+++ b/frontend/app/components/CommandCenter/index.vue
@@ -121,7 +121,7 @@ function openSearch() {
}
function closeSearch(e?: MouseEvent) {
- if (e && e.target && (e.target as Element).closest('.command-center-modal')) return;
+ if (e && e.target && (e.target as Element).closest('.command-center-modal') && !(e.target as Element).classList.contains('close-btn')) return;
isOpen.value = false;
searchQuery.value = '';
selectedIndex.value = 0;
diff --git a/frontend/app/components/DocumentCard.vue b/frontend/app/components/DocumentCard.vue
index 5950aac2..caa84910 100644
--- a/frontend/app/components/DocumentCard.vue
+++ b/frontend/app/components/DocumentCard.vue
@@ -65,6 +65,8 @@ const deleteDoc = () => useModal().add(new Modal(shallowRef(DeleteDocumentModal)
padding: 6px;
border-radius: 6px;
margin-right: 10px;
+ width: 30px;
+ height: 30px;
}
.document-title {
diff --git a/frontend/app/components/DocumentLine.vue b/frontend/app/components/DocumentLine.vue
index 9498a91a..17359f7b 100644
--- a/frontend/app/components/DocumentLine.vue
+++ b/frontend/app/components/DocumentLine.vue
@@ -2,7 +2,7 @@
<div class="document-line">
<header style="display: flex; justify-content: space-between">
<div style="display: flex; align-items: center; justify-content: flex-start">
- <div class="category-icon">
+ <div>
<Icon :name="category?.icon || 'files'" :class="`category-icon ${getAppColor(category?.color as number, true)}`" />
</div>
<NuxtLink :to="`/dashboard/docs/${document.id}`" class="document-title">{{ document.name }}</NuxtLink>
@@ -50,6 +50,8 @@ header {
padding: 6px;
border-radius: 6px;
margin-right: 5px;
+ width: 30px;
+ height: 30px;
}
.document-title {
diff --git a/frontend/app/components/Icon.vue b/frontend/app/components/Icon.vue
index a942033a..ed3e3df8 100644
--- a/frontend/app/components/Icon.vue
+++ b/frontend/app/components/Icon.vue
@@ -13,10 +13,14 @@ const icon = computed(() => useIcon(props.name as IconName) || props.name);
.icon {
display: flex;
align-items: center;
+ width: 20px;
+ height: 20px;
+ max-width: 100%;
+ max-height: 100%;
&:deep(svg) {
- width: 20px;
- max-height: 20px;
+ width: 100%;
+ height: 100%;
path {
fill: inherit;
@@ -29,23 +33,17 @@ const icon = computed(() => useIcon(props.name as IconName) || props.name);
}
.small {
- &:deep(svg) {
- width: 18px;
- max-height: 18px;
- }
+ width: 18px;
+ height: 18px;
}
.mid {
- &:deep(svg) {
- width: 21px;
- max-height: 21px;
- }
+ width: 21px;
+ height: 21px;
}
.big {
- &:deep(svg) {
- width: 25px;
- max-height: 25px;
- }
+ width: 25px !important;
+ height: 25px !important;
}
</style>
diff --git a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
index faf1daef..ced222ae 100644
--- a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
+++ b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
@@ -1,28 +1,6 @@
<template>
<div class="color-picker-modal">
- <div class="modal-header">
- <div class="header-icon">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
- >
- <circle cx="13.5" cy="6.5" r=".5" />
- <circle cx="17.5" cy="10.5" r=".5" />
- <circle cx="8.5" cy="7.5" r=".5" />
- <circle cx="6.5" cy="12.5" r=".5" />
- <path
- d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 011.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"
- />
- </svg>
- </div>
- <h3>Color Palette</h3>
- <p class="header-subtitle">Choose from predefined colors or use the color wheel</p>
- </div>
+ <EditorAppHeader icon="color" title="Select Color" subtitle="Choose a color from the palette or create a custom one." />
<div class="modal-content">
<div class="section">
@@ -134,6 +112,7 @@
</template>
<script setup lang="ts">
+import EditorAppHeader from './EditorAppHeader.vue';
const props = defineProps<{
onColorSelect: (color: string) => void;
}>();
@@ -345,52 +324,6 @@ onMounted(async () => {
overflow: hidden;
}
-.modal-header {
- display: flex;
- padding: 24px 0 20px;
- text-align: center;
- align-items: center;
- flex-direction: column;
- flex-shrink: 0;
-
- .header-icon {
- display: flex;
- width: 48px;
- height: 48px;
- border-radius: 16px;
- color: white;
- background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
- align-items: center;
- justify-content: center;
- margin-bottom: 16px;
-
- svg {
- width: 24px;
- height: 24px;
- }
- }
-
- h3 {
- margin: 0 0 8px;
- font-size: 24px;
- font-weight: 800;
- color: var(--font-color-dark);
- background: linear-gradient(135deg, var(--font-color-dark), var(--primary));
- background-clip: text;
- letter-spacing: -0.8px;
- -webkit-text-fill-color: transparent;
- }
-
- .header-subtitle {
- max-width: 280px;
- margin: 0;
- font-size: 14px;
- font-weight: 500;
- line-height: 1.4;
- color: var(--font-color-light);
- }
-}
-
.modal-content {
display: flex;
min-height: 0;
diff --git a/frontend/app/components/MarkdownEditor/EditorAppHeader.vue b/frontend/app/components/MarkdownEditor/EditorAppHeader.vue
new file mode 100644
index 00000000..0904dcbd
--- /dev/null
+++ b/frontend/app/components/MarkdownEditor/EditorAppHeader.vue
@@ -0,0 +1,61 @@
+<template>
+ <div class="modal-header">
+ <div class="header-icon">
+ <Icon :name="icon" style="width: 30px; height: 30px" fill="var(--bg-color)" />
+ </div>
+ <h3>{{ title }}</h3>
+ <p class="header-subtitle">{{ subtitle }}</p>
+ </div>
+</template>
+
+<script setup lang="ts">
+defineProps<{ icon: string; title: string; subtitle: string }>();
+</script>
+
+<style scoped lang="scss">
+.modal-header {
+ display: flex;
+ padding: 24px 0 20px;
+ text-align: center;
+ align-items: center;
+ flex-direction: column;
+ flex-shrink: 0;
+
+ .header-icon {
+ display: flex;
+ width: 48px;
+ height: 48px;
+ border-radius: 16px;
+ color: white;
+ background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 16px;
+
+ svg {
+ width: 24px;
+ height: 24px;
+ }
+ }
+
+ h3 {
+ margin: 0 0 8px;
+ font-size: 24px;
+ font-weight: 800;
+ color: var(--font-color-dark);
+ background: linear-gradient(135deg, var(--font-color-dark), var(--primary));
+ background-clip: text;
+ letter-spacing: -0.8px;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .header-subtitle {
+ max-width: 280px;
+ margin: 0;
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 1.4;
+ color: var(--font-color-light);
+ }
+}
+</style>
diff --git a/frontend/app/components/MarkdownEditor/GridOrganizationModal.vue b/frontend/app/components/MarkdownEditor/GridOrganizationModal.vue
index 67bcd316..519f43bc 100644
--- a/frontend/app/components/MarkdownEditor/GridOrganizationModal.vue
+++ b/frontend/app/components/MarkdownEditor/GridOrganizationModal.vue
@@ -1,16 +1,6 @@
<template>
<div class="grid-organization-modal">
- <div class="modal-header">
- <div class="header-icon">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#fff">
- <path
- d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"
- />
- </svg>
- </div>
- <h3>Table creator</h3>
- <p class="header-subtitle">Choose from predefined table layouts or create your own</p>
- </div>
+ <EditorAppHeader icon="grid" title="Insert Grid" subtitle="Select a grid layout or customize your own by selecting the number of rows and columns." />
<div class="modal-content">
<div class="table-selector">
@@ -55,6 +45,7 @@
</template>
<script setup lang="ts">
+import EditorAppHeader from './EditorAppHeader.vue';
const props = defineProps<{
onGridSelect: (gridMarkdown: string) => void;
}>();
@@ -245,52 +236,6 @@ const closeModal = () => {
overflow: auto;
}
-.modal-header {
- display: flex;
- padding: 24px 0 20px;
- text-align: center;
- align-items: center;
- flex-direction: column;
- flex-shrink: 0;
-
- .header-icon {
- display: flex;
- width: 48px;
- height: 48px;
- border-radius: 16px;
- color: white;
- background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
- align-items: center;
- justify-content: center;
- margin-bottom: 16px;
-
- svg {
- width: 24px;
- height: 24px;
- }
- }
-
- h3 {
- margin: 0 0 8px;
- font-size: 24px;
- font-weight: 800;
- color: var(--font-color-dark);
- background: linear-gradient(135deg, var(--font-color-dark), var(--primary));
- background-clip: text;
- letter-spacing: -0.8px;
- -webkit-text-fill-color: transparent;
- }
-
- .header-subtitle {
- max-width: 280px;
- margin: 0;
- font-size: 14px;
- font-weight: 500;
- line-height: 1.4;
- color: var(--font-color-light);
- }
-}
-
.modal-content {
display: flex;
padding: 0;
diff --git a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
index fe132474..6a65561a 100644
--- a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
+++ b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
@@ -1,16 +1,6 @@
<template>
<div class="image-selector-modal">
- <div class="modal-header">
- <div class="header-icon">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#fff">
- <path
- d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"
- />
- </svg>
- </div>
- <h3>Image selector</h3>
- <p class="header-subtitle">Choose image from your library</p>
- </div>
+ <EditorAppHeader icon="image" title="Select Image" subtitle="Choose an image to insert into your document." />
<div class="search-bar">
<input v-model="searchQuery" placeholder="Search images..." class="search-input" />
</div>
@@ -37,6 +27,7 @@
</template>
<script setup lang="ts">
+import EditorAppHeader from './EditorAppHeader.vue';
import { useRessourcesStore, type Ressource } from '~/stores';
const props = defineProps<{
@@ -114,52 +105,6 @@ onMounted(() => {
flex-direction: column;
}
-.modal-header {
- display: flex;
- padding: 24px 0 20px;
- text-align: center;
- align-items: center;
- flex-direction: column;
- flex-shrink: 0;
-
- .header-icon {
- display: flex;
- width: 48px;
- height: 48px;
- border-radius: 16px;
- color: white;
- background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
- align-items: center;
- justify-content: center;
- margin-bottom: 16px;
-
- svg {
- width: 24px;
- height: 24px;
- }
- }
-
- h3 {
- margin: 0 0 8px;
- font-size: 24px;
- font-weight: 800;
- color: var(--font-color-dark);
- background: linear-gradient(135deg, var(--font-color-dark), var(--primary));
- background-clip: text;
- letter-spacing: -0.8px;
- -webkit-text-fill-color: transparent;
- }
-
- .header-subtitle {
- max-width: 280px;
- margin: 0;
- font-size: 14px;
- font-weight: 500;
- line-height: 1.4;
- color: var(--font-color-light);
- }
-}
-
.modal-content {
display: flex;
padding: 0;
diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue
index 9d7b86da..b8090947 100644
--- a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue
+++ b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue
@@ -295,6 +295,7 @@ const state = EditorState.create({
history(),
drawSelection(),
autocompletion(),
+ // @ts-expect-error normal custom key map
keymap.of([...defaultKeymap, ...historyKeymap, ...searchKeymap, indentWithTab, ...markdownKeysmap]),
markdown({ base: markdownLanguage }),
updateListener,
diff --git a/frontend/app/components/MarkdownEditor/Toolbar.vue b/frontend/app/components/MarkdownEditor/Toolbar.vue
index fe7b0eef..fe9f091c 100644
--- a/frontend/app/components/MarkdownEditor/Toolbar.vue
+++ b/frontend/app/components/MarkdownEditor/Toolbar.vue
@@ -1,7 +1,9 @@
<template>
<div class="toolbar">
<!-- eslint-disable-next-line vue/no-v-html -->
- <button v-for="item in toolbar" :key="item.name" :title="item.name" class="btn" @click="emitAction(item.action)" v-html="item.icon" />
+ <button v-for="item in toolbar" :key="item.name" :title="item.name" class="btn" @click="emitAction(item.action)">
+ <Icon :name="item.icon" :big="true" fill="var(--font-color)" />
+ </button>
<VoiceRecognition @transcription="handleTranscription" />
<AppSelect v-if="!minimal" v-model="localValue.accessibility" :items="accessibilities" placeholder="Access" size="100px" class="entry" />
<AppSelect v-if="!minimal" v-model="localValue.category" :items="categories" placeholder="Select category" size="300px" class="entry" />
@@ -74,7 +76,7 @@ const toolbar = [
},
{
name: 'Image',
- icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"/></svg>',
+ icon: 'image',
action: 'image',
},
{
@@ -99,12 +101,12 @@ const toolbar = [
},
{
name: 'Table',
- icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"/></svg>',
+ icon: 'grid',
action: 'gridOrganization',
},
{
name: 'Color',
- icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80Zm0-400Zm-220 40q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120-160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm200 0q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120 160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17ZM480-160q9 0 14.5-5t5.5-13q0-14-15-33t-15-57q0-42 29-67t71-25h70q66 0 113-38.5T800-518q0-121-92.5-201.5T488-800q-136 0-232 93t-96 227q0 133 93.5 226.5T480-160Z"/></svg>`,
+ icon: `color`,
action: 'openColorPicker',
},
{
@@ -175,12 +177,6 @@ const toolbar = [
background: var(--primary);
}
-.btn:deep(svg) {
- width: 24px;
- height: 24px;
- fill: var(--font-color-dark);
-}
-
input,
.select {
display: inline-block;
diff --git a/frontend/app/components/Sidebar/SidebarItem.vue b/frontend/app/components/Sidebar/SidebarItem.vue
index 50864abb..cc4282a1 100644
--- a/frontend/app/components/Sidebar/SidebarItem.vue
+++ b/frontend/app/components/Sidebar/SidebarItem.vue
@@ -11,7 +11,7 @@
>
<Icon :name="icon" :class="customClass" />&nbsp;
- <NuxtLink :to="item.route" style="width: 100%" class="close">{{ item.label }}</NuxtLink>
+ <NuxtLink :to="item.route" style="flex: 1" class="close">{{ item.label }}</NuxtLink>
<NuxtLink v-if="item.data.type === 'category'" :to="`/dashboard/categories/${item.id}/edit`" class="nav close">
<Icon name="settings" fill="var(--font-color)" />
@@ -101,7 +101,7 @@ const drop = async (event: DragEvent) => {
};
</script>
-<style lang="scss" scoped>
+<style scoped lang="scss">
.item {
display: flex;
margin: 2.5px 0;
@@ -113,7 +113,7 @@ const drop = async (event: DragEvent) => {
cursor: pointer;
justify-content: flex-start;
letter-spacing: -0.4px;
-
+ width: 100%;
&:hover,
&:has(.router-link-exact-active:not(.nav)) {
background: var(--bg-contrast-2);
@@ -133,11 +133,10 @@ const drop = async (event: DragEvent) => {
}
.item-icon {
- display: inline-flex;
padding: 2px;
- border-radius: 4px; // Coins arrondis
- align-items: center;
- justify-content: center;
+ border-radius: 4px;
+ width: 20px;
+ height: 20px;
}
}
@@ -158,5 +157,7 @@ const drop = async (event: DragEvent) => {
.item:hover .nav,
.active {
display: block;
+ width: 20px;
+ height: 20px;
}
</style>
diff --git a/frontend/app/helpers/icons.ts b/frontend/app/helpers/icons.ts
index 040a1b7f..cc155e71 100644
--- a/frontend/app/helpers/icons.ts
+++ b/frontend/app/helpers/icons.ts
@@ -8,6 +8,7 @@ const icons = {
cdn: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M485-440h163q26 0 44-18t18-44q0-26-18-44.5T648-565h-2q-5-32-29-53.5T560-640q-26 0-47 13.5T481-590q-30 2-50.5 23.5T410-515q0 30 21.5 52.5T485-440ZM120-120q-33 0-56.5-23.5T40-200v-480q0-17 11.5-28.5T80-720q17 0 28.5 11.5T120-680v480h640q17 0 28.5 11.5T800-160q0 17-11.5 28.5T760-120H120Zm160-160q-33 0-56.5-23.5T200-360v-440q0-33 23.5-56.5T280-880h167q16 0 30.5 6t25.5 17l57 57h280q33 0 56.5 23.5T920-720v360q0 33-23.5 56.5T840-280H280Zm0-80h560v-360H527l-80-80H280v440Zm0 0v-440 440Z"/></svg>`,
close: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>`,
collapse: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="m480-500 160-160H320l160 160Zm280-340q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560ZM200-320v120h560v-120H200Zm560-80v-360H200v360h560Zm-560 80v120-120Z"/></svg>`,
+ color: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80Zm0-400Zm-220 40q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120-160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm200 0q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120 160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17ZM480-160q9 0 14.5-5t5.5-13q0-14-15-33t-15-57q0-42 29-67t71-25h70q66 0 113-38.5T800-518q0-121-92.5-201.5T488-800q-136 0-232 93t-96 227q0 133 93.5 226.5T480-160Z"/></svg>`,
copy: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="var(--font-color)"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/></svg>`,
dashboard: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M240-200h120v-200q0-17 11.5-28.5T400-440h160q17 0 28.5 11.5T600-400v200h120v-360L480-740 240-560v360Zm-80 0v-360q0-19 8.5-36t23.5-28l240-180q21-16 48-16t48 16l240 180q15 11 23.5 28t8.5 36v360q0 33-23.5 56.5T720-120H560q-17 0-28.5-11.5T520-160v-200h-80v200q0 17-11.5 28.5T400-120H240q-33 0-56.5-23.5T160-200Zm320-270Z"/></svg>`,
delete: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="var(--font-color)"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z" /></svg>`,
@@ -26,6 +27,7 @@ const icons = {
file_parent: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path style="fill:var(--green);" d="M320-320h200v-200H320v200Zm0-280h480v-200H320v200Zm280 280h200v-200H600v200Zm-280 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Z"/></svg>`,
folder: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" style="fill:var(--yellow)"><path style="fill:var(--yellow)" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640H447l-80-80H160v480l96-320h684L837-217q-8 26-29.5 41.5T760-160H160Zm84-80h516l72-240H316l-72 240Zm0 0 72-240-72 240Zm-84-400v-80 80Z"/></svg>`,
folder_s: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M160-160q-33 0-56.5-23.5T80-240v-400q0-33 23.5-56.5T160-720h240l80-80h320q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm73-280h207v-207L233-440Zm-73-40 160-160H160v160Zm0 120v120h640v-480H520v280q0 33-23.5 56.5T440-360H160Zm280-160Z"/></svg>`,
+ grid: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"/></svg>`,
help: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>`,
image: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path style="fill:var(--green);" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"/></svg>`,
import: `<svg xmlns="http://www.w3.org/2000/svg"viewBox="0 -960 960 960"><path d="M480-800 243-663l237 137 237-137-237-137ZM120-321v-318q0-22 10.5-40t29.5-29l280-161q10-5 19.5-8t20.5-3q11 0 21 3t19 8l280 161q19 11 29.5 29t10.5 40v119q0 17-11.5 28.5T800-480q-17 0-28.5-11.5T760-520v-76L519-457q-19 11-40 11t-40-11L200-596v274l220 128q9 5 14.5 14t5.5 20q0 23-20 34.5t-40 .5L160-252q-19-11-29.5-29T120-321ZM720 0q-83 0-141.5-58.5T520-200q0-83 58.5-141.5T720-400q83 0 141.5 58.5T920-200q0 83-58.5 141.5T720 0ZM480-491Zm220 335-58-58q-6-6-14-6t-14 6q-6 6-6 14t6 14l78 78q6 6 13 8.5t15 2.5q8 0 15-2.5t13-8.5l78-78q6-6 6-14t-6-14q-6-6-14-6t-14 6l-58 58v-144q0-8-6-14t-14-6q-8 0-14 6t-6 14v144Z"/></svg>`,