79 lines
3.4 KiB
PHP
79 lines
3.4 KiB
PHP
<x-layouts.auth>
|
|
<x-slot name="title">
|
|
{{ trans('auth.login') }}
|
|
</x-slot>
|
|
|
|
<x-slot name="content">
|
|
<div>
|
|
<img src="{{ asset('public/img/akaunting-logo-gold.svg') }}" class="w-16" alt="Akaunting" />
|
|
|
|
<h1 class="text-xl my-3 font-semibold text-black-700">
|
|
{{ trans('auth.dingtalk.title') }}
|
|
</h1>
|
|
<p class="text-sm leading-6 text-black-500">
|
|
{{ trans('auth.dingtalk.only_method') }}
|
|
</p>
|
|
</div>
|
|
|
|
@if (session('dingtalk_error'))
|
|
<div class="w-full border border-red-200 bg-red-50 text-red-700 p-3 rounded-lg font-semibold text-xs my-3" role="alert">
|
|
{{ session('dingtalk_error') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($dingtalkAvailable)
|
|
<a href="{{ route('login.dingtalk') }}"
|
|
class="w-full min-h-11 inline-flex items-center justify-center gap-2 border border-[#856632] bg-[#856632] text-white hover:bg-[#6A5129] focus:outline-none focus:ring-2 focus:ring-[#856632]/25 rounded-lg text-sm font-semibold"
|
|
>
|
|
<span class="material-icons-outlined text-base" aria-hidden="true">qr_code_scanner</span>
|
|
{{ trans('auth.dingtalk.login') }}
|
|
</a>
|
|
@else
|
|
<div class="w-full border border-amber-200 bg-amber-50 text-amber-800 p-3 rounded-lg text-xs" role="alert">
|
|
{{ trans('auth.dingtalk.unavailable') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($passwordLoginEnabled)
|
|
<div class="flex items-center gap-3 my-3" aria-hidden="true">
|
|
<span class="h-px flex-1 bg-gray-200"></span>
|
|
<span class="text-xs text-gray-500">本机开发登录</span>
|
|
<span class="h-px flex-1 bg-gray-200"></span>
|
|
</div>
|
|
|
|
<x-form id="auth" route="login">
|
|
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-4">
|
|
<x-form.group.email
|
|
name="email"
|
|
label="{{ trans('general.email') }}"
|
|
placeholder="{{ trans('general.email') }}"
|
|
form-group-class="sm:col-span-6"
|
|
input-group-class="input-group-alternative"
|
|
/>
|
|
<x-form.group.password
|
|
name="password"
|
|
label="{{ trans('auth.password.pass') }}"
|
|
placeholder="{{ trans('auth.password.pass') }}"
|
|
form-group-class="sm:col-span-6"
|
|
input-group-class="input-group-alternative"
|
|
/>
|
|
<x-button
|
|
type="submit"
|
|
::disabled="form.loading"
|
|
class="relative flex items-center justify-center bg-black hover:bg-black-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-gray-300 sm:col-span-6"
|
|
override="class"
|
|
>
|
|
<x-button.loading>本机开发登录</x-button.loading>
|
|
</x-button>
|
|
</div>
|
|
</x-form>
|
|
@endif
|
|
|
|
<p class="text-xs leading-5 text-black-400">
|
|
{{ $passwordLoginEnabled ? '本机开发登录仅用于私有开发数据库;正式环境只允许钉钉登录。' : trans('auth.dingtalk.no_password') }}
|
|
</p>
|
|
</x-slot>
|
|
|
|
<x-script folder="auth" file="common" />
|
|
</x-layouts.auth>
|