Implement routes and transitions

This commit is contained in:
2025-07-14 12:08:09 +02:00
parent 736dad748b
commit 5ac4c987d3
27 changed files with 860 additions and 376 deletions

View File

@ -20,6 +20,22 @@ export const useTreeState = defineStore('treeState', {
selectClient(id: string) {
this.selected = { objectType: SshecretObjectType.Client, id: id }
},
/*
* Fetch and select a specific client.
*/
async loadClientName(name: string) {
const existing = this.clients?.clients.find(c => c.name === name)
if (existing) {
this.selected = { objectType: SshecretObjectType.Client, id: existing.id, param: name }
} else {
const result = await this.queryClients(name, 0, 1)
if (result === 1 && this.clients) {
this.selected = { objectType: SshecretObjectType.Client, id: this.clients.clients[0].id, param: name }
} else {
throw new Error("The selected client could not be found.")
}
}
},
selectSecret(name: string, parent?: string) {
this.selected = { objectType: SshecretObjectType.ClientSecret, id: name }
if (parent) {