filament setting apge

This commit is contained in:
xiaomlove
2022-06-29 17:00:15 +08:00
parent 6fb3d95ef0
commit 1a8866f3d0
21 changed files with 314 additions and 47 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
return [
'setting' => [
'nav_text' => '设置',
'backup' => [
'tab_header' => '备份',
'enabled' => '是否启用',
'enabled_help' => '是否启用备份功能',
'frequency' => '频率',
'frequency_help' => '备份频率',
'hour' => '小时',
'hour_help' => '在这个点钟数进行备份',
'minute' => '分钟',
'minute_help' => "在前面点钟数的这一分钟进行备份。如果频率是按 'hourly',此值会被忽略",
'google_drive_client_id' => 'Google Drive client ID',
'google_drive_client_secret' => 'Google Drive client secret',
'google_drive_refresh_token' => 'Google Drive refresh token',
'google_drive_folder_id' => 'Google Drive folder ID',
'via_ftp' => '通过 FTP 保存',
'via_ftp_help' => '是否通过 FTP 保存。如果通过,把配置信息添加到 .env 文件,参考 <a href="https://laravel.com/docs/master/filesystem#ftp-driver-configuration">Laravel 文档</a>',
'via_sftp' => '通过 SFTP 保存',
'via_sftp_help' => '是否通过 SFTP 保存。如果通过,把配置信息添加到 .env 文件,参考 <a href="https://laravel.com/docs/master/filesystem#sftp-driver-configuration">Laravel 文档</a>',
],
'hr' => [
'tab_header' => 'H&R',
'mode' => '模式',
'inspect_time' => '考察时长',
'inspect_time_help' => '考察时长自下载完成后开始计算,单位:小时',
'seed_time_minimum' => '达标做种时长',
'seed_time_minimum_help' => '达标的最短做种时长,单位:小时,必须小于考察时长',
'ignore_when_ratio_reach' => '达标分享率',
'ignore_when_ratio_reach_help' => '达标的最小分享率',
'ban_user_when_counts_reach' => 'H&R 数量上限',
'ban_user_when_counts_reach_help' => 'H&R 数量达到此值,账号会被禁用',
]
],
'user' => [
]
];
@@ -1,3 +1,10 @@
<x-filament::page>
<form wire:submit.prevent="submit">
{{ $this->form }}
<div class="flex justify-center mt-10">
<button type="submit" class="inline-flex items-center justify-center gap-1 font-medium rounded-lg border transition-colors focus:outline-none focus:ring-offset-2 focus:ring-2 focus:ring-inset filament-button h-9 px-4 text-sm text-white shadow focus:ring-white border-transparent bg-primary-600 hover:bg-primary-500 focus:bg-primary-700 focus:ring-offset-primary-700 filament-page-button-action">
{{__('filament::resources/pages/edit-record.form.actions.save.label')}}
</button>
</div>
</form>
</x-filament::page>
@@ -0,0 +1,3 @@
<x-filament::page>
{{ $this->form }}
</x-filament::page>
@@ -1,3 +1,94 @@
<x-filament::page>
<div class="flex">
<div class="w-full">
<table class="table w-full text-left border-spacing-y-2 border-collapse divide-y">
<tbody>
<tr>
<th>UID</th>
<td>{{$user->id}}</td>
<td></td>
</tr>
<tr>
<th>Username</th>
<td>{{$user->username}}</td>
<td></td>
</tr>
<tr>
<th>Email</th>
<td>{{$user->email}}</td>
<td></td>
</tr>
<tr>
<th>Status</th>
<td>{{$user->status}}</td>
<td></td>
</tr>
<tr>
<th>Enabled</th>
<td>{{$user->enabled}}</td>
<td><button class="border px-1 rounded">Disable</button></td>
</tr>
<tr>
<th>Added</th>
<td>{{$user->added}}</td>
<td></td>
</tr>
<tr>
<th>Last access</th>
<td>{{$user->last_access}}</td>
<td></td>
</tr>
<tr>
<th>Class</th>
<td>{{$user->classText}}</td>
<td></td>
</tr>
<tr>
<th>Invite by</th>
<td>{{$user->inviter->username ?? ''}}</td>
<td><button class="border px-1 rounded">View</button></td>
</tr>
<tr>
<th>Tow-step authentication</th>
<td>{{$user->two_step_secret ? 'Enabled' : 'Disabled'}}</td>
<td><button class="border px-1 rounded">Disable</button></td>
</tr>
<tr>
<th>Seed points</th>
<td>{{$user->seed_points}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
<tr>
<th>Attendance card</th>
<td>{{$user->attendance_card}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
<tr>
<th>Invites</th>
<td>{{$user->invites}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
<tr>
<th>Uploaded</th>
<td>{{$user->uploadedText}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
<tr>
<th>Downloaded</th>
<td>{{$user->downloadedText}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
<tr>
<th>Bonus</th>
<td>{{$user->seedbonus}}</td>
<td><button class="border px-1 rounded">Change</button></td>
</tr>
</tbody>
</table>
</div>
<div class="w-full">
</div>
</div>
</x-filament::page>