Consistent dialog styling widgets and using Paskia's shared backdrop. Internal password auth mimics Paskia. API paths changed (/auth goes to internal or paskia depending on config). All API calls and previews get access checks.

This commit is contained in:
2026-01-30 18:28:05 +00:00
parent bb38328c24
commit 7be02e951d
23 changed files with 1109 additions and 386 deletions
+4 -7
View File
@@ -3,7 +3,7 @@ import { Doc } from '@/repositories/Document'
import { defineStore, type StateTree } from 'pinia'
import { collator } from '@/utils'
import { logoutUser } from '@/repositories/User'
import { watchConnect } from '@/repositories/WS'
import { watchConnect, resumeWatching } from '@/repositories/WS'
import { shallowRef } from 'vue'
import { sorted, type SortOrder } from '@/utils/docsort'
@@ -17,8 +17,8 @@ export const useMainStore = defineStore({
error: '' as string,
connected: false,
cursor: '' as string,
server: {} as Record<string, any>,
dialog: '' as '' | 'login' | 'settings' | 'usermgmt',
server: {} as Record<string, any> & { authentication?: 'none' | 'paskia' | 'password' },
dialog: '' as '' | 'settings' | 'usermgmt',
uprogress: {} as any,
dprogress: {} as any,
prefs: {
@@ -69,10 +69,7 @@ export const useMainStore = defineStore({
this.user.privileged = privileged
this.user.isLoggedIn = true
this.dialog = ''
if (!this.connected) watchConnect()
},
loginDialog() {
this.dialog = 'login'
if (!this.connected) resumeWatching()
},
async logout() {
console.log("Logout")