Lae/resources/views/index.blade.php

84 lines
3.1 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
<p>嗨,游客</p>
2023-02-01 18:58:44 +00:00
<p>您需要先 登录 / 注册,才能继续使用 莱云。</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-01-14 21:37:25 +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-01 18:58:44 +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
2022-11-06 11:28:22 +00:00
<p>, {{ auth('web')->user()->name }}
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 }}">
<label>{{ __('Username') }}</label>
</div>
<button type="submit" class="btn btn-primary">
更新
</button>
</form>
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-01-17 17:21:35 +00:00
<div class="input-group mb-3">
<input type="text" class="form-control" id="token_name" name="token_name" placeholder="这个 Token 要用来做什么"
aria-label="Example text with button addon"
aria-describedby="button-addon1">
<button class="btn btn-outline-primary" type="submit" id="button-addon1">生成</button>
</div>
2022-11-06 11:28:22 +00:00
</form>
<hr/>
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')
2022-11-16 02:29:50 +00:00
<button class="btn btn-danger" type="submit">吊销所有 Token</button>
2022-11-06 11:28:22 +00:00
</form>
2022-11-16 02:29:50 +00:00
<p class="text-danger">*如果您的 Token 被泄漏,您应该立即吊销所有 Token</p>
2022-11-06 11:28:22 +00:00
<hr/>
2022-11-06 11:28:22 +00:00
<form action="{{ route('logout') }}" method="post">
@csrf
2022-11-16 02:29:50 +00:00
<button class="btn btn-danger" type="submit">退出登录</button>
2022-11-06 11:28:22 +00:00
</form>
@endauth
2022-11-16 02:29:50 +00:00
@endsection