mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Improving Switches on Config Server Page
This commit is contained in:
parent
3eeb00e524
commit
7949db65ac
@ -194,6 +194,7 @@
|
||||
required>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-check-flat">
|
||||
<label for="auto_start" class="form-check-label ml-4 mb-4">
|
||||
{% if data['server_stats']['server_id']['auto_start'] %}
|
||||
@ -233,6 +234,43 @@
|
||||
</label>
|
||||
{% end %}
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
{% if data['server_stats']['server_id']['auto_start'] %}
|
||||
<input type="checkbox" class="custom-control-input" id="auto_start" name="auto_start" checked="" value="1">
|
||||
<label class="custom-control-label" for="auto_start"> {{ translate('serverConfig', 'serverAutoStart', data['lang']) }}</label>
|
||||
{% else %}
|
||||
<input type="checkbox" class="custom-control-input" id="auto_start" name="auto_start" value="1">
|
||||
<label class="custom-control-label" for="auto_start"> {{ translate('serverConfig', 'serverAutoStart', data['lang']) }}</label>
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
{% if data['server_stats']['server_id']['crash_detection'] %}
|
||||
<input type="checkbox" class="custom-control-input" id="crash_detection" name="crash_detection" checked="" value="1">
|
||||
<label class="custom-control-label" for="crash_detection"> {{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}</label>
|
||||
{% else %}
|
||||
<input type="checkbox" class="custom-control-input" id="crash_detection" name="crash_detection" value="1">
|
||||
<label class="custom-control-label" for="crash_detection"> {{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}</label>
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
{% if data['super_user'] %}
|
||||
{% if data['server_stats']['server_id']['show_status'] %}
|
||||
<input type="checkbox" class="custom-control-input" id="show_status" name="show_status" checked="" value="1">
|
||||
<label class="custom-control-label" for="show_status"> {{ translate('serverConfig', 'showStatus', data['lang']) }}</label>
|
||||
{% else %}
|
||||
<input type="checkbox" class="custom-control-input" id="show_status" name="show_status" value="1"> {{ translate('serverConfig', 'showStatus', data['lang']) }}
|
||||
<label class="custom-control-label" for="show_status"> {{ translate('serverConfig', 'showStatus', data['lang']) }}</label>
|
||||
{% end %}
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-save"></i> {{
|
||||
translate('serverConfig', 'save', data['lang']) }}</button>
|
||||
@ -305,18 +343,19 @@
|
||||
|
||||
</div>
|
||||
<style>
|
||||
.toggle-handle {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.toggle-on {
|
||||
.custom-control-input:checked~.custom-control-label::before {
|
||||
color: black !important;
|
||||
background-color: blueviolet !important;
|
||||
border-color: var(--outline) !important;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
height: 0px !important;
|
||||
background-color: grey !important;
|
||||
.custom-control-label::before {
|
||||
background-color: white !important;
|
||||
top: calc(-0.2rem);
|
||||
}
|
||||
|
||||
.custom-switch .custom-control-label::after {
|
||||
top: calc(-0.125rem + 1px);
|
||||
}
|
||||
</style>
|
||||
<!-- content-wrapper ends -->
|
||||
|
Loading…
Reference in New Issue
Block a user