1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-06 09:00:03 +00:00
elk/components/user/UserSignInEntry.vue

32 lines
1.1 KiB
Vue
Raw Normal View History

<script setup lang="ts">
const { busy, oauth, singleInstanceServer } = useSignIn()
</script>
2022-11-23 03:06:56 +00:00
<template>
2022-12-27 17:49:15 +00:00
<div p8 lg:flex="~ col gap2" hidden>
2023-01-15 08:38:02 +00:00
<p v-if="isHydrated" text-sm>
2022-12-27 17:49:15 +00:00
<i18n-t keypath="user.sign_in_notice_title">
<strong>{{ currentServer }}</strong>
</i18n-t>
2022-11-29 20:51:52 +00:00
</p>
<p text-sm text-secondary>
{{ $t(singleInstanceServer ? 'user.single_instance_sign_in_desc' : 'user.sign_in_desc') }}
2022-11-29 20:51:52 +00:00
</p>
<button
v-if="singleInstanceServer"
flex="~ row" gap-x-2 items-center justify-center btn-solid text-center rounded-3
:disabled="busy"
@click="oauth()"
>
<span v-if="busy" aria-hidden="true" block animate animate-spin preserve-3d class="rtl-flip">
<span block i-ri:loader-2-fill aria-hidden="true" />
</span>
<span v-else aria-hidden="true" block i-ri:login-circle-line class="rtl-flip" />
{{ $t('action.sign_in') }}
</button>
<button v-else btn-solid rounded-3 text-center mt-2 select-none @click="openSigninDialog()">
{{ $t('action.sign_in') }}
2022-11-23 08:58:07 +00:00
</button>
2022-11-23 03:06:56 +00:00
</div>
</template>