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.

Fixes

Smaug67394df2e825d151
diff --git a/frontend/components/Navbar.vue b/frontend/components/Navbar.vue
index ac9b3ecb..b8448618 100644
--- a/frontend/components/Navbar.vue
+++ b/frontend/components/Navbar.vue
@@ -6,7 +6,7 @@
<path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" />
</svg>
</button>
- <DHeader />
+ <DHeader v-if="!isMobile()" />
</div>
<ThemeToggle />
</header>
@@ -50,7 +50,4 @@ button {
</style>
<script lang="ts" setup>
const { toggleSidebar, isOpened } = useSidebar();
-//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/Search.vue b/frontend/components/sidebar/Search.vue
index af07628c..c782a216 100644
--- a/frontend/components/sidebar/Search.vue
+++ b/frontend/components/sidebar/Search.vue
@@ -53,6 +53,7 @@ const searchContainer = ref<HTMLElement | null>(null);
const searchInput = ref<HTMLInputElement | null>(null);
const handleTab = (event: KeyboardEvent) => {
+ event.preventDefault();
if (!searchContainer.value) return;
const focusableItems = Array.from(searchContainer.value.querySelectorAll('a'));
const currentIndex = focusableItems.findIndex(item => item === document.activeElement);
@@ -63,7 +64,6 @@ const handleTab = (event: KeyboardEvent) => {
nextIndex = (currentIndex + 1) % focusableItems.length;
}
focusableItems[nextIndex].focus();
- event.preventDefault();
}
onMounted(() => document.addEventListener('keydown', handleSearchShortCut));
@@ -142,6 +142,10 @@ const handleSearchShortCut = (e: KeyboardEvent) => {
background: var(--bg-contrast-2);
}
+ &:focus {
+ outline: 2px solid var(--font-color);
+ }
+
.icon {
display: flex;
align-items: center;
diff --git a/frontend/components/sidebar/Sidebar.vue b/frontend/components/sidebar/Sidebar.vue
index 9f9c974a..78c5aae9 100644
--- a/frontend/components/sidebar/Sidebar.vue
+++ b/frontend/components/sidebar/Sidebar.vue
@@ -32,7 +32,6 @@ const documentsStore = useDocumentsStore();
const filter = ref<string>('');
const showSearchModal = ref<boolean>(false);
-const isMobile = () => import.meta.client ? window.innerWidth <= 768 : false;
const handleSearchShortCut = (e: KeyboardEvent) => {
if (e.ctrlKey && e.key === 'q') showSearchModal.value = !showSearchModal.value;
};
diff --git a/frontend/composables/utils.ts b/frontend/composables/utils.ts
index 568ec1d2..0bdf6e2f 100644
--- a/frontend/composables/utils.ts
+++ b/frontend/composables/utils.ts
@@ -20,6 +20,7 @@ export interface APIResult<Data> {
export interface FetchOptions {
id: string; // id of the ressource
}
+export const isMobile = () => (import.meta.client ? window.innerWidth <= 768 : false);
export const baseUrl = import.meta.env.VITE_BASE_API?.toString() || '';
import type { DB_Document, DB_Category, DB_Ressource } from '../store/db_strustures';