oauth locale

This commit is contained in:
xiaomlove
2024-03-15 02:50:39 +08:00
parent 79208b06e3
commit 38ff708a26
6 changed files with 20 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http;
use App\Http\Middleware\Locale;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
@@ -38,6 +39,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
Locale::class,
],
'api' => [

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-11');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-15');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

View File

@@ -6,4 +6,8 @@ return [
'revoked' => 'Valid',
'access_token' => 'Access token',
'refresh_token' => 'Refresh token',
'authorization_request_title' => 'Authorization Request',
'authorization_request_desc' => 'is requesting permission to access your account',
'btn_approve' => 'Authorize',
'btn_deny' => 'Cancel',
];

View File

@@ -6,4 +6,8 @@ return [
'revoked' => '有效',
'access_token' => '访问令牌',
'refresh_token' => '刷新令牌',
'authorization_request_title' => '授权请求',
'authorization_request_desc' => '正在请求获取您账号的访问权限',
'btn_approve' => '授权',
'btn_deny' => '取消',
];

View File

@@ -16,16 +16,18 @@
justify-content: center;
align-items: center;
height: 100vh;
background-image: url("/pic/oauth2-authorize-bg.jpg");
}
.passport-authorize .card {
/*padding: 40px;*/
padding: 40px;
background-color: #ffffff;
}
.passport-authorize .card-header {
font-size: 24px;
font-size: 36px;
text-align: center;
margin-bottom: 20px;
margin-bottom: 15px;
}
.passport-authorize .scopes {
@@ -61,11 +63,11 @@
<body class="passport-authorize">
<div class="card card-default">
<div class="card-header">
Authorization Request
{{ __('oauth.authorization_request_title') }}
</div>
<div class="card-body">
<!-- Introduction -->
<p><strong>{{ $client->name }}</strong> is requesting permission to access your account.</p>
<p><strong>{{ $client->name }}</strong> {{ __('oauth.authorization_request_desc') }}.</p>
<!-- Scope List -->
@if (count($scopes) > 0)
@@ -88,7 +90,7 @@
<input type="hidden" name="state" value="{{ $request->state }}">
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
<input type="hidden" name="auth_token" value="{{ $authToken }}">
<button type="submit" class="btn btn-success btn-approve">Authorize</button>
<button type="submit" class="btn btn-success btn-approve">{{ __('oauth.btn_approve') }}</button>
</form>
<!-- Cancel Button -->
@@ -99,7 +101,7 @@
<input type="hidden" name="state" value="{{ $request->state }}">
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
<input type="hidden" name="auth_token" value="{{ $authToken }}">
<button class="btn btn-danger">Cancel</button>
<button class="btn btn-danger">{{ __('oauth.btn_deny') }}</button>
</form>
</div>
</div>