2023-02-05 13:10:19 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
const { busy, oauth, singleInstanceServer } = useSignIn()
|
|
|
|
</script>
|
|
|
|
|
2022-11-23 04:06:56 +01:00
|
|
|
<template>
|
2022-12-27 18:49:15 +01:00
|
|
|
<div p8 lg:flex="~ col gap2" hidden>
|
2023-01-15 09:38:02 +01:00
|
|
|
<p v-if="isHydrated" text-sm>
|
2022-12-27 18:49:15 +01:00
|
|
|
<i18n-t keypath="user.sign_in_notice_title">
|
|
|
|
<strong>{{ currentServer }}</strong>
|
|
|
|
</i18n-t>
|
2022-11-29 21:51:52 +01:00
|
|
|
</p>
|
|
|
|
<p text-sm text-secondary>
|
2023-02-12 13:10:14 +01:00
|
|
|
{{ $t(singleInstanceServer ? 'user.single_instance_sign_in_desc' : 'user.sign_in_desc') }}
|
2022-11-29 21:51:52 +01:00
|
|
|
</p>
|
2023-02-05 13:10:19 +01:00
|
|
|
<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()">
|
2022-11-29 11:55:28 +01:00
|
|
|
{{ $t('action.sign_in') }}
|
2022-11-23 09:58:07 +01:00
|
|
|
</button>
|
2022-11-23 04:06:56 +01:00
|
|
|
</div>
|
|
|
|
</template>
|