Skip to content

Commit

Permalink
feat(content warnings): misc QoL / fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Oct 4, 2024
1 parent 8c3192e commit ad814df
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 20 deletions.
Binary file added public/images/content_warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/views/character/_image_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<i class="fas fa-times" aria-hidden="true"></i>
</a>
</span>
<img src="{{ asset('images/content-warning.png') }}" class="mb-1" alt="Content Warning" style="height: 10vh;" />
<img src="{{ asset('images/content_warning.png') }}" class="mb-1" alt="Content Warning" style="height: 10vh;" />
<h5>
<i class="fa fa-exclamation-triangle mr-2"></i>Character Warnings<i class="fa fa-exclamation-triangle ml-2"></i>
</h5>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/bank.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/character.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/character_logs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/currency_logs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/edit_profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/gallery.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/images.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/ownership_logs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/submission_logs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/transfer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/update_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta-img')
{{ $character->image->thumbnailUrl }}
{{ $character->image->content_warnings ? asset('images/content_warning.png') : $character->image->thumbnailUrl }}
@endsection

@section('profile-content')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/comments/_comment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class="comment border p-3 rounded {{ $comment->is_featured ? 'border-success bg-
<div class="media-body row mw-100 mx-0 mb-3" style="flex:1;flex-wrap:wrap;">
@if (isset($compact) && !$compact)
<div class="d-none d-md-block">
<img class="mr-3 mt-2" src="/images/avatars/default.jpg" style="width:70px; height:70px; border-radius:50%;" alt="Default Avatar">
<img class="mr-3 mt-2" src="{{ asset('images/avatars/default.jpg') }}" style="width:70px; height:70px; border-radius:50%;" alt="Default Avatar">
</div>
@endif
<div class="d-block bg-light" style="flex:1">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/comments/_perma_comments.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class="comment border p-3 rounded {{ $limit == 0 ? 'shadow-sm border-info' : ''
@endif
<div class="media-body row mw-100 mx-0" style="flex:1;flex-wrap:wrap;">
<div class="d-none d-md-block">
<img class="mr-3 mt-2" src="/images/avatars/default.jpg" style="width:70px; height:70px; border-radius:50%;" alt="Default Avatar">
<img class="mr-3 mt-2" src="{{ asset('images/avatars/default.jpg') }}" style="width:70px; height:70px; border-radius:50%;" alt="Default Avatar">
</div>
<div class="d-block bg-light" style="flex:1">
<div class="border p-3 rounded {{ $limit == 0 ? 'shadow-sm border-info' : '' }}">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/user/_profile_content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div class="col-md-3 col-6 text-center">
<div>
@if ((Auth::check() && Auth::user()->settings->content_warning_visibility == 0 && isset($character->character_warning)) || (isset($character->character_warning) && !Auth::check()))
<a href="{{ $character->url }}"><img src="{{ asset('/images/content_warning.png') }}" class="img-thumbnail" alt="Content Warning - {{ $character->fullName }}" /></a>
<a href="{{ $character->url }}"><img src="{{ asset('images/content_warning.png') }}" class="img-thumbnail" alt="Content Warning - {{ $character->fullName }}" /></a>
@else
<a href="{{ $character->url }}"><img src="{{ $character->image->thumbnailUrl }}" class="img-thumbnail" alt="{{ $character->fullName }}" /></a>
@endif
Expand Down
6 changes: 3 additions & 3 deletions resources/views/widgets/_character_warning_js.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
type: "GET",
dataType: 'json',
error: function() {
callback();
error: function(data) {
console.log('Error getting warnings');
console.log(data);
},
success: function(options) {
$('#warningList').selectize({
Expand All @@ -20,7 +21,6 @@
preload: true,
options: options,
onInitialize: function() {
console.log(this.$input.attr('data-init-value'));
let existingOptions = this.$input.attr('data-init-value') ? JSON.parse(this.$input.attr('data-init-value')) : [];
var self = this;
if (Object.prototype.toString.call(existingOptions) ===
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/_gallery_thumb.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if (isset($submission->content_warning))
<img class="img-thumbnail" src="{{ asset('/images/content_warning.png') }}" alt="Content Warning" />
<img class="img-thumbnail" src="{{ asset('images/content_warning.png') }}" alt="Content Warning" />
@elseif(isset($submission->hash))
<img class="img-thumbnail" src="{{ $submission->thumbnailUrl }}" alt="Submission thumbnail" />
@else
Expand Down

0 comments on commit ad814df

Please sign in to comment.