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.

General code style update (class names)

Smaug67396625d9c62f71
diff --git a/frontend/app/components/AppButton.vue b/frontend/app/components/AppButton.vue
index b1063e7a..b9440028 100644
--- a/frontend/app/components/AppButton.vue
+++ b/frontend/app/components/AppButton.vue
@@ -52,9 +52,9 @@ button {
}
.link {
+ font-weight: bold;
color: var(--primary);
background: none;
- font-weight: bold;
cursor: pointer;
&:hover {
diff --git a/frontend/app/components/AppCheck.vue b/frontend/app/components/AppCheck.vue
index d70933b5..6c33de8b 100644
--- a/frontend/app/components/AppCheck.vue
+++ b/frontend/app/components/AppCheck.vue
@@ -1,7 +1,7 @@
<template>
- <label class="app-checkbox">
+ <label class="checkbox">
<input type="checkbox" :checked="!!modelValue" @change="toggle" />
- <span class="checkmark">
+ <span class="mark">
<svg v-if="modelValue" viewBox="0 0 24 24">
<path d="M20 6L9 17l-5-5" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
</svg>
@@ -11,9 +11,7 @@
</template>
<script setup lang="ts">
-const props = defineProps<{
- modelValue?: boolean;
-}>();
+const props = defineProps<{ modelValue?: boolean }>();
const emit = defineEmits(['update:modelValue']);
function toggle() {
@@ -22,7 +20,7 @@ function toggle() {
</script>
<style scoped lang="scss">
-.app-checkbox {
+.checkbox {
display: inline-flex;
width: fit-content;
font-family: Inter, sans-serif;
@@ -32,16 +30,16 @@ function toggle() {
user-select: none;
input {
- display: none; // on masque le vrai input
+ display: none;
}
- .checkmark {
+ .mark {
display: flex;
width: 20px;
height: 20px;
- border: 2px solid var(--border-color, #ccc);
- border-radius: 6px;
- background: var(--bg-color, #fff);
+ border: 2px solid var(--border-color);
+ border-radius: $radius-sm;
+ background: var(--bg-color);
transition: all 0.2s ease;
align-items: center;
justify-content: center;
@@ -52,14 +50,14 @@ function toggle() {
}
}
- input:checked + .checkmark {
+ input:checked + .mark {
border-color: var(--primary);
background: var(--primary);
}
.label {
font-size: 1rem;
- color: var(--font-color, #333);
+ color: var(--font-color);
}
}
</style>
diff --git a/frontend/app/components/AppDrop.vue b/frontend/app/components/AppDrop.vue
index cb626bd4..33871341 100644
--- a/frontend/app/components/AppDrop.vue
+++ b/frontend/app/components/AppDrop.vue
@@ -1,7 +1,7 @@
<template>
<div
- class="dropzone"
- :class="{ 'drag-over': isDragOver, 'has-files': selectedFiles.length }"
+ class="drop"
+ :class="{ dragging: isDragOver, 'has-files': selectedFiles.length }"
@dragover.prevent
@drop.prevent="handleFileDrop"
@dragenter.prevent="dragEnter"
@@ -10,31 +10,31 @@
>
<input ref="fileInput" type="file" :multiple="multiple" @change="handleFileSelect" />
- <div v-if="selectedFiles.length" class="files-container">
- <div class="files-list">
- <div v-for="(file, index) in selectedFiles" :key="index" class="file-item">
- <div class="file-icon">
+ <div v-if="selectedFiles.length" class="files">
+ <div class="list">
+ <div v-for="(file, index) in selectedFiles" :key="index" class="item">
+ <div class="icon">
<Icon :name="getFileIcon(file.type)" size="20px" />
</div>
- <div class="file-details">
- <span class="file-name">{{ file.name }}</span>
- <span class="file-meta">{{ readableFileSize(file.size) }} • {{ getFileType(file.type) }}</span>
+ <div class="details">
+ <span class="name">{{ file.name }}</span>
+ <span class="meta">{{ readableFileSize(file.size) }} • {{ getFileType(file.type) }}</span>
</div>
- <button class="remove-btn" title="Remove file" @click.stop="removeFile(index)">
+ <button class="remove" title="Remove file" @click.stop="removeFile(index)">
<Icon name="close" size="16px" />
</button>
</div>
</div>
- <div class="files-footer">
- <span class="total-info">{{ selectedFiles.length }} file{{ selectedFiles.length > 1 ? 's' : '' }} • {{ readableFileSize(totalSize) }}</span>
- <span class="clickable" @click="triggerFileSelect">+ Add more</span>
- </div>
+ <footer>
+ <span class="total">{{ selectedFiles.length }} file{{ selectedFiles.length > 1 ? 's' : '' }} • {{ readableFileSize(totalSize) }}</span>
+ <span class="link" @click="triggerFileSelect">+ Add more</span>
+ </footer>
</div>
- <div v-else class="empty-state">
+ <div v-else class="empty">
<Icon name="layers" size="40px" />
- <p v-if="multiple">Drop files here or <span class="clickable" @click="triggerFileSelect">click to select</span></p>
- <p v-else>Drop file here or <span class="clickable" @click="triggerFileSelect">click to select</span></p>
+ <p v-if="multiple">Drop files here or <span class="link" @click="triggerFileSelect">click to select</span></p>
+ <p v-else>Drop file here or <span class="link" @click="triggerFileSelect">click to select</span></p>
<span v-if="multiple" class="hint">Maximum {{ maxFiles }} files</span>
</div>
</div>
@@ -164,23 +164,23 @@ defineExpose({ reset });
</script>
<style scoped lang="scss">
-.dropzone {
+.drop {
position: relative;
display: flex;
width: 100%;
min-height: 150px;
border: 2px dashed var(--border-color);
- border-radius: 8px;
+ border-radius: $radius-md;
font-size: 14px;
color: var(--font-color-light);
- background-color: var(--dropzone-bg, transparent);
+ background-color: transparent;
transition: all 0.2s ease;
align-items: center;
flex-direction: column;
justify-content: center;
&:hover {
- border-color: var(--border-color-hover, var(--border-color));
+ border-color: var(--border-color-accent);
background-color: var(--bg-contrast);
}
@@ -189,17 +189,17 @@ defineExpose({ reset });
align-items: stretch;
}
+ &.dragging {
+ border-color: var(--primary);
+ background-color: var(--bg-contrast);
+ }
+
input[type='file'] {
display: none;
}
}
-.drag-over {
- border-color: var(--primary);
- background-color: var(--bg-contrast);
-}
-
-.empty-state {
+.empty {
display: flex;
align-items: center;
flex-direction: column;
@@ -211,18 +211,18 @@ defineExpose({ reset });
.hint {
font-size: 12px;
- color: var(--font-color-lighter, var(--font-color-light));
+ color: var(--font-color-light);
}
}
-.files-container {
+.files {
display: flex;
width: 100%;
flex-direction: column;
gap: 8px;
}
-.files-list {
+.list {
display: flex;
max-height: 200px;
flex-direction: column;
@@ -230,31 +230,31 @@ defineExpose({ reset });
overflow-y: auto;
}
-.file-item {
+.item {
display: flex;
padding: 10px 12px;
border: 1px solid var(--border-color);
- border-radius: 6px;
- background: var(--bg-color-secondary);
+ border-radius: $radius-sm;
+ background: var(--bg-color);
transition: all 0.15s ease;
align-items: center;
gap: 12px;
&:hover {
- border-color: var(--border-color-hover, var(--border-color));
+ border-color: var(--border-color-accent);
background: var(--bg-contrast);
- .remove-btn {
+ .remove {
opacity: 1;
}
}
}
-.file-icon {
+.icon {
display: flex;
width: 36px;
height: 36px;
- border-radius: 6px;
+ border-radius: $radius-sm;
color: var(--primary);
background: var(--bg-ui);
align-items: center;
@@ -262,7 +262,7 @@ defineExpose({ reset });
justify-content: center;
}
-.file-details {
+.details {
display: flex;
min-width: 0;
flex: 1;
@@ -270,7 +270,7 @@ defineExpose({ reset });
gap: 2px;
}
-.file-name {
+.name {
font-size: 14px;
font-weight: 500;
color: var(--font-color-dark);
@@ -279,12 +279,12 @@ defineExpose({ reset });
white-space: nowrap;
}
-.file-meta {
+.meta {
font-size: 12px;
color: var(--font-color-light);
}
-.remove-btn {
+.remove {
display: flex;
width: 28px;
height: 28px;
@@ -301,13 +301,13 @@ defineExpose({ reset });
justify-content: center;
&:hover {
- color: var(--danger, #e74c3c);
+ color: var(--red);
background: var(--bg-ui);
opacity: 1;
}
}
-.files-footer {
+footer {
display: flex;
align-items: center;
border-top: 1px solid var(--border-color);
@@ -315,13 +315,13 @@ defineExpose({ reset });
padding-top: 8px;
}
-.total-info {
+.total {
font-size: 13px;
font-weight: 500;
color: var(--font-color-dark);
}
-.clickable {
+.link {
font-size: 13px;
color: var(--primary);
cursor: pointer;
diff --git a/frontend/app/components/AppHint.vue b/frontend/app/components/AppHint.vue
index 9ea31f80..848d9126 100644
--- a/frontend/app/components/AppHint.vue
+++ b/frontend/app/components/AppHint.vue
@@ -1,9 +1,7 @@
<template>
- <div class="chint-wrapper" @mouseenter="show = true" @mouseleave="show = false">
- <div class="chint-icon">i</div>
- <div v-if="show" class="chint-tooltip">
- {{ text }}
- </div>
+ <div class="hint-wrapper" @mouseenter="show = true" @mouseleave="show = false">
+ <div class="icon">i</div>
+ <div v-if="show" class="hint-tooltip">{{ text }}</div>
</div>
</template>
@@ -13,13 +11,7 @@ const show = ref(false);
</script>
<style scoped lang="scss">
-.chint-wrapper {
- position: relative;
- display: inline-block;
- margin-left: 0.25rem;
-}
-
-.chint-icon {
+.icon {
display: flex;
width: 1rem;
height: 1rem;
@@ -31,20 +23,4 @@ const show = ref(false);
align-items: center;
justify-content: center;
}
-
-.chint-tooltip {
- position: absolute;
- top: 100%;
- left: 50%;
- z-index: 100;
- padding: 0.4rem 0.6rem;
- border-radius: 0.4rem;
- font-size: 0.75rem;
- color: white;
- background-color: #1f2937;
- box-shadow: 0 2px 8px var(--shadow);
- margin-top: 0.4rem;
- transform: translateX(-50%);
- white-space: nowrap;
-}
</style>
diff --git a/frontend/app/components/AppSelect.vue b/frontend/app/components/AppSelect.vue
index 72d519d1..9f19d58a 100644
--- a/frontend/app/components/AppSelect.vue
+++ b/frontend/app/components/AppSelect.vue
@@ -1,5 +1,5 @@
<template>
- <div ref="trigger" class="app-select" :style="{ width: size || '100%' }">
+ <div ref="trigger" class="select" :style="{ width: size || '100%' }">
<!-- Desktop: inline search input -->
<input
v-if="open && searchable && !isMobile"
@@ -7,12 +7,12 @@
v-model="search"
type="text"
placeholder="Search..."
- class="search-input"
+ class="search"
@keydown="handleKeyDown"
@click.stop
/>
<div v-else class="trigger" @click.stop="toggleDropdown">
- <button class="trigger-button">{{ selected?.label || placeholder }}</button>
+ <button class="value">{{ selected?.label || placeholder }}</button>
<svg :class="{ rotated: !open }" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="var(--font-color)">
<path d="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" />
</svg>
@@ -21,7 +21,7 @@
<!-- Desktop dropdown -->
<Teleport to="body">
<ul v-if="open && !isMobile" ref="portalList" class="dropdown" :style="dropdownStyle">
- <li v-if="nullable && selected" class="clear-option" @click="clearSelection">
+ <li v-if="nullable && selected" class="clear" @click="clearSelection">
<Icon name="close" display="sm" fill="var(--font-color-light)" />
<span>Clear selection</span>
</li>
@@ -32,23 +32,23 @@
<!-- Mobile: Bottom Sheet Modal -->
<Teleport to="body">
- <Transition name="mobile-sheet">
- <div v-if="open && isMobile" class="mobile-overlay" @click.self="toggleDropdown">
- <div class="mobile-sheet">
- <div class="mobile-sheet-header">
- <span class="mobile-sheet-title">{{ placeholder }}</span>
- <button class="mobile-sheet-close" @click="toggleDropdown">
+ <Transition name="sheet">
+ <div v-if="open && isMobile" class="overlay" @click.self="toggleDropdown">
+ <div class="sheet">
+ <header>
+ <span class="sheet-title">{{ placeholder }}</span>
+ <button class="close-btn" @click="toggleDropdown">
<Icon name="close" display="md" fill="var(--font-color)" />
</button>
- </div>
+ </header>
- <div v-if="searchable" class="mobile-search-wrapper">
+ <div v-if="searchable" class="sheet-search">
<Icon name="search" display="md" fill="var(--font-color-light)" />
- <input ref="mobileSearchInput" v-model="search" type="text" placeholder="Search..." class="mobile-search-input" @keydown="handleKeyDown" />
+ <input ref="mobileSearchInput" v-model="search" type="text" placeholder="Search..." @keydown="handleKeyDown" />
</div>
- <ul class="mobile-list">
- <li v-if="nullable && selected" class="clear-option" @click="clearSelection">
+ <ul class="sheet-list">
+ <li v-if="nullable && selected" class="clear" @click="clearSelection">
<Icon name="close" display="sm" fill="var(--font-color-light)" />
<span>Clear selection</span>
</li>
@@ -61,7 +61,7 @@
:selected-id="selectedId"
@select="handleSelect"
/>
- <li v-if="filteredItems.length === 0" class="mobile-no-results">No results found</li>
+ <li v-if="filteredItems.length === 0" class="empty">No results found</li>
<slot name="list-footer"></slot>
</ul>
</div>
@@ -230,12 +230,12 @@ onBeforeUnmount(() => {
</script>
<style scoped lang="scss">
-.app-select {
+.select {
position: relative;
width: 100%;
margin: 0;
border: 1px solid var(--border-color);
- border-radius: 6px;
+ border-radius: $radius-sm;
background: var(--bg-color);
&:focus {
@@ -249,45 +249,44 @@ onBeforeUnmount(() => {
align-items: center;
justify-content: space-between;
}
-.trigger-button {
+
+.value {
height: 30px;
}
button,
-.search-input {
+.search {
width: 100%;
height: 34px;
padding: 6px 10px;
- border-radius: 6px;
+ border-radius: $radius-sm;
font-size: 0.95rem;
text-align: left;
cursor: pointer;
}
-.search-input {
+.search {
padding: 7px 10px;
border: none;
cursor: text;
}
-/* Teleported element : attention au scoped styles + teleport.
- :deep permet d'appliquer les règles même si l'élément est rendu hors-DOM parent */
.dropdown {
max-height: 300px;
margin: 0;
padding: 2px;
border: 1px solid var(--border-color);
- border-radius: 6px;
+ border-radius: $radius-sm;
background: var(--bg-color);
box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
list-style: none;
overflow-y: auto;
}
-/* ========================
- Mobile Bottom Sheet Styles
- ======================== */
-.mobile-overlay {
+// ===========================
+// Mobile Bottom Sheet
+// ===========================
+.overlay {
position: fixed;
z-index: 1000;
display: flex;
@@ -297,7 +296,7 @@ button,
justify-content: center;
}
-.mobile-sheet {
+.sheet {
display: flex;
width: 100%;
max-height: 85vh;
@@ -305,6 +304,15 @@ button,
background: var(--bg-color);
animation: slide-up 0.3s ease-out;
flex-direction: column;
+
+ header {
+ display: flex;
+ padding: 16px;
+ align-items: center;
+ border-bottom: 1px solid var(--border-color);
+ flex-shrink: 0;
+ justify-content: space-between;
+ }
}
@keyframes slide-up {
@@ -317,21 +325,12 @@ button,
}
}
-.mobile-sheet-header {
- display: flex;
- padding: 16px;
- align-items: center;
- border-bottom: 1px solid var(--border-color);
- flex-shrink: 0;
- justify-content: space-between;
-}
-
-.mobile-sheet-title {
+.sheet-title {
font-size: 1.1rem;
font-weight: 600;
}
-.mobile-sheet-close {
+.close-btn {
display: flex;
width: 36px;
height: 36px;
@@ -349,7 +348,7 @@ button,
}
}
-.mobile-search-wrapper {
+.sheet-search {
display: flex;
padding: 12px 16px;
background: var(--bg-contrast);
@@ -357,24 +356,24 @@ button,
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
gap: 8px;
-}
-.mobile-search-input {
- height: 40px;
- padding: 8px 12px;
- border: 1px solid var(--border-color);
- border-radius: 8px;
- font-size: 1rem;
- background: var(--bg-color);
- flex: 1;
+ input {
+ height: 40px;
+ padding: 8px 12px;
+ border: 1px solid var(--border-color);
+ border-radius: $radius-sm;
+ font-size: 1rem;
+ background: var(--bg-color);
+ flex: 1;
- &:focus {
- border-color: var(--primary);
- outline: none;
+ &:focus {
+ border-color: var(--primary);
+ outline: none;
+ }
}
}
-.mobile-list {
+.sheet-list {
margin: 0;
padding: 8px;
flex: 1;
@@ -382,9 +381,9 @@ button,
-webkit-overflow-scrolling: touch;
overflow-y: auto;
- :deep(.app-select-node) {
+ :deep(.tree-node) {
padding: 14px 16px;
- border-radius: 8px;
+ border-radius: $radius-sm;
font-size: 1rem;
transition: background 0.15s;
@@ -393,21 +392,20 @@ button,
}
}
- :deep(.app-select-node.selected) {
+ :deep(.tree-node.selected) {
font-weight: 500;
color: var(--primary);
background: var(--selection-color);
}
}
-.mobile-no-results {
+.empty {
padding: 24px 16px;
color: var(--font-color-light);
text-align: center;
}
-/* Clear selection option */
-.clear-option {
+.clear {
display: flex;
margin: 2px 0 6px;
padding: 6px 12px;
@@ -434,24 +432,22 @@ button,
}
}
-/* Transitions */
-.mobile-sheet-enter-active,
-.mobile-sheet-leave-active {
+// Transitions
+.sheet-enter-active,
+.sheet-leave-active {
transition: opacity 0.3s ease;
-}
-.mobile-sheet-enter-active .mobile-sheet,
-.mobile-sheet-leave-active .mobile-sheet {
- transition: transform 0.3s ease;
+ .sheet {
+ transition: transform 0.3s ease;
+ }
}
-.mobile-sheet-enter-from,
-.mobile-sheet-leave-to {
+.sheet-enter-from,
+.sheet-leave-to {
opacity: 0;
-}
-.mobile-sheet-enter-from .mobile-sheet,
-.mobile-sheet-leave-to .mobile-sheet {
- transform: translateY(100%);
+ .sheet {
+ transform: translateY(100%);
+ }
}
</style>
diff --git a/frontend/app/components/AppTagInput.vue b/frontend/app/components/AppTagInput.vue
index 39ec3ec4..5203dd9a 100644
--- a/frontend/app/components/AppTagInput.vue
+++ b/frontend/app/components/AppTagInput.vue
@@ -1,9 +1,8 @@
<template>
- <div class="tag-input">
- <div v-for="(tag, index) in tagsArray" :key="index">
- <tag class="primary tag">{{ tag }}<button type="button" class="remove" @click="removeTag(index)">×</button></tag>
- </div>
-
+ <div class="tags">
+ <tag v-for="(tag, index) in tagsArray" :key="index" class="primary">
+ {{ tag }}<button type="button" class="remove" @click="removeTag(index)">×</button>
+ </tag>
<input v-model="input" placeholder="Add a tag (enter to add)" @keydown.enter.prevent="addTag" @keydown.delete="removeLastTag" />
</div>
</template>
@@ -46,14 +45,15 @@ function removeLastTag() {
</script>
<style scoped lang="scss">
-.tag-input {
+.tags {
display: flex;
width: 100%;
padding: 0 7px;
align-items: center;
flex-wrap: wrap;
}
-.tag {
+
+tag {
padding: 5px 6px;
}
@@ -75,7 +75,7 @@ input {
min-width: 100px;
padding: 4px 8px;
border: none;
- border-radius: 6px;
+ border-radius: $radius-sm;
font-size: 0.85rem;
color: var(--font-color);
background: transparent;
diff --git a/frontend/app/components/AppToggle.vue b/frontend/app/components/AppToggle.vue
index 5fe96baf..ccbf1b6b 100644
--- a/frontend/app/components/AppToggle.vue
+++ b/frontend/app/components/AppToggle.vue
@@ -1,14 +1,11 @@
<template>
<button class="toggle" :class="{ active: modelValue || active }" :aria-pressed="modelValue" role="switch" @click="toggle">
- <span class="circle" />
+ <span class="knob" />
</button>
</template>
<script setup lang="ts">
-const props = defineProps<{
- modelValue?: boolean;
- active?: boolean;
-}>();
+const props = defineProps<{ modelValue?: boolean; active?: boolean }>();
const active = ref(props.active || props.modelValue || false);
const emit = defineEmits<{
@@ -28,21 +25,21 @@ const toggle = () => {
display: flex;
height: 24px;
padding: 2px;
- border: 1px solid var(--border-color, #ccc);
+ border: 1px solid var(--border-color);
border-radius: 15px;
background: var(--bg-contrast-2);
- transition: background-color 0.3s ease, border-color 0.3s ease;
+ transition: background-color 0.3s, border-color 0.3s;
align-items: center;
cursor: pointer;
- flex: 0 0 44px; // Avoiding shrinking
+ flex: 0 0 44px;
- .circle {
+ .knob {
width: 20px;
height: 20px;
border: 1px solid transparent;
border-radius: 50%;
background: var(--bg-color);
- transition: transform 0.25s ease, background-color 0.25s, border-color 0.25s;
+ transition: transform 0.25s, background-color 0.25s, border-color 0.25s;
transform: translateX(0);
}
@@ -50,7 +47,7 @@ const toggle = () => {
border-color: var(--primary);
background: var(--primary);
- .circle {
+ .knob {
border-color: var(--primary);
background: #fff;
transform: translateX(20px);
diff --git a/frontend/app/components/BreadCrumb.vue b/frontend/app/components/BreadCrumb.vue
index fdcb1f7a..7e9c7b88 100644
--- a/frontend/app/components/BreadCrumb.vue
+++ b/frontend/app/components/BreadCrumb.vue
@@ -1,5 +1,5 @@
<template>
- <nav class="breadcrumb no-mobile" aria-label="Breadcrumb">
+ <nav class="no-mobile" aria-label="Breadcrumb">
<svg
v-if="preferences.get('navbarItems').value.navigation"
:class="{ disabled: !canGoBack, 'no-tablet': true }"
@@ -20,8 +20,8 @@
<path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" />
</svg>
- <ol class="breadcrumb-list">
- <li v-for="(segment, index) in breadcrumbs" :key="index" class="breadcrumb-item">
+ <ol class="list">
+ <li v-for="(segment, index) in breadcrumbs" :key="index" class="item">
<NuxtLink :to="segment.path"> {{ segment.name }} </NuxtLink>
</li>
</ol>
@@ -70,7 +70,7 @@ watchEffect(() => {
</script>
<style lang="scss" scoped>
-.breadcrumb {
+nav {
display: flex;
padding: 3px;
align-items: center;
@@ -98,7 +98,7 @@ watchEffect(() => {
}
}
-.breadcrumb-list {
+.list {
display: flex;
margin: 0;
padding: 0;
@@ -106,7 +106,7 @@ watchEffect(() => {
list-style: none;
}
-.breadcrumb-item {
+.item {
display: inline-flex;
align-items: center;
diff --git a/frontend/app/components/DataTable.vue b/frontend/app/components/DataTable.vue
index 6e7b0ed5..a2fc7156 100644
--- a/frontend/app/components/DataTable.vue
+++ b/frontend/app/components/DataTable.vue
@@ -1,12 +1,12 @@
<template>
- <div class="container">
- <div class="header">
+ <div class="table">
+ <header>
<input v-model="searchInput" type="text" placeholder="Search..." />
<!-- Actions groupées (slot) -->
<slot v-if="selectedRows.length > 0" name="bulk-actions" :selected="selectedRows"> </slot>
- </div>
+ </header>
- <div class="table-wrapper">
+ <div class="wrapper">
<table>
<thead>
<tr>
@@ -38,7 +38,7 @@
<!-- Footer -->
<tr>
<td colspan="100%">
- <div class="footer">
+ <footer>
<p>
Showing {{ paginator.startIndex.value }} to {{ paginator.endIndex.value }} of {{ paginator.totalItems.value }} entries |
<span>
@@ -70,7 +70,7 @@
</button>
<button type="button" :disabled="!paginator.hasNext()" @click="paginator.next()">&gt;</button>
</div>
- </div>
+ </footer>
</td>
</tr>
</tbody>
@@ -139,19 +139,19 @@ export interface Field<V = unknown> {
</script>
<style lang="scss" scoped>
-.container {
+.table {
width: 100%;
border: 1.5px solid var(--border-color);
- border-radius: 8px;
+ border-radius: $radius-md;
}
-.header {
+header {
display: flex;
padding: 0 10px;
align-items: center;
}
-.table-wrapper {
+.wrapper {
width: 100%;
border-top: 1px solid var(--border-color);
overflow-x: auto;
@@ -176,25 +176,21 @@ td {
th {
font-size: 13px;
+ color: var(--font-color-dark);
background: var(--bg-ui);
text-transform: uppercase;
}
-td > span {
- display: flex;
- align-items: center;
-}
-
-th {
- color: var(--font-color-dark);
-}
-
td {
color: var(--font-color-light);
- &:has(.footer) {
- border-bottom-left-radius: 8px;
- border-bottom-right-radius: 8px;
+ > span {
+ display: flex;
+ align-items: center;
+ }
+
+ &:has(footer) {
+ border-radius: 0 0 $radius-md $radius-md;
}
}
@@ -202,11 +198,6 @@ td {
display: flex;
align-items: center;
justify-content: center;
-
- .active {
- color: white;
- background-color: var(--primary);
- }
}
button {
@@ -231,7 +222,7 @@ button {
}
}
-.footer {
+footer {
display: flex;
width: 100%;
justify-content: space-between;
@@ -239,16 +230,8 @@ button {
select {
max-width: 100px;
- margin: 0;
+ margin: 0 0 0 10px;
padding: 4px 8px;
- margin-left: 10px;
-}
-
-svg {
- position: absolute;
- top: 13px;
- left: 13px;
- fill: var(--grey);
}
input {
@@ -264,16 +247,6 @@ input {
color: var(--font-color-dark);
}
-@media screen and (width >= 1000px) {
- .container {
- zoom: 1;
- }
-
- table {
- zoom: 1;
- }
-}
-
@media screen and (width <= 768px) {
table {
table-layout: fixed;
diff --git a/frontend/app/components/DocumentLine.vue b/frontend/app/components/DocumentLine.vue
index 3762581c..45b64242 100644
--- a/frontend/app/components/DocumentLine.vue
+++ b/frontend/app/components/DocumentLine.vue
@@ -1,20 +1,20 @@
<template>
- <div class="document-line" @contextmenu.prevent="showContextMenu">
- <header style="display: flex; justify-content: space-between">
- <div style="display: flex; align-items: center; justify-content: flex-start">
+ <div class="line" @contextmenu.prevent="showContextMenu">
+ <header>
+ <div class="title-row">
<Icon
:name="document.icon || category?.icon || 'files'"
display="xl"
- :class="`category-icon ${getAppColor(document.color || category?.color as number, true)}`"
+ :class="['icon', getAppColor(document.color || category?.color as number, true)]"
/>
- <NuxtLink :to="`/dashboard/docs/${document.id}`" class="document-title">{{ document.name }}</NuxtLink>
+ <NuxtLink :to="`/dashboard/docs/${document.id}`" class="name">{{ document.name }}</NuxtLink>
</div>
<NodeDotMenu :node="document" :user="user" @delete="deleteDoc" />
</header>
<div v-if="document.tags" class="tags">
<tag v-for="tag in document.tags?.split(', ')" :key="tag" class="primary">{{ tag }}</tag>
</div>
- <p class="description">{{ document.description }}</p>
+ <p class="desc">{{ document.description }}</p>
<footer>
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="var(--font-color)">
<path
@@ -53,7 +53,7 @@ function showContextMenu(event: MouseEvent) {
</script>
<style scoped lang="scss">
-.document-line {
+.line {
display: flex;
padding: 14px 16px;
border: 1px solid var(--border-color);
@@ -63,16 +63,16 @@ function showContextMenu(event: MouseEvent) {
flex-direction: column;
&:first-child {
- border-radius: 10px 10px 0 0;
+ border-radius: $radius-md $radius-md 0 0;
}
&:last-child {
- border-radius: 0 0 10px 10px;
+ border-radius: 0 0 $radius-md $radius-md;
border-bottom: 1px solid var(--border-color);
}
&:only-child {
- border-radius: 10px;
+ border-radius: $radius-md;
border-bottom: 1px solid var(--border-color);
}
@@ -82,16 +82,24 @@ function showContextMenu(event: MouseEvent) {
}
header {
+ display: flex;
border: none;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.title-row {
+ display: flex;
+ align-items: center;
}
-.category-icon {
+.icon {
padding: 6px;
- border-radius: 8px;
+ border-radius: $radius-sm;
margin-right: 8px;
}
-.document-title {
+.name {
font-size: 16px;
font-weight: 600;
color: var(--font-color-dark);
@@ -103,7 +111,7 @@ header {
}
}
-.description {
+.desc {
margin: 0;
padding: 6px 0;
font-size: 14px;
diff --git a/frontend/app/components/Loader.vue b/frontend/app/components/Loader.vue
index 9da234f3..75218724 100644
--- a/frontend/app/components/Loader.vue
+++ b/frontend/app/components/Loader.vue
@@ -4,8 +4,8 @@
<style scoped>
.loader {
- margin: 4px auto;
width: 25px;
+ margin: 4px auto;
background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
background-size: 20% 100%;
animation: l1 1s infinite linear;
diff --git a/frontend/app/components/Navbar.vue b/frontend/app/components/Navbar.vue
index 52faa428..0fd99fdc 100644
--- a/frontend/app/components/Navbar.vue
+++ b/frontend/app/components/Navbar.vue
@@ -64,7 +64,7 @@ button {
width: 200px;
padding: 8px 12px;
border: none;
- border-radius: 8px;
+ border-radius: $radius-sm;
background: var(--border-color);
transition: all 0.2s ease;
align-items: center;
diff --git a/frontend/app/components/Node/DeleteNodeModal.vue b/frontend/app/components/Node/DeleteNodeModal.vue
index 248a14ed..b50972e6 100644
--- a/frontend/app/components/Node/DeleteNodeModal.vue
+++ b/frontend/app/components/Node/DeleteNodeModal.vue
@@ -47,6 +47,7 @@ const deleteDoc = () => {
.description {
opacity: 0.7;
}
+
.warn {
color: var(--red-dark);
opacity: 0.7;
diff --git a/frontend/app/components/Node/NodeContextMenu.vue b/frontend/app/components/Node/NodeContextMenu.vue
index d62511b0..996f334d 100644
--- a/frontend/app/components/Node/NodeContextMenu.vue
+++ b/frontend/app/components/Node/NodeContextMenu.vue
@@ -1,7 +1,7 @@
<template>
<div class="context-menu" :class="{ 'is-context-menu': props.contextMenu }">
<div class="menu-header">
- <img :src="avatarURL(user)" alt="" class="header-avatar" />
+ <img :src="avatarURL(user)" alt="" class="avatar" />
<div class="header-info">
<span class="header-name">{{ node.name }}</span>
<span class="header-meta">{{ user?.username }} · {{ shortDate(node.updated_timestamp) }}</span>
@@ -99,13 +99,13 @@ async function action(name: string) {
border-bottom: 1px solid var(--border-color);
gap: 10px;
margin-bottom: 6px;
-}
-.header-avatar {
- width: 32px;
- height: 32px;
- border-radius: 8px;
- object-fit: cover;
+ .avatar {
+ width: 32px;
+ height: 32px;
+ border-radius: $radius-sm;
+ object-fit: cover;
+ }
}
.header-info {
@@ -132,7 +132,7 @@ async function action(name: string) {
.menu-group {
padding: 2px 0;
- & + .menu-group {
+ & + & {
border-top: 1px solid var(--border-color);
margin-top: 2px;
padding-top: 4px;
@@ -144,7 +144,7 @@ async function action(name: string) {
width: 100%;
padding: 4px 10px;
border: none;
- border-radius: 8px;
+ border-radius: $radius-sm;
font: inherit;
font-size: 13px;
color: var(--font-color);
diff --git a/frontend/app/components/Sidebar/Sidebar.vue b/frontend/app/components/Sidebar/Sidebar.vue
index 28832033..fc478c21 100644
--- a/frontend/app/components/Sidebar/Sidebar.vue
+++ b/frontend/app/components/Sidebar/Sidebar.vue
@@ -197,12 +197,13 @@ input {
font-size: 0.85rem;
justify-content: space-between;
margin-left: 5px;
+ }
- .email {
- font-size: 0.7rem;
- color: var(--font-color-light);
- }
+ .email {
+ font-size: 0.7rem;
+ color: var(--font-color-light);
}
+
.avatar {
width: 25px;
height: 25px;
diff --git a/frontend/app/components/Sidebar/SidebarItem.vue b/frontend/app/components/Sidebar/SidebarItem.vue
index 27abfcfc..04b0e70f 100644
--- a/frontend/app/components/Sidebar/SidebarItem.vue
+++ b/frontend/app/components/Sidebar/SidebarItem.vue
@@ -2,7 +2,7 @@
<span
class="item"
:draggable="true"
- :class="{ 'drag-over': isDragOver }"
+ :class="{ dragging: isDragOver }"
@click="onClick"
@dragstart="dragStart"
@dragover.prevent="dragOver"
@@ -12,8 +12,8 @@
>
<Icon :fill="item.data.role == 3 ? 'var(--pink) !important' : undefined" :name="icon" :class="customClass" />&nbsp;
- <NuxtLink v-if="item.onClick" style="flex: 1" class="close" @click="item.onClick">{{ item.label }}</NuxtLink>
- <NuxtLink v-else :to="item.route" style="flex: 1" class="close">{{ item.label }}</NuxtLink>
+ <NuxtLink v-if="item.onClick" class="close content" @click="item.onClick">{{ item.label }}</NuxtLink>
+ <NuxtLink v-else :to="item.route" class="close content">{{ item.label }}</NuxtLink>
<Icon v-if="item.data.shared && level === 0" name="shared" fill="var(--font-color-light)" />
@@ -106,7 +106,7 @@ const drop = async (event: DragEvent) => {
width: 100%;
margin: 2.5px 0;
padding: 1px 4px;
- border-radius: 6px;
+ border-radius: $radius-sm;
font-size: 15px;
font-weight: 450;
align-items: center;
@@ -122,22 +122,24 @@ const drop = async (event: DragEvent) => {
background: var(--default-bg);
}
- .default-icon {
+ .default-icon,
+ .item-icon {
width: 20px;
height: 20px;
color: var(--primary) !important;
}
.item-icon {
- width: 20px;
- height: 20px;
padding: 2px;
border-radius: 4px;
- color: var(--primary) !important;
}
}
-.drag-over {
+.content {
+ flex: 1;
+}
+
+.dragging {
box-shadow: 0 2px 10px var(--shadow);
border-bottom: 2px solid var(--primary);
}
diff --git a/frontend/app/components/Sidebar/SidebarWorkspaces.vue b/frontend/app/components/Sidebar/SidebarWorkspaces.vue
index aaecb48d..a1a99c66 100644
--- a/frontend/app/components/Sidebar/SidebarWorkspaces.vue
+++ b/frontend/app/components/Sidebar/SidebarWorkspaces.vue
@@ -91,14 +91,15 @@ const create_workspace = (_: MouseEvent) => useModal().add(new Modal(shallowRef(
transition: transform 0.2s ease;
}
}
+
.selected {
flex: 1;
}
.placeholder {
- color: var(--font-color-light);
padding: 6px;
font-size: 0.9rem;
+ color: var(--font-color-light);
font-style: italic;
}
diff --git a/frontend/app/components/ViewSelection.vue b/frontend/app/components/ViewSelection.vue
index bbc7d0af..d8135035 100644
--- a/frontend/app/components/ViewSelection.vue
+++ b/frontend/app/components/ViewSelection.vue
@@ -48,7 +48,7 @@ onMounted(() => {
.view-selection {
display: flex;
padding: 3px;
- border-radius: 8px;
+ border-radius: $radius-sm;
background: var(--bg-contrast);
align-items: center;
gap: 2px;
diff --git a/frontend/app/pages/(public)/_components/FinalCTA.vue b/frontend/app/pages/(public)/_components/FinalCTA.vue
index 5ae5177a..489004a3 100644
--- a/frontend/app/pages/(public)/_components/FinalCTA.vue
+++ b/frontend/app/pages/(public)/_components/FinalCTA.vue
@@ -179,7 +179,6 @@
display: block;
background: linear-gradient(90deg, #fff, #e0e7ff, #fff);
background-clip: text;
- background-clip: text;
-webkit-text-fill-color: transparent;
}
}
diff --git a/frontend/app/pages/(public)/_components/OpenSourceStats.vue b/frontend/app/pages/(public)/_components/OpenSourceStats.vue
index 27d1f49a..1bd61acb 100644
--- a/frontend/app/pages/(public)/_components/OpenSourceStats.vue
+++ b/frontend/app/pages/(public)/_components/OpenSourceStats.vue
@@ -270,7 +270,6 @@ onMounted(() => {
font-weight: 800;
background: linear-gradient(135deg, var(--primary), #8b5cf6);
background-clip: text;
- background-clip: text;
-webkit-text-fill-color: transparent;
}
diff --git a/frontend/app/styles/components.scss b/frontend/app/styles/components.scss
index 326d98f9..654e0e2c 100644
--- a/frontend/app/styles/components.scss
+++ b/frontend/app/styles/components.scss
@@ -1,3 +1,59 @@
+@use "./_variables.scss" as *;
+
+// ===========================
+// LAYOUT UTILITIES
+// ===========================
+.center {
+ display: flex;
+ text-align: center;
+ align-items: center;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.flex {
+ display: flex;
+}
+
+.flex-col {
+ flex-direction: column;
+}
+
+.flex-wrap {
+ flex-wrap: wrap;
+}
+
+.items-center {
+ align-items: center;
+}
+
+.justify-between {
+ justify-content: space-between;
+}
+
+.justify-center {
+ justify-content: center;
+}
+
+.gap-xs {
+ gap: 4px;
+}
+
+.gap-sm {
+ gap: 8px;
+}
+
+.gap-md {
+ gap: 16px;
+}
+
+.gap-lg {
+ gap: 24px;
+}
+
+// ===========================
+// MODAL STYLES
+// ===========================
.modal {
height: 100%;
max-height: 715px;
@@ -9,45 +65,50 @@
padding: 6px 0 0;
align-items: center;
border-top: 1px solid var(--border-color);
+ gap: 8px;
justify-content: flex-end;
}
}
-.center {
- display: flex;
- text-align: center;
- align-items: center;
- flex-direction: column;
- justify-content: center;
-}
-
-.card-component {
+// ===========================
+// CARD COMPONENT
+// ===========================
+.card {
display: block;
margin: 12px 6px;
padding: 24px;
border: 1px solid var(--border-color);
- border-radius: 8px;
+ border-radius: $radius-md;
box-shadow: 0 2px 6px var(--shadow);
gap: 16px;
header {
- h1 {
- margin: 10px 0;
- padding: 6px 4px;
- font-size: 20px;
- }
-
display: flex;
align-items: center;
border-bottom: 1px solid var(--border-color);
justify-content: space-between;
margin-bottom: 10px;
+
+ h1 {
+ margin: 10px 0;
+ padding: 6px 4px;
+ font-size: 20px;
+ }
}
}
+// Legacy alias
+.card-component {
+ @extend .card;
+}
+
+// ===========================
+// BUTTONS
+// ===========================
.btn-icon {
padding: 4px;
- border-radius: 8px;
+ border-radius: $radius-sm;
+ transition: background 0.15s;
cursor: pointer;
&:hover {
@@ -55,33 +116,57 @@
}
}
-/* stylelint-disable */
+// ===========================
+// TAGS
+// ===========================
tag {
margin: 1px 2px 1px 0;
- padding: 2px 4px;
- border-radius: 6px;
+ padding: 2px 6px;
+ border-radius: $radius-sm;
font-size: 0.8em;
+
+ &.primary {
+ color: var(--primary);
+ background: var(--default-bg);
+ }
}
+// ===========================
+// FORM / FEEDBACK
+// ===========================
.error {
- margin: 8px 0 4px 0;
+ margin: 8px 0 4px;
+ font-size: 0.95rem;
color: var(--red);
text-align: center;
- font-size: 0.95rem;
}
-.ctitle {
+// ===========================
+// TYPOGRAPHY HELPERS
+// ===========================
+.title {
font-size: 1.7rem;
font-weight: bold;
}
-.csubtitle {
+.subtitle {
+ margin: 0 0 1rem;
+ font-size: 1rem;
color: var(--font-color-sub);
- font-size: medium !important;
- padding: 0;
- margin: 0 0 1rem 0 !important;
}
+// Legacy aliases
+.ctitle {
+ @extend .title;
+}
+
+.csubtitle {
+ @extend .subtitle;
+}
+
+// ===========================
+// TOOLTIPS / HINTS
+// ===========================
.hint-wrapper {
position: relative;
display: inline-block;
@@ -95,7 +180,7 @@ tag {
z-index: 100;
display: none;
padding: 0.4rem 0.6rem;
- border-radius: 0.4rem;
+ border-radius: $radius-sm;
font-size: 0.75rem;
color: white;
background-color: #1f2937;
@@ -104,4 +189,25 @@ tag {
text-transform: capitalize;
transform: translateX(-50%);
white-space: nowrap;
+}
+
+// ===========================
+// VISIBILITY HELPERS
+// ===========================
+.no-mobile {
+ @media (width <=768px) {
+ display: none !important;
+ }
+}
+
+.no-tablet {
+ @media (width <=1024px) {
+ display: none !important;
+ }
+}
+
+.mobile-only {
+ @media (width > 768px) {
+ display: none !important;
+ }
}
\ No newline at end of file
diff --git a/frontend/app/styles/main.scss b/frontend/app/styles/main.scss
index 140a065a..d4977c40 100644
--- a/frontend/app/styles/main.scss
+++ b/frontend/app/styles/main.scss
@@ -68,9 +68,6 @@ body.modal-open {
overflow: hidden;
touch-action: none;
user-select: none;
- user-select: none;
- user-select: none;
- user-select: none;
}
:root {