Skip to content

Commit

Permalink
improve approval trans
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Aug 16, 2022
1 parent b398c8d commit 78a2507
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/Filament/Resources/User/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Support\HtmlString;

class UserResource extends Resource
{
Expand Down Expand Up @@ -56,7 +57,8 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('id')->sortable()->searchable(),
Tables\Columns\TextColumn::make('username')->searchable()->label(__("label.user.username")),
Tables\Columns\TextColumn::make('username')->searchable()->label(__("label.user.username"))
->formatStateUsing(fn ($record) => new HtmlString(get_username($record->id, false, true, false, true))),
Tables\Columns\TextColumn::make('email')->searchable()->label(__("label.email")),
Tables\Columns\TextColumn::make('class')->label('Class')
->formatStateUsing(fn(Tables\Columns\Column $column) => $column->getRecord()->classText)
Expand Down
2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.21');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-08-13');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-08-16');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
'permanent' => 'Permanent',
'operator' => 'Operator',
'action' => 'Action',
'submit' => 'Submit',
'reset' => 'Reset',
'setting' => [
'nav_text' => 'Setting',
'backup' => [
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/zh_CN/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
'permanent' => '永久有效',
'operator' => '操作者',
'action' => '操作',
'submit' => '提交',
'reset' => '重置',
'setting' => [
'nav_text' => '设置',
'backup' => [
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/zh_TW/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
'permanent' => '永久有效',
'operator' => '操作者',
'action' => '操作',
'submit' => '提交',
'reset' => '重置',
'setting' => [
'nav_text' => '設置',
'backup' => [
Expand Down
4 changes: 2 additions & 2 deletions resources/views/torrent/approval.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="formDemo">Submit</button>
<button type="reset" class="layui-btn layui-btn-primary">Reset</button>
<button class="layui-btn" lay-submit lay-filter="formDemo">{{ __('label.submit') }}</button>
<button type="reset" class="layui-btn layui-btn-primary">{{ __('label.reset') }}</button>
</div>
</div>
</form>
Expand Down

0 comments on commit 78a2507

Please sign in to comment.