2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 03:22:32 +08:00
Files
panel/web/src/views/backup/IndexView.vue
2025-12-01 19:37:19 +08:00

45 lines
1.1 KiB
Vue

<script setup lang="ts">
defineOptions({
name: 'backup-index'
})
import home from '@/api/panel/home'
import ListView from '@/views/backup/ListView.vue'
import { useGettext } from 'vue3-gettext'
const { $gettext } = useGettext()
const currentTab = ref('website')
const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
initialData: {
db: [
{
label: '',
value: ''
}
]
}
})
const mySQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'mysql')
})
const postgreSQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'postgresql')
})
</script>
<template>
<common-page show-header show-footer>
<template #tabbar>
<n-tabs v-model:value="currentTab" animated>
<n-tab name="website" :tab="$gettext('Website')" />
<n-tab v-if="mySQLInstalled" name="mysql" tab="MySQL" />
<n-tab v-if="postgreSQLInstalled" name="postgres" tab="PostgreSQL" />
</n-tabs>
</template>
<list-view v-model:type="currentTab" />
</common-page>
</template>