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