mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
refactor: rework async DomainList
This commit is contained in:
parent
ddf872dd58
commit
3e44d959eb
1 changed files with 3 additions and 5 deletions
|
@ -1,12 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import api from '@/api'
|
||||
import RecursiveListGroup from '@/components/RecursiveListGroup.vue'
|
||||
import { useDomains } from '@/composables/data'
|
||||
import { useInitialQueries } from '@/composables/useInitialQueries'
|
||||
import { useSearch } from '@/composables/useSearch'
|
||||
|
||||
const { loading } = useInitialQueries([
|
||||
{ uri: 'domains', cachePath: 'domains' },
|
||||
])
|
||||
await api.fetch({ uri: 'domains', cachePath: 'domains' })
|
||||
|
||||
const { mainDomain, domainsTree } = useDomains()
|
||||
|
||||
const [search, filteredTree] = useSearch(domainsTree, (s, node) =>
|
||||
|
@ -20,7 +19,6 @@ const [search, filteredTree] = useSearch(domainsTree, (s, node) =>
|
|||
v-model="search"
|
||||
:items="filteredTree ? filteredTree.children : filteredTree"
|
||||
items-name="domains"
|
||||
:loading="loading"
|
||||
>
|
||||
<template #top-bar-buttons>
|
||||
<BButton variant="success" :to="{ name: 'domain-add' }">
|
||||
|
|
Loading…
Add table
Reference in a new issue