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.

refactor: clean code and refactor pages & components for consistency (#502)

Smaugf29f987aa19b
diff --git a/frontend/app/App.vue b/frontend/app/App.vue
index 811fc8b9..c5f5a338 100644
--- a/frontend/app/App.vue
+++ b/frontend/app/App.vue
@@ -49,11 +49,10 @@ watch(
<style lang="scss">
#app {
- height: 100vh;
- overflow-y: scroll;
- overflow-x: auto;
display: flex;
+ height: 100vh;
flex-direction: column;
+ overflow: auto scroll;
}
@media print {
diff --git a/frontend/app/components/AppColorPicker.vue b/frontend/app/components/AppColorPicker.vue
index 79c76404..6173057f 100644
--- a/frontend/app/components/AppColorPicker.vue
+++ b/frontend/app/components/AppColorPicker.vue
@@ -82,6 +82,7 @@ const selectColor = (color: number) => {
.hint-tooltip {
margin-top: 10px;
}
+
.color-option:hover .hint-tooltip {
opacity: 1;
visibility: visible;
diff --git a/frontend/app/components/AppDotMenu.vue b/frontend/app/components/AppDotMenu.vue
index 0a9d33cc..dcb136dc 100644
--- a/frontend/app/components/AppDotMenu.vue
+++ b/frontend/app/components/AppDotMenu.vue
@@ -17,9 +17,10 @@
</template>
<script setup lang="ts">
-const open = ref(false);
const emit = defineEmits(['open', 'close']);
+const open = ref(false);
+
const toggleMenu = () => {
open.value = !open.value;
emit(open.value ? 'open' : 'close');
diff --git a/frontend/app/components/AppDrop.vue b/frontend/app/components/AppDrop.vue
index dc323382..8810b9b9 100644
--- a/frontend/app/components/AppDrop.vue
+++ b/frontend/app/components/AppDrop.vue
@@ -62,17 +62,19 @@ const props = withDefaults(
},
);
+const emit = defineEmits<{
+ select: [files: File | File[] | null];
+}>();
+
const { t } = useI18nT();
+
const selectedFiles = ref<File[]>([]);
const isDragOver = ref(false);
const fileInput = ref<HTMLInputElement | null>(null);
const totalSize = computed(() => selectedFiles.value.reduce((acc, file) => acc + file.size, 0));
-const emit = defineEmits<{
- select: [files: File | File[] | null];
-}>();
-
+// Actions
const triggerFileSelect = () => fileInput.value!.click();
const addFiles = (files?: FileList | File[] | null) => {
diff --git a/frontend/app/components/AppPreferenceInputSection.vue b/frontend/app/components/AppPreferenceInputSection.vue
index 59275dfc..477a6d18 100644
--- a/frontend/app/components/AppPreferenceInputSection.vue
+++ b/frontend/app/components/AppPreferenceInputSection.vue
@@ -69,14 +69,14 @@
</template>
<script setup lang="ts">
+defineProps<{
+ options: Array<{ label: string; options: Option[] }>;
+}>();
+
const preferencesStore = usePreferencesStore();
// @ts-expect-error unknown type
const p = preferencesStore.get as <K extends PreferenceKey>(key: K) => ReturnType<unknown>;
-
-defineProps<{
- options: Array<{ label: string; options: Option[] }>;
-}>();
</script>
<style lang="scss" scoped>
@@ -141,6 +141,7 @@ h3 {
opacity: 0.7;
}
}
+
.number-entry {
width: 40%;
}
diff --git a/frontend/app/components/AppTagInput.vue b/frontend/app/components/AppTagInput.vue
index f13d4388..4b384997 100644
--- a/frontend/app/components/AppTagInput.vue
+++ b/frontend/app/components/AppTagInput.vue
@@ -198,6 +198,7 @@ input {
align-items: center;
cursor: pointer;
justify-content: center;
+
&:hover {
background: var(--surface-transparent);
}
diff --git a/frontend/app/components/CommandCenter/index.vue b/frontend/app/components/CommandCenter/index.vue
index a8047cb6..6d86ca8c 100644
--- a/frontend/app/components/CommandCenter/index.vue
+++ b/frontend/app/components/CommandCenter/index.vue
@@ -138,9 +138,9 @@ function handleKeydown(e: KeyboardEvent) {
.shortcuts {
display: flex;
- align-items: center;
font-size: 13px;
font-weight: 500;
+ align-items: center;
flex-wrap: wrap;
gap: 10px;
}
diff --git a/frontend/app/components/DataTable.vue b/frontend/app/components/DataTable.vue
index e990a431..e31ca7a1 100644
--- a/frontend/app/components/DataTable.vue
+++ b/frontend/app/components/DataTable.vue
@@ -163,8 +163,8 @@ table {
display: table;
width: 100%;
margin: 0;
- border-radius: 0;
border-color: inherit;
+ border-radius: 0;
border-collapse: collapse;
table-layout: auto;
}
diff --git a/frontend/app/components/FileInline.vue b/frontend/app/components/FileInline.vue
index 3bc09d8e..5977559e 100644
--- a/frontend/app/components/FileInline.vue
+++ b/frontend/app/components/FileInline.vue
@@ -36,13 +36,13 @@ onBeforeUnmount(() => {
<style scoped lang="scss">
.file-card {
display: flex;
- align-items: center;
- gap: 0.75rem;
+ width: 100%;
padding: 0.5rem 0.75rem;
- border-radius: var(--radius-md);
border: 1px solid var(--border);
+ border-radius: var(--radius-md);
background-color: var(--surface-base);
- width: 100%;
+ align-items: center;
+ gap: 0.75rem;
.file-preview {
width: 48px;
@@ -52,8 +52,8 @@ onBeforeUnmount(() => {
}
.file-info {
- flex: 1;
min-width: 0;
+ flex: 1;
.file-name {
display: block;
@@ -77,8 +77,8 @@ onBeforeUnmount(() => {
cursor: pointer;
&:hover {
- background: var(--bg-tertiary);
color: var(--red);
+ background: var(--bg-tertiary);
}
}
}
diff --git a/frontend/app/components/Kanban/Column.vue b/frontend/app/components/Kanban/Column.vue
index 40fb60da..b3f7d156 100644
--- a/frontend/app/components/Kanban/Column.vue
+++ b/frontend/app/components/Kanban/Column.vue
@@ -79,6 +79,7 @@ export interface KanbanColumnData {
}
const { t } = useI18nT();
+const modals = useModal();
const props = defineProps<{
column: KanbanColumnData;
@@ -152,7 +153,7 @@ const selectColor = (color: number) => {
};
const confirmDelete = () => {
- useModal().add(
+ modals.add(
new Modal(shallowRef(DeleteColumnModal), {
props: {
columnTitle: props.column.title,
@@ -164,7 +165,12 @@ const confirmDelete = () => {
);
};
-// Close color picker on click outside
+function handleClickOutside(e: MouseEvent) {
+ const target = e.target as HTMLElement;
+ if (!target.closest('.column-header')) {
+ showColorPicker.value = false;
+ }
+}
onMounted(() => {
document.addEventListener('click', handleClickOutside);
});
@@ -172,13 +178,6 @@ onMounted(() => {
onUnmounted(() => {
document.removeEventListener('click', handleClickOutside);
});
-
-function handleClickOutside(e: MouseEvent) {
- const target = e.target as HTMLElement;
- if (!target.closest('.column-header')) {
- showColorPicker.value = false;
- }
-}
</script>
<style scoped lang="scss">
diff --git a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
index bee11838..357e097b 100644
--- a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
+++ b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
@@ -62,33 +62,37 @@ watch(selectedColor, val => (hex.value = val));
<style scoped lang="scss">
.modal-ctn {
- padding: 16px;
display: flex;
+ padding: 16px;
flex-direction: column;
gap: 12px;
}
+
.modal-content {
display: flex;
flex-direction: column;
gap: 12px;
}
+
.section-title {
- font-weight: 700;
font-size: 14px;
+ font-weight: 700;
}
+
.swatches {
display: flex;
- justify-content: space-evenly;
- gap: 8px;
flex-wrap: wrap;
+ gap: 8px;
+ justify-content: space-evenly;
}
+
.swatch {
+ display: flex;
width: 45px;
height: 45px;
border-radius: var(--radius-md);
- cursor: pointer;
transition: transform $transition-fast ease;
- display: flex;
+ cursor: pointer;
justify-content: center;
&:hover {
@@ -100,27 +104,31 @@ watch(selectedColor, val => (hex.value = val));
}
.swatch-check {
+ width: 20px;
opacity: 0;
transition: opacity $transition-fast ease;
- width: 20px;
}
}
+
.custom-row {
display: flex;
flex-direction: column;
gap: 8px;
}
+
.custom-inputs {
display: flex;
- gap: 8px;
align-items: center;
+ gap: 8px;
}
+
.color-input {
width: 48px;
height: 34px;
padding: 0;
border: none;
}
+
.actions-row {
justify-content: flex-end;
}
diff --git a/frontend/app/components/MarkdownEditor/DrawioSidebar.vue b/frontend/app/components/MarkdownEditor/DrawioSidebar.vue
index 450c44e5..caeda4ec 100644
--- a/frontend/app/components/MarkdownEditor/DrawioSidebar.vue
+++ b/frontend/app/components/MarkdownEditor/DrawioSidebar.vue
@@ -25,46 +25,45 @@ defineProps<{ diagrams: Node[] }>();
<style scoped lang="scss">
.drawio-sidebar {
display: flex;
+ max-height: 45%;
padding: 12px;
- border-top: 1px solid var(--border);
background: var(--surface-base);
+ border-top: 1px solid var(--border);
flex-direction: column;
gap: 12px;
- max-height: 45%;
- overflow-y: auto;
- overflow-x: hidden;
+ overflow: hidden auto;
}
.sidebar-header {
display: flex;
align-items: center;
- padding-bottom: 8px;
border-bottom: 1px solid var(--border);
+ padding-bottom: 8px;
}
.header-title {
display: flex;
- align-items: center;
- gap: 8px;
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
- text-transform: uppercase;
+ align-items: center;
+ gap: 8px;
letter-spacing: 0.5px;
+ text-transform: uppercase;
}
.badge {
display: flex;
- align-items: center;
- justify-content: center;
width: 20px;
height: 20px;
- margin-left: auto;
- background: var(--primary-bg);
border-radius: 50%;
font-size: 11px;
font-weight: 700;
color: var(--primary);
+ background: var(--primary-bg);
+ align-items: center;
+ justify-content: center;
+ margin-left: auto;
}
.diagrams-list {
diff --git a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
index 98a637c3..5980a1f3 100644
--- a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
+++ b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue
@@ -106,11 +106,11 @@ const selectImage = (image: Node) => {
.image-item {
border: 2px solid transparent;
border-radius: var(--radius-md);
- cursor: pointer;
transition:
border-color $transition-fast ease,
box-shadow $transition-fast ease,
transform $transition-fast ease;
+ cursor: pointer;
&:hover {
border-color: var(--primary);
diff --git a/frontend/app/components/MarkdownEditor/Toolbar.vue b/frontend/app/components/MarkdownEditor/Toolbar.vue
index 1eda0692..05be3983 100644
--- a/frontend/app/components/MarkdownEditor/Toolbar.vue
+++ b/frontend/app/components/MarkdownEditor/Toolbar.vue
@@ -118,12 +118,13 @@
</template>
<script setup lang="ts">
-import type { Node } from '~/stores';
import ModalSyntax from './ModalSyntax.vue';
import VoiceRecognition from './VoiceRecognition.vue';
import EditorPreferences from './EditorPreferences.vue';
+import type { Node } from '~/stores';
const { t } = useI18nT();
+const modals = useModal();
const props = defineProps<{
modelValue: Partial<Node>;
@@ -163,8 +164,8 @@ const localValue = computed({
const emitAction = (action: string) => emit('execute-action', action);
-const openHelp = () => useModal().add(new Modal(shallowRef(ModalSyntax), { size: 'medium' }));
-const openSettings = () => useModal().add(new Modal(shallowRef(EditorPreferences), { size: 'small' }));
+const openHelp = () => modals.add(new Modal(shallowRef(ModalSyntax), { size: 'medium' }));
+const openSettings = () => modals.add(new Modal(shallowRef(EditorPreferences), { size: 'small' }));
const nodesTree = useNodesTree();
const categories = nodesTree.treeUpToRole(2);
diff --git a/frontend/app/components/MarkdownEditor/modules/editorCommands.ts b/frontend/app/components/MarkdownEditor/modules/editorCommands.ts
index ea3670e3..da8c1ede 100644
--- a/frontend/app/components/MarkdownEditor/modules/editorCommands.ts
+++ b/frontend/app/components/MarkdownEditor/modules/editorCommands.ts
@@ -510,10 +510,10 @@ export function createCommands(params: CreateCommandsParams) {
view.focus();
}
- const modalManager = useModal();
+ const modals = useModal();
function openColorModal() {
- modalManager.add(new Modal(shallowRef(ColorPickerModal), { props: { onColorSelect: handleColorSelect } }));
+ modals.add(new Modal(shallowRef(ColorPickerModal), { props: { onColorSelect: handleColorSelect } }));
}
function handleColorSelect(color: string) {
@@ -521,11 +521,11 @@ export function createCommands(params: CreateCommandsParams) {
}
function openImageSelector() {
- modalManager.add(new Modal(shallowRef(ImageSelectorModal), { props: { onImageSelect: handleImageSelect, nodeId: params.getDoc()?.id }, size: 'medium' }));
+ modals.add(new Modal(shallowRef(ImageSelectorModal), { props: { onImageSelect: handleImageSelect, nodeId: params.getDoc()?.id }, size: 'medium' }));
}
function openGridOrganization() {
- modalManager.add(new Modal(shallowRef(GridOrganizationModal), { props: { onGridSelect: handleGridSelect } }));
+ modals.add(new Modal(shallowRef(GridOrganizationModal), { props: { onGridSelect: handleGridSelect } }));
}
function openDrawioEditor() {
@@ -537,7 +537,7 @@ export function createCommands(params: CreateCommandsParams) {
size: 'large',
noPadding: true,
});
- modalManager.add(modal);
+ modals.add(modal);
}
function handleImageSelect(imageUrl: string, altText: string) {
diff --git a/frontend/app/components/MediumView.vue b/frontend/app/components/MediumView.vue
index f2884b1c..40601e48 100644
--- a/frontend/app/components/MediumView.vue
+++ b/frontend/app/components/MediumView.vue
@@ -17,8 +17,8 @@ main {
width: 100%;
height: 100%;
padding: 0 10px;
- flex-direction: column;
transition: padding-left $transition-medium;
+ flex-direction: column;
}
@media print {
diff --git a/frontend/app/components/ModalManager.vue b/frontend/app/components/ModalManager.vue
index 0cf85972..0b7fc135 100644
--- a/frontend/app/components/ModalManager.vue
+++ b/frontend/app/components/ModalManager.vue
@@ -60,24 +60,26 @@ onUnmounted(() => document.removeEventListener('keydown', handleKeydown));
background-color: var(--surface-base);
box-shadow: var(--shadow-sm);
backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
- -webkit-backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
+ backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
}
.modal-container:has(> .full) {
- max-width: calc(100vw - 32px);
- max-height: calc(100vh - 20px);
width: 100%;
+ max-width: calc(100vw - 32px);
height: 100%;
+ max-height: calc(100vh - 20px);
+
.modal {
max-height: none;
}
}
.modal-container:has(> .large) {
- max-width: 95vw;
- max-height: 90vh;
width: 100%;
+ max-width: 95vw;
height: 100%;
+ max-height: 90vh;
+
.modal {
max-height: none;
}
@@ -118,7 +120,7 @@ onUnmounted(() => document.removeEventListener('keydown', handleKeydown));
display: flex;
background-color: var(--overlay-backdrop);
backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
- -webkit-backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
+ backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
inset: 0;
}
diff --git a/frontend/app/components/Navigation/BreadCrumbs.vue b/frontend/app/components/Navigation/BreadCrumbs.vue
index 106fda7f..2720e685 100644
--- a/frontend/app/components/Navigation/BreadCrumbs.vue
+++ b/frontend/app/components/Navigation/BreadCrumbs.vue
@@ -60,16 +60,16 @@ watchEffect(() => {
display: flex;
min-width: 0;
margin: 0;
- padding-inline: 8px;
align-items: center;
list-style: none;
- overflow-x: auto;
+ mask-image: linear-gradient(to right, transparent, black var(--_fade), black calc(100% - var(--_fade)), transparent);
+ mask-image: linear-gradient(to right, transparent, black var(--_fade), black calc(100% - var(--_fade)), transparent);
-webkit-overflow-scrolling: touch;
- white-space: nowrap;
+ overflow-x: auto;
+ padding-inline: 8px;
scroll-behavior: smooth;
scrollbar-width: none;
- mask-image: linear-gradient(to right, transparent, black var(--_fade), black calc(100% - var(--_fade)), transparent);
- -webkit-mask-image: linear-gradient(to right, transparent, black var(--_fade), black calc(100% - var(--_fade)), transparent);
+ white-space: nowrap;
&::-webkit-scrollbar {
display: none;
@@ -82,8 +82,8 @@ watchEffect(() => {
}
&__separator {
- flex-shrink: 0;
opacity: 0.6;
+ flex-shrink: 0;
}
&__link {
@@ -92,19 +92,19 @@ watchEffect(() => {
font-size: 0.85rem;
font-weight: 500;
color: var(--text-secondary);
- text-decoration: none;
transition:
background-color 0.15s ease,
color 0.15s ease;
+ text-decoration: none;
&:hover {
- background-color: var(--surface-transparent);
color: var(--text-body);
+ background-color: var(--surface-transparent);
}
&--active {
- color: var(--text-body);
font-weight: 600;
+ color: var(--text-body);
}
}
}
diff --git a/frontend/app/components/Navigation/Navigation.vue b/frontend/app/components/Navigation/Navigation.vue
index 5b229691..cca5d0dc 100644
--- a/frontend/app/components/Navigation/Navigation.vue
+++ b/frontend/app/components/Navigation/Navigation.vue
@@ -48,19 +48,19 @@ router.afterEach(() => handleState(window.history.state));
padding: 3px;
align-items: center;
gap: 8px;
- overflow-x: auto;
-webkit-overflow-scrolling: touch;
- white-space: nowrap;
+ overflow-x: auto;
scroll-behavior: smooth;
+ white-space: nowrap;
&__item {
display: inline-flex;
+ min-width: 27px;
+ min-height: 27px;
padding: 0;
border-radius: 50%;
- overflow: hidden;
cursor: pointer;
- min-width: 27px;
- min-height: 27px;
+ overflow: hidden;
&:hover:not(:disabled) {
.navigation__icon {
@@ -80,10 +80,10 @@ router.afterEach(() => handleState(window.history.state));
&__icon {
width: 27px;
height: 27px;
- fill: var(--text-body);
transition:
background-color $transition-medium ease,
opacity $transition-medium ease;
+ fill: var(--text-body);
}
}
</style>
diff --git a/frontend/app/components/Node/Action/ContextMenu.vue b/frontend/app/components/Node/Action/ContextMenu.vue
index 03edbc81..f2238ba5 100644
--- a/frontend/app/components/Node/Action/ContextMenu.vue
+++ b/frontend/app/components/Node/Action/ContextMenu.vue
@@ -47,14 +47,16 @@ const emit = defineEmits(['close']);
const nodeStore = useNodesStore();
const userStore = useUserStore();
-const router = useRouter();
-const route = useRoute();
const preferences = usePreferencesStore();
const { t } = useI18nT();
const { shortDate } = useDateFormatters();
const { avatarURL } = useApi();
+const router = useRouter();
+const route = useRoute();
+const modals = useModal();
userStore.fetchPublicUser(props.node.user_id);
+
const user = computed(() => userStore.getById(props.node.user_id || ''));
const developerMode = preferences.get('developerMode');
@@ -73,7 +75,7 @@ async function action(name: string) {
nodeStore.duplicate(props.node);
break;
case 'delete':
- useModal().add(
+ modals.add(
new Modal(shallowRef(NodeDeleteModal), {
props: { node: props.node, redirectTo: route.params?.id === props.node.id ? '/dashboard' : undefined },
size: 'small',
@@ -87,7 +89,7 @@ async function action(name: string) {
await nodeStore.update({ ...props.node, order: props.node.order === -1 ? 0 : -1 });
break;
case 'manageAccess':
- useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: props.node }, size: 'small' }));
+ modals.add(new Modal(shallowRef(NodePermissions), { props: { node: props.node }, size: 'small' }));
break;
case 'copyId':
navigator.clipboard.writeText(props.node.id);
diff --git a/frontend/app/components/Node/Action/ResourceContextMenu.vue b/frontend/app/components/Node/Action/ResourceContextMenu.vue
index e024eaed..1acf6e1f 100644
--- a/frontend/app/components/Node/Action/ResourceContextMenu.vue
+++ b/frontend/app/components/Node/Action/ResourceContextMenu.vue
@@ -42,10 +42,14 @@ const emit = defineEmits(['close']);
const nodeStore = useNodesStore();
const userStore = useUserStore();
+
const preferences = usePreferencesStore();
const { t } = useI18nT();
const { shortDate } = useDateFormatters();
const { avatarURL, resourceURL } = useApi();
+const modal = useModal();
+const notifications = useNotifications();
+const router = useRouter();
userStore.fetchPublicUser(props.node.user_id);
const user = computed(() => userStore.getById(props.node.user_id || ''));
@@ -54,27 +58,28 @@ const developerMode = preferences.get('developerMode');
async function action(name: string) {
switch (name) {
case 'open':
- useRouter().push(`/dashboard/docs/${props.node.id}`);
+ router.push(`/dashboard/docs/${props.node.id}`);
break;
case 'edit':
- useRouter().push(`/dashboard/cdn/${props.node.id}`);
+ router.push(`/dashboard/cdn/${props.node.id}`);
break;
case 'delete':
- useModal().add(new Modal(shallowRef(NodeDeleteModal), { props: { node: props.node }, size: 'small' }));
+ modal.add(new Modal(shallowRef(NodeDeleteModal), { props: { node: props.node }, size: 'small' }));
break;
case 'copyLink':
navigator.clipboard.writeText(resourceURL(props.node));
- useNotifications().add({ type: 'success', title: 'Link copied to clipboard' });
+ notifications.add({ type: 'success', title: 'Link copied to clipboard' });
break;
case 'copyMd':
navigator.clipboard.writeText(`![${props.node.name}](${resourceURL(props.node)})`);
- useNotifications().add({ type: 'success', title: 'Markdown link copied to clipboard' });
+ notifications.add({ type: 'success', title: 'Markdown link copied to clipboard' });
break;
case 'manageAccess':
- useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: props.node }, size: 'small' }));
+ modal.add(new Modal(shallowRef(NodePermissions), { props: { node: props.node }, size: 'small' }));
break;
case 'copyId':
navigator.clipboard.writeText(props.node.id);
+ notifications.add({ type: 'success', title: 'ID copied to clipboard' });
break;
}
emit('close');
diff --git a/frontend/app/components/Node/Card/NodeCard.vue b/frontend/app/components/Node/Card/NodeCard.vue
index 71bdba48..af15c484 100644
--- a/frontend/app/components/Node/Card/NodeCard.vue
+++ b/frontend/app/components/Node/Card/NodeCard.vue
@@ -1,12 +1,12 @@
<template>
- <div class="document-card" @contextmenu.prevent="showContextMenu">
+ <div class="document-card" @contextmenu.prevent="openContextMenu">
<div class="top">
<div class="header">
<span style="display: flex">
<Icon :name="category?.icon || 'files'" display="xl" :class="['category-icon', getAppAccent(node.color || category?.color, true)]" />
<NuxtLink :to="`/dashboard/docs/${node.id}`" class="document-title">{{ node.name }}</NuxtLink>
</span>
- <NodeActionDotMenu :node="node" :user="user" @delete="deleteDoc" />
+ <NodeActionDotMenu :node="node" :user="user" />
</div>
<div class="body">
<div class="category">{{ category?.name }}</div>
@@ -33,7 +33,6 @@
</template>
<script setup lang="ts">
-import DeleteDocumentModal from '~/components/Node/Modals/Delete.vue';
import NodeContextMenu from '~/components/Node/Action/ContextMenu.vue';
import type { Node } from '~/stores';
@@ -44,14 +43,17 @@ const userStore = useUserStore();
const { shortDate } = useDateFormatters();
const { getAppAccent } = useAppColors();
+const contextMenu = useContextMenu();
-const category = computed(() => nodesStore.getById(props.node.parent_id || ''));
userStore.fetchPublicUser(props.node.user_id);
+
+const category = computed(() => nodesStore.getById(props.node.parent_id || ''));
+
const user = computed(() => userStore.getById(props.node.user_id || ''));
-const deleteDoc = () => useModal().add(new Modal(shallowRef(DeleteDocumentModal), { props: { node: props.node } }));
-function showContextMenu(event: MouseEvent) {
- useContextMenu().open(shallowRef(NodeContextMenu), event, {
+// Actions
+function openContextMenu(event: MouseEvent) {
+ contextMenu.open(shallowRef(NodeContextMenu), event, {
props: { node: props.node, contextMenu: true },
});
}
diff --git a/frontend/app/components/Node/Card/Recent.vue b/frontend/app/components/Node/Card/Recent.vue
index e9cc3689..0cf7bb0f 100644
--- a/frontend/app/components/Node/Card/Recent.vue
+++ b/frontend/app/components/Node/Card/Recent.vue
@@ -1,5 +1,5 @@
<template>
- <div class="n-card">
+ <div class="card">
<div class="header">
<Icon :name="icon" display="xl" :class="['node-icon', getAppAccent(node.color || (category?.color as number), true)]" />
<span class="time">{{ relativeTime(node.updated_timestamp) }}</span>
@@ -33,7 +33,7 @@ const icon = resolveIcon(props.node);
</script>
<style scoped lang="scss">
-.n-card {
+.card {
display: flex;
height: 100%;
padding: 1rem;
diff --git a/frontend/app/components/Node/ContainerView.vue b/frontend/app/components/Node/ContainerView.vue
index f9d1b361..bb515ebf 100644
--- a/frontend/app/components/Node/ContainerView.vue
+++ b/frontend/app/components/Node/ContainerView.vue
@@ -84,22 +84,29 @@ import type { Node } from '~/stores';
const props = defineProps<{ parent?: Node; nodes: Node[]; parentId?: string }>();
const nodesStore = useNodesStore();
-
-const router = useRouter();
const userStore = useUserStore();
+
const { isMobile } = useDevice();
const modals = useModal();
const { getAppAccent } = useAppColors();
const { t } = useI18nT();
+const router = useRouter();
const connectedId = userStore.user?.id;
const view = ref<ViewMode>();
const filteredNodes = ref<Node[]>(props.nodes);
-
const kanbanBoard = ref<InstanceType<typeof KanbanBoard> | null>(null);
+// Watch for nodes changes to update filtered nodes
+watch(
+ () => props.nodes,
+ newNodes => (filteredNodes.value = newNodes),
+ { immediate: true },
+);
+
+// Actions
const resetKanban = () => {
- useModal().add(
+ modals.add(
new Modal(shallowRef(ResetBoardModal), {
props: {
onConfirm: () => kanbanBoard.value?.resetKanbanData(),
@@ -109,13 +116,6 @@ const resetKanban = () => {
);
};
-// Watch for nodes changes to update filtered nodes
-watch(
- () => props.nodes,
- newNodes => (filteredNodes.value = newNodes),
- { immediate: true },
-);
-
const openPermissionsModal = () => {
if (props.parent) modals.add(new Modal(shallowRef(NodePermissions), { props: { node: props.parent }, size: 'small' }));
};
diff --git a/frontend/app/components/Node/Document/ContentCompiled.vue b/frontend/app/components/Node/Document/ContentCompiled.vue
index 6b450109..91f4768d 100644
--- a/frontend/app/components/Node/Document/ContentCompiled.vue
+++ b/frontend/app/components/Node/Document/ContentCompiled.vue
@@ -9,9 +9,9 @@
</template>
<script setup lang="ts">
-import type { Node } from '~/stores';
import { subscribeDrawioCacheInvalidated } from '~/composables/useDrawioCache';
import { rerenderImages } from '~/helpers/DOM';
+import type { Node } from '~/stores';
const props = defineProps<{ node?: Partial<Node> }>();
diff --git a/frontend/app/components/Node/Document/Footer.vue b/frontend/app/components/Node/Document/Footer.vue
index 587da725..3ec38e92 100644
--- a/frontend/app/components/Node/Document/Footer.vue
+++ b/frontend/app/components/Node/Document/Footer.vue
@@ -52,9 +52,10 @@ footer {
}
.attachments {
+ width: 100%;
gap: 10px;
margin-bottom: 20px;
- width: 100%;
+
.attachment {
margin: 5px 0;
}
@@ -81,9 +82,9 @@ footer {
.last-updated {
display: flex;
- align-items: center;
font-size: 13px;
color: var(--text-secondary);
+ align-items: center;
gap: 6px;
}
@@ -112,12 +113,13 @@ footer {
border: 1px solid var(--primary);
color: var(--primary);
}
+
b {
display: block;
font-size: 10px;
- text-transform: uppercase;
- color: var(--text-secondary);
font-weight: 600;
+ color: var(--text-secondary);
+ text-transform: uppercase;
}
}
diff --git a/frontend/app/components/Node/Document/Header.vue b/frontend/app/components/Node/Document/Header.vue
index b38f95fe..fae57360 100644
--- a/frontend/app/components/Node/Document/Header.vue
+++ b/frontend/app/components/Node/Document/Header.vue
@@ -31,14 +31,14 @@
</template>
<script setup lang="ts">
-import type { Node, PublicUser } from '~/stores';
import Thumbnail from './Thumbnail.vue';
import HeaderSkeleton from './HeaderSkeleton.vue';
import HeaderActionRow from './HeaderActionRow.vue';
+import type { Node, PublicUser } from '~/stores';
const props = defineProps<{ doc?: Node; public?: boolean }>();
-const store = useUserStore();
+const userStore = useUserStore();
const preferences = usePreferencesStore();
const { avatarURL } = useApi();
@@ -49,7 +49,7 @@ const user = ref<PublicUser | null>(null);
const printMode = preferences.get('printMode');
watchEffect(() => {
- if (props.doc) store.fetchPublicUser(props.doc.user_id).then(u => (user.value = u));
+ if (props.doc) userStore.fetchPublicUser(props.doc.user_id).then(u => (user.value = u));
});
</script>
diff --git a/frontend/app/components/Node/Document/HeaderActionRow.vue b/frontend/app/components/Node/Document/HeaderActionRow.vue
index 25418f23..f24bc504 100644
--- a/frontend/app/components/Node/Document/HeaderActionRow.vue
+++ b/frontend/app/components/Node/Document/HeaderActionRow.vue
@@ -59,19 +59,22 @@ import type { Node } from '~/stores';
const props = defineProps<{ doc: Node; isPublic?: boolean }>();
const nodeStore = useNodesStore();
+
const { t } = useI18nT();
+const modals = useModal();
+// Actions
const print = () => window.print();
const openDeleteModal = () =>
- useModal().add(
+ modals.add(
new Modal(shallowRef(DeleteNodeModal), {
props: { node: props.doc, redirectTo: '/dashboard' },
size: 'small',
}),
);
-const openEditModal = () => useModal().add(new Modal(shallowRef(DocumentMeta), { props: { doc: props.doc }, size: 'small' }));
-const openPermissionsModal = () => useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: props.doc }, size: 'small' }));
-const openRemoveShareModal = () => useModal().add(new Modal(shallowRef(RemoveSharedNode), { props: { nodeId: props.doc.id }, size: 'small' }));
+const openEditModal = () => modals.add(new Modal(shallowRef(DocumentMeta), { props: { doc: props.doc }, size: 'small' }));
+const openPermissionsModal = () => modals.add(new Modal(shallowRef(NodePermissions), { props: { node: props.doc }, size: 'small' }));
+const openRemoveShareModal = () => modals.add(new Modal(shallowRef(RemoveSharedNode), { props: { nodeId: props.doc.id }, size: 'small' }));
function exportMarkdown() {
const blob = new Blob([generateMarkdownWithMetadata(props.doc)], { type: 'text/markdown' });
diff --git a/frontend/app/components/Node/Import/Preview.vue b/frontend/app/components/Node/Import/Preview.vue
index b2453278..863b948c 100644
--- a/frontend/app/components/Node/Import/Preview.vue
+++ b/frontend/app/components/Node/Import/Preview.vue
@@ -40,12 +40,13 @@ const emit = defineEmits<{
(e: 'toggleSelection' | 'importSingle'): void;
}>();
-const store = useNodesStore();
+const nodesStore = useNodesStore();
+
const { t } = useI18nT();
const { numericDate } = useDateFormatters();
const { getAppAccent } = useAppColors();
-const existingNode = computed(() => store.getById(props.node.id));
+const existingNode = computed(() => nodesStore.getById(props.node.id));
const toggleSelection = () => emit('toggleSelection');
const importSingle = () => emit('importSingle');
@@ -54,14 +55,15 @@ const importSingle = () => emit('importSingle');
<style scoped lang="scss">
.node-item {
display: flex;
+ width: 100%;
padding: 0.75rem;
- border-radius: var(--radius-sm);
border: 1px solid var(--border);
+ border-radius: var(--radius-sm);
align-items: center;
- gap: 1rem;
flex-wrap: wrap;
- width: 100%;
+ gap: 1rem;
}
+
.doc-info {
display: flex;
min-width: 0;
@@ -69,11 +71,13 @@ const importSingle = () => emit('importSingle');
flex: 1;
gap: 0.75rem;
}
+
.icon {
padding: 4px;
border-radius: var(--radius-md);
margin-right: 10px;
}
+
.doc-details {
display: flex;
min-width: 0;
diff --git a/frontend/app/components/Node/List/Inline.vue b/frontend/app/components/Node/List/Inline.vue
index ce3679e5..c337011a 100644
--- a/frontend/app/components/Node/List/Inline.vue
+++ b/frontend/app/components/Node/List/Inline.vue
@@ -1,5 +1,5 @@
<template>
- <div class="line" @contextmenu.prevent="showContextMenu">
+ <div class="line" @contextmenu.prevent="openContextMenu">
<header>
<div class="title-row">
<Icon
@@ -38,17 +38,22 @@ const userStore = useUserStore();
const { shortDate } = useDateFormatters();
const { getAppAccent } = useAppColors();
+const modals = useModal();
+const contextMenu = useContextMenu();
-const category = computed(() => categoriesStore.getById(props.document.parent_id || ''));
userStore.fetchPublicUser(props.document.user_id);
+
+const category = computed(() => categoriesStore.getById(props.document.parent_id || ''));
const user = computed(() => userStore.getById(props.document.user_id || ''));
-const deleteDoc = () => useModal().add(new Modal(shallowRef(DeleteDocumentModal), { props: { node: props.document } }));
-function showContextMenu(event: MouseEvent) {
- useContextMenu().open(shallowRef(NodeContextMenu), event, {
+// Actions
+const deleteDoc = () => modals.add(new Modal(shallowRef(DeleteDocumentModal), { props: { node: props.document } }));
+
+const openContextMenu = (event: MouseEvent) => {
+ contextMenu.open(shallowRef(NodeContextMenu), event, {
props: { node: props.document as Node, contextMenu: true },
});
-}
+};
</script>
<style scoped lang="scss">
diff --git a/frontend/app/components/Node/Modals/CreateCategory.vue b/frontend/app/components/Node/Modals/CreateCategory.vue
index 6871b8bd..b1398572 100644
--- a/frontend/app/components/Node/Modals/CreateCategory.vue
+++ b/frontend/app/components/Node/Modals/CreateCategory.vue
@@ -29,12 +29,12 @@ import type { Node } from '~/stores';
const props = defineProps<{ role: 1 | 2 }>();
const emit = defineEmits(['close']);
-const { t } = useI18nT();
const categoriesStore = useNodesStore();
const nodesTree = useNodesTree();
const sidebar = useSidebar();
+const { t } = useI18nT();
const categoriesItem = nodesTree.treeUpToRole(2);
diff --git a/frontend/app/components/Node/Modals/Delete.vue b/frontend/app/components/Node/Modals/Delete.vue
index dece17e1..cdd16d13 100644
--- a/frontend/app/components/Node/Modals/Delete.vue
+++ b/frontend/app/components/Node/Modals/Delete.vue
@@ -39,11 +39,14 @@ const props = defineProps<{
}>();
const emit = defineEmits(['close']);
-const { t } = useI18nT();
const store = useNodesStore();
const nodesTree = useNodesTree();
+const { t } = useI18nT();
+const router = useRouter();
+const notifications = useNotifications();
+
const allChildren = computed(() => (props.node ? nodesTree.getSubtreeAsArray(props.node.id) : []));
const nodeType = computed(() => getRoleName(props.node?.role).toLowerCase());
@@ -57,10 +60,10 @@ const handleDelete = async () => {
}
emit('close');
if (props.redirectTo) {
- useRouter().push(props.redirectTo);
+ router.push(props.redirectTo);
}
} catch (e) {
- useNotifications().add({ type: 'error', title: 'Error', message: String(e) });
+ notifications.add({ type: 'error', title: 'Error', message: String(e) });
}
};
</script>
diff --git a/frontend/app/components/Node/Modals/DrawioEditor.vue b/frontend/app/components/Node/Modals/DrawioEditor.vue
index b6b6a8fe..17817aa1 100644
--- a/frontend/app/components/Node/Modals/DrawioEditor.vue
+++ b/frontend/app/components/Node/Modals/DrawioEditor.vue
@@ -28,7 +28,6 @@
<script setup lang="ts">
import EditorAppHeader from '~/components/MarkdownEditor/EditorAppHeader.vue';
import NodeDeleteModal from '~/components/Node/Modals/Delete.vue';
-
import type { Node } from '~/stores';
const { t } = useI18nT();
@@ -48,6 +47,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits<{ (e: 'close'): void }>();
+const modals = useModal();
+
const iframe = ref<HTMLIFrameElement | null>(null);
const iframeKey = ref(0);
@@ -77,7 +78,7 @@ const toggleFullScreen = () => {
const openDeleteModal = () => {
if (!props.node) return;
- useModal().add(
+ modals.add(
new Modal(shallowRef(NodeDeleteModal), {
props: {
node: props.node,
@@ -101,19 +102,19 @@ onBeforeUnmount(() => window.removeEventListener('message', exitHandleMessage));
<style scoped lang="scss">
.drawio-editor-modal {
display: flex;
- flex-direction: column;
height: 100%;
+ flex-direction: column;
gap: 12px;
}
.drawio-content {
position: relative;
- flex: 1;
min-height: 0;
+ border: 1px solid var(--border);
border-radius: var(--radius-md);
- overflow: hidden;
background: var(--surface-base);
- border: 1px solid var(--border);
+ flex: 1;
+ overflow: hidden;
}
.drawio-iframe {
@@ -125,18 +126,18 @@ onBeforeUnmount(() => window.removeEventListener('message', exitHandleMessage));
.loading-overlay {
position: absolute;
- inset: 0;
+ z-index: 10;
display: flex;
- flex-direction: column;
+ background: var(--surface-base);
align-items: center;
- justify-content: center;
+ flex-direction: column;
gap: 12px;
- background: var(--surface-base);
- z-index: 10;
+ inset: 0;
+ justify-content: center;
p {
- color: var(--text-secondary);
font-size: 14px;
+ color: var(--text-secondary);
}
}
diff --git a/frontend/app/components/Node/Modals/Metadata.vue b/frontend/app/components/Node/Modals/Metadata.vue
index 79ce4c05..c9c5f861 100644
--- a/frontend/app/components/Node/Modals/Metadata.vue
+++ b/frontend/app/components/Node/Modals/Metadata.vue
@@ -44,11 +44,12 @@ import { DOCUMENT_THEMES, CATEGORY_ROLES } from '~/helpers/constants';
import type { Node } from '~/stores';
const props = defineProps<{ doc: Node }>();
-const { t } = useI18nT();
const nodeStore = useNodesStore();
const nodesTree = useNodesTree();
+const { t } = useI18nT();
+
const node = ref<Node>({ ...props.doc });
const pinnedToggle = ref(node.value.order == -1);
const parentsTree = nodesTree.treeUpToRole(node.value.role);
diff --git a/frontend/app/components/Node/Modals/Permissions.vue b/frontend/app/components/Node/Modals/Permissions.vue
index 44c8894a..7b71896e 100644
--- a/frontend/app/components/Node/Modals/Permissions.vue
+++ b/frontend/app/components/Node/Modals/Permissions.vue
@@ -125,6 +125,8 @@ watch(
debounce(() => nodesStore.update(node.value), 500),
{ deep: true },
);
+
+// Actions
const addPermission = async (user: PublicUser) => {
if (!user) return;
await nodesStore.addPermission({
diff --git a/frontend/app/components/Node/Modals/RemoveShared.vue b/frontend/app/components/Node/Modals/RemoveShared.vue
index a280777d..37f89f27 100644
--- a/frontend/app/components/Node/Modals/RemoveShared.vue
+++ b/frontend/app/components/Node/Modals/RemoveShared.vue
@@ -17,6 +17,7 @@ const emit = defineEmits(['close']);
const { t } = useI18nT();
const nodesTree = useNodesTree();
+
const allChildren = nodesTree.getSubtreeAsArray(props.nodeId);
const removeDoc = () => {
diff --git a/frontend/app/components/Node/Resource/Inline.vue b/frontend/app/components/Node/Resource/Inline.vue
index c389cae3..aaf39f20 100644
--- a/frontend/app/components/Node/Resource/Inline.vue
+++ b/frontend/app/components/Node/Resource/Inline.vue
@@ -26,6 +26,8 @@ const props = defineProps<{
node: Node;
}>();
+const modal = useModal();
+
const editable = computed(() => props.node.metadata?.drawio);
const preview = ref<string | null>(null);
@@ -33,32 +35,33 @@ const preview = ref<string | null>(null);
if (isImageFile(props.node.metadata?.filetype)) preview.value = resolvePreviewUrl(props.node);
const openDeleteModal = () => {
- useModal().add(new Modal(shallowRef(NodeDeleteModal), { size: 'small', props: { node: props.node, redirect: '/dashboard' } }));
+ modal.add(new Modal(shallowRef(NodeDeleteModal), { size: 'small', props: { node: props.node, redirect: '/dashboard' } }));
};
function openDrawioEditor() {
- const modalManager = useModal();
- const modal = new Modal(shallowRef(DrawioEditorModal), {
- props: {
- node: props.node,
- },
- size: 'large',
- noPadding: true,
- });
- modalManager.add(modal);
+ modal.add(
+ new Modal(shallowRef(DrawioEditorModal), {
+ props: {
+ node: props.node,
+ },
+ size: 'large',
+ noPadding: true,
+ }),
+ );
}
</script>
<style scoped lang="scss">
.file-card {
display: flex;
- align-items: center;
- gap: 0.75rem;
+ width: 100%;
padding: 0.5rem 0.75rem;
- border-radius: var(--radius-md);
border: 1px solid var(--border);
+ border-radius: var(--radius-md);
background-color: var(--surface-base);
- width: 100%;
+ align-items: center;
+ gap: 0.75rem;
+
&:hover {
background-color: var(--surface-raised);
}
@@ -72,8 +75,8 @@ function openDrawioEditor() {
}
.file-info {
- flex: 1;
min-width: 0;
+ flex: 1;
.file-name {
display: block;
diff --git a/frontend/app/components/PDFViewer.vue b/frontend/app/components/PDFViewer.vue
index e3dff632..c1df7efb 100644
--- a/frontend/app/components/PDFViewer.vue
+++ b/frontend/app/components/PDFViewer.vue
@@ -292,21 +292,21 @@ onBeforeUnmount(() => {
.textLayer {
--csstools-color-scheme--light: initial;
- color-scheme: only light;
position: absolute;
+ z-index: 0;
+ line-height: 1;
text-align: initial;
+ opacity: 1;
+ caret-color: CanvasText;
+ color-scheme: only light;
+ forced-color-adjust: none;
inset: 0;
overflow: clip;
- opacity: 1;
- line-height: 1;
- -webkit-text-size-adjust: none;
- -moz-text-size-adjust: none;
text-size-adjust: none;
- forced-color-adjust: none;
+ text-size-adjust: none;
+ text-size-adjust: none;
transform-origin: 0 0;
- caret-color: CanvasText;
- z-index: 0;
}
.textLayer.highlighting {
@@ -314,11 +314,11 @@ onBeforeUnmount(() => {
}
.textLayer :is(span, br) {
- color: transparent;
position: absolute;
- white-space: pre;
+ color: transparent;
cursor: text;
transform-origin: 0% 0%;
+ white-space: pre;
}
.textLayer :is(br) {
@@ -340,10 +340,12 @@ onBeforeUnmount(() => {
z-index: 1;
--font-height: 0;
+
font-size: calc(var(--text-scale-factor) * var(--font-height));
--scale-x: 1;
--rotate: 0deg;
+
transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}
@@ -352,14 +354,14 @@ onBeforeUnmount(() => {
}
.textLayer span[role='img'] {
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
cursor: default;
+ user-select: none;
+ user-select: none;
+ user-select: none;
}
.textLayer .highlight {
- --highlight-selected-bg-color: rgb(0 100 0 / 0.25);
+ --highlight-selected-bg-color: rgb(0 100 0 / 25%);
--highlight-backdrop-filter: none;
--highlight-selected-backdrop-filter: none;
}
@@ -375,23 +377,21 @@ onBeforeUnmount(() => {
.textLayer .highlight {
margin: -1px;
padding: 1px;
+ border-radius: 4px;
background-color: var(--selection-color);
- -webkit-backdrop-filter: var(--highlight-backdrop-filter);
backdrop-filter: var(--highlight-backdrop-filter);
- border-radius: 4px;
+ backdrop-filter: var(--highlight-backdrop-filter);
}
-.textLayer ::-moz-selection {
- background: rgba(0 0 255 / 0.25);
+.textLayer ::selection {
background: color-mix(in srgb, AccentColor, transparent 75%);
}
.textLayer ::selection {
- background: rgba(0 0 255 / 0.25);
background: color-mix(in srgb, AccentColor, transparent 75%);
}
-.textLayer br::-moz-selection {
+.textLayer br::selection {
background: transparent;
}
@@ -400,19 +400,20 @@ onBeforeUnmount(() => {
}
.textLayer .endOfContent {
- display: block;
position: absolute;
- inset: 100% 0 0;
z-index: 0;
+ display: block;
cursor: default;
- -webkit-user-select: none;
- -moz-user-select: none;
+ inset: 100% 0 0;
+ user-select: none;
+ user-select: none;
user-select: none;
}
.textLayer.selecting .endOfContent {
top: 0;
}
+
.pdf-page-placeholder {
position: absolute;
display: flex;
diff --git a/frontend/app/components/Sidebar/Dock.vue b/frontend/app/components/Sidebar/Dock.vue
index 6cd7cb24..539e9d17 100644
--- a/frontend/app/components/Sidebar/Dock.vue
+++ b/frontend/app/components/Sidebar/Dock.vue
@@ -37,12 +37,15 @@
import SettingsModal from '~/pages/dashboard/settings/index.vue';
const userStore = useUserStore();
+const preferences = usePreferencesStore();
+
+const modals = useModal();
const openSettings = () => {
- useModal().add(new Modal(shallowRef(SettingsModal), { props: { isModal: true }, size: 'medium', noPadding: true }));
+ modals.add(new Modal(shallowRef(SettingsModal), { props: { isModal: true }, size: 'medium', noPadding: true }));
};
function closeDock() {
- usePreferencesStore().set('view_dock', false);
+ preferences.set('view_dock', false);
}
</script>
diff --git a/frontend/app/components/Sidebar/Sidebar.vue b/frontend/app/components/Sidebar/Sidebar.vue
index 90fa80b8..1454b11b 100644
--- a/frontend/app/components/Sidebar/Sidebar.vue
+++ b/frontend/app/components/Sidebar/Sidebar.vue
@@ -77,6 +77,7 @@ const nodesTree = useNodesTree();
const { isOpened, hasSidebar, filtered } = useSidebar();
const { isMobile } = useDevice();
const { avatarURL } = useApi();
+const modals = useModal();
const viewDock = preferences.get('view_dock');
const compactMode = preferences.get('compactMode');
@@ -91,12 +92,13 @@ const tree = computed(() => {
return filterTreeByLabel(filtered.value, filter.value);
});
+// Actions
const toggleDock = () => preferences.set('view_dock', !preferences.get('view_dock').value);
const handleClickOutside = (e: MouseEvent) => {
if (isOpened.value && e.target && !(e.target as Element).closest('.sidebar') && !(e.target as Element).closest('.open-sidebar')) isOpened.value = false;
};
-const newCategory = () => useModal().add(new Modal(shallowRef(NewCategoryModal), { props: { role: 2 } }));
+const newCategory = () => modals.add(new Modal(shallowRef(NewCategoryModal), { props: { role: 2 } }));
const onClick = () => {
if (isMobile.value) isOpened.value = false;
diff --git a/frontend/app/components/Sidebar/SidebarItem.vue b/frontend/app/components/Sidebar/SidebarItem.vue
index 3b87d63e..582f6eb9 100644
--- a/frontend/app/components/Sidebar/SidebarItem.vue
+++ b/frontend/app/components/Sidebar/SidebarItem.vue
@@ -8,7 +8,7 @@
@dragover.prevent="dragOver"
@drop.prevent="drop"
@dragleave="dragLeave"
- @contextmenu.prevent="showContextMenu"
+ @contextmenu.prevent="openContextMenu"
>
<!-- Left icon -->
<Icon :fill="item.data.role == 3 ? 'var(--pink) !important' : undefined" :name="icon" :class="customClass" />&nbsp;
@@ -75,7 +75,7 @@ const onClick = (m: MouseEvent) => {
/* Context menu */
-function showContextMenu(event: MouseEvent) {
+function openContextMenu(event: MouseEvent) {
if (props.item.data.role === -1) return; // Prevent context menu on nav items
contextMenu.open(shallowRef(NodeContextMenu), event, {
props: { contextMenu: true, node: props.item.data as Node },
diff --git a/frontend/app/components/Sidebar/SidebarWorkspaces.vue b/frontend/app/components/Sidebar/SidebarWorkspaces.vue
index d8040139..0150108d 100644
--- a/frontend/app/components/Sidebar/SidebarWorkspaces.vue
+++ b/frontend/app/components/Sidebar/SidebarWorkspaces.vue
@@ -35,6 +35,7 @@ const props = defineProps<{ options: Workspace[] }>();
const { t } = useI18nT();
const { workspaceId } = useSidebar();
+const modals = useModal();
const isOpen = ref(false);
@@ -53,7 +54,8 @@ watch(
{ immediate: true },
);
-const createWorkspace = () => useModal().add(new Modal(shallowRef(NewCategoryModal), { props: { role: 1 } }));
+// Actions
+const createWorkspace = () => modals.add(new Modal(shallowRef(NewCategoryModal), { props: { role: 1 } }));
const toggleDropdown = () => (isOpen.value = !isOpen.value);
diff --git a/frontend/app/components/ViewSelection.vue b/frontend/app/components/ViewSelection.vue
index 65a01f11..356e1ca8 100644
--- a/frontend/app/components/ViewSelection.vue
+++ b/frontend/app/components/ViewSelection.vue
@@ -57,6 +57,7 @@ onMounted(() => {
}
button {
+ position: relative;
display: flex;
width: 32px;
height: 32px;
@@ -71,11 +72,11 @@ button {
align-items: center;
cursor: pointer;
justify-content: center;
- position: relative;
&:hover {
color: var(--text-body);
background: var(--surface-base);
+
.hint-tooltip {
opacity: 1;
visibility: visible;
diff --git a/frontend/app/composables/useCommandCenter.ts b/frontend/app/composables/useCommandCenter.ts
index 41cde178..2709ad9c 100644
--- a/frontend/app/composables/useCommandCenter.ts
+++ b/frontend/app/composables/useCommandCenter.ts
@@ -38,18 +38,18 @@ function getModal() {
export function useCommandCenter() {
const router = useRouter();
- const modalManager = useModal();
+ const modals = useModal();
function open() {
if (state.isOpen) return;
reset();
state.isOpen = true;
- modalManager.add(getModal());
+ modals.add(getModal());
}
function close() {
if (!state.isOpen) return;
- modalManager.close(getModal());
+ modals.close(getModal());
}
function changeTab(tabId: TabType) {
@@ -89,7 +89,7 @@ export function useCommandCenter() {
}
if ((e.ctrlKey || e.metaKey) && e.altKey && e.key.toLowerCase() === 'n') {
e.preventDefault();
- return modalManager.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
+ return modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
}
}
diff --git a/frontend/app/composables/useDevise.ts b/frontend/app/composables/useDevice.ts
similarity index 100%
rename from frontend/app/composables/useDevise.ts
rename to frontend/app/composables/useDevice.ts
diff --git a/frontend/app/composables/useNodesTree.ts b/frontend/app/composables/useNodesTree.ts
index c98154fc..d42d2aac 100644
--- a/frontend/app/composables/useNodesTree.ts
+++ b/frontend/app/composables/useNodesTree.ts
@@ -165,6 +165,3 @@ export function useNodesTree() {
isAllCollapsed: collapseStore.isAllCollapsed,
};
}
-
-// Legacy alias for backward compatibility during migration
-export { useNodesTree as useSidebarTree };
diff --git a/frontend/app/composables/user.ts b/frontend/app/composables/user.ts
index 0c7d93e7..9c82c596 100644
--- a/frontend/app/composables/user.ts
+++ b/frontend/app/composables/user.ts
@@ -20,7 +20,7 @@ function logoutUser() {
function logoutUserAll() {
const store = useUserStore();
store
- .logout_all()
+ .logoutAll()
.then(() => {
useNotifications().add({ type: 'success', title: 'Logged out' });
store.post_logout();
diff --git a/frontend/app/helpers/node.ts b/frontend/app/helpers/node.ts
index 7c4fb36a..241f12e8 100644
--- a/frontend/app/helpers/node.ts
+++ b/frontend/app/helpers/node.ts
@@ -41,6 +41,10 @@ export const resolveNodeType = (node: Node): string => {
return types[node.role] || '';
};
+/** Resolve color for a resource-node based on its type */
+export const resolveNodeColor = (type: string) =>
+ type.includes('image') ? 'green' : type.includes('video') ? 'blue' : type.includes('pdf') ? 'yellow' : 'red';
+
/* Generate markdown file with metadata from a node */
export const generateMarkdownWithMetadata = (node: Node): string => {
const metadataLines = ['---', `title: "${node.name}"`];
diff --git a/frontend/app/layouts/public.vue b/frontend/app/layouts/public.vue
index dc3637ea..96635aa8 100644
--- a/frontend/app/layouts/public.vue
+++ b/frontend/app/layouts/public.vue
@@ -10,8 +10,8 @@
.container {
display: flex;
width: 95%;
- padding: 1rem 0;
margin: 0 auto;
+ padding: 1rem 0;
flex-direction: column;
justify-content: space-between;
padding-top: 1.5rem;
diff --git a/frontend/app/middleware/authentification.global.ts b/frontend/app/middleware/authentication.global.ts
similarity index 100%
rename from frontend/app/middleware/authentification.global.ts
rename to frontend/app/middleware/authentication.global.ts
diff --git a/frontend/app/pages/(public)/login/index.vue b/frontend/app/pages/(public)/login/index.vue
index 46634fbd..9ba41d56 100644
--- a/frontend/app/pages/(public)/login/index.vue
+++ b/frontend/app/pages/(public)/login/index.vue
@@ -126,6 +126,7 @@ form {
input {
padding: 0.6rem;
+
&:disabled {
background: var(--surface-transparent);
cursor: not-allowed;
@@ -162,12 +163,14 @@ input {
transform: translateY(-50%) scale(0.95);
}
}
+
.disabled {
- margin-top: 0.5rem;
font-size: 0.9rem;
color: var(--text-muted);
text-align: center;
+ margin-top: 0.5rem;
}
+
.eye-icon {
display: flex;
width: 20px;
@@ -239,6 +242,7 @@ input {
&:active {
transform: translateY(0);
}
+
&:disabled {
cursor: not-allowed;
transform: none;
@@ -255,9 +259,10 @@ input {
font-size: 0.8rem;
color: var(--red);
text-align: center;
+
&.general {
- margin-top: 1rem;
font-size: 0.9rem;
+ margin-top: 1rem;
}
}
</style>
diff --git a/frontend/app/pages/dashboard.vue b/frontend/app/pages/dashboard.vue
index 7dd3e158..52b9fe59 100644
--- a/frontend/app/pages/dashboard.vue
+++ b/frontend/app/pages/dashboard.vue
@@ -31,8 +31,8 @@ onBeforeUnmount(() => {
<style lang="scss">
.dashboard-root {
- height: 100%;
display: flex;
+ height: 100%;
flex-direction: column;
}
</style>
diff --git a/frontend/app/pages/dashboard/admin.vue b/frontend/app/pages/dashboard/admin.vue
index fd700a76..72e2c921 100644
--- a/frontend/app/pages/dashboard/admin.vue
+++ b/frontend/app/pages/dashboard/admin.vue
@@ -3,5 +3,5 @@
</template>
<script setup lang="ts">
-definePageMeta({ breadcrumb: 'Admin' });
+definePageMeta({ breadcrumb: { i18n: 'admin.dashboard.title' } });
</script>
diff --git a/frontend/app/pages/dashboard/admin/index.vue b/frontend/app/pages/dashboard/admin/index.vue
index cbaddb07..3c95fa54 100644
--- a/frontend/app/pages/dashboard/admin/index.vue
+++ b/frontend/app/pages/dashboard/admin/index.vue
@@ -146,6 +146,7 @@ function toPolyline(series: MonthlyCount[]): string {
a:hover {
color: var(--primary);
}
+
.admin-dashboard {
display: flex;
flex-direction: column;
@@ -154,9 +155,9 @@ a:hover {
.admin-header {
display: flex;
- justify-content: space-between;
align-items: center;
gap: 1rem;
+ justify-content: space-between;
}
.stats-loading,
@@ -189,22 +190,22 @@ a:hover {
.kpi-card,
.chart-card,
.top-card {
+ padding: 1rem;
border: 1px solid var(--border);
border-radius: var(--radius-md);
- padding: 1rem;
background: radial-gradient(circle at top right, color-mix(in srgb, var(--primary) 11%, transparent), transparent 54%), var(--background-100);
}
.kpi-label {
margin: 0;
- color: var(--text-muted);
font-size: 0.9rem;
+ color: var(--text-muted);
}
.kpi-value {
margin: 0.35rem 0 0;
- font-weight: 700;
font-size: clamp(1.2rem, 2vw, 1.8rem);
+ font-weight: 700;
}
.sparkline {
@@ -214,15 +215,15 @@ a:hover {
}
.month-row {
- list-style: none;
display: grid;
- grid-template-columns: repeat(12, minmax(0, 1fr));
- padding: 0;
margin: 0;
- color: var(--text-muted);
+ padding: 0;
font-size: 0.72rem;
- gap: 0.2rem;
+ color: var(--text-muted);
text-align: center;
+ gap: 0.2rem;
+ grid-template-columns: repeat(12, minmax(0, 1fr));
+ list-style: none;
}
table {
diff --git a/frontend/app/pages/dashboard/admin/users/[id]/documents/[doc_id].vue b/frontend/app/pages/dashboard/admin/users/[id]/documents/[doc_id].vue
index 3ddf7449..757dcfd2 100644
--- a/frontend/app/pages/dashboard/admin/users/[id]/documents/[doc_id].vue
+++ b/frontend/app/pages/dashboard/admin/users/[id]/documents/[doc_id].vue
@@ -108,9 +108,11 @@ label {
button {
margin-top: 1rem;
}
+
.columns {
gap: 10px;
}
+
.column {
margin: 0;
}
diff --git a/frontend/app/pages/dashboard/categories/[id]/edit.vue b/frontend/app/pages/dashboard/categories/[id]/edit.vue
index 6da5b5cc..264db968 100644
--- a/frontend/app/pages/dashboard/categories/[id]/edit.vue
+++ b/frontend/app/pages/dashboard/categories/[id]/edit.vue
@@ -47,30 +47,35 @@
import DeleteModal from '~/components/Node/Modals/Delete.vue';
import { CATEGORY_ROLES } from '~/helpers/constants';
-definePageMeta({ breadcrumb: {i18n: 'common.actions.edit'} });
+definePageMeta({ breadcrumb: { i18n: 'common.actions.edit' } });
-const { t } = useI18nT();
const nodesStore = useNodesStore();
-const route = useRoute();
+
+const { t } = useI18nT();
const nodesTree = useNodesTree();
+const modals = useModal();
+const notifications = useNotifications();
+const route = useRoute();
+const router = useRouter();
const category = computed(() => nodesStore.getById(route.params.id as string));
const categoriesItem = nodesTree.treeUpToRole(2);
+// Actions
const updateCategory = async () => {
if (category.value)
nodesStore
.update(category.value)
.then(() => {
- useNotifications().add({ title: t('nodes.category.notifications.updated'), type: 'success' });
- useRouter().push('/dashboard/categories');
+ notifications.add({ title: t('nodes.category.notifications.updated'), type: 'success' });
+ router.push('/dashboard/categories');
})
- .catch(e => useNotifications().add({ message: e, title: t('common.status.error'), type: 'error' }));
+ .catch(e => notifications.add({ message: e, title: t('common.status.error'), type: 'error' }));
};
const deleteCategory = async () => {
if (!category.value) return;
- useModal().add(
+ modals.add(
new Modal(shallowRef(DeleteModal), {
props: {
node: category.value,
@@ -80,18 +85,19 @@ const deleteCategory = async () => {
);
};
-const handleDocumentKeydown = (event: KeyboardEvent) => {
+// Shortcuts
+function handleKeydown(event: KeyboardEvent) {
if (event.key !== 'Delete') return;
event.preventDefault();
deleteCategory();
-};
+}
onMounted(() => {
- document.addEventListener('keydown', handleDocumentKeydown);
+ document.addEventListener('keydown', handleKeydown);
});
onUnmounted(() => {
- document.removeEventListener('keydown', handleDocumentKeydown);
+ document.removeEventListener('keydown', handleKeydown);
});
</script>
diff --git a/frontend/app/pages/dashboard/categories/[id]/index.vue b/frontend/app/pages/dashboard/categories/[id]/index.vue
index 1811ee22..8d45dfcf 100644
--- a/frontend/app/pages/dashboard/categories/[id]/index.vue
+++ b/frontend/app/pages/dashboard/categories/[id]/index.vue
@@ -3,20 +3,21 @@
</template>
<script setup lang="ts">
+import NodeDeleteModal from '~/components/Node/Modals/Delete.vue';
import type { RouteLocationNormalizedLoaded } from 'vue-router';
import type { Node } from '~/stores';
-import NodeDeleteModal from '~/components/Node/Modals/Delete.vue';
-
definePageMeta({
breadcrumb: (route: RouteLocationNormalizedLoaded) => {
return useBreadcrumbs().generateBreadcrumbsById(route.params.id as string);
},
});
-const route = useRoute();
const nodesStore = useNodesStore();
+const modals = useModal();
+const route = useRoute();
+
const parentId = route.params.id as string;
const parent = ref<Node | undefined>();
@@ -30,20 +31,21 @@ const nodes = computed(() => {
const openDeleteModal = () => {
if (!parent.value || !nodesStore.hasPermissions(parent.value, 4)) return;
- useModal().add(new Modal(shallowRef(NodeDeleteModal), { size: 'small', props: { node: parent.value, redirect: '/dashboard' } }));
+ modals.add(new Modal(shallowRef(NodeDeleteModal), { size: 'small', props: { node: parent.value, redirect: '/dashboard' } }));
};
-const handleDocumentKeydown = (event: KeyboardEvent) => {
+// Shortcuts
+function handleKeydown(event: KeyboardEvent) {
if (event.key !== 'Delete') return;
event.preventDefault();
openDeleteModal();
-};
+}
onMounted(() => {
- document.addEventListener('keydown', handleDocumentKeydown);
+ document.addEventListener('keydown', handleKeydown);
});
onUnmounted(() => {
- document.removeEventListener('keydown', handleDocumentKeydown);
+ document.removeEventListener('keydown', handleKeydown);
});
</script>
diff --git a/frontend/app/pages/dashboard/categories/index.vue b/frontend/app/pages/dashboard/categories/index.vue
index 9be2eacc..3b92abe3 100644
--- a/frontend/app/pages/dashboard/categories/index.vue
+++ b/frontend/app/pages/dashboard/categories/index.vue
@@ -27,13 +27,16 @@
import CreateCategoryModal from '~/components/Node/Modals/CreateCategory.vue';
import DeleteCategoryModal from '~/components/Node/Modals/Delete.vue';
import WorkspaceTree from './_components/WorkspaceTree.vue';
-import type { Node } from '~/stores';
import { filterTreeByLabel, type TreeItem } from '~/helpers/TreeBuilder';
+import type { Node } from '~/stores';
+
+const nodesTree = useNodesTree();
const { t } = useI18nT();
+const modals = useModal();
+const router = useRouter();
const filter = ref('');
-const nodesTree = useNodesTree();
const filteredItems = computed(() => {
const items = nodesTree.treeUpToRole(2).value;
@@ -41,15 +44,15 @@ const filteredItems = computed(() => {
return filterTreeByLabel(items, filter.value);
});
-const createWorkspace = () => useModal().add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
-const createCategory = () => useModal().add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 2 } }));
+const createWorkspace = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
+const createCategory = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 2 } }));
function editNode(node: TreeItem<Node>) {
- useRouter().push('/dashboard/categories/' + node.id + '/edit');
+ router.push('/dashboard/categories/' + node.id + '/edit');
}
function deleteNode(node: TreeItem<Node>) {
- useModal().add(new Modal(shallowRef(DeleteCategoryModal), { props: { categoryId: node.id } }));
+ modals.add(new Modal(shallowRef(DeleteCategoryModal), { props: { categoryId: node.id } }));
}
</script>
diff --git a/frontend/app/pages/dashboard/cdn/[id]/index.vue b/frontend/app/pages/dashboard/cdn/[id]/index.vue
index d75116c1..92461d20 100644
--- a/frontend/app/pages/dashboard/cdn/[id]/index.vue
+++ b/frontend/app/pages/dashboard/cdn/[id]/index.vue
@@ -34,7 +34,7 @@
</p>
<div class="actions-row">
<AppButton type="primary" class="btn primary" @click="updateCategory">{{ t('common.actions.update') }}</AppButton>
- <AppButton type="danger" @click="showDeleteModal">{{ t('common.actions.delete') }}</AppButton>
+ <AppButton type="danger" @click="openDeleteModal">{{ t('common.actions.delete') }}</AppButton>
</div>
</form>
</div>
@@ -47,43 +47,47 @@ import { readableFileSize } from '~/helpers/resources';
definePageMeta({ breadcrumb: { i18n: 'common.actions.edit' } });
const nodeStore = useNodesStore();
+
const { t } = useI18nT();
-const route = useRoute();
const { resourceURL } = useApi();
-
-const resource = computed(() => nodeStore.getById(route.params.id as string));
+const modals = useModal();
+const notifications = useNotifications();
+const route = useRoute();
+const router = useRouter();
const nodesTree = useNodesTree().treeUpToRole(3);
+const resource = computed(() => nodeStore.getById(route.params.id as string));
+// Actions
const updateCategory = async () => {
- if (resource.value)
- nodeStore
- .update(resource.value)
- .then(() => {
- useNotifications().add({ title: 'Resource updated', type: 'success' });
- useRouter().push('/dashboard/cdn');
- })
- .catch(e => useNotifications().add({ message: e, title: 'Error', type: 'error' }));
+ if (!resource.value) return;
+ nodeStore
+ .update(resource.value)
+ .then(() => {
+ notifications.add({ title: 'Resource updated', type: 'success' });
+ router.push('/dashboard/cdn');
+ })
+ .catch(e => notifications.add({ message: e, title: 'Error', type: 'error' }));
};
+
const openDeleteModal = () => {
if (!resource.value) return;
- useModal().add(new Modal(shallowRef(DeleteNodeModal), { props: { nodes: [resource.value], redirectTo: '/dashboard/cdn' }, size: 'small' }));
+ modals.add(new Modal(shallowRef(DeleteNodeModal), { props: { nodes: [resource.value], redirectTo: '/dashboard/cdn' }, size: 'small' }));
};
-const showDeleteModal = openDeleteModal;
-
-const handleDocumentKeydown = (event: KeyboardEvent) => {
+// Shortcuts
+function handleKeydown(event: KeyboardEvent) {
if (event.key !== 'Delete') return;
event.preventDefault();
openDeleteModal();
-};
+}
onMounted(() => {
- document.addEventListener('keydown', handleDocumentKeydown);
+ document.addEventListener('keydown', handleKeydown);
});
onUnmounted(() => {
- document.removeEventListener('keydown', handleDocumentKeydown);
+ document.removeEventListener('keydown', handleKeydown);
});
</script>
diff --git a/frontend/app/pages/dashboard/cdn/[id]/preview.vue b/frontend/app/pages/dashboard/cdn/[id]/preview.vue
index 2f34bb25..48e88195 100644
--- a/frontend/app/pages/dashboard/cdn/[id]/preview.vue
+++ b/frontend/app/pages/dashboard/cdn/[id]/preview.vue
@@ -9,7 +9,7 @@
<Icon name="edit" display="lg" />
<p class="hint-tooltip">{{ t('common.actions.edit') }}</p>
</NuxtLink>
- <button v-if="resource.metadata?.drawio" class="btn-icon" @click="showDrawioEditor">
+ <button v-if="resource.metadata?.drawio" class="btn-icon" @click="openDrawioEditor">
<Icon name="format/diagrams" display="lg" />
<p class="hint-tooltip">{{ t('common.actions.edit') }}</p>
</button>
@@ -55,48 +55,53 @@ import { rerenderImages } from '~/helpers/DOM';
definePageMeta({ breadcrumb: { i18n: 'common.actions.preview' } });
+const nodesStore = useNodesStore();
+
const { t } = useI18nT();
const { resourceURL } = useApi();
+const modals = useModal();
+const route = useRoute();
const previewElement = ref<HTMLElement | null>();
const zoom = ref<(typeof PDF_SCALES)[number]['id']>('automatic_zoom');
-const resource = computed(() => useNodesStore().getById(useRoute().params.id as string));
+const resource = computed(() => nodesStore.getById(route.params.id as string));
const mimeType = computed(() => resource.value?.metadata?.filetype || '');
-const copyLink = () => {
- const link = resourceURL(resource.value!);
- navigator.clipboard.writeText(link);
+// Actions
+const copyLink = () => navigator.clipboard.writeText(resourceURL(resource.value!));
+
+const openDrawioEditor = () => {
+ if (!resource.value) return;
+ modals.add(
+ new Modal(shallowRef(DrawioEditorModal), {
+ props: {
+ node: resource.value,
+ },
+ onClose: () => rerenderImages(previewElement.value!),
+ size: 'large',
+ noPadding: true,
+ }),
+ );
};
-function showDrawioEditor() {
- const modalManager = useModal();
- const modal = new Modal(shallowRef(DrawioEditorModal), {
- props: {
- node: resource.value,
- },
- onClose: () => rerenderImages(previewElement.value!),
- size: 'large',
- noPadding: true,
- });
- modalManager.add(modal);
-}
const openDeleteModal = () => {
if (!resource.value) return;
- useModal().add(new Modal(shallowRef(DeleteNodeModal), { props: { nodes: [resource.value], redirectTo: '/dashboard/cdn' }, size: 'small' }));
+ modals.add(new Modal(shallowRef(DeleteNodeModal), { props: { node: resource.value, redirectTo: '/dashboard/cdn' }, size: 'small' }));
};
-const handleDocumentKeydown = (event: KeyboardEvent) => {
+// Shortcuts
+function handleKeydown(event: KeyboardEvent) {
if (event.key !== 'Delete') return;
event.preventDefault();
openDeleteModal();
-};
+}
onMounted(() => {
- document.addEventListener('keydown', handleDocumentKeydown);
+ document.addEventListener('keydown', handleKeydown);
});
onUnmounted(() => {
- document.removeEventListener('keydown', handleDocumentKeydown);
+ document.removeEventListener('keydown', handleKeydown);
});
</script>
<style scoped lang="scss">
diff --git a/frontend/app/pages/dashboard/cdn/diagram.vue b/frontend/app/pages/dashboard/cdn/diagram.vue
index c766eb9d..a1116dd7 100644
--- a/frontend/app/pages/dashboard/cdn/diagram.vue
+++ b/frontend/app/pages/dashboard/cdn/diagram.vue
@@ -60,10 +60,10 @@ onBeforeUnmount(() => window.removeEventListener('message', exitHandleMessage));
<style scoped lang="scss">
.drawio-editor-modal {
display: flex;
- flex-direction: column;
height: 100%;
- margin-top: 10px;
+ flex-direction: column;
gap: 12px;
+ margin-top: 10px;
}
aside {
@@ -74,12 +74,12 @@ aside {
.drawio-content {
position: relative;
- flex: 1;
min-height: 0;
+ border: 1px solid var(--border);
border-radius: var(--radius-md);
- overflow: hidden;
background: var(--surface-base);
- border: 1px solid var(--border);
+ flex: 1;
+ overflow: hidden;
}
.drawio-iframe {
@@ -91,18 +91,18 @@ aside {
.loading-overlay {
position: absolute;
- inset: 0;
+ z-index: 10;
display: flex;
- flex-direction: column;
+ background: var(--surface-base);
align-items: center;
- justify-content: center;
+ flex-direction: column;
gap: 12px;
- background: var(--surface-base);
- z-index: 10;
+ inset: 0;
+ justify-content: center;
p {
- color: var(--text-secondary);
font-size: 14px;
+ color: var(--text-secondary);
}
}
diff --git a/frontend/app/pages/dashboard/cdn/index.vue b/frontend/app/pages/dashboard/cdn/index.vue
index dc7a1ea4..0ea08bb1 100644
--- a/frontend/app/pages/dashboard/cdn/index.vue
+++ b/frontend/app/pages/dashboard/cdn/index.vue
@@ -61,7 +61,7 @@
:key="image.id"
class="image-item"
@click="router.push(`/dashboard/cdn/${image.id}/preview`)"
- @contextmenu="event => showContextMenu(event, image)"
+ @contextmenu="event => openContextMenu(event, image)"
>
<img :src="resolvePreviewUrl(image)" :alt="image.name" class="image-preview" />
<div class="image-info">
@@ -79,22 +79,25 @@
</div>
</template>
<script setup lang="ts">
-import type { Field } from '~/components/DataTable.vue';
-import type { Node } from '~/stores';
-
import ResourceContextMenu from '~/components/Node/Action/ResourceContextMenu.vue';
import DeleteNodeModal from '~/components/Node/Modals/Delete.vue';
import { readableFileSize, resolvePreviewUrl } from '~/helpers/resources';
+import { resolveNodeColor } from '~/helpers/node';
+import type { Field } from '~/components/DataTable.vue';
+import type { Node } from '~/stores';
-const router = useRouter();
-const resourcesStore = useResourcesStore();
const nodesStore = useNodesStore();
+const resourcesStore = useResourcesStore();
+
+const router = useRouter();
const { t } = useI18nT();
const device = useDevice();
const appColors = useAppColors();
const { numericDate } = useDateFormatters();
const contextMenu = useContextMenu();
const { resourceURL } = useApi();
+const modals = useModal();
+const notifications = useNotifications();
const view = ref<'list' | 'table'>('list');
const selectedFiles = ref<File[]>([]);
@@ -113,22 +116,49 @@ const totalUsedSpace = computed(() => nodesStore.getTotalUsedStorage);
const storagePercentage = computed(() => Math.min((totalUsedSpace.value / MAX_STORAGE) * 100, 100));
const linksText = computed(() => fileLinks.value.join('\n'));
-function showContextMenu(event: MouseEvent, node: Node) {
- contextMenu.open(shallowRef(ResourceContextMenu), event, {
- props: { node: node },
- });
-}
+// DataTable setup
+const headers = [
+ { key: 'name', label: t('common.labels.name') },
+ { key: 'size', label: t('common.labels.size') },
+ { key: 'type', label: t('common.labels.type') },
+ { key: 'parent', label: t('common.labels.parent') },
+ { key: 'date', label: t('common.labels.date') },
+ { key: 'action', label: t('common.labels.action') },
+];
+
+const rows: ComputedRef<Field[]> = computed(() =>
+ filteredResources.value.map(res => {
+ const parent = res.parent_id ? nodesStore.getById(res.parent_id) : null;
+ const category = parent ? nodesStore.getById(parent.parent_id || '') : null;
+ return {
+ action: { data: res, type: 'slot' },
+ date: { content: numericDate(res.created_timestamp), type: 'text' },
+ name: { content: res.name, type: 'text' },
+ parent: { content: category ? `<tag class="${appColors.getAppAccent(category.color)}">${parent?.name}</tag>` : '', type: 'html' },
+ size: { content: readableFileSize(res.size ?? 0), type: 'text' },
+ type: { content: `<tag class="${resolveNodeColor(res.metadata?.filetype || '')}">${res.metadata?.filetype || ''}</tag>`, type: 'html' },
+ };
+ }),
+);
+// Actions
const selectFiles = (files: File | File[] | null) => {
- if (!files) {
- selectedFiles.value = [];
- } else if (Array.isArray(files)) {
+ if (Array.isArray(files)) {
selectedFiles.value = files;
- } else {
+ } else if (files) {
selectedFiles.value = [files];
}
};
+
+const openContextMenu = (event: MouseEvent, node: Node) => {
+ if (!node) return;
+ contextMenu.open(shallowRef(ResourceContextMenu), event, {
+ props: { node: node },
+ });
+};
+
const copyLinks = () => navigator.clipboard.writeText(fileLinks.value.join('\n'));
+
const submitFiles = async () => {
if (!selectedFiles.value.length) return;
isLoading.value = true;
@@ -146,14 +176,14 @@ const submitFiles = async () => {
const r = await resourcesStore.post(body);
fileLinks.value.push(resourceURL(r));
} catch (e) {
- useNotifications().add({ message: t('cdn.notifications.error', { error: e, file: file.name }), title: 'Error', type: 'error' });
+ notifications.add({ message: t('cdn.notifications.error', { error: e, file: file.name }), title: 'Error', type: 'error' });
}
uploadProgress.value.current++;
}
isLoading.value = false;
if (fileLinks.value.length) {
- useNotifications().add({
+ notifications.add({
message: t('cdn.notifications.successMsg', { n: fileLinks.value.length }),
title: t('cdn.notifications.successTitle'),
type: 'success',
@@ -161,37 +191,12 @@ const submitFiles = async () => {
}
};
-const headers = [
- { key: 'name', label: t('common.labels.name') },
- { key: 'size', label: t('common.labels.size') },
- { key: 'type', label: t('common.labels.type') },
- { key: 'parent', label: t('common.labels.parent') },
- { key: 'date', label: t('common.labels.date') },
- { key: 'action', label: t('common.labels.action') },
-];
-
-const color = (type: string) => (type.includes('image') ? 'green' : type.includes('video') ? 'blue' : type.includes('pdf') ? 'yellow' : 'red');
-const rows: ComputedRef<Field[]> = computed(() =>
- filteredResources.value.map(res => {
- const parent = res.parent_id ? nodesStore.getById(res.parent_id) : null;
- const category = parent ? nodesStore.getById(parent.parent_id || '') : null;
- return {
- action: { data: res, type: 'slot' },
- date: { content: numericDate(res.created_timestamp), type: 'text' },
- name: { content: res.name, type: 'text' },
- parent: { content: category ? `<tag class="${appColors.getAppAccent(category.color)}">${parent?.name}</tag>` : '', type: 'html' },
- size: { content: readableFileSize(res.size ?? 0), type: 'text' },
- type: { content: `<tag class="${color(res.metadata?.filetype || '')}">${res.metadata?.filetype || ''}</tag>`, type: 'html' },
- };
- }),
-);
-
const deleteResource = async (node: Node) => {
- useModal().add(new Modal(shallowRef(DeleteNodeModal), { props: { node: node, redirectTo: '/dashboard/cdn' }, size: 'small' }));
+ modals.add(new Modal(shallowRef(DeleteNodeModal), { props: { node: node, redirectTo: '/dashboard/cdn' }, size: 'small' }));
};
const bulkDelete = async (lines: Field[]) => {
const resources = lines.map(line => line.action?.data as Node);
- useModal().add(new Modal(shallowRef(DeleteNodeModal), { props: { nodes: resources, redirectTo: '/dashboard/cdn' }, size: 'small' }));
+ modals.add(new Modal(shallowRef(DeleteNodeModal), { props: { nodes: resources, redirectTo: '/dashboard/cdn' }, size: 'small' }));
};
</script>
diff --git a/frontend/app/pages/dashboard/docs/[id].vue b/frontend/app/pages/dashboard/docs/[id].vue
index 8e75b97b..9b3ece15 100644
--- a/frontend/app/pages/dashboard/docs/[id].vue
+++ b/frontend/app/pages/dashboard/docs/[id].vue
@@ -1,6 +1,5 @@
-<!-- eslint-disable vue/no-v-html -->
<template>
- <div style="width: 100%; padding: 1rem 0" @contextmenu.prevent="showContextMenu">
+ <div style="width: 100%; padding: 1rem 0" @contextmenu.prevent="openContextMenu">
<div v-if="!error" style="display: flex; justify-content: space-between">
<div :style="{ maxWidth: width }" class="doc-container">
<NodeDocumentHeader :doc="node" style="margin-bottom: 20px" />
@@ -37,6 +36,7 @@ const preferencesStore = usePreferencesStore();
const devise = useDevice();
const nodesTree = useNodesTree();
const contextMenu = useContextMenu();
+const modals = useModal();
const route = useRoute();
const router = useRouter();
@@ -76,15 +76,17 @@ const width = computed(() => {
return '700px';
});
-function showContextMenu(event: MouseEvent) {
+// Actions
+const openContextMenu = (event: MouseEvent) => {
+ if (!node.value) return;
contextMenu.open(shallowRef(NodeContextMenu), event, {
props: { contextMenu: true, node: node.value },
});
-}
+};
const openDeleteModal = () => {
if (!node.value) return;
- useModal().add(
+ modals.add(
new Modal(shallowRef(DeleteNodeModal), {
props: { node: node.value, redirectTo: '/dashboard' },
size: 'small',
@@ -92,43 +94,43 @@ const openDeleteModal = () => {
);
};
-onMounted(() => {
- // Keyboard shortcuts management for navigating between corresponding pages
- const handleDocumentKeydown = (e: KeyboardEvent) => {
- if (e.ctrlKey && e.key === 'e') {
- // Go to the edit page of the current document
- if (!node.value) return;
- e.preventDefault();
- router.push(`/dashboard/docs/edit/${node.value.id}`);
- }
- if (e.key === 'ArrowRight') {
- // Go to the next document page
- e.preventDefault();
- if (!next.value?.id) return;
- e.preventDefault();
- router.push(`/dashboard/docs/${next.value.id}`);
- }
- if (e.key === 'ArrowLeft') {
- if (!previous.value?.id) return;
- e.preventDefault();
- router.push(`/dashboard/docs/${previous.value.id}`);
- }
- if (e.key === 'Escape') {
- // Close context menu on Escape
- contextMenu.close();
- }
- if (e.key === 'Delete') {
- // Open delete modal on Delete
- e.preventDefault();
- openDeleteModal();
- }
- };
+// Shortcuts
+function handleDocumentKeydown(e: KeyboardEvent) {
+ if (e.ctrlKey && e.key === 'e') {
+ // Go to the edit page of the current document
+ if (!node.value) return;
+ e.preventDefault();
+ router.push(`/dashboard/docs/edit/${node.value.id}`);
+ }
+ if (e.key === 'ArrowRight') {
+ // Go to the next document page
+ e.preventDefault();
+ if (!next.value?.id) return;
+ e.preventDefault();
+ router.push(`/dashboard/docs/${next.value.id}`);
+ }
+ if (e.key === 'ArrowLeft') {
+ if (!previous.value?.id) return;
+ e.preventDefault();
+ router.push(`/dashboard/docs/${previous.value.id}`);
+ }
+ if (e.key === 'Escape') {
+ // Close context menu on Escape
+ contextMenu.close();
+ }
+ if (e.key === 'Delete') {
+ // Open delete modal on Delete
+ e.preventDefault();
+ openDeleteModal();
+ }
+}
+onMounted(() => {
document.addEventListener('keydown', handleDocumentKeydown);
+});
- onUnmounted(() => {
- document.removeEventListener('keydown', handleDocumentKeydown);
- });
+onUnmounted(() => {
+ document.removeEventListener('keydown', handleDocumentKeydown);
});
</script>
diff --git a/frontend/app/pages/dashboard/docs/edit/[id].vue b/frontend/app/pages/dashboard/docs/edit/[id].vue
index c1d57b7e..140319c5 100644
--- a/frontend/app/pages/dashboard/docs/edit/[id].vue
+++ b/frontend/app/pages/dashboard/docs/edit/[id].vue
@@ -4,9 +4,10 @@
<script lang="ts" setup>
import type { Node } from '~/stores';
-definePageMeta({ breadcrumb: {i18n: 'common.actions.edit'} });
+definePageMeta({ breadcrumb: { i18n: 'common.actions.edit' } });
const store = useNodesStore();
+
const route = useRoute();
const nodeId = route.params.id as string;
@@ -24,18 +25,13 @@ watchEffect(async () => {
} else node.value = docFromStore;
});
-function save(doc: Node) {
+// Actions
+const save = (doc: Node) => {
store
.update(doc)
.then(() => notifications.add({ title: 'Document successfully updated', type: 'success' }))
.catch(e => notifications.add({ message: e, title: 'Error', type: 'error' }));
-}
-
-function autoSave(doc: Node) {
- store.update(doc);
-}
-
-function exit() {
- useRouter().push(`/dashboard/docs/${nodeId}`);
-}
+};
+const autoSave = (doc: Node) => store.update(doc);
+const exit = () => useRouter().push(`/dashboard/docs/${nodeId}`);
</script>
diff --git a/frontend/app/pages/dashboard/docs/index.vue b/frontend/app/pages/dashboard/docs/index.vue
index a6e4f9ca..33d1e117 100644
--- a/frontend/app/pages/dashboard/docs/index.vue
+++ b/frontend/app/pages/dashboard/docs/index.vue
@@ -6,9 +6,10 @@
import type { TreeItem } from '~/helpers/TreeBuilder';
import type { Node } from '~/stores';
-definePageMeta({ breadcrumb: {i18n: 'common.labels.all'} });
+definePageMeta({ breadcrumb: { i18n: 'common.labels.all' } });
const nodesStore = useNodesStore();
+
const { filtered, workspaceId } = useSidebar();
const parent = computed(() => nodesStore.getById(workspaceId.value || ''));
diff --git a/frontend/app/pages/dashboard/docs/new.vue b/frontend/app/pages/dashboard/docs/new.vue
index a25e1018..cea06728 100644
--- a/frontend/app/pages/dashboard/docs/new.vue
+++ b/frontend/app/pages/dashboard/docs/new.vue
@@ -4,13 +4,14 @@
<script lang="ts" setup>
import type { Node } from '~/stores';
+definePageMeta({ breadcrumb: { i18n: 'common.actions.new' } });
+
interface NewDocumentQuery {
- parent_id?: string
+ parent_id?: string;
}
-definePageMeta({ breadcrumb: {i18n: 'common.actions.new'} });
-
const store = useNodesStore();
+
const notifications = useNotifications();
const route = useRoute();
const sidebar = useSidebar();
diff --git a/frontend/app/pages/dashboard/home.vue b/frontend/app/pages/dashboard/home.vue
index b257962a..030decc7 100644
--- a/frontend/app/pages/dashboard/home.vue
+++ b/frontend/app/pages/dashboard/home.vue
@@ -148,13 +148,14 @@ import type { Node } from '~/stores';
definePageMeta({ breadcrumb: { i18n: 'dashboard.pages.home' } });
-const router = useRouter();
const nodesStore = useNodesStore();
const userStore = useUserStore();
const { t } = useI18nT();
const { todayFormatted, formatTime, shortDateLabel } = useDateFormatters();
const { getAppAccent } = useAppColors();
+const modals = useModal();
+const router = useRouter();
// Search state
const searchQuery = ref('');
@@ -237,18 +238,18 @@ const getNodePath = (node: Node) => {
current = parent;
} else break;
}
- return parts.join(' / ') || 'Racine';
+ return parts.join(' / ') || 'Root';
};
// Actions
const createNewDocument = () => router.push('/dashboard/docs/new');
-const openCreateWorkspace = () => useModal().add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
+const openCreateWorkspace = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1 } }));
</script>
<style scoped lang="scss">
.home-container {
- max-width: 1400px;
width: 100%;
+ max-width: 1400px;
margin: 0 auto;
padding: 2rem;
}
@@ -612,6 +613,7 @@ const openCreateWorkspace = () => useModal().add(new Modal(shallowRef(CreateCate
.greeting h1 {
font-size: 1.5rem;
}
+
.stats-section {
grid-template-columns: repeat(1, 1fr);
}
diff --git a/frontend/app/pages/dashboard/import/_components/ImportHeader.vue b/frontend/app/pages/dashboard/import/_components/ImportHeader.vue
index bde5fe63..99b2f9a9 100644
--- a/frontend/app/pages/dashboard/import/_components/ImportHeader.vue
+++ b/frontend/app/pages/dashboard/import/_components/ImportHeader.vue
@@ -50,8 +50,9 @@
</template>
<script setup lang="ts">
-import type { Manifest } from '~/helpers/backups/types';
import { readableFileSize } from '~/helpers/resources';
+import type { Manifest } from '~/helpers/backups/types';
+
defineProps<{ manifest: Manifest; resetImport: () => void }>();
const { t } = useI18nT();
diff --git a/frontend/app/pages/dashboard/import/_components/ImportSummary.vue b/frontend/app/pages/dashboard/import/_components/ImportSummary.vue
index e9de2941..207ed027 100644
--- a/frontend/app/pages/dashboard/import/_components/ImportSummary.vue
+++ b/frontend/app/pages/dashboard/import/_components/ImportSummary.vue
@@ -26,16 +26,16 @@
<script setup lang="ts">
import ImportProgress from './ImportProgress.vue';
-
import type { ImportJob } from '~/stores';
-const { t } = useI18nT();
defineProps<{
toCreate: number;
toUpdate: number;
unchangedCount: number;
importJob: ImportJob;
}>();
+
+const { t } = useI18nT();
</script>
<style scoped lang="scss">
diff --git a/frontend/app/pages/dashboard/import/_components/ImportTabs.vue b/frontend/app/pages/dashboard/import/_components/ImportTabs.vue
index 1c57235b..2d06b1d2 100644
--- a/frontend/app/pages/dashboard/import/_components/ImportTabs.vue
+++ b/frontend/app/pages/dashboard/import/_components/ImportTabs.vue
@@ -86,13 +86,14 @@
import type { DB_Node, ImportJob } from '~/stores';
import type { Manifest } from '~/helpers/backups/types';
-const { t } = useI18nT();
const props = defineProps<{ manifest: Manifest; toCreate: DB_Node[]; toUpdate: DB_Node[]; importJob: ImportJob }>();
const emit = defineEmits<{
(e: 'import', type: 'create' | 'update', nodeIds: string[]): void;
(e: 'importLocalSettings'): void;
}>();
+const { t } = useI18nT();
+
// Selection
const activeTab = ref<'create' | 'update' | 'local'>('create');
const selectedCreate = ref<string[]>([]);
@@ -210,7 +211,7 @@ function importLocalSettings() {
.warning {
display: flex;
- align-items: center;
color: var(--red);
+ align-items: center;
}
</style>
diff --git a/frontend/app/pages/dashboard/import/advanced.vue b/frontend/app/pages/dashboard/import/advanced.vue
index 5c69d271..83e87339 100644
--- a/frontend/app/pages/dashboard/import/advanced.vue
+++ b/frontend/app/pages/dashboard/import/advanced.vue
@@ -186,9 +186,9 @@ label {
}
.panel {
+ padding: 0.85rem;
border: 1px solid var(--border);
border-radius: 10px;
- padding: 0.85rem;
}
.panel h3 {
@@ -198,21 +198,15 @@ label {
.panel-head {
display: flex;
align-items: center;
- justify-content: space-between;
gap: 0.7rem;
+ justify-content: space-between;
margin-bottom: 0.65rem;
}
.list {
display: grid;
- gap: 0.35rem;
max-height: 250px;
+ gap: 0.35rem;
overflow: auto;
}
-
-@media (max-width: 900px) {
- .grid {
- grid-template-columns: 1fr;
- }
-}
</style>
diff --git a/frontend/app/pages/dashboard/import/backup.vue b/frontend/app/pages/dashboard/import/backup.vue
index aafb454e..4f4952d0 100644
--- a/frontend/app/pages/dashboard/import/backup.vue
+++ b/frontend/app/pages/dashboard/import/backup.vue
@@ -58,12 +58,13 @@ import ImportTabs from './_components/ImportTabs.vue';
import ImportActions from './_components/ImportActions.vue';
import { handleBackupFile } from '~/helpers/backups';
import type { Manifest } from '~/helpers/backups/types';
-import type { DB_Node, ImportJob } from '~/stores/db_strustures';
+import type { DB_Node, ImportJob } from '~/stores/db_structures';
definePageMeta({ breadcrumb: { i18n: 'import.meta.breadcrumb' } });
-const { t } = useI18nT();
const nodesStore = useNodesStore();
+
+const { t } = useI18nT();
const notifications = useNotifications();
// State
diff --git a/frontend/app/pages/dashboard/import/files.vue b/frontend/app/pages/dashboard/import/files.vue
index 6c14bc2e..6578d735 100644
--- a/frontend/app/pages/dashboard/import/files.vue
+++ b/frontend/app/pages/dashboard/import/files.vue
@@ -49,12 +49,11 @@ definePageMeta({ breadcrumb: { i18n: 'import.meta.breadcrumb' } });
const user = useUserStore();
const nodesStore = useNodesStore();
+
const { t } = useI18nT();
const selectedNodes = ref<string[]>([]);
-
const toCreate = ref(0);
-
const nodes = ref<DB_Node[]>([]);
const importJob = ref<ImportJob>({
@@ -114,9 +113,9 @@ async function importNodes(importNodes: DB_Node[]) {
}
.panel {
+ padding: 0.85rem;
border: 1px solid var(--border);
border-radius: 10px;
- padding: 0.85rem;
}
.panel h3 {
@@ -126,19 +125,19 @@ async function importNodes(importNodes: DB_Node[]) {
.panel-head {
display: flex;
align-items: center;
- justify-content: space-between;
gap: 0.7rem;
+ justify-content: space-between;
margin-bottom: 0.65rem;
}
.list {
display: grid;
- gap: 0.35rem;
max-height: 250px;
+ gap: 0.35rem;
overflow: auto;
}
-@media (max-width: 900px) {
+@media (width <= 900px) {
.grid {
grid-template-columns: 1fr;
}
diff --git a/frontend/app/pages/dashboard/import/index.vue b/frontend/app/pages/dashboard/import/index.vue
index 692aed65..2b349c3d 100644
--- a/frontend/app/pages/dashboard/import/index.vue
+++ b/frontend/app/pages/dashboard/import/index.vue
@@ -60,29 +60,29 @@ const { t } = useI18nT();
.cards-grid {
display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.9rem;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
}
.import-card {
+ display: flex;
+ min-height: 185px;
+ padding: 0.9rem;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface-raised);
- padding: 0.9rem;
- display: flex;
- flex-direction: column;
- gap: 0.65rem;
- min-height: 185px;
transition:
transform 0.18s ease,
box-shadow 0.18s ease,
border-color 0.18s ease;
+ flex-direction: column;
+ gap: 0.65rem;
.top {
display: flex;
align-items: center;
- justify-content: space-between;
gap: 0.6rem;
+ justify-content: space-between;
}
h3 {
@@ -92,22 +92,22 @@ const { t } = useI18nT();
p {
margin: 0;
- color: var(--text-secondary);
font-size: 0.9rem;
line-height: 1.45;
+ color: var(--text-secondary);
}
.cta {
- margin-top: auto;
font-size: 0.84rem;
- color: var(--primary);
font-weight: 600;
+ color: var(--primary);
+ margin-top: auto;
}
&:hover {
border-color: var(--primary);
+ box-shadow: 0 8px 18px rgb(0 0 0 / 8%);
transform: translateY(-2px);
- box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.icon-app {
@@ -115,7 +115,7 @@ const { t } = useI18nT();
}
}
-@media (max-width: 850px) {
+@media (width <= 850px) {
.cards-grid {
grid-template-columns: 1fr;
}
diff --git a/frontend/app/pages/dashboard/settings/_views/security.vue b/frontend/app/pages/dashboard/settings/_views/security.vue
index b18ab0f1..66f58a6f 100644
--- a/frontend/app/pages/dashboard/settings/_views/security.vue
+++ b/frontend/app/pages/dashboard/settings/_views/security.vue
@@ -5,9 +5,9 @@
<h3>{{ t('settings.security.activeSessions') }}</h3>
<p class="section-description">{{ t('settings.security.activeSessionsDesc') }}</p>
<div class="sessions-list">
- <SessionCard v-for="(session, index) in store.sessions" :key="session.id" :session="session" :is-current="index === 0" :show-user-agent="true" />
+ <SessionCard v-for="(session, index) in userStore.sessions" :key="session.id" :session="session" :is-current="index === 0" :show-user-agent="true" />
</div>
- <p v-if="store.sessions.length === 0" class="no-sessions">{{ t('settings.security.noSessions') }}</p>
+ <p v-if="userStore.sessions.length === 0" class="no-sessions">{{ t('settings.security.noSessions') }}</p>
<div v-if="hasUnrecognizedSession" class="warning-box">
<Icon name="warning" display="sm" />
<div>
@@ -126,10 +126,14 @@ import { getProviderIcon, getProviderLabel } from '~/helpers/oidc-providers';
import DeleteAccountModal from '../_modals/DeleteAccountModal.vue';
const emit = defineEmits(['close']);
+
+const userStore = useUserStore();
+
const { t } = useI18nT();
+const modals = useModal();
+const notifications = useNotifications();
-const store = useUserStore();
-store.fetchSessions();
+userStore.fetchSessions();
const {
providers: availableProviders,
@@ -145,7 +149,7 @@ const loadingOIDC = ref(true);
// Check if there might be unrecognized sessions (sessions other than current)
const hasUnrecognizedSession = computed(() => {
- return store.sessions.length > 1;
+ return userStore.sessions.length > 1;
});
function isLinked(providerName: string): boolean {
@@ -156,16 +160,16 @@ async function linkAccount(providerName: string) {
try {
await linkProvider(providerName);
} catch (error) {
- useNotifications().add({ type: 'error', title: (error as Error).message || t('settings.security.notifications.linkError') });
+ notifications.add({ type: 'error', title: (error as Error).message || t('settings.security.notifications.linkError') });
}
}
async function unlinkAccount(providerName: string) {
try {
await unlinkProvider(providerName);
- useNotifications().add({ type: 'success', title: t('settings.security.notifications.accountUnlinked', { provider: getProviderLabel(providerName) }) });
+ notifications.add({ type: 'success', title: t('settings.security.notifications.accountUnlinked', { provider: getProviderLabel(providerName) }) });
} catch (error) {
- useNotifications().add({ type: 'error', title: (error as Error).message || t('settings.security.notifications.unlinkError') });
+ notifications.add({ type: 'error', title: (error as Error).message || t('settings.security.notifications.unlinkError') });
}
}
@@ -181,17 +185,17 @@ const passwordConfirmValue = ref('');
const errPasswordNotMatch = ref(false);
const changePassword = async () => {
- if (!store.user) return;
+ if (!userStore.user) return;
if (passwordValue.value !== passwordConfirmValue.value) return (errPasswordNotMatch.value = true);
- store
+ userStore
.updatePassword(passwordValue.value)
.then(() => {
passwordValue.value = '';
passwordConfirmValue.value = '';
errPasswordNotMatch.value = false;
- useNotifications().add({ type: 'success', title: t('settings.security.notifications.passwordChanged') });
+ notifications.add({ type: 'success', title: t('settings.security.notifications.passwordChanged') });
})
- .catch(e => useNotifications().add({ type: 'error', title: t('settings.security.notifications.passwordError'), message: e.message }));
+ .catch(e => notifications.add({ type: 'error', title: t('settings.security.notifications.passwordError'), message: e.message }));
};
const logout = () => {
@@ -203,7 +207,7 @@ const logoutAll = () => {
emit('close');
};
-const openDeleteModal = () => useModal().add(new Modal(shallowRef(DeleteAccountModal)));
+const openDeleteModal = () => modals.add(new Modal(shallowRef(DeleteAccountModal)));
</script>
<style scoped lang="scss">
diff --git a/frontend/app/pages/dashboard/settings/_views/snippets.vue b/frontend/app/pages/dashboard/settings/_views/snippets.vue
index 2a671fa0..cc344d1f 100644
--- a/frontend/app/pages/dashboard/settings/_views/snippets.vue
+++ b/frontend/app/pages/dashboard/settings/_views/snippets.vue
@@ -64,7 +64,7 @@ import type { Field } from '~/components/DataTable.vue';
const { t } = useI18nT();
const notifications = useNotifications();
-const modalManager = useModal();
+const modals = useModal();
const { allSnippets, add, remove, update, exportJSON, importJSON, importDictionary, isDuplicate } = useSnippets();
// Table config
@@ -97,7 +97,7 @@ const handleSave = (snippet: Snippet, originalId?: string): boolean => {
};
const openModal = (mode: 'create' | 'edit', snippet?: Snippet) => {
- modalManager.add(
+ modals.add(
new Modal(shallowRef(SnippetModal), {
size: 'small',
props: {
@@ -123,7 +123,7 @@ const bulkDelete = (selected: Field[]) => {
};
const openRestoreModal = () => {
- modalManager.add(
+ modals.add(
new Modal(shallowRef(RestoreModal), {
size: 'small',
}),
@@ -224,8 +224,8 @@ const handleDictImport = async (e: Event) => {
.dropdown-backdrop {
position: fixed;
- inset: 0;
z-index: 99;
+ inset: 0;
}
.dropdown-menu {
diff --git a/frontend/app/pages/dashboard/settings/index.vue b/frontend/app/pages/dashboard/settings/index.vue
index 7ce6a164..43972243 100644
--- a/frontend/app/pages/dashboard/settings/index.vue
+++ b/frontend/app/pages/dashboard/settings/index.vue
@@ -219,6 +219,7 @@ watchEffect(() => {
.modal {
height: 100%;
+
nav {
width: 270px;
border: none;
diff --git a/frontend/app/pages/dashboard/share-target.vue b/frontend/app/pages/dashboard/share-target.vue
index 18830c5b..a75cdbfc 100644
--- a/frontend/app/pages/dashboard/share-target.vue
+++ b/frontend/app/pages/dashboard/share-target.vue
@@ -228,20 +228,21 @@ async function uploadFiles() {
section {
margin-top: 1.5rem;
}
+
.share-content {
gap: 1.5rem;
}
.preview-card {
padding: 1rem;
- border-radius: var(--radius-md);
border: 1px solid var(--border);
+ border-radius: var(--radius-md);
.shared-url {
display: block;
color: var(--primary);
- word-break: break-all;
text-decoration: underline;
+ word-break: break-all;
&:hover {
color: var(--primary-dark);
@@ -263,14 +264,14 @@ section {
.action-card {
display: flex;
- align-items: center;
- gap: 1rem;
padding: 1rem;
- background: var(--bg-secondary);
- border-radius: var(--radius-md);
border: 1px solid var(--border);
- cursor: pointer;
+ border-radius: var(--radius-md);
+ background: var(--bg-secondary);
transition: all 0.15s ease;
+ align-items: center;
+ cursor: pointer;
+ gap: 1rem;
&:hover {
border-color: var(--primary);
@@ -278,15 +279,15 @@ section {
}
.action-icon {
+ display: flex;
width: 40px;
height: 40px;
- display: flex;
- align-items: center;
- justify-content: center;
- background: var(--primary);
border-radius: var(--radius-sm);
color: white;
+ background: var(--primary);
+ align-items: center;
flex-shrink: 0;
+ justify-content: center;
}
.action-info {
diff --git a/frontend/app/pages/reference/documentation.vue b/frontend/app/pages/reference/documentation.vue
index 3a904a86..4d8f806f 100644
--- a/frontend/app/pages/reference/documentation.vue
+++ b/frontend/app/pages/reference/documentation.vue
@@ -1,6 +1,6 @@
<template>
<div class="body-container">
- <article class="markdown-preview modern-theme document-content" style="font-size: 16px; font-family: Poppins; line-height: 1.5">
+ <article class="markdown-preview modern-theme document-content" style=" font-family: Poppins;font-size: 16px; line-height: 1.5">
<h1 id="alexandrie-setup-guide">Alexandrie Setup Guide</h1>
<p>This guide explains how to set up, configure, and deploy the Alexandrie stack.</p>
<p>
diff --git a/frontend/app/pages/reference/privacy.vue b/frontend/app/pages/reference/privacy.vue
index 6cb9f1a1..958c3dda 100644
--- a/frontend/app/pages/reference/privacy.vue
+++ b/frontend/app/pages/reference/privacy.vue
@@ -1,5 +1,5 @@
<template>
- <article class="markdown-preview modern-theme document-content" style="font-size: 16px; font-family: Poppins; line-height: 1.5">
+ <article class="markdown-preview modern-theme document-content" style=" font-family: Poppins;font-size: 16px; line-height: 1.5">
<h1 id="privacy-policy---alexandrie" tabindex="-1">
<a class="header-anchor" href="#privacy-policy---alexandrie" aria-hidden="true">#</a> Privacy Policy - Alexandrie
</h1>
@@ -58,6 +58,6 @@ definePageMeta({
<style scoped>
article {
max-width: 1000px;
- margin: 2rem auto 0 auto;
+ margin: 2rem auto 0;
}
</style>
diff --git a/frontend/app/stores/_utils.ts b/frontend/app/stores/_utils.ts
index 440b7fef..85364850 100644
--- a/frontend/app/stores/_utils.ts
+++ b/frontend/app/stores/_utils.ts
@@ -4,8 +4,6 @@
* SSR-compatible with proper cookie handling
*/
-import type { WatchSource } from 'vue';
-
export interface APIResult<Data> {
status: 'success' | 'error';
message: string;
@@ -178,72 +176,3 @@ export async function makeRequest<T>(route: string, method: HttpMethod, body: ob
};
}
}
-
-/**
- * Composable for reactive API calls with Nuxt's useAsyncData
- * Use this for data that should be fetched on component mount and cached
- *
- * @param key - Unique key for caching
- * @param route - API endpoint
- * @param options - Additional options
- */
-export function useApiData<T>(
- key: string,
- route: string,
- options: {
- method?: HttpMethod;
- body?: object;
- immediate?: boolean;
- watch?: WatchSource[];
- } = {},
-) {
- const { method = 'GET' as HttpMethod, body = {}, immediate = true, watch: watchSources } = options;
-
- return useAsyncData<APIResult<T>>(key, () => makeRequest<T>(route, method, body), {
- immediate,
- watch: watchSources,
- });
-}
-
-/**
- * Composable for lazy API calls (triggered manually)
- * Useful for mutations (POST, PUT, DELETE) or conditional fetching
- *
- * @param route - API endpoint
- * @param method - HTTP method
- */
-export function useApiMutation<T, TBody extends object = object>(route: string, method: HttpMethod = 'POST') {
- const pending = ref(false);
- const error = ref<string | null>(null);
- const data = ref<T | null>(null);
-
- async function mutate(body: TBody = {} as TBody): Promise<APIResult<T>> {
- pending.value = true;
- error.value = null;
-
- try {
- const response = await makeRequest<T>(route, method, body);
-
- if (response.status === 'success') {
- data.value = response.result ?? null;
- } else {
- error.value = response.message;
- }
-
- return response;
- } catch (err) {
- const message = err instanceof Error ? err.message : String(err);
- error.value = message;
- return { status: 'error', message };
- } finally {
- pending.value = false;
- }
- }
-
- return {
- mutate,
- pending: readonly(pending),
- error: readonly(error),
- data: readonly(data),
- };
-}
diff --git a/frontend/app/stores/admin.store.ts b/frontend/app/stores/admin.store.ts
index 370ee417..0114a36e 100644
--- a/frontend/app/stores/admin.store.ts
+++ b/frontend/app/stores/admin.store.ts
@@ -1,4 +1,4 @@
-import type { User, Node, OverviewStats, UserStats, NodeStats } from './db_strustures';
+import type { User, Node, OverviewStats, UserStats, NodeStats } from './db_structures';
interface UserData extends User {
nodes?: Node[];
@@ -31,18 +31,18 @@ export const useAdminStore = defineStore('admin', {
actions: {
async fetchAll(): Promise<UserData[] | undefined> {
if (this.users) return this.users;
- const responce = await makeRequest<User[]>(`users`, 'GET', {});
- if (responce.status === 'success') {
- if (responce.result) this.users = responce.result as User[];
+ const response = await makeRequest<User[]>(`users`, 'GET', {});
+ if (response.status === 'success') {
+ if (response.result) this.users = response.result as User[];
return this.users;
- } else throw responce.message;
+ } else throw response.message;
},
async fetchById(id: string): Promise<User | undefined> {
const cachedUser = this.users?.find(user => user.id === id);
if (cachedUser) return cachedUser;
- const responce = await makeRequest<{ user: User }>(`users/${id}`, 'GET', {});
- if (responce.status === 'success') return responce.result?.user as User;
- else throw responce.message;
+ const response = await makeRequest<{ user: User }>(`users/${id}`, 'GET', {});
+ if (response.status === 'success') return response.result?.user as User;
+ else throw response.message;
},
async update(user: User) {
const request = await makeRequest(`users/${user.id}`, 'PATCH', user);
@@ -55,17 +55,17 @@ export const useAdminStore = defineStore('admin', {
async fetchUserDocuments(userId: string): Promise<Node[] | undefined> {
const cachedUser = this.users?.find(user => user.id === userId);
if (cachedUser && cachedUser.nodes) return cachedUser.nodes;
- const responce = await makeRequest<Node[]>(`nodes/user/${userId}`, 'GET', {});
- if (responce.status === 'success') {
- if (cachedUser) cachedUser.nodes = responce.result;
- return responce.result;
- } else throw responce.message;
+ const response = await makeRequest<Node[]>(`nodes/user/${userId}`, 'GET', {});
+ if (response.status === 'success') {
+ if (cachedUser) cachedUser.nodes = response.result;
+ return response.result;
+ } else throw response.message;
},
async fetchUserDocument(userId: string, docId: string): Promise<Node | undefined> {
- const responce = await makeRequest<{ node: Node; permissions: [] }>(`nodes/${docId}`, 'GET', {});
- if (responce.status === 'success') {
- return responce.result?.node;
- } else throw responce.message;
+ const response = await makeRequest<{ node: Node; permissions: [] }>(`nodes/${docId}`, 'GET', {});
+ if (response.status === 'success') {
+ return response.result?.node;
+ } else throw response.message;
},
async fetchOverviewStats() {
const response = await makeRequest<OverviewStats>('stats/overview', 'GET', {});
diff --git a/frontend/app/stores/db_strustures.d.ts b/frontend/app/stores/db_structures.d.ts
similarity index 100%
rename from frontend/app/stores/db_strustures.d.ts
rename to frontend/app/stores/db_structures.d.ts
diff --git a/frontend/app/stores/index.ts b/frontend/app/stores/index.ts
index d3eeb8c6..dd8f2e05 100644
--- a/frontend/app/stores/index.ts
+++ b/frontend/app/stores/index.ts
@@ -1,4 +1,4 @@
export * from './nodes.store';
export * from './user.store';
export * from './resources.store';
-export type * from './db_strustures';
+export type * from './db_structures';
diff --git a/frontend/app/stores/nodes.store.ts b/frontend/app/stores/nodes.store.ts
index 58bf211b..720448dc 100644
--- a/frontend/app/stores/nodes.store.ts
+++ b/frontend/app/stores/nodes.store.ts
@@ -1,5 +1,5 @@
import { Collection } from './collection';
-import type { DB_Node, ImportJob, Node, NodeSearchResult, Permission, PublicNodeResponse } from './db_strustures';
+import type { DB_Node, ImportJob, Node, NodeSearchResult, Permission, PublicNodeResponse } from './db_structures';
export type CategoryRole = 1 | 2;
export type DocumentRole = 3;
diff --git a/frontend/app/stores/resources.store.ts b/frontend/app/stores/resources.store.ts
index b41d0cfc..afa8a162 100644
--- a/frontend/app/stores/resources.store.ts
+++ b/frontend/app/stores/resources.store.ts
@@ -1,4 +1,4 @@
-import type { Node } from './db_strustures';
+import type { Node } from './db_structures';
export const useResourcesStore = defineStore('resources', {
actions: {
diff --git a/frontend/app/stores/user.store.ts b/frontend/app/stores/user.store.ts
index c723ad97..74d43277 100644
--- a/frontend/app/stores/user.store.ts
+++ b/frontend/app/stores/user.store.ts
@@ -1,4 +1,4 @@
-import type { User, PublicUser, Session } from './db_strustures';
+import type { User, PublicUser, Session } from './db_structures';
export const useUserStore = defineStore('user', {
state: () => ({
@@ -35,11 +35,11 @@ export const useUserStore = defineStore('user', {
async fetch(): Promise<undefined | User> {
if (this.user) return this.user;
- const responce = await makeRequest<User>(`users/@me`, 'GET', {});
- if (responce.status === 'success') {
- if (responce.result) this.user = responce.result as User;
+ const response = await makeRequest<User>(`users/@me`, 'GET', {});
+ if (response.status === 'success') {
+ if (response.result) this.user = response.result as User;
return this.user;
- } else throw responce.message;
+ } else throw response.message;
},
async fetchSessions(): Promise<Session[]> {
@@ -57,10 +57,10 @@ export const useUserStore = defineStore('user', {
if (this.current_fetching.includes(id)) return null;
this.current_fetching.push(id);
const response = await makeRequest<PublicUser[]>(`users/public/${id}`, 'GET', {});
+ this.current_fetching = this.current_fetching.filter(uid => uid !== id);
if (response.status === 'success' && response.result?.length) {
const user = response.result[0] as PublicUser;
this.users[user.id] = user;
- this.current_fetching = this.current_fetching.filter(uid => uid !== id);
return user;
}
throw response.message;
@@ -79,9 +79,9 @@ export const useUserStore = defineStore('user', {
},
async fetchById(id: string): Promise<undefined | User> {
- const responce = await makeRequest<{ user: User }>(`users/${id}`, 'GET', {});
- if (responce.status === 'success') return responce.result?.user as User;
- throw responce.message;
+ const response = await makeRequest<{ user: User }>(`users/${id}`, 'GET', {});
+ if (response.status === 'success') return response.result?.user as User;
+ throw response.message;
},
async update(user: User) {
@@ -121,7 +121,7 @@ export const useUserStore = defineStore('user', {
} else throw request.message;
},
- async logout_all() {
+ async logoutAll() {
if (!this.user) return;
const request = await makeRequest(`auth/logout/all`, 'POST', {});
if (request.status === 'success') {
diff --git a/frontend/app/styles/abstract/static.scss b/frontend/app/styles/abstract/static.scss
index 92fae581..9c1cda15 100644
--- a/frontend/app/styles/abstract/static.scss
+++ b/frontend/app/styles/abstract/static.scss
@@ -1,5 +1,5 @@
// --- Typography ---
-$font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
+$font-sans: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
$font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
// Transitions
diff --git a/frontend/app/styles/base/forms.scss b/frontend/app/styles/base/forms.scss
index 0361e3e4..c7512259 100644
--- a/frontend/app/styles/base/forms.scss
+++ b/frontend/app/styles/base/forms.scss
@@ -48,8 +48,8 @@ textarea {
input {
display: block;
- font-size: 16px;
width: 100%;
+ font-size: 16px;
}
input[type="radio"]:focus {
diff --git a/frontend/app/styles/base/typography.scss b/frontend/app/styles/base/typography.scss
index afdf4afc..f9363a23 100644
--- a/frontend/app/styles/base/typography.scss
+++ b/frontend/app/styles/base/typography.scss
@@ -107,8 +107,8 @@ kbd {
padding: 4px 6px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
- font-size: 13px;
font-family: $font-sans;
+ font-size: 13px;
font-weight: 400;
color: var(--text-primary);
background-color: var(--surface-base);
diff --git a/frontend/app/styles/components/page-components.scss b/frontend/app/styles/components/page-components.scss
index d7537d0e..1fd9ef78 100644
--- a/frontend/app/styles/components/page-components.scss
+++ b/frontend/app/styles/components/page-components.scss
@@ -31,9 +31,9 @@
}
.page-title {
+ display: flex;
font-size: 1.7rem;
font-weight: bold;
- display: flex;
align-items: center;
gap: 0.5rem;
}
diff --git a/frontend/app/styles/features/document-theme.scss b/frontend/app/styles/features/document-theme.scss
index 8ef79366..cc01b36b 100644
--- a/frontend/app/styles/features/document-theme.scss
+++ b/frontend/app/styles/features/document-theme.scss
@@ -74,13 +74,13 @@
.custom-block {
display: flex;
- flex-wrap: wrap;
margin: 2em 0;
padding: 0;
border: none;
font-size: 16px;
color: var(--text-body);
background-color: transparent;
+ flex-wrap: wrap;
.custom-block-title {
min-width: 150px;
@@ -170,13 +170,13 @@
.custom-block {
display: flex;
- flex-wrap: wrap;
margin: 2em 0;
padding: 4px;
border: none;
border-radius: var(--radius-xs);
font-size: 16px;
color: var(--text-body);
+ flex-wrap: wrap;
.grey {
color: var(--grey);
diff --git a/frontend/app/styles/main.scss b/frontend/app/styles/main.scss
index 76a5abc5..4489fded 100644
--- a/frontend/app/styles/main.scss
+++ b/frontend/app/styles/main.scss
@@ -4,5 +4,4 @@
@forward "./themes/index";
@forward "./utilities/index";
@forward "./vendors/index";
-
@forward "./transitions";
\ No newline at end of file
diff --git a/frontend/app/styles/themes/_index.scss b/frontend/app/styles/themes/_index.scss
index c31525da..b185054f 100644
--- a/frontend/app/styles/themes/_index.scss
+++ b/frontend/app/styles/themes/_index.scss
@@ -3,6 +3,7 @@
@use "material" as *;
@use "print" as *;
@use "white" as *;
+
@forward "colors";
:root {
diff --git a/frontend/app/styles/themes/dark.scss b/frontend/app/styles/themes/dark.scss
index c053f351..624362a7 100644
--- a/frontend/app/styles/themes/dark.scss
+++ b/frontend/app/styles/themes/dark.scss
@@ -15,7 +15,6 @@
--surface-overlay: #2d3443;
--surface-transparent: rgb(255 255 255 / 4%);
--surface-transparent-light: rgb(255 255 255 / 2%);
-
--body-fixed: #212830;
// -------------------------------------------------------------------------
// TEXT
@@ -37,11 +36,11 @@
// -------------------------------------------------------------------------
// SHADOWS
// -------------------------------------------------------------------------
- --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
- --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
- --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
- --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
- --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.16);
+ --shadow-xs: 0 1px 2px rgb(0 0 0 / 4%);
+ --shadow-sm: 0 2px 4px rgb(0 0 0 / 6%);
+ --shadow-md: 0 4px 12px rgb(0 0 0 / 8%);
+ --shadow-lg: 0 8px 24px rgb(0 0 0 / 12%);
+ --shadow-xl: 0 20px 40px rgb(0 0 0 / 16%);
// -------------------------------------------------------------------------
// INTERACTIVE STATES
diff --git a/frontend/app/styles/themes/glassmorphism.scss b/frontend/app/styles/themes/glassmorphism.scss
index 642bad6f..8a45db4b 100644
--- a/frontend/app/styles/themes/glassmorphism.scss
+++ b/frontend/app/styles/themes/glassmorphism.scss
@@ -23,7 +23,6 @@
}
@mixin glassmorphism-theme-white {
-
--accent-bg: rgb(221 225 248 / 65%);
--accent-border: rgb(221 225 248 / 65%);
@@ -39,32 +38,25 @@
--border-strong: rgb(0 0 0 / 10%);
// Elevated shadows with slight spread
- --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
- --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
- --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
-
+ --shadow-sm: 0 2px 8px rgb(0 0 0 / 6%);
+ --shadow-md: 0 4px 16px rgb(0 0 0 / 8%);
+ --shadow-lg: 0 8px 32px rgb(0 0 0 / 10%);
--surface-tooltip: rgb(30 30 40 / 80%);
}
@mixin glassmorphism-dark-theme {
-
--accent-bg: rgb(44 51 74 / 65%);
--accent-border: rgb(74 79 92 / 65%);
-
--surface-base: rgb(33 40 48 / 65%);
--surface-raised: rgb(38 44 54 / 55%);
--surface-overlay: rgb(45 52 67 / 50%);
-
--border: rgb(255 255 255 / 12%);
--border-subtle: rgb(255 255 255 / 6%);
--border-strong: rgb(255 255 255 / 18%);
-
- --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
- --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.20);
- --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
-
+ --shadow-sm: 0 2px 8px rgb(0 0 0 / 15%);
+ --shadow-md: 0 4px 16px rgb(0 0 0 / 20%);
+ --shadow-lg: 0 8px 32px rgb(0 0 0 / 25%);
--overlay-backdrop: rgb(0 0 0 / 40%);
--overlay-light: rgb(0 0 0 / 20%);
-
--surface-tooltip: rgb(15 18 25 / 85%);
}
\ No newline at end of file
diff --git a/frontend/app/styles/themes/white.scss b/frontend/app/styles/themes/white.scss
index bc417779..db787694 100644
--- a/frontend/app/styles/themes/white.scss
+++ b/frontend/app/styles/themes/white.scss
@@ -15,7 +15,6 @@
--surface-overlay: #e2ebfd;
--surface-transparent: rgb(8 8 8 / 3%);
--surface-transparent-light: rgb(8 8 8 / 2%);
-
--body-fixed: #fff;
// -------------------------------------------------------------------------
// TEXT
@@ -37,11 +36,11 @@
// -------------------------------------------------------------------------
// SHADOWS
// -------------------------------------------------------------------------
- --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
- --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
- --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
- --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
- --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.16);
+ --shadow-xs: 0 1px 2px rgb(0 0 0 / 4%);
+ --shadow-sm: 0 2px 4px rgb(0 0 0 / 6%);
+ --shadow-md: 0 4px 12px rgb(0 0 0 / 8%);
+ --shadow-lg: 0 8px 24px rgb(0 0 0 / 12%);
+ --shadow-xl: 0 20px 40px rgb(0 0 0 / 16%);
// -------------------------------------------------------------------------
// INTERACTIVE STATES
diff --git a/frontend/app/styles/utilities/layout.scss b/frontend/app/styles/utilities/layout.scss
index a5eebb09..e95f7eb9 100644
--- a/frontend/app/styles/utilities/layout.scss
+++ b/frontend/app/styles/utilities/layout.scss
@@ -7,11 +7,11 @@
.center {
display: flex;
+ width: 100%;
text-align: center;
align-items: center;
flex-direction: column;
justify-content: center;
- width: 100%;
}
.flex {
diff --git a/frontend/app/styles/vendors/font.scss b/frontend/app/styles/vendors/font.scss
index 2cc854fc..0266263b 100644
--- a/frontend/app/styles/vendors/font.scss
+++ b/frontend/app/styles/vendors/font.scss
@@ -4,82 +4,82 @@
/* poppins-300 - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 300;
font-display: swap;
- font-family: 'Poppins';
font-style: normal;
- font-weight: 300;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-300.woff2') format('woff2');
}
/* poppins-regular - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 400;
font-display: swap;
- font-family: 'Poppins';
font-style: normal;
- font-weight: 400;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-regular.woff2') format('woff2');
}
/* poppins-italic - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 400;
font-display: swap;
- font-family: 'Poppins';
font-style: italic;
- font-weight: 400;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-italic.woff2') format('woff2');
}
/* poppins-500 - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 500;
font-display: swap;
- font-family: 'Poppins';
font-style: normal;
- font-weight: 500;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-500.woff2') format('woff2');
}
/* poppins-500italic - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 500;
font-display: swap;
- font-family: 'Poppins';
font-style: italic;
- font-weight: 500;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-500italic.woff2') format('woff2');
}
/* poppins-600 - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 600;
font-display: swap;
- font-family: 'Poppins';
font-style: normal;
- font-weight: 600;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-600.woff2') format('woff2');
}
/* poppins-600italic - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 600;
font-display: swap;
- font-family: 'Poppins';
font-style: italic;
- font-weight: 600;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-600italic.woff2') format('woff2');
}
/* poppins-700 - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 700;
font-display: swap;
- font-family: 'Poppins';
font-style: normal;
- font-weight: 700;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-700.woff2') format('woff2');
}
/* poppins-700italic - latin */
@font-face {
+ font-family: Poppins;
+ font-weight: 700;
font-display: swap;
- font-family: 'Poppins';
font-style: italic;
- font-weight: 700;
src: url('~/assets/fonts/Poppins/poppins-v24-latin-700italic.woff2') format('woff2');
}
@@ -89,54 +89,54 @@
@font-face {
font-family: 'LMRoman10';
+ font-weight: normal;
+ font-display: swap;
+ font-style: normal;
src: url('~/assets/fonts/LMRoman/LMRoman10-Regular.eot');
src: local('LMRoman10-Regular'),
url('~/assets/fonts/LMRoman/LMRoman10-Regular.eot?#iefix') format('embedded-opentype'),
url('~/assets/fonts/LMRoman/LMRoman10-Regular.woff2') format('woff2'),
url('~/assets/fonts/LMRoman/LMRoman10-Regular.woff') format('woff'),
url('~/assets/fonts/LMRoman/LMRoman10-Regular.ttf') format('truetype');
- font-weight: normal;
- font-style: normal;
- font-display: swap;
}
@font-face {
font-family: 'LMRoman10';
+ font-weight: normal;
+ font-display: swap;
+ font-style: italic;
src: url('~/assets/fonts/LMRoman/LMRoman10-Italic.eot');
src: local('LMRoman10-Italic'),
url('~/assets/fonts/LMRoman/LMRoman10-Italic.eot?#iefix') format('embedded-opentype'),
url('~/assets/fonts/LMRoman/LMRoman10-Italic.woff2') format('woff2'),
url('~/assets/fonts/LMRoman/LMRoman10-Italic.woff') format('woff'),
url('~/assets/fonts/LMRoman/LMRoman10-Italic.ttf') format('truetype');
- font-weight: normal;
- font-style: italic;
- font-display: swap;
}
@font-face {
font-family: 'LMRoman10';
+ font-weight: bold;
+ font-display: swap;
+ font-style: italic;
src: url('~/assets/fonts/LMRoman/LMRoman10-BoldItalic.eot');
src: local('LMRoman10-BoldItalic'),
url('~/assets/fonts/LMRoman/LMRoman10-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('~/assets/fonts/LMRoman/LMRoman10-BoldItalic.woff2') format('woff2'),
url('~/assets/fonts/LMRoman/LMRoman10-BoldItalic.woff') format('woff'),
url('~/assets/fonts/LMRoman/LMRoman10-BoldItalic.ttf') format('truetype');
- font-weight: bold;
- font-style: italic;
- font-display: swap;
}
@font-face {
font-family: 'LMRoman10';
+ font-weight: bold;
+ font-display: swap;
+ font-style: normal;
src: url('~/assets/fonts/LMRoman/LMRoman10-Bold.eot');
src: local('LMRoman10-Bold'),
url('~/assets/fonts/LMRoman/LMRoman10-Bold.eot?#iefix') format('embedded-opentype'),
url('~/assets/fonts/LMRoman/LMRoman10-Bold.woff2') format('woff2'),
url('~/assets/fonts/LMRoman/LMRoman10-Bold.woff') format('woff'),
url('~/assets/fonts/LMRoman/LMRoman10-Bold.ttf') format('truetype');
- font-weight: bold;
- font-style: normal;
- font-display: swap;
}
// ****************************************************************************************** */
@@ -145,111 +145,112 @@
/* jetbrains-mono-regular - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: normal;
font-weight: 400;
+ font-display: swap;
+ font-style: normal;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
/* jetbrains-mono-italic - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: italic;
font-weight: 400;
+ font-display: swap;
+ font-style: italic;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-italic.woff2') format('woff2');
}
/* jetbrains-mono-500 - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: normal;
font-weight: 500;
+ font-display: swap;
+ font-style: normal;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}
/* jetbrains-mono-500italic - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: italic;
font-weight: 500;
+ font-display: swap;
+ font-style: italic;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-500italic.woff2') format('woff2');
}
/* jetbrains-mono-600 - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: normal;
font-weight: 600;
+ font-display: swap;
+ font-style: normal;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-600.woff2') format('woff2');
}
/* jetbrains-mono-600italic - latin */
@font-face {
- font-display: swap;
font-family: 'JetBrains Mono';
- font-style: italic;
font-weight: 600;
+ font-display: swap;
+ font-style: italic;
src: url('~/assets/fonts/JetBrainsMono/jetbrains-mono-v24-latin-600italic.woff2') format('woff2');
}
// ****************************************************************************************** */
// Font name: Inter
// ******************************************************************************************* */
+
/* inter-regular - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 400;
font-display: swap;
- font-family: 'Inter';
font-style: normal;
- font-weight: 400;
src: url('~/assets/fonts/Inter/inter-v20-latin-regular.woff2') format('woff2');
}
/* inter-italic - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 400;
font-display: swap;
- font-family: 'Inter';
font-style: italic;
- font-weight: 400;
src: url('~/assets/fonts/Inter/inter-v20-latin-italic.woff2') format('woff2');
}
/* inter-500 - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 500;
font-display: swap;
- font-family: 'Inter';
font-style: normal;
- font-weight: 500;
src: url('~/assets/fonts/Inter/inter-v20-latin-500.woff2') format('woff2');
}
/* inter-500italic - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 500;
font-display: swap;
- font-family: 'Inter';
font-style: italic;
- font-weight: 500;
src: url('~/assets/fonts/Inter/inter-v20-latin-500italic.woff2') format('woff2');
}
/* inter-600 - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 600;
font-display: swap;
- font-family: 'Inter';
font-style: normal;
- font-weight: 600;
src: url('~/assets/fonts/Inter/inter-v20-latin-600.woff2') format('woff2');
}
/* inter-600italic - latin */
@font-face {
+ font-family: Inter;
+ font-weight: 600;
font-display: swap;
- font-family: 'Inter';
font-style: italic;
- font-weight: 600;
src: url('~/assets/fonts/Inter/inter-v20-latin-600italic.woff2') format('woff2');
}
\ No newline at end of file
diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts
index 0006bf90..35c0bce6 100644
--- a/frontend/nuxt.config.ts
+++ b/frontend/nuxt.config.ts
@@ -256,7 +256,6 @@ export default defineNuxtConfig({
},
},
plugins: [
- // @ts-expect-error Vite version incompatibility
createSvgIconsPlugin({
iconDirs: [resolve(process.cwd(), 'public/app-icons/')],
symbolId: 'icon-[name]',