mirror of https://github.com/pixelfed/pixelfed
Update Settings, add default license and enforced media descriptions
parent
27778e00c9
commit
67e3f6048f
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddComposeSettingsToUserSettingsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('user_settings', function (Blueprint $table) {
|
||||||
|
$table->json('compose_settings')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('media', function (Blueprint $table) {
|
||||||
|
$table->text('caption')->change();
|
||||||
|
$table->index('profile_id');
|
||||||
|
$table->index('mime');
|
||||||
|
$table->index('license');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('user_settings', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('compose_settings');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('media', function (Blueprint $table) {
|
||||||
|
$table->string('caption')->change();
|
||||||
|
$table->dropIndex('profile_id');
|
||||||
|
$table->dropIndex('mime');
|
||||||
|
$table->dropIndex('license');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
@extends('settings.template')
|
||||||
|
|
||||||
|
@section('section')
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<h3 class="font-weight-bold">Media</h3>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<form method="post">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group pb-3">
|
||||||
|
<label class="form-check-label font-weight-bold" for="">Default License</label>
|
||||||
|
<select class="form-control" name="default">
|
||||||
|
@foreach(App\Util\Media\License::get() as $license)
|
||||||
|
<option value="{{$license['id']}}" {{$compose['default_license'] == $license['id'] ? 'selected':''}}>
|
||||||
|
{{$license['name']}}
|
||||||
|
@if($license['id'] > 10)
|
||||||
|
({{$license['title']}})
|
||||||
|
@endif
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
<p class="text-muted small help-text">Set a default license for new posts.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-check pb-3">
|
||||||
|
<input class="form-check-input" type="checkbox" name="sync">
|
||||||
|
<label class="form-check-label font-weight-bold" for="">Sync Licenses</label>
|
||||||
|
<p class="text-muted small help-text">Update existing posts with your new default license. You can sync once every 24 hours.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-check pb-3">
|
||||||
|
<input class="form-check-input" type="checkbox" name="media_descriptions" {{$compose['media_descriptions'] == $license['id'] ? 'checked':''}}>
|
||||||
|
<label class="form-check-label font-weight-bold" for="">Require Media Descriptions</label>
|
||||||
|
<p class="text-muted small help-text">
|
||||||
|
Briefly describe your media to improve accessibility for vision impaired people. <br />
|
||||||
|
<span class="font-weight-bold">Not available for mobile or 3rd party apps at this time.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row mt-5 pt-5">
|
||||||
|
<div class="col-12 text-right">
|
||||||
|
<hr>
|
||||||
|
<button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@endsection
|
Loading…
Reference in New Issue