Skip to content

Commit

Permalink
修复角色组设置水印模式,无法选择「动态生成」的 bug (Fixed #502)
Browse files Browse the repository at this point in the history
  • Loading branch information
wisp-x committed Aug 17, 2022
1 parent f49f52d commit b6f5f24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Requests/Admin/GroupRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function rules()
'configs.image_cache_ttl' => 'nullable|numeric',

'configs.is_enable_watermark' => 'boolean',
'configs.watermark_configs.mode' => ['exclude_if:configs.is_enable_watermark,false', 'in:1,2'],
'configs.watermark_configs.mode' => ['in:1,2'],
'configs.watermark_configs.driver' => ['exclude_if:configs.is_enable_watermark,false', 'in:font,image'],
'configs.watermark_configs.drivers.font.font' => [
$requiredIfWatermark('font'),
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/group/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<div class="col-span-6 mt-4 mb-4">
<x-fieldset title="水印模式">
<x-fieldset-radio id="configs[watermark_configs][mode]_overlay" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Overlay }}" :checked="($group->configs['watermark_configs']['mode'] ?? '') == \App\Enums\Watermark\Mode::Overlay">覆盖原图</x-fieldset-radio>
<x-fieldset-radio id="configs[watermark_configs][mode]_dynamic" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Dynamic }}" :checked="($group->configs['watermark_configs']['dynamic'] ?? '') == \App\Enums\Watermark\Mode::Dynamic">动态生成</x-fieldset-radio>
<x-fieldset-radio id="configs[watermark_configs][mode]_dynamic" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Dynamic }}" :checked="($group->configs['watermark_configs']['mode'] ?? '') == \App\Enums\Watermark\Mode::Dynamic">动态生成</x-fieldset-radio>
</x-fieldset>
</div>
<div class="col-span-6 mt-4 mb-4">
Expand Down

0 comments on commit b6f5f24

Please sign in to comment.