进一步 优化系统设置页面的显示

This commit is contained in:
兔姬桑
2021-06-25 17:58:29 +08:00
parent 0fd76ba5b4
commit 021e2b3153
9 changed files with 381 additions and 1625 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
@props(['code', 'title', 'value'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-form-label col-md-3" for="{{$code}}">{{$title}}</label>
<div class="col-md-8">
<input type="file" id="{{$code}}" data-plugin="dropify" data-default-file="{{asset($value ?? '/assets/images/default.png')}}"/>
<button type="submit" class="btn btn-success float-right mt-10"> </button>
</div>
</div>
</div>

View File

@@ -0,0 +1,41 @@
@props(['code', 'hcode', 'title', 'value', 'holder' => '', 'help', 'min' => 0, 'max' => false, 'hmin' => false, 'hmax' => false, 'hvalue', 'unit'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label">{{$title}}</label>
<div class="col-md-7">
@isset($hcode)
<div class="input-group">
<label for="{{$code}}"></label>
<input type="number" class="form-control" id="{{$code}}" value="{{$value}}"
onchange="updateFromInput('{{$code}}', {{$min}},{{$max}})"/>
<div class="input-group-prepend">
<span class="input-group-text"> ~ </span>
</div>
<label for="{{$hcode}}"></label>
<input type="number" class="form-control" id="{{$hcode}}" value="{{$hvalue}}"
onchange="updateFromInput('{{$hcode}}',{{$hmin}},{{$hmax}})"/>
@isset($unit)
<div class="input-group-prepend">
<span class="input-group-text"> {{$unit}} </span>
</div>
@endisset
</div>
@else
<div class="input-group">
<input type="number" class="form-control" id="{{$code}}" value="{{$value}}"/>
<div class="input-group-append">
@isset($unit)
<span class="input-group-text">{{$unit}}</span>
@endisset
<button class="btn btn-primary" type="button"
onclick="updateFromInput('{{$code}}', {{$min}}, {{$max}})">{{trans('common.update')}}</button>
</div>
</div>
@endisset
@isset($help)
<span class="text-help"> {!! $help !!} </span>
@endisset
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
@props(['type' => 'text','code', 'title', 'value', 'holder' => '','help', 'test'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label" for="{{$code}}">{{$title}}</label>
<div class="col-md-6">
<div class="input-group">
<input type="{{$type}}" class="form-control" id="{{$code}}" value="{{$value}}" placeholder="{{$holder}}"/>
<span class="input-group-append">
<button class="btn btn-primary" type="button" onclick="update('{{$code}}')">{{trans('common.update')}}</button>
</span>
</div>
@isset($help)
<span class="text-help"> {!! $help !!}@can('admin.test.notify')<a href="javascript:sendTestNotification('{{$test}}');">发送测试消息</a>@endcan</span>
@endisset
</div>
</div>
</div>

View File

@@ -0,0 +1,18 @@
@props(['type' => 'text', 'code', 'title', 'value', 'holder' => '', 'help'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label" for="{{$code}}">{{$title}}</label>
<div class="col-md-6">
<div class="input-group">
<input type="{{$type}}" class="form-control" id="{{$code}}" value="{{$value}}" placeholder="{{$holder}}"/>
<span class="input-group-append">
<button class="btn btn-primary" type="button" onclick="update('{{$code}}')">{{trans('common.update')}}</button>
</span>
</div>
@isset($help)
<span class="text-help"> {!! $help !!} </span>
@endisset
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
@props(['code', 'title', 'list', 'help', 'multiple' => 0])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label" for="{{$code}}">{{$title}}</label>
<div class="col-md-9">
<select id="{{$code}}" data-plugin="selectpicker" data-style="btn-outline btn-primary" onchange="updateFromOther('select','{{$code}}')" @if ($multiple) multiple @endif>
@foreach ($list as $item => $value)
<option value="{{$value}}">{{$item}}</option>
@endforeach
</select>
@isset($help)
<span class="text-help"> {!! $help !!} </span>
@endisset
</div>
</div>
</div>

View File

@@ -0,0 +1,13 @@
@props(['code', 'title', 'help', 'check'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label" for="{{$code}}">{{$title}}</label>
<div class="col-md-9">
<input type="checkbox" id="{{$code}}" data-plugin="switchery" @if($check) checked @endif onchange="updateFromOther('switch','{{$code}}')">
@isset($help)
<span class="text-help"> {!! $help !!} </span>
@endisset
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
@props(['active' => false, 'id', 'slot'])
<div class="tab-pane {{$active ? 'active' : ''}}" id="{{$id}}" role="tabpanel">
<div class="form-row">
{{$slot}}
</div>
</div>

View File

@@ -0,0 +1,18 @@
@props(['code', 'title', 'value', 'row' => 10, 'help'])
<div class="form-group col-lg-6">
<div class="row">
<label class="col-md-3 col-form-label" for="{{$code}}">{{$title}}</label>
<div class="col-md-8">
<div class="input-group">
<textarea class="form-control" rows={{$row}} id="{{$code}}">{{$value}}</textarea>
<span class="input-group-append">
<button class="btn btn-primary" type="button" onclick="update('{{$code}}')">{{trans('common.update')}}</button>
</span>
</div>
@isset($help)
<span class="text-help"> {!! $help !!} </span>
@endisset
</div>
</div>
</div>