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.

About view & pwa

Smaug6739d6314e70fea9
diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts
index 13058ab9..0ac79bb7 100644
--- a/frontend/nuxt.config.ts
+++ b/frontend/nuxt.config.ts
@@ -3,7 +3,6 @@ export default defineNuxtConfig({
future: {
compatibilityVersion: 4,
},
-
vite: {
css: {
preprocessorOptions: {
@@ -109,6 +108,17 @@ export default defineNuxtConfig({
networkTimeoutSeconds: 3,
},
},
+ {
+ urlPattern: ({ url }) => url.origin === process.env.VITE_BASE_API,
+ handler: 'NetworkFirst',
+ options: {
+ cacheName: 'api-cache',
+ expiration: {
+ maxEntries: 50,
+ maxAgeSeconds: 86400,
+ },
+ },
+ },
],
},
},
diff --git a/frontend/package.json b/frontend/package.json
index 8059d83c..e2a4f0bb 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,5 +1,6 @@
{
- "name": "nuxt-app",
+ "name": "alexandrie",
+ "version": "7.1.0-alpha.1",
"devDependencies": {
"@codemirror/autocomplete": "^6.18.6",
"@codemirror/commands": "^6.8.1",
diff --git a/frontend/pages/dashboard/settings/_views/about.vue b/frontend/pages/dashboard/settings/_views/about.vue
new file mode 100644
index 00000000..dba1864f
--- /dev/null
+++ b/frontend/pages/dashboard/settings/_views/about.vue
@@ -0,0 +1,15 @@
+<template>
+ <h1>About Alexandrie</h1>
+ <p>
+ <strong>Alexandrie version: {{ version }}</strong>
+ </p>
+ <p>
+ <strong>Client: {{ isPWA ? 'PWA' : 'Website' }}</strong>
+ </p>
+</template>
+
+<script setup lang="ts">
+import pgk from '~/package.json';
+const version = pgk.version || 'unknown';
+const isPWA = !!window.matchMedia('(display-mode: standalone)').matches;
+</script>
diff --git a/frontend/pages/dashboard/settings/index.vue b/frontend/pages/dashboard/settings/index.vue
index ed78d63a..6b2dfac1 100644
--- a/frontend/pages/dashboard/settings/index.vue
+++ b/frontend/pages/dashboard/settings/index.vue
@@ -25,17 +25,19 @@
<NuxtLink to="?p=markdown"><Icon fill="var(--font-color)" name="markdown" />Markdown</NuxtLink>
<span>Other</span>
+ <NuxtLink to="?p=about"><Icon fill="var(--font-color)" name="view" />About</NuxtLink>
<NuxtLink @click="logoutUser"><Icon fill="var(--font-color)" name="logout" />Logout</NuxtLink>
</nav>
<div class="content">
<button @click="close" class="close-btn"><Icon name="close" :big="true" /></button>
<ProfileView v-if="currentPage === 'profile'"></ProfileView>
- <PreferencesView v-if="currentPage === 'preferences'" />
- <SecurityView v-if="currentPage === 'security'" />
- <BackupView v-if="currentPage == 'backup'" />
- <ShortcutsView v-if="currentPage == 'shortcuts'" />
- <SnippetsView v-if="currentPage == 'snippets'" />
- <MarkdownView v-if="currentPage == 'markdown'" />
+ <PreferencesView v-else-if="currentPage === 'preferences'" />
+ <SecurityView v-else-if="currentPage === 'security'" />
+ <BackupView v-else-if="currentPage == 'backup'" />
+ <ShortcutsView v-else-if="currentPage == 'shortcuts'" />
+ <SnippetsView v-else-if="currentPage == 'snippets'" />
+ <MarkdownView v-else-if="currentPage == 'markdown'" />
+ <AboutView v-else-if="currentPage == 'about'" />
</div>
</div>
</div>
@@ -49,6 +51,7 @@ import BackupView from './_views/backups.vue';
import ShortcutsView from './_views/shortcuts.vue';
import SnippetsView from './_views/snippets.vue';
import MarkdownView from './_views/markdown.vue';
+import AboutView from './_views/about.vue';
const route = useRoute();
const currentPage = ref(route.query.p || 'profile');
const store = useUserStore();