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