third-party-login.vue
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script setup lang="ts">
import { useAppConfig } from '@vben/hooks';
import {
SvgGithubIcon,
SvgGoogleIcon,
SvgQQChatIcon,
SvgWeChatIcon,
} from '@vben/icons';
import { $t } from '@vben/locales';
import { VbenIconButton } from '@vben-core/shadcn-ui';
import DingdingLogin from './dingding-login.vue';
defineOptions({
name: 'ThirdPartyLogin',
});
const {
auth: { dingding: dingdingAuthConfig },
} = useAppConfig(import.meta.env, import.meta.env.PROD);
</script>
<template>
<div class="w-full sm:mx-auto md:max-w-md">
<div class="mt-4 flex items-center justify-between">
<span class="border-input w-[35%] border-b dark:border-gray-600"></span>
<span class="text-muted-foreground text-center text-xs uppercase">
{{ $t('authentication.thirdPartyLogin') }}
</span>
<span class="border-input w-[35%] border-b dark:border-gray-600"></span>
</div>
<div class="mt-4 flex flex-wrap justify-center">
<VbenIconButton
:tooltip="$t('authentication.wechatLogin')"
tooltip-side="top"
class="mb-3"
>
<SvgWeChatIcon />
</VbenIconButton>
<VbenIconButton
:tooltip="$t('authentication.qqLogin')"
tooltip-side="top"
class="mb-3"
>
<SvgQQChatIcon />
</VbenIconButton>
<VbenIconButton
:tooltip="$t('authentication.githubLogin')"
tooltip-side="top"
class="mb-3"
>
<SvgGithubIcon />
</VbenIconButton>
<VbenIconButton
:tooltip="$t('authentication.googleLogin')"
tooltip-side="top"
class="mb-3"
>
<SvgGoogleIcon />
</VbenIconButton>
<DingdingLogin
v-if="dingdingAuthConfig"
:corp-id="dingdingAuthConfig.corpId"
:client-id="dingdingAuthConfig.clientId"
class="mb-3"
/>
</div>
</div>
</template>