Lae/resources/views/index.blade.php

50 lines
1.8 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>
2022-11-16 02:29:50 +00:00
<p>您需要先登录,才能继续使用 莱云。</p>
2022-11-06 11:28:22 +00:00
2022-12-20 11:48:01 +00:00
<p>如果您继续登录,则代表您已经阅读并同意 <a href="https://www.laecloud.com/tos/" target="_blank" class="text-decoration-underline">服务条款</a></p>
2022-11-16 02:29:50 +00:00
<a href="{{ route('login') }}" class="btn btn-primary">登录</a>
2022-11-06 11:28:22 +00:00
@endguest
@auth
2022-11-16 02:29:50 +00:00
@if (session('token'))
<p style="color:green">这是新的 Token请妥善保管{{ session('token') }}</p>
{{-- <a href="http://localhost:3000/login?token={{ session('token') }}">前往</a> --}}
@endif
2022-11-06 11:28:22 +00:00
<p>, {{ auth('web')->user()->name }}
2022-11-16 10:06:51 +00:00
<p>在这里,你可以获取新的 Token 来对接其他应用程序或者访问 控制面板。</p>
2022-11-06 11:28:22 +00:00
<form action="{{ route('newToken') }}" name="newToken" method="POST">
@csrf
2022-12-20 11:48:01 +00:00
<label for="token_name">Token 名称</label>
<input type="text" name="token_name" id="token_name" placeholder="Token 名字"/>
2022-11-16 02:29:50 +00:00
<button class="btn btn-primary" type="submit">获取新的 Token</button>
2022-11-06 11:28:22 +00:00
</form>
<hr/>
2022-11-06 11:28:22 +00:00
<p>如果你需要撤销对所有应用程序的授权,你可以在这里吊销所有 Token</p>
<form action="{{ route('deleteAll') }}" method="post">
@csrf
@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