discord in settings and clreanup .env.example

This commit is contained in:
1Day 2022-01-07 10:51:59 +01:00
parent d46417b235
commit 676a65098d
5 changed files with 117 additions and 64 deletions

View file

@ -8,18 +8,6 @@ APP_URL=http://localhost
APP_TIMEZONE=UTC
### --- App Settings End --- ###
### --- Localization settings --- ###
# If set to true, Language is chosen automatically depending on the users browserlanguage.
DYNAMIC_LOCALE = false
# The language of the Dashboard. This is also the fallback if dynamic_locale is true but no translation is found
LOCALE=en
# You can grab the Language-Codes for the Datatables from this Website https://datatables.net/plug-ins/i18n/
DATATABLE_LOCALE=en-gb
#The languages you DO NOT want to support on your Controlpanel split by comma.
#Remove the language to make it available
UNSUPPORTED_LOCALES=german,italian,chinese
### --- Localization settings End --- ###
### --- DB Settings (required) --- ###
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
@ -30,26 +18,6 @@ DB_PASSWORD=
### --- DB Settings End --- ###
### --- Discord Settings (optional) --- ###
# Discord API Credentials - https://discordapp.com/developers/applications/
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
# Bot Settings - will join users to your discord
DISCORD_BOT_TOKEN=
DISCORD_GUILD_ID=
# Discord role that will be assigned to users when they register
DISCORD_ROLE_ID=
### --- Discord Settings End --- ###
### --- Controlpanel Settings (required) --- ###
# Controlpanel URL Settings - URLs must not end with a slash!
PTERODACTYL_URL=https://panel.controlpanel.gg # required
PHPMYADMIN_URL=https://mysql.controlpanel.gg #optional. remove to remove database button
DISCORD_INVITE_URL=https://discord.gg/vrUYdxG4wZ #optional
# Admin API Token from Pterodactyl Panel - Nececary for the Panel to work
PTERODACTYL_TOKEN=
### --- Controlpanel Settings End --- ###
# Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)
RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
RECAPTCHA_SECRET_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

View file

@ -36,7 +36,14 @@ class Misc
$values = [
//SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form)
"SETTINGS::MISC:PHPMYADMIN:URL" => "phpmyadmin-url"
"SETTINGS::MISC:PHPMYADMIN:URL" => "phpmyadmin-url",
"SETTINGS::DISCORD:BOT_TOKEN" => "discord-bot-token",
"SETTINGS::DISCORD:CLIENT_ID" => "discord-client-id",
"SETTINGS::DISCORD:CLIENT_SECRET" => "discord-client-secret",
"SETTINGS::DISCORD:GUILD_ID" => "discord-guild-id",
"SETTINGS::DISCORD:INVITE_URL" => "discord-invite-url",
"SETTINGS::DISCORD:ROLE_ID" => "discord-role-id"
];

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -13,7 +13,8 @@
<div class="form-group">
<div class="custom-control mb-3">
<label for="phpmyadmin-url">{{ __('The URL to your PHPMYADMIN Panel. Must not end with a /, leave blank to remove database button') }}</label>
<label
for="phpmyadmin-url">{{ __('The URL to your PHPMYADMIN Panel. Must not end with a /, leave blank to remove database button') }}</label>
<input x-model="phpmyadmin-url" id="phpmyadmin-url" name="phpmyadmin-url" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::MISC:PHPMYADMIN:URL") }}"
class="form-control @error('phpmyadmin-url') is-invalid @enderror">
@ -45,6 +46,72 @@
@enderror
</div>
</div>
<div class="col-md-3">
<img class="mb-3" height="50"
src="{{ url('/images/discord_logo.png') }}">
<!-- DISCORD -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-client-id">{{ __('Your Discord client-id')}} ( Discord API Credentials -
https://discordapp.com/developers/applications/ ) </label>
<input x-model="discord-client-id" id="discord-client-id" name="discord-client-id" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:CLIENT_ID") }}"
class="form-control @error('discord-client-id') is-invalid @enderror">
</div>
</div>
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-client-secret">{{ __('Your Discord client-secret')}} </label>
<input x-model="discord-client-secret" id="discord-client-secret" name="discord-client-secret"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:CLIENT_SECRET") }}"
class="form-control @error('discord-client-secret') is-invalid @enderror">
</div>
</div>
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-client-secret">{{ __('Your Discord Bot-token')}} </label>
<input x-model="discord-bot-token" id="discord-bot-token" name="discord-bot-token"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:BOT_TOKEN") }}"
class="form-control @error('discord-bot-token') is-invalid @enderror">
</div>
</div>
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-client-secret">{{ __('Your Discord Guild-ID')}} </label>
<input x-model="discord-guild-id" id="discord-guild-id" name="discord-guild-id"
type="number"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:GUILD_ID") }}"
class="form-control @error('discord-guild-id') is-invalid @enderror">
</div>
</div>
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-invite-url">{{ __('Your Discord Server iniviation url')}} </label>
<input x-model="discord-invite-url" id="discord-invite-url" name="discord-invite-url"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:INVITE_URL") }}"
class="form-control @error('discord-invite-url') is-invalid @enderror">
</div>
</div>
<div class="form-group">
<div class="custom-control mb-3">
<label for="discord-role-id">{{ __('Discord role that will be assigned to users when they register (optional)')}} </label>
<input x-model="discord-role-id" id="discord-role-id" name="discord-role-id"
type="number"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::DISCORD:ROLE_ID") }}"
class="form-control @error('discord-role-id') is-invalid @enderror">
</div>
</div>
</div>
</div>
<button class="btn btn-primary">{{ __('Submit') }}</button>

View file

@ -21,8 +21,10 @@
<!-- PAYPAL -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="paypal-client-secret">{{ __('Your PayPal Secret-Key')}} ( https://developer.paypal.com/docs/integration/direct/rest/ ) </label>
<input x-model="paypal-client-secret" id="paypal-client-secret" name="paypal-client-secret" type="text"
<label for="paypal-client-secret">{{ __('Your PayPal Secret-Key')}} (
https://developer.paypal.com/docs/integration/direct/rest/ ) </label>
<input x-model="paypal-client-secret" id="paypal-client-secret" name="paypal-client-secret"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SECRET") }}"
class="form-control @error('paypal-client-secret') is-invalid @enderror">
</div>
@ -31,7 +33,8 @@
<!-- PAYPAL -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="paypal-sandbox-id">{{ __('Your PayPal SANDBOX Client-ID used for testing') }}</label>
<label
for="paypal-sandbox-id">{{ __('Your PayPal SANDBOX Client-ID used for testing') }}</label>
<input x-model="paypal-sandbox-id" id="paypal-sandbox-id" name="paypal-sandbox-id" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID") }}"
class="form-control @error('paypal-sandbox-id') is-invalid @enderror">
@ -41,8 +44,10 @@
<!-- PAYPAL -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="paypal-sandbox-secret">{{ __('Your PayPal SANDBOX Secret-Key used for testing ') }}</label>
<input x-model="paypal-sandbox-secret" id="paypal-sandbox-secret" name="paypal-sandbox-secret" type="text"
<label
for="paypal-sandbox-secret">{{ __('Your PayPal SANDBOX Secret-Key used for testing ') }}</label>
<input x-model="paypal-sandbox-secret" id="paypal-sandbox-secret" name="paypal-sandbox-secret"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") }}"
class="form-control @error('paypal-sandbox-secret') is-invalid @enderror">
</div>
@ -55,7 +60,8 @@
<!-- STRIPE -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="stripe-secret">{{ __('Your Stripe Secret-Key')}} ( https://dashboard.stripe.com/account/apikeys )</label>
<label for="stripe-secret">{{ __('Your Stripe Secret-Key')}} (
https://dashboard.stripe.com/account/apikeys )</label>
<input x-model="stripe-secret" id="stripe-secret" name="stripe-secret" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:SECRET") }}"
class="form-control @error('stripe-secret') is-invalid @enderror">
@ -65,7 +71,8 @@
<div class="form-group">
<div class="custom-control mb-3">
<label for="stripe-endpoint-secret">{{ __('Enter your Stripe endpoint-secret-key') }}</label>
<input x-model="stripe-endpoint-secret" id="stripe-endpoint-secret" name="stripe-endpoint-secret" type="text"
<input x-model="stripe-endpoint-secret" id="stripe-endpoint-secret"
name="stripe-endpoint-secret" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") }}"
class="form-control @error('stripe-endpoint-secret') is-invalid @enderror">
</div>
@ -75,7 +82,8 @@
<div class="form-group">
<div class="custom-control mb-3">
<label for="stripe-test-secret">{{ __('Enter your Stripe test-secret-key') }}</label>
<input x-model="stripe-test-secret" id="stripe-test-secret" name="stripe-test-secret" type="text"
<input x-model="stripe-test-secret" id="stripe-test-secret" name="stripe-test-secret"
type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:TEST_SECRET") }}"
class="form-control @error('stripe-test-secret') is-invalid @enderror">
</div>
@ -84,8 +92,10 @@
<!-- STRIPE -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="stripe-endpoint-test-secret">{{ __('Enter your Stripe endpoint-test-secret-key') }}</label>
<input x-model="stripe-endpoint-test-secret" id="stripe-endpoint-test-secret" name="stripe-endpoint-test-secret" type="text"
<label
for="stripe-endpoint-test-secret">{{ __('Enter your Stripe endpoint-test-secret-key') }}</label>
<input x-model="stripe-endpoint-test-secret" id="stripe-endpoint-test-secret"
name="stripe-endpoint-test-secret" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET") }}"
class="form-control @error('stripe-endpoint-test-secret') is-invalid @enderror">
</div>
@ -94,7 +104,8 @@
<!-- STRIPE -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="stripe-methods">{{ __('Comma seperated list of payment methods that are enabled')}} (https://stripe.com/docs/payments/payment-methods/integration-options)</label>
<label for="stripe-methods">{{ __('Comma seperated list of payment methods that are enabled')}}
(https://stripe.com/docs/payments/payment-methods/integration-options)</label>
<input x-model="stripe-methods" id="stripe-methods" name="stripe-methods" type="text"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:METHODS") }}"
class="form-control @error('stripe-methods') is-invalid @enderror">
@ -103,7 +114,6 @@
</div>
<!-- Sorry IceToast, aber kein plan wie man das hier schön gestalten soll.... -->
<div class="row">
<div class="col-md-6">
@ -111,7 +121,8 @@
<!-- Tax -->
<div class="form-group">
<div class="custom-control mb-3">
<label for="salex_tax">{{ __('The %-value of tax that will be added to the product price on checkout')}}</label>
<label
for="salex_tax">{{ __('The %-value of tax that will be added to the product price on checkout')}}</label>
<input x-model="salex_tax" id="salex_tax" name="salex_tax" type="number"
value="{{ App\Models\Settings::getValueByKey("SETTINGS::PAYMENTS:SALES_TAX") }}"
class="form-control @error('salex_tax') is-invalid @enderror">