mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
✨ 完善角色组编辑页面
This commit is contained in:
parent
5662f86aae
commit
4975f3e1c1
@ -3,7 +3,6 @@
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Enums\ConfigKey;
|
||||
use App\Enums\GroupConfigKey;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Admin\GroupRequest;
|
||||
use App\Models\Group;
|
||||
@ -74,9 +73,9 @@ class GroupController extends Controller
|
||||
return $this->success('success', $request->validated());
|
||||
}
|
||||
|
||||
public function update(Request $request): Response
|
||||
public function update(GroupRequest $request): Response
|
||||
{
|
||||
return $this->success('success', $request->all());
|
||||
return $this->success('success', $request->validated());
|
||||
}
|
||||
|
||||
public function delete(Request $request): Response
|
||||
|
@ -7,7 +7,7 @@ use App\Exceptions\UploadException;
|
||||
use App\Http\Api;
|
||||
use App\Models\Image;
|
||||
use App\Models\User;
|
||||
use App\Service\ImageService;
|
||||
use App\Services\ImageService;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
|
10
app/Mappers/GroupConfig.php
Normal file
10
app/Mappers/GroupConfig.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mappers;
|
||||
|
||||
use JsonMapper\Middleware\Attributes\MapFrom;
|
||||
|
||||
class GroupConfig
|
||||
{
|
||||
public int $maximumFileSize = 5120;
|
||||
}
|
@ -5,7 +5,7 @@ namespace App\Models;
|
||||
use App\Enums\GroupConfigKey;
|
||||
use App\Enums\Strategy\LocalOption;
|
||||
use App\Enums\StrategyKey;
|
||||
use App\Service\ImageService;
|
||||
use App\Services\ImageService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Services;
|
||||
|
||||
use App\Enums\ConfigKey;
|
||||
use App\Enums\GroupConfigKey;
|
@ -15,11 +15,11 @@ return [
|
||||
ConfigKey::SiteKeywords => 'Lsky Pro,lsky,兰空图床',
|
||||
ConfigKey::SiteDescription => 'Lsky Pro, Your photo album on the cloud.',
|
||||
ConfigKey::IcpNo => '',
|
||||
ConfigKey::IsEnableRegistration => 1,
|
||||
ConfigKey::IsEnableGallery => 1,
|
||||
ConfigKey::IsAllowGuestUpload => 1,
|
||||
ConfigKey::IsEnableRegistration => true,
|
||||
ConfigKey::IsEnableGallery => true,
|
||||
ConfigKey::IsAllowGuestUpload => true,
|
||||
ConfigKey::UserInitialCapacity => 512000,
|
||||
ConfigKey::IsUserNeedVerify => 1,
|
||||
ConfigKey::IsUserNeedVerify => true,
|
||||
ConfigKey::MailConfigs => [
|
||||
'default' => 'smtp',
|
||||
'mailers' => [
|
||||
@ -35,9 +35,9 @@ return [
|
||||
ConfigKey::GroupConfigs => [
|
||||
GroupConfigKey::MaximumFileSize => 5120,
|
||||
GroupConfigKey::ConcurrentUploadNum => 3,
|
||||
GroupConfigKey::IsEnableScan => 0,
|
||||
GroupConfigKey::IsEnableWatermark => 0,
|
||||
GroupConfigKey::IsEnableOriginalProtection => 0,
|
||||
GroupConfigKey::IsEnableScan => false,
|
||||
GroupConfigKey::IsEnableWatermark => false,
|
||||
GroupConfigKey::IsEnableOriginalProtection => false,
|
||||
GroupConfigKey::ScannedAction => 'mark', // in mark or delete
|
||||
GroupConfigKey::ScanConfigs => [
|
||||
'driver' => 'aliyun',
|
||||
|
@ -25,6 +25,7 @@
|
||||
<label for="name" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>组名称</label>
|
||||
@if($group->id == 0)
|
||||
<input type="text" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md bg-gray-100" value="{{ $group->name }}" disabled readonly>
|
||||
<input type="hidden" name="name" id="name" value="{{ $group->name }}">
|
||||
@else
|
||||
<input type="text" name="name" id="name" autocomplete="name" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="请输入组名称" value="{{ $group->name }}">
|
||||
@endif
|
||||
|
Loading…
Reference in New Issue
Block a user