π 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
Smaug673971fc7b9dd132
diff --git a/frontend/pages/dashboard/category/[id].vue b/frontend/pages/dashboard/category/[id].vueindex 38747d26..7f9ed12e 100644--- a/frontend/pages/dashboard/category/[id].vue+++ b/frontend/pages/dashboard/category/[id].vue@@ -74,7 +74,7 @@ h1 {border-radius: 10px;box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);overflow: hidden;- width: 420px;+ width: 400px;display: flex;flex-direction: column;justify-content: space-between;diff --git a/frontend/pages/login.vue b/frontend/pages/login.vueindex 7746c7b0..dc1490e2 100644--- a/frontend/pages/login.vue+++ b/frontend/pages/login.vue@@ -1,9 +1,10 @@<template><div class="container">- <form @submit.prevent="login" class="form-body">+ <form @submit.prevent="login" class="body">+ <p class="signup-link">Need an account? <a href="mailto:[email protected]">Sign up</a></p><div class="form-group"><label for="username">Username</label>- <input type="text" id="username" v-model="username" :class="{ 'is-invalid': errors.username }">+ <input type="username" id="username" v-model="username" :class="{ 'is-invalid': errors.username }"><p v-if="errors.username" class="invalid-feedback">{{ errors.username }}</p></div><div class="form-group">@@ -16,115 +17,98 @@</div><p v-if="errors.password" class="invalid-feedback">{{ errors.password }}</p></div>- <p class="signup-link">Need an account? <a>Sign up</a></p><button type="submit" class="btn">Login</button><p v-if="errors.general" class="invalid-feedback">{{ errors.general }}</p>+ <p class="forgot-password-link">Forgot your password? <a href="mailto:[email protected]">Click here</a></p></form></div></template>-<script setup lang="ts">-import { ref } from 'vue';-import { useRouter } from 'vue-router';--const username = ref('');-const password = ref('');+const router = useRouter()+const username = ref('')const errors = ref({username: '',password: '',general: ''-});-const showPassword = ref(false);--const router = useRouter();+})+const showPassword = ref(false)+const password = ref('')function login() {- errors.value.username = !username.value.trim() ? 'Username is required' : '';- errors.value.password = !password.value.trim() ? 'Password is required' : '';+ if (!username.value) errors.value.username = 'Username is required'+ else errors.value.username = '';++ if (!password.value) errors.value.password = 'Password is required'+ else errors.value.password = '';+if (username.value && password.value) {connect(username.value, password.value);}}-async function connect(username: string, password: string) {- try {- console.log("Fetching...");- console.log(`${import.meta.env.VITE_BASE_API}/api/v1/auth`)- const response = await fetch(`${import.meta.env.VITE_BASE_API}/api/v1/auth`, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- 'Accept': 'application/json'- },- body: JSON.stringify({ username, password }),- credentials: 'include'- });-- const result = await response.json();-- if (result.status === 'success' && result.result.auth) {- logIn();- router.push('/dashboard');- } else {- errors.value.general = result.message || 'Login failed';- }- } catch (error) {- errors.value.general = 'Failed to connect';- }-}-</script>+async function connect(username: string, password: string) {+ const content = JSON.stringify({+ username: username,+ password: password+ });+ const responce = await fetch(`${import.meta.env.VITE_BASE_API}/api/v1/auth`, {+ method: "POST",+ headers: {+ Accept: "application/json",+ "Content-Type": "application/json",+ },+ body: content,+ credentials: "include",+ });++ const result = await responce.json();+ if (result.status == "success" && result.result.auth) router.push("/dashboard");+ else errors.value.general = result.message;-<style scoped>+}+</script>+<style scoped lang="scss">.container {display: flex;flex-direction: column;- justify-content: center;align-items: center;- min-height: 100vh;- background-color: #f0f0f0;-}--.header {- font-size: 2rem;- margin-bottom: 1rem;- text-align: center;- text-transform: uppercase;- font-weight: bold;- letter-spacing: 0.1em;+ height: 100%;+ justify-content: center;}-.form-body {+.body {+ display: flex;+ flex-direction: column;+ align-items: center;width: 100%;- max-width: 400px;- padding: 2rem;- background-color: #ffffff;- border-radius: 8px;- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);+ max-width: 620px;+ padding: 3rem;+ background-color: var(--bg-contrast);+ border-radius: 15px;}.form-group {+ display: flex;+ flex-direction: column;+ width: 100%;margin-bottom: 1rem;}.signup-link {font-size: 0.8rem;- text-align: right;+ margin-top: -0.5rem;margin-bottom: 1rem;- color: #666666;- text-align: center;-}--.signup-link a {- color: #007bff;+ text-align: right;text-decoration: none;-}-.signup-link a:hover {- text-decoration: underline;+ &:hover {+ text-decoration: underline;+ }}+.password-input {position: relative;}@@ -139,31 +123,51 @@ async function connect(username: string, password: string) {background-color: transparent;border: none;cursor: pointer;+ outline: none;++ &:hover {+ text-decoration: underline;+ }+}.btn {- font-size: 1rem;+ font-size: 1.2rem;+ border-radius: 50px;width: 100%;- padding: 0.75rem 0;- color: #ffffff;- background-color: #007bff;- border: none;- border-radius: 5px;- cursor: pointer;- transition: background-color 0.3s ease;+ background-color: $primary-300;++ &:hover {+ background: $primary-500;+ transform: none;+ }}-.btn:hover {- background-color: #0056b3;+input {+ background: var(--bg-contrast-2);+ outline: none;}.is-invalid {- border-color: #dc3545 !important;+ border-color: $red !important;}.invalid-feedback {font-size: 0.8rem;- color: #dc3545;- margin-top: 0.25rem;+ color: $red;+}++.forgot-password-link {+ margin-top: 20px;+ text-align: center;+ font-size: 14px;++ a {+ text-decoration: underline;+ }++ a:hover {+ text-decoration: none;+ }}-</style>+</style>\ No newline at end of filediff --git a/frontend/styles/_variables.scss b/frontend/styles/_variables.scssindex f4eed831..290f403e 100644--- a/frontend/styles/_variables.scss+++ b/frontend/styles/_variables.scss@@ -57,7 +57,7 @@ $transition-duration: 0.3s;.dark-mode {- --bg-color: #202025;+ --bg-color: #242424;--bg-contrast: #2e3034;--bg-contrast-2: #2b2d31;--selection-color: #4a90e2;