This commit is contained in:
syuilo 2022-01-04 18:35:21 +09:00
parent 6c62c0681c
commit 0ea5b38fb1
4 changed files with 54 additions and 70 deletions

View file

@ -1,37 +1,36 @@
<template> <template>
<FormBase> <MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init"> <FormSuspense :p="init">
<FormSwitch v-model="enableDiscordIntegration"> <FormSwitch v-model="enableDiscordIntegration" class="_formBlock">
{{ $ts.enable }} <template #label>{{ $ts.enable }}</template>
</FormSwitch> </FormSwitch>
<template v-if="enableDiscordIntegration"> <template v-if="enableDiscordIntegration">
<FormInfo>Callback URL: {{ `${uri}/api/dc/cb` }}</FormInfo> <FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/dc/cb` }}</FormInfo>
<FormInput v-model="discordClientId"> <FormInput v-model="discordClientId" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Client ID <template #label>Client ID</template>
</FormInput> </FormInput>
<FormInput v-model="discordClientSecret"> <FormInput v-model="discordClientSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Client Secret <template #label>Client Secret</template>
</FormInput> </FormInput>
</template> </template>
<FormButton primary @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton> <FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton>
</FormSuspense> </FormSuspense>
</FormBase> </MkSpacer>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import FormSwitch from '@/components/debobigego/switch.vue'; import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/debobigego/input.vue'; import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/debobigego/button.vue'; import FormButton from '@/components/ui/button.vue';
import FormBase from '@/components/debobigego/base.vue'; import FormInfo from '@/components/ui/info.vue';
import FormInfo from '@/components/debobigego/info.vue'; import FormSuspense from '@/components/form/suspense.vue';
import FormSuspense from '@/components/debobigego/suspense.vue';
import * as os from '@/os'; import * as os from '@/os';
import * as symbols from '@/symbols'; import * as symbols from '@/symbols';
import { fetchInstance } from '@/instance'; import { fetchInstance } from '@/instance';
@ -40,7 +39,6 @@ export default defineComponent({
components: { components: {
FormSwitch, FormSwitch,
FormInput, FormInput,
FormBase,
FormInfo, FormInfo,
FormButton, FormButton,
FormSuspense, FormSuspense,

View file

@ -1,37 +1,36 @@
<template> <template>
<FormBase> <MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init"> <FormSuspense :p="init">
<FormSwitch v-model="enableGithubIntegration"> <FormSwitch v-model="enableGithubIntegration" class="_formBlock">
{{ $ts.enable }} <template #label>{{ $ts.enable }}</template>
</FormSwitch> </FormSwitch>
<template v-if="enableGithubIntegration"> <template v-if="enableGithubIntegration">
<FormInfo>Callback URL: {{ `${uri}/api/gh/cb` }}</FormInfo> <FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/gh/cb` }}</FormInfo>
<FormInput v-model="githubClientId"> <FormInput v-model="githubClientId" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Client ID <template #label>Client ID</template>
</FormInput> </FormInput>
<FormInput v-model="githubClientSecret"> <FormInput v-model="githubClientSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Client Secret <template #label>Client Secret</template>
</FormInput> </FormInput>
</template> </template>
<FormButton primary @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton> <FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton>
</FormSuspense> </FormSuspense>
</FormBase> </MkSpacer>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import FormSwitch from '@/components/debobigego/switch.vue'; import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/debobigego/input.vue'; import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/debobigego/button.vue'; import FormButton from '@/components/ui/button.vue';
import FormBase from '@/components/debobigego/base.vue'; import FormInfo from '@/components/ui/info.vue';
import FormInfo from '@/components/debobigego/info.vue'; import FormSuspense from '@/components/form/suspense.vue';
import FormSuspense from '@/components/debobigego/suspense.vue';
import * as os from '@/os'; import * as os from '@/os';
import * as symbols from '@/symbols'; import * as symbols from '@/symbols';
import { fetchInstance } from '@/instance'; import { fetchInstance } from '@/instance';
@ -40,7 +39,6 @@ export default defineComponent({
components: { components: {
FormSwitch, FormSwitch,
FormInput, FormInput,
FormBase,
FormInfo, FormInfo,
FormButton, FormButton,
FormSuspense, FormSuspense,

View file

@ -1,37 +1,36 @@
<template> <template>
<FormBase> <MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init"> <FormSuspense :p="init">
<FormSwitch v-model="enableTwitterIntegration"> <FormSwitch v-model="enableTwitterIntegration" class="_formBlock">
{{ $ts.enable }} <template #label>{{ $ts.enable }}</template>
</FormSwitch> </FormSwitch>
<template v-if="enableTwitterIntegration"> <template v-if="enableTwitterIntegration">
<FormInfo>Callback URL: {{ `${uri}/api/tw/cb` }}</FormInfo> <FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/tw/cb` }}</FormInfo>
<FormInput v-model="twitterConsumerKey"> <FormInput v-model="twitterConsumerKey" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Consumer Key <template #label>Consumer Key</template>
</FormInput> </FormInput>
<FormInput v-model="twitterConsumerSecret"> <FormInput v-model="twitterConsumerSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template> <template #prefix><i class="fas fa-key"></i></template>
Consumer Secret <template #label>Consumer Secret</template>
</FormInput> </FormInput>
</template> </template>
<FormButton primary @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton> <FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ $ts.save }}</FormButton>
</FormSuspense> </FormSuspense>
</FormBase> </MkSpacer>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import FormSwitch from '@/components/debobigego/switch.vue'; import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/debobigego/input.vue'; import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/debobigego/button.vue'; import FormButton from '@/components/ui/button.vue';
import FormBase from '@/components/debobigego/base.vue'; import FormInfo from '@/components/ui/info.vue';
import FormInfo from '@/components/debobigego/info.vue'; import FormSuspense from '@/components/form/suspense.vue';
import FormSuspense from '@/components/debobigego/suspense.vue';
import * as os from '@/os'; import * as os from '@/os';
import * as symbols from '@/symbols'; import * as symbols from '@/symbols';
import { fetchInstance } from '@/instance'; import { fetchInstance } from '@/instance';
@ -40,7 +39,6 @@ export default defineComponent({
components: { components: {
FormSwitch, FormSwitch,
FormInput, FormInput,
FormBase,
FormInfo, FormInfo,
FormButton, FormButton,
FormSuspense, FormSuspense,

View file

@ -1,32 +1,27 @@
<template> <template>
<FormBase> <MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init"> <FormSuspense :p="init">
<FormLink to="/admin/integrations/twitter"> <FormLink to="/admin/integrations/twitter" class="_formBlock">
<i class="fab fa-twitter"></i> Twitter <i class="fab fa-twitter"></i> Twitter
<template #suffix>{{ enableTwitterIntegration ? $ts.enabled : $ts.disabled }}</template> <template #suffix>{{ enableTwitterIntegration ? $ts.enabled : $ts.disabled }}</template>
</FormLink> </FormLink>
<FormLink to="/admin/integrations/github"> <FormLink to="/admin/integrations/github" class="_formBlock">
<i class="fab fa-github"></i> GitHub <i class="fab fa-github"></i> GitHub
<template #suffix>{{ enableGithubIntegration ? $ts.enabled : $ts.disabled }}</template> <template #suffix>{{ enableGithubIntegration ? $ts.enabled : $ts.disabled }}</template>
</FormLink> </FormLink>
<FormLink to="/admin/integrations/discord"> <FormLink to="/admin/integrations/discord" class="_formBlock">
<i class="fab fa-discord"></i> Discord <i class="fab fa-discord"></i> Discord
<template #suffix>{{ enableDiscordIntegration ? $ts.enabled : $ts.disabled }}</template> <template #suffix>{{ enableDiscordIntegration ? $ts.enabled : $ts.disabled }}</template>
</FormLink> </FormLink>
</FormSuspense> </FormSuspense>
</FormBase> </MkSpacer>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import FormLink from '@/components/debobigego/link.vue'; import FormLink from '@/components/form/link.vue';
import FormInput from '@/components/debobigego/input.vue'; import FormSecion from '@/components/form/section.vue';
import FormButton from '@/components/debobigego/button.vue'; import FormSuspense from '@/components/form/suspense.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormTextarea from '@/components/debobigego/textarea.vue';
import FormInfo from '@/components/debobigego/info.vue';
import FormSuspense from '@/components/debobigego/suspense.vue';
import * as os from '@/os'; import * as os from '@/os';
import * as symbols from '@/symbols'; import * as symbols from '@/symbols';
import { fetchInstance } from '@/instance'; import { fetchInstance } from '@/instance';
@ -34,12 +29,7 @@ import { fetchInstance } from '@/instance';
export default defineComponent({ export default defineComponent({
components: { components: {
FormLink, FormLink,
FormInput, FormSecion,
FormBase,
FormGroup,
FormButton,
FormTextarea,
FormInfo,
FormSuspense, FormSuspense,
}, },