feat: add qb iframe page

This commit is contained in:
Rewrite0
2023-10-24 13:24:02 +08:00
parent 25538558fe
commit abd946b0f2
5 changed files with 41 additions and 3 deletions

View File

@@ -64,7 +64,6 @@ const items = [
icon: Download,
label: () => t('sidebar.downloader'),
path: '/downloader',
hidden: true,
},
{
id: 6,

View File

@@ -77,6 +77,9 @@
"player": {
"hit": "Please set up the media player"
},
"downloader": {
"hit": "Please set up the downloader"
},
"log": {
"title": "Log",
"reset": "Reset",

View File

@@ -77,6 +77,9 @@
"player": {
"hit": "请设置媒体播放器地址"
},
"downloader": {
"hit": "请设置下载器"
},
"log": {
"title": "日志",
"reset": "重置",

View File

@@ -2,8 +2,42 @@
definePage({
name: 'Downloader',
});
const { config } = storeToRefs(useConfigStore());
const { getConfig } = useConfigStore();
getConfig();
const isNull = computed(() => {
return config.value.downloader.host === '';
});
const url = computed(() => {
const downloader = config.value.downloader;
const protocol = downloader.ssl ? 'https' : 'http';
return `${protocol}://${downloader.host}`;
});
</script>
<template>
<div>null</div>
<div overflow-auto mt-12px flex-grow>
<template v-if="isNull">
<div wh-full f-cer text-h1 text-primary>
<RouterLink to="/config" hover:underline>{{
$t('downloader.hit')
}}</RouterLink>
</div>
</template>
<iframe
:src="url"
frameborder="0"
allowfullscreen="true"
w-full
h-full
flex-1
rounded-12px
></iframe>
</div>
</template>

View File

@@ -35,7 +35,6 @@ declare module '@vue/runtime-core' {
AbTag: typeof import('./../../src/components/basic/ab-tag.vue')['default']
AbTopbar: typeof import('./../../src/components/layout/ab-topbar.vue')['default']
ConfigDownload: typeof import('./../../src/components/setting/config-download.vue')['default']
ConfigExperimental: typeof import('./../../src/components/setting/config-experimental.vue')['default']
ConfigManage: typeof import('./../../src/components/setting/config-manage.vue')['default']
ConfigNormal: typeof import('./../../src/components/setting/config-normal.vue')['default']
ConfigNotification: typeof import('./../../src/components/setting/config-notification.vue')['default']