Lae/resources/views/index.blade.php

110 lines
4.4 KiB
PHP
Raw Normal View History

2022-11-16 02:29:50 +00:00
@extends('layouts.app')
2022-11-06 11:28:22 +00:00
2022-11-16 02:29:50 +00:00
@section('content')
2022-11-06 11:28:22 +00:00
@guest
2023-02-02 10:49:16 +00:00
<h3>欢迎使用 {{ config('app.display_name') }}</h3>
<p>您需要先 登录 / 注册,才能继续使用 {{ config('app.display_name') }}</p>
2022-11-06 11:28:22 +00:00
2023-02-01 18:58:44 +00:00
<p>如果您继续,则代表您已经阅读并同意 <a href="https://www.laecloud.com/tos/" target="_blank"
2023-02-02 10:53:09 +00:00
class="text-decoration-underline">服务条款</a></p>
2022-11-16 02:29:50 +00:00
<a href="{{ route('login') }}" class="btn btn-primary">登录</a>
2023-02-01 18:58:44 +00:00
<a href="{{ route('register') }}" class="btn btn-primary">注册</a>
2022-11-06 11:28:22 +00:00
@endguest
@auth
2023-02-01 18:58:44 +00:00
@if(!auth('web')->user()->isRealNamed())
2023-01-14 23:47:13 +00:00
<x-alert-danger>
<div>
2023-02-02 10:53:09 +00:00
您还没有<a href="{{ route('real_name.create') }}">实人认证</a><a
href="{{ route('real_name.create') }}">实人认证</a>后才能使用所有功能。
2023-01-14 21:37:25 +00:00
</div>
2023-01-14 23:47:13 +00:00
</x-alert-danger>
@endif
2022-11-16 02:29:50 +00:00
@if (session('token'))
2023-01-17 17:21:35 +00:00
<x-alert-warning>
<div>
像密码一样保管好您的 API Token。
2023-02-01 18:01:49 +00:00
<br/>
2023-01-17 17:21:35 +00:00
{{ session('token') }}
</div>
</x-alert-warning>
2022-11-16 02:29:50 +00:00
@endif
2023-02-02 10:53:09 +00:00
<h3>, <span class="link" data-bs-toggle="modal" data-bs-target="#userInfo"
style="cursor: pointer">{{ auth('web')->user()->name }}</span></h3>
2023-02-02 04:55:48 +00:00
@php($user = auth('web')->user())
<form method="POST" action="{{ route('users.update') }}">
@csrf
@method('PATCH')
<div class="form-floating mb-2">
<input type="text" class="form-control" placeholder="用户名"
aria-label="用户名" name="name" required maxlength="25"
value="{{ $user->name }}">
2023-02-02 05:07:32 +00:00
<label>用户名</label>
2023-02-02 04:55:48 +00:00
</div>
2023-02-02 12:48:29 +00:00
<button type="submit" class="btn btn-primary visually-hidden">
2023-02-02 04:55:48 +00:00
更新
</button>
</form>
2023-02-02 10:49:16 +00:00
<h3 class="mt-3">访问密钥</h3>
2022-11-16 10:06:51 +00:00
<p>在这里,你可以获取新的 Token 来对接其他应用程序或者访问 控制面板。</p>
2022-11-06 11:28:22 +00:00
2023-02-01 18:58:44 +00:00
<form action="{{ route('token.new') }}" name="newToken" method="POST">
2022-11-06 11:28:22 +00:00
@csrf
2023-02-02 12:48:29 +00:00
<div class="form-floating mb-2">
<input type="text" class="form-control" placeholder="Token 名称"
aria-label="密钥名称" name="name" required maxlength="25">
<label>Token 名称</label>
2023-01-17 17:21:35 +00:00
</div>
2023-02-02 12:48:29 +00:00
<button type="submit" class="btn btn-primary visually-hidden">
创建
</button>
2022-11-06 11:28:22 +00:00
</form>
2023-02-02 10:49:16 +00:00
<h3 class="mt-3">撤销密钥</h3>
2022-11-06 11:28:22 +00:00
<p>如果你需要撤销对所有应用程序的授权,你可以在这里吊销所有 Token</p>
2023-02-01 18:58:44 +00:00
<form action="{{ route('token.delete_all') }}" method="post">
2022-11-06 11:28:22 +00:00
@csrf
2023-02-01 18:58:44 +00:00
@method('DELETE')
2023-02-02 10:49:16 +00:00
<button class="btn btn-danger" type="submit">撤销所有</button>
2022-11-06 11:28:22 +00:00
</form>
2023-02-02 10:53:09 +00:00
<div class="modal fade" id="userInfo" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ $user->name }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>ID: {{ $user->id }}</p>
<p>Email: {{ $user->email }}</p>
@if ($user->birthday_at)
<p>年龄: {{ $user->birthday_at->age . ' 岁' }}</p>
@endif
<p>注册时间: {{ $user->created_at }}</p>
<p>验证时间: {{ $user->email_verified_at }}</p>
@if ($user->real_name_verified_at)
<p>实人认证时间: {{ $user->real_name_verified_at }}</p>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">
</button>
</div>
</div>
</div>
</div>
2022-11-06 11:28:22 +00:00
@endauth
2022-11-16 02:29:50 +00:00
@endsection