yumechi-no-kuni/packages/frontend/src/pages/admin/integrations.vue

58 lines
2 KiB
Vue
Raw Normal View History

<template><MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
2022-01-04 06:16:41 -06:00
<FormFolder class="_formBlock">
2022-12-20 00:15:34 -06:00
<template #icon><i class="ti ti-brand-twitter"></i></template>
2022-01-04 06:16:41 -06:00
<template #label>Twitter</template>
<template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
2022-01-04 06:16:41 -06:00
<XTwitter/>
</FormFolder>
<FormFolder class="_formBlock">
2022-12-20 00:15:34 -06:00
<template #icon><i class="ti ti-brand-github"></i></template>
2022-01-04 06:16:41 -06:00
<template #label>GitHub</template>
<template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
2022-01-04 06:16:41 -06:00
<XGithub/>
</FormFolder>
<FormFolder class="_formBlock">
2022-12-20 00:15:34 -06:00
<template #icon><i class="ti ti-brand-discord"></i></template>
2022-01-04 06:16:41 -06:00
<template #label>Discord</template>
<template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
2022-01-04 06:16:41 -06:00
<XDiscord/>
</FormFolder>
</FormSuspense>
</MkSpacer></MkStickyContainer>
</template>
<script lang="ts" setup>
import { } from 'vue';
2022-01-04 06:16:41 -06:00
import XTwitter from './integrations.twitter.vue';
import XGithub from './integrations.github.vue';
import XDiscord from './integrations.discord.vue';
import FormSuspense from '@/components/form/suspense.vue';
import FormFolder from '@/components/form/folder.vue';
2021-11-11 11:02:25 -06:00
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
let enableTwitterIntegration: boolean = $ref(false);
let enableGithubIntegration: boolean = $ref(false);
let enableDiscordIntegration: boolean = $ref(false);
async function init() {
const meta = await os.api('admin/meta');
enableTwitterIntegration = meta.enableTwitterIntegration;
enableGithubIntegration = meta.enableGithubIntegration;
enableDiscordIntegration = meta.enableDiscordIntegration;
}
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.integration,
icon: 'ti ti-share',
});
</script>