Add admin dashboard config partials

This commit is contained in:
Daniel Supernault 2019-04-08 21:42:32 -06:00
parent a0349ec828
commit 9ad8a8e46c
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
4 changed files with 174 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<div class="alert alert-info">Cache information is read only, to make changes please edit the .env</div>
<div class="form-group row">
<label for="app_name" class="col-sm-3 col-form-label font-weight-bold text-right">Driver</label>
<div class="col-sm-9">
<select class="form-control" disabled>
<option {{config('cache.default') == 'apc' ? 'selected=""':''}}>APC</option>
<option {{config('cache.default') == 'array' ? 'selected=""':''}}>Array</option>
<option {{config('cache.default') == 'database' ? 'selected=""':''}}>Database</option>
<option {{config('cache.default') == 'file' ? 'selected=""':''}}>File</option>
<option {{config('cache.default') == 'memcached' ? 'selected=""':''}}>Memcached</option>
<option {{config('cache.default') == 'redis' ? 'selected=""':''}}>Redis</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="db_host" class="col-sm-3 col-form-label font-weight-bold text-right">Cache Prefix</label>
<div class="col-sm-9">
<input type="text" class="form-control" disabled value="{{config('cache.prefix')}}">
</div>
</div>

View File

@ -0,0 +1,37 @@
<div class="alert alert-info">Database information is read only, to make changes please edit the .env</div>
<div class="form-group row">
<label for="app_name" class="col-sm-3 col-form-label font-weight-bold text-right">Driver</label>
<div class="col-sm-9">
<select class="form-control" disabled>
<option {{config('database.default') == 'mysql' ? 'selected=""':''}}>MySQL</option>
<option {{config('database.default') == 'pgsql' ? 'selected=""':''}}>Postgres</option>
<option {{config('database.default') == 'sqlite' ? 'selected=""':''}}>SQLite</option>
<option {{config('database.default') == 'sqlsrv' ? 'selected=""':''}}>MSSQL</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="db_host" class="col-sm-3 col-form-label font-weight-bold text-right">Host</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="" name="db_host" disabled value="{{config('database.connections.mysql.host')}}">
</div>
</div>
<div class="form-group row">
<label for="db_port" class="col-sm-3 col-form-label font-weight-bold text-right">Port</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="db_port" name="db_port" disabled value="{{config('database.connections.mysql.port')}}">
</div>
</div>
<div class="form-group row">
<label for="db_database" class="col-sm-3 col-form-label font-weight-bold text-right">Database</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="db_database" name="db_database" disabled value="{{config('database.connections.mysql.database')}}">
</div>
</div>
<div class="form-group row">
<label for="db_username" class="col-sm-3 col-form-label font-weight-bold text-right">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="db_username" name="db_username" disabled value="{{config('database.connections.mysql.username')}}">
</div>
</div>

View File

@ -0,0 +1,12 @@
<div class="alert alert-info">Filesystems information is read only, to make changes please edit the .env</div>
<div class="form-group row">
<label for="app_name" class="col-sm-3 col-form-label font-weight-bold text-right">Driver</label>
<div class="col-sm-9">
<select class="form-control" disabled>
<option {{config('filesystems.default') == 'local' ? 'selected=""':''}}>Local</option>
<option {{config('filesystems.default') == 's3' ? 'selected=""':''}}>S3</option>
<option {{config('filesystems.default') == 'spaces' ? 'selected=""':''}}>Digital Ocean Spaces</option>
</select>
</div>
</div>

View File

@ -0,0 +1,103 @@
<form method="post">
@csrf
<div class="form-group row">
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">Registration</label>
<div class="col-sm-9">
<div class="form-check pb-2">
<input class="form-check-input" type="checkbox" id="open_registration" name="open_registration" {{config('pixelfed.open_registration') === true ? 'checked=""' : '' }}>
<label class="form-check-label font-weight-bold" for="open_registration">
{{config('pixelfed.open_registration') === true ? 'Open' : 'Closed' }}
</label>
<p class="text-muted small help-text font-weight-bold">When this option is enabled, new user registration is open.</p>
</div>
</div>
</div>
<div class="form-group row">
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">Email Validation</label>
<div class="col-sm-9">
<div class="form-check pb-2">
<input class="form-check-input" type="checkbox" id="enforce_email_verification" name="enforce_email_verification" {{config('pixelfed.enforce_email_verification') === true ? 'checked=""' : '' }}>
<label class="form-check-label font-weight-bold" for="open_registration">
{{config('pixelfed.enforce_email_verification') == true ? 'Enabled' : 'Disabled' }}
</label>
<p class="text-muted small help-text font-weight-bold">Enforce email validation for new user registration.</p>
</div>
</div>
</div>
<div class="form-group row">
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">Recaptcha</label>
<div class="col-sm-9">
<div class="form-check pb-2">
<input class="form-check-input" type="checkbox" id="recaptcha" name="recaptcha" {{config('pixelfed.recaptcha') === true ? 'checked=""' : '' }}>
<label class="form-check-label font-weight-bold" for="open_registration">
{{config('pixelfed.recaptcha') == true ? 'Enabled' : 'Disabled' }}
</label>
<p class="text-muted small help-text font-weight-bold">When this option is enabled, new user registration is open.</p>
</div>
</div>
</div>
<div class="form-group row">
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">ActivityPub</label>
<div class="col-sm-9">
<div class="form-check pb-2">
<input class="form-check-input" type="checkbox" id="activitypub_enabled" name="activitypub_enabled" {{config('pixelfed.activitypub_enabled') === true ? 'checked=""' : '' }}>
<label class="form-check-label font-weight-bold" for="activitypub_enabled">
{{config('pixelfed.activitypub_enabled') === true ? 'Enabled' : 'Disabled' }}
</label>
<p class="text-muted small help-text font-weight-bold">Enable for federation support.</p>
</div>
</div>
</div>
<hr>
<div class="form-group row">
<label class="col-sm-3 col-form-label font-weight-bold text-right">Account Size</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="1000000" name="max_account_size" value="{{config('pixelfed.max_account_size')}}">
<span class="help-text font-weight-bold text-muted small">
Max account size for users, in KB.
</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label font-weight-bold text-right">Max Upload Size</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="15000" name="max_photo_size" value="{{config('pixelfed.max_photo_size')}}">
<span class="help-text font-weight-bold text-muted small">
Max file size for uploads, in KB.
</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label font-weight-bold text-right">Caption Length</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="500" name="caption_limit" value="{{config('pixelfed.max_caption_length')}}">
<span class="help-text font-weight-bold text-muted small">
Character limit for captions and comments.
</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label font-weight-bold text-right">Max Album Size</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="3" name="album_limit" value="{{config('pixelfed.max_album_length')}}">
<span class="help-text font-weight-bold text-muted small">
Limit # of media per post.
</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label font-weight-bold text-right">Image Quality</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="80" name="image_quality" value="{{config('pixelfed.image_quality')}}">
<span class="help-text font-weight-bold text-muted small">
Image quality. Must be a value between 1 (worst) - 100 (best).
</span>
</div>
</div>
<hr>
<div class="form-group row mb-0">
<div class="col-12 text-right">
<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
</div>
</div>
</form>