2022-06-20 03:38:49 -05:00
|
|
|
<template><MkStickyContainer>
|
|
|
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
|
|
|
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
|
2021-04-22 08:29:33 -05:00
|
|
|
<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>
|
2022-05-17 11:31:48 -05:00
|
|
|
<template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
|
2022-01-04 06:16:41 -06:00
|
|
|
<XTwitter/>
|
|
|
|
</FormFolder>
|
2022-05-17 11:31:48 -05:00
|
|
|
<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>
|
2022-05-17 11:31:48 -05:00
|
|
|
<template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
|
2022-01-04 06:16:41 -06:00
|
|
|
<XGithub/>
|
|
|
|
</FormFolder>
|
2022-05-17 11:31:48 -05:00
|
|
|
<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>
|
2022-05-17 11:31:48 -05:00
|
|
|
<template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
|
2022-01-04 06:16:41 -06:00
|
|
|
<XDiscord/>
|
|
|
|
</FormFolder>
|
2021-04-22 08:29:33 -05:00
|
|
|
</FormSuspense>
|
2022-06-20 03:38:49 -05:00
|
|
|
</MkSpacer></MkStickyContainer>
|
2021-04-22 08:29:33 -05:00
|
|
|
</template>
|
|
|
|
|
2022-05-17 11:31:48 -05:00
|
|
|
<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';
|
2022-06-20 03:38:49 -05:00
|
|
|
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';
|
2022-05-17 11:31:48 -05:00
|
|
|
import { i18n } from '@/i18n';
|
2022-06-20 03:38:49 -05:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
2021-04-22 08:29:33 -05:00
|
|
|
|
2022-05-17 11:31:48 -05:00
|
|
|
let enableTwitterIntegration: boolean = $ref(false);
|
|
|
|
let enableGithubIntegration: boolean = $ref(false);
|
|
|
|
let enableDiscordIntegration: boolean = $ref(false);
|
2021-04-22 08:29:33 -05:00
|
|
|
|
2022-05-17 11:31:48 -05:00
|
|
|
async function init() {
|
|
|
|
const meta = await os.api('admin/meta');
|
|
|
|
enableTwitterIntegration = meta.enableTwitterIntegration;
|
|
|
|
enableGithubIntegration = meta.enableGithubIntegration;
|
|
|
|
enableDiscordIntegration = meta.enableDiscordIntegration;
|
|
|
|
}
|
2021-04-22 08:29:33 -05:00
|
|
|
|
2022-06-20 03:38:49 -05:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.integration,
|
2022-12-19 04:01:30 -06:00
|
|
|
icon: 'ti ti-share',
|
2021-04-22 08:29:33 -05:00
|
|
|
});
|
|
|
|
</script>
|