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.

update

Smaug6739467ff7e19d84
diff --git a/frontend/components/MarkdownEditor/LazyToolbar.vue b/frontend/components/MarkdownEditor/LazyToolbar.vue
index f6181af9..b9fc755a 100644
--- a/frontend/components/MarkdownEditor/LazyToolbar.vue
+++ b/frontend/components/MarkdownEditor/LazyToolbar.vue
@@ -1,5 +1,15 @@
<template>
- <div class="toolbar flex-container">
+ <div class="toolbar">
+ <button @click="previous" class="no-mobile">
+ <svg xmlns="http://www.w3.org/2000/svg" height="18" viewBox="0 -960 960 960" width="24">
+ <path d="M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z" />
+ </svg>
+ </button>
+ <button @click="next" class="no-mobile">
+ <svg xmlns="http://www.w3.org/2000/svg" height="18" viewBox="0 -960 960 960" width="24">
+ <path d="m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z" />
+ </svg>
+ </button>
<span v-for="item in toolbar" :key="item.name" v-html="item.icon" class="btn"
@click="emitAction(item.action)"></span>
<input placeholder="#tags" class="tags input" v-model="copy.tags" style="margin-right:5px;" />
@@ -29,11 +39,13 @@ import { useCategoriesStore, useDocumentsStore, type Document } from "~/store";
const categoriesStore = useCategoriesStore();
const documentsStore = useDocumentsStore();
-
+const router = useRouter();
+const next = () => router.go(1);
+const previous = () => router.go(-1);
const props = defineProps<{ document: Partial<Document> }>();
const copy = ref(props.document);
-const e = defineEmits(['execute-action']);
-const emitAction = (action: string) => e('execute-action', action, copy);
+const emit = defineEmits(['execute-action']);
+const emitAction = (action: string) => emit('execute-action', action, copy);
const toolbar = [
{
@@ -105,38 +117,37 @@ const toolbar = [
</script>
<style scoped lang="scss">
+button {
+ padding: 5px 0;
+ margin: 0;
+}
+
.toolbar {
margin-bottom: 10px;
user-select: none;
display: flex;
+ align-items: center;
+}
- .btn {
- margin-right: 5px;
- opacity: 0.8;
- cursor: pointer;
-
- &:deep(svg) {
- fill: var(--font-color);
- }
-
- &:hover {
- opacity: 1;
+.btn {
+ margin-right: 5px;
+ cursor: pointer;
+}
- &:deep(svg) {
- fill: $primary-400;
- }
- }
- }
+svg,
+.toolbar:deep(svg) {
+ fill: var(--font-color);
+}
- input {
- display: none;
- }
+svg:hover,
+.toolbar:deep(svg):hover {
+ fill: $primary-400;
+}
- input,
- select {
- display: inline-block;
- width: min-content;
- padding: 0;
- }
+input,
+select {
+ display: inline-block;
+ width: min-content;
+ padding: 0;
}
</style>
\ No newline at end of file
diff --git a/frontend/components/Navbar.vue b/frontend/components/Navbar.vue
index 0b43f7dd..7bb365ec 100644
--- a/frontend/components/Navbar.vue
+++ b/frontend/components/Navbar.vue
@@ -56,7 +56,7 @@ button {
</style>
<script lang="ts" setup>
const { toggleSidebar, isOpened } = useSidebar();
-const router = useRouter();
+//const router = useRouter();
//const next = () => router.go(1);
//const previous = () => router.go(-1);
</script>
\ No newline at end of file
diff --git a/frontend/components/sidebar/Sidebar.vue b/frontend/components/sidebar/Sidebar.vue
index 1166a721..51f89119 100644
--- a/frontend/components/sidebar/Sidebar.vue
+++ b/frontend/components/sidebar/Sidebar.vue
@@ -86,7 +86,6 @@ if (isMobile()) {
justify-content: space-between;
align-items: center;
height: 50px;
- margin: 0 0 15px 0;
.btn {
fill: var(--font-color);
diff --git a/frontend/styles/theme.scss b/frontend/styles/theme.scss
index 1363ecfc..a5b80880 100644
--- a/frontend/styles/theme.scss
+++ b/frontend/styles/theme.scss
@@ -43,6 +43,21 @@ button {
}
}
+code {
+ background-color: var(--bg-contrast-2);
+ border: 1px solid var(--border-color);
+ border-radius: 12px;
+ padding: 4px 8px;
+}
+
+/* Style pour les éléments <pre> contenant du code */
+pre code {
+ display: block;
+ padding: 10px;
+ overflow-x: auto;
+ white-space: pre-wrap;
+}
+
fieldset {
margin: auto;
margin-top: 3% !important;