π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Fixes & improvments
Smaug67395c474142675d
diff --git a/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/components/MarkdownEditor/LazyMarkdownEditor.vueindex 8f1db4c1..eae79957 100644--- a/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -1,12 +1,14 @@<template>- <div class="editor-container">+ <div class="editor-container" @keydown="editor.handleKeydown"><Toolbar style="height: fit-content;" :document="document" @execute-action="(a: string) => exec(a)" />- <input placeholder="Titre" class="title" v-model="document.name" />+ <input placeholder="Title" class="title" v-model="document.name" /><input placeholder="Description" class="description" v-model="document.description" /><div class="markdown"><InlineToolbar ref="toolbar" @execute-action="(a: string) => exec(a)" /><div contenteditable="true" ref="textarea" class="textarea content markdown-input" @scroll="syncScroll"- @input="update" @blur="update" @keydown="editor.handleKeydown" v-html="document.content_markdown"></div>+ @input="update" @blur="update" v-html="document.content_markdown || ''"+ placeholder="Write something or use the toolbar to create your document...">+ </div><div v-if="editor.showPreview.value" class="markdown-preview document-theme" ref="markdownPreview"v-html="document.content_html"></div></div>@@ -97,6 +99,18 @@ input,padding-left: 0;}+[placeholder]:empty::before {+ content: attr(placeholder);+ color: #757575;+ font-weight: 500;+ font-size: 18px;+ opacity: 1+}++[placeholder]:empty {+ content: "";+}+.textarea {white-space: break-spaces;}diff --git a/frontend/middleware/authentification.global.ts b/frontend/middleware/authentification.global.tsindex fda58267..5ee0928a 100644--- a/frontend/middleware/authentification.global.ts+++ b/frontend/middleware/authentification.global.ts@@ -7,5 +7,9 @@ export default defineNuxtRouteMiddleware((to, from) => {query: { redirect: to.fullPath },});}- //else if (to.fullPath.startsWith('/login') && user_auth?.value) return navigateTo({ path: '/dashboard' });+ if (to.fullPath.startsWith('/login') && user_auth) {+ return navigateTo({+ path: '/dashboard',+ });+ }});diff --git a/frontend/pages/dashboard/docs/new.vue b/frontend/pages/dashboard/docs/new.vueindex 82f4d293..019f45d1 100644--- a/frontend/pages/dashboard/docs/new.vue+++ b/frontend/pages/dashboard/docs/new.vue@@ -8,7 +8,7 @@ import MarkdownEditor from '~/components/MarkdownEditor/LazyMarkdownEditor.vue';const store = useDocumentsStore();const editor = ref();-const document = ref<Document | undefined>(undefined);+const document = ref<Document | undefined>();const notifications = useNotifications();definePageMeta({ breadcrumb: 'New' });diff --git a/frontend/pages/index.vue b/frontend/pages/index.vueindex e8fc3d58..89896e6f 100644--- a/frontend/pages/index.vue+++ b/frontend/pages/index.vue@@ -1,13 +1,13 @@<template><div class="container">- <nav>- <div class="container"></div>- <div class="actions">- <NuxtLink to="/login" class="login">Login</NuxtLink>- <NuxtLink to="/" class="sign-up">Sign up</NuxtLink>- </div>-- </nav>+ <nav>+ <div class="container"></div>+ <div class="actions">+ <NuxtLink to="/login" class="login">Login</NuxtLink>+ <NuxtLink to="/" class="sign-up">Sign up</NuxtLink>+ </div>++ </nav><main><div class="content-wrapper"><div class="intro">@@ -16,15 +16,12 @@<h3>Alexandrie is the connected workspace where <br /> better, faster work happens</h3></div><div class="btns-block">- <NuxtLink to="/dashboard" class="get-started">Get started</NuxtLink>- <NuxtLink to="https://github.com/Smaug6739/Alexandrie" target="_blank" class="github">Github</NuxtLink>+ <NuxtLink to="/dashboard" class="get-started">Get started</NuxtLink>+ <NuxtLink to="https://github.com/Smaug6739/Alexandrie" target="_blank" class="github">Github</NuxtLink></div></div><div class="images">-- <div class="img-container">- <img :src="`/main-${colorMode.value}.webp`" alt="Documents Image" />- </div>+ <img :src="`/main-${colorMode.value}.webp`" alt="Documents Image" /></div></div></main>@@ -44,36 +41,42 @@ const colorMode = useColorMode();flex-direction: column;justify-content: space-between;}+nav {- height: 65px;- width: 90%;- display: flex;- align-items: center;- justify-content: space-between;- font-weight: 500;+ height: 65px;+ width: 90%;+ display: flex;+ align-items: center;+ justify-content: space-between;+ font-weight: 500;}+.actions {- a {- padding: 4px 15px;- margin: 0 8px;- border-radius: 25px;- }+ a {+ padding: 4px 15px;+ margin: 0 8px;+ border-radius: 25px;+ }}+.sign-up {- background: var(--bg-color);- border: 1px solid var(--border-color);- &:hover {- outline: 2px solid var(--border-color);- outline-offset: 2px;- }+ background: var(--bg-color);+ border: 1px solid var(--border-color);++ &:hover {+ outline: 2px solid var(--border-color);+ outline-offset: 2px;+ }}+.login {- background: var(--font-color);- color: var(--bg-color);- &:hover {- outline: 2px solid var(--font-color);- outline-offset: 2px;- }+ background: var(--font-color);+ color: var(--bg-color);++ &:hover {+ outline: 2px solid var(--font-color);+ outline-offset: 2px;+ }}main {@@ -96,7 +99,7 @@ main {}.intro h1 {- font-size: 3.2rem;+ font-size: 3.1rem;font-weight: 700;}@@ -107,30 +110,34 @@ main {}.btns-block {- display: flex;- justify-content: center;+ display: flex;+ justify-content: center;margin: 2rem;+a {- margin: 0 0.5rem;+ margin: 0 0.5rem;padding: 0.5rem 1.4rem;border-radius: 0.45rem;font-weight: 500;font-size: 1.2rem;- &:hover {- transform: scale(1.03)- }++ &:hover {+ transform: scale(1.03)+ }+ }++ .get-started {+ background-color: var(--font-color);+ color: var(--bg-color);+ border: 1px solid var(--bg-color);+ }++ .github {+ background-color: var(--bg-color);+ color: var(--font-color);+ border: 1px solid var(--font-color);}- .get-started {- background-color: var(--font-color);- color: var(--bg-color);- border: 1px solid var(--bg-color);- }- .github {- background-color: var(--bg-color);- color: var(--font-color);- border: 1px solid var(--font-color);- }}.none {@@ -141,24 +148,23 @@ main {display: flex;align-items: center;justify-content: center;+ max-width: 100%;+ width: 800px;}-.img-container {- width: 1000px;-}-@media (min-width: 768px) {- .none {- display: block;- }++footer {+ padding: 1rem;}-@media (min-width: 1024px) {- .img-container {+@media (max-width: 768px) {+ .intro h1 {+ font-size: 2.5rem;}-}-footer {- padding: 1rem;+ .intro h3 {+ font-size: 1rem;+ }}</style>