feat: added new settings
This commit is contained in:
parent
70f4ff13c1
commit
5d18b36083
|
@ -46,6 +46,8 @@ public function checkPteroClientkey(){
|
||||||
"pterodactyl-admin-api-key" => "required|string",
|
"pterodactyl-admin-api-key" => "required|string",
|
||||||
"enable-upgrades" => "string",
|
"enable-upgrades" => "string",
|
||||||
"enable-disable-servers" => "string",
|
"enable-disable-servers" => "string",
|
||||||
|
"show-imprint" => "string",
|
||||||
|
"show-privacy" => "string",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$validator->after(function ($validator) use ($request) {
|
$validator->after(function ($validator) use ($request) {
|
||||||
|
@ -87,6 +89,8 @@ public function checkPteroClientkey(){
|
||||||
"SETTINGS::SYSTEM:ENABLE_UPGRADE" => "enable-upgrade",
|
"SETTINGS::SYSTEM:ENABLE_UPGRADE" => "enable-upgrade",
|
||||||
"SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS" => "enable-disable-servers",
|
"SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS" => "enable-disable-servers",
|
||||||
"SETTINGS::SYSTEM:CREATION_OF_NEW_USERS" => "enable-disable-new-users",
|
"SETTINGS::SYSTEM:CREATION_OF_NEW_USERS" => "enable-disable-new-users",
|
||||||
|
"SETTINGS::SYSTEM:SHOW_IMPRINT" => "show-imprint",
|
||||||
|
"SETTINGS::SYSTEM:SHOW_PRIVACY" => "show-privacy",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -532,9 +532,23 @@ class SettingsSeeder extends Seeder
|
||||||
Settings::firstOrCreate([
|
Settings::firstOrCreate([
|
||||||
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS',
|
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS',
|
||||||
], [
|
], [
|
||||||
'value' => "true",
|
'value' => "false",
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'description' => 'Enable/disable the creation of new users'
|
'description' => 'Enable/disable the creation of new users'
|
||||||
]);
|
]);
|
||||||
|
Settings::firstOrCreate([
|
||||||
|
'key' => 'SETTINGS::SYSTEM:SHOW_IMPRINT',
|
||||||
|
], [
|
||||||
|
'value' => "true",
|
||||||
|
'type' => 'boolean',
|
||||||
|
'description' => 'Enable/disable imprint in footer'
|
||||||
|
]);
|
||||||
|
Settings::firstOrCreate([
|
||||||
|
'key' => 'SETTINGS::SYSTEM:SHOW_PRIVACY',
|
||||||
|
], [
|
||||||
|
'value' => "true",
|
||||||
|
'type' => 'boolean',
|
||||||
|
'description' => 'Enable/disable privacy policy in footer'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,32 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="custom-control mb-1 p-0">
|
||||||
|
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||||
|
<div>
|
||||||
|
<input value="true" id="show-imprint" name="show-imprint"
|
||||||
|
{{ config('SETTINGS::SYSTEM:SHOW_IMPRINT') == 'true' ? 'checked' : '' }}
|
||||||
|
type="checkbox">
|
||||||
|
<label for="show-imprint">{{ __('Show imprint') }} </label>
|
||||||
|
</div>
|
||||||
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
|
data-content="{{ __('Show the imprint link in the footer of every page.') }}"
|
||||||
|
class="fas fa-info-circle"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="custom-control mb-1 p-0">
|
||||||
|
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||||
|
<div>
|
||||||
|
<input value="true" id="show-privacy" name="show-privacy"
|
||||||
|
{{ config('SETTINGS::SYSTEM:SHOW_PRIVACY') == 'true' ? 'checked' : '' }}
|
||||||
|
type="checkbox">
|
||||||
|
<label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
|
||||||
|
</div>
|
||||||
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
|
data-content="{{ __('Show the privacy policy link in the footer of every page.') }}"
|
||||||
|
class="fas fa-info-circle"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="custom-control mb-1 p-0">
|
<div class="custom-control mb-1 p-0">
|
||||||
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||||
<div>
|
<div>
|
||||||
|
@ -26,6 +52,7 @@
|
||||||
class="fas fa-info-circle"></i>
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-control mb-3 p-0">
|
<div class="custom-control mb-3 p-0">
|
||||||
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||||
<div>
|
<div>
|
||||||
|
@ -94,21 +121,24 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control p-0 mb-3">
|
<div class="custom-control p-0 mb-3">
|
||||||
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||||
<label for="pterodactyl-admin-api-key">{{ __('Pterodactyl Admin-Account API Key') }}</label>
|
<label
|
||||||
|
for="pterodactyl-admin-api-key">{{ __('Pterodactyl Admin-Account API Key') }}</label>
|
||||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
data-content="{{ __('Enter the Client-API Key to a Pterodactyl-Admin-User here.') }}"
|
data-content="{{ __('Enter the Client-API Key to a Pterodactyl-Admin-User here.') }}"
|
||||||
class="fas fa-info-circle"></i>
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
<input x-model="pterodactyl-admin-api-key" id="pterodactyl-admin-api-key" name="pterodactyl-admin-api-key"
|
<input x-model="pterodactyl-admin-api-key" id="pterodactyl-admin-api-key"
|
||||||
type="text" value="{{ config('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN') }}"
|
name="pterodactyl-admin-api-key" type="text"
|
||||||
|
value="{{ config('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN') }}"
|
||||||
class="form-control @error('pterodactyl-admin-api-key') is-invalid @enderror" required>
|
class="form-control @error('pterodactyl-admin-api-key') is-invalid @enderror" required>
|
||||||
@error('pterodactyl-admin-api-key')
|
@error('pterodactyl-admin-api-key')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{ $message }}
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<a href="{{route('admin.settings.checkPteroClientkey')}}"> <button type="button" class="btn btn-secondary">{{__("Test API")}}</button></a>
|
<a href="{{ route('admin.settings.checkPteroClientkey') }}"> <button type="button"
|
||||||
|
class="btn btn-secondary">{{ __('Test API') }}</button></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -157,8 +187,7 @@
|
||||||
class="form-control @error('initial-server-limit') is-invalid @enderror" required>
|
class="form-control @error('initial-server-limit') is-invalid @enderror" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control mb-3 p-0">
|
<div class="custom-control mb-3 p-0">
|
||||||
<label
|
<label for="credits-reward-amount-discord">{{ __('Credits Reward Amount - Discord') }}</label>
|
||||||
for="credits-reward-amount-discord">{{ __('Credits Reward Amount - Discord') }}</label>
|
|
||||||
<input x-model="credits-reward-amount-discord" id="credits-reward-amount-discord"
|
<input x-model="credits-reward-amount-discord" id="credits-reward-amount-discord"
|
||||||
name="credits-reward-amount-discord" type="number"
|
name="credits-reward-amount-discord" type="number"
|
||||||
value="{{ config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD') }}"
|
value="{{ config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD') }}"
|
||||||
|
@ -188,8 +217,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control mb-3 p-0">
|
<div class="custom-control mb-3 p-0">
|
||||||
<label for="server-limit-purchase">{{ __('Server Limit after Credits Purchase') }}</label>
|
<label for="server-limit-purchase">{{ __('Server Limit after Credits Purchase') }}</label>
|
||||||
<input x-model="server-limit-purchase" id="server-limit-purchase" name="server-limit-purchase"
|
<input x-model="server-limit-purchase" id="server-limit-purchase"
|
||||||
type="number"
|
name="server-limit-purchase" type="number"
|
||||||
value="{{ config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') }}"
|
value="{{ config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') }}"
|
||||||
class="form-control @error('server-limit-purchase') is-invalid @enderror" required>
|
class="form-control @error('server-limit-purchase') is-invalid @enderror" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -241,8 +270,8 @@
|
||||||
data-content="{{ __('The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!') }}"
|
data-content="{{ __('The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!') }}"
|
||||||
class="fas fa-info-circle"></i>
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
<input x-model="allocation-limit" id="allocation-limit" name="allocation-limit" type="number"
|
<input x-model="allocation-limit" id="allocation-limit" name="allocation-limit"
|
||||||
value="{{ config('SETTINGS::SERVER:ALLOCATION_LIMIT') }}"
|
type="number" value="{{ config('SETTINGS::SERVER:ALLOCATION_LIMIT') }}"
|
||||||
class="form-control @error('allocation-limit') is-invalid @enderror" required>
|
class="form-control @error('allocation-limit') is-invalid @enderror" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,15 +286,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control mb-3 p-0">
|
<div class="custom-control mb-3 p-0">
|
||||||
<input value="true" id="enable-login-logo" name="enable-login-logo"
|
<input value="true" id="enable-login-logo" name="enable-login-logo"
|
||||||
{{ config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO') == 'true' ? 'checked' : '' }}
|
{{ config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO') == 'true' ? 'checked' : '' }} type="checkbox">
|
||||||
type="checkbox">
|
|
||||||
<label for="enable-login-logo">{{ __('Enable Logo on Loginpage') }} </label>
|
<label for="enable-login-logo">{{ __('Enable Logo on Loginpage') }} </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input" name="icon"
|
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input"
|
||||||
id="icon">
|
name="icon" id="icon">
|
||||||
<label class="custom-file-label selected" for="icon">{{ __('Select panel icon') }}</label>
|
<label class="custom-file-label selected"
|
||||||
|
for="icon">{{ __('Select panel icon') }}</label>
|
||||||
</div>
|
</div>
|
||||||
@error('icon')
|
@error('icon')
|
||||||
<span class="text-danger">
|
<span class="text-danger">
|
||||||
|
@ -275,9 +304,10 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input" name="logo"
|
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input"
|
||||||
id="logo">
|
name="logo" id="logo">
|
||||||
<label class="custom-file-label selected" for="logo">{{ __('Select Login-page Logo') }}</label>
|
<label class="custom-file-label selected"
|
||||||
|
for="logo">{{ __('Select Login-page Logo') }}</label>
|
||||||
</div>
|
</div>
|
||||||
@error('logo')
|
@error('logo')
|
||||||
<span class="text-danger">
|
<span class="text-danger">
|
||||||
|
|
Loading…
Reference in a new issue