A lot of things
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
nsfw: null,
|
||||
state: '{{ old('submit-state', $defaultState) }}',
|
||||
deleteOpen: false,
|
||||
featuredOpen: false,
|
||||
init(){
|
||||
this.$watch('nsfw', (val) => {
|
||||
if( val && this.state === 'published' ) {
|
||||
@@ -11,6 +12,13 @@
|
||||
}
|
||||
}" x-init="init()">
|
||||
@if($isEdit)
|
||||
@if(!$news && $entry && !$entry->featured )
|
||||
<div>
|
||||
<button type="button" id="entry-featured-button" class="btn" @click="featuredOpen = true; $dispatch('modal:opened')">
|
||||
<i data-lucide="star" size="13"></i> Featured
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
<button type="button" class="btn danger" @click="deleteOpen = true; $dispatch('modal:opened')">
|
||||
<i data-lucide="trash-2" size="13"></i> Delete
|
||||
@@ -35,6 +43,46 @@
|
||||
</select>
|
||||
|
||||
@if($isEdit)
|
||||
@if(!$news && $entry && !$entry->featured )
|
||||
<template x-teleport="body">
|
||||
<div
|
||||
class="modal-overlay"
|
||||
x-cloak
|
||||
x-show="featuredOpen"
|
||||
x-transition.opacity
|
||||
@click.self="featuredOpen = false"
|
||||
@keydown.escape.window="featuredOpen = false"
|
||||
@modal:opened.window="refreshIcons($el)"
|
||||
>
|
||||
<div class="modal-window" x-show="featuredOpen" x-transition>
|
||||
<div class="modal-header">
|
||||
<span class="modal-title">Request as featured</span>
|
||||
<button type="button" class="modal-close" @click="featuredOpen = false">
|
||||
<i data-lucide="x" size="20"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" id="entry-featured-body">
|
||||
<p style="margin-bottom: 1.5rem; color: var(--text, #333);">
|
||||
Please do not overuse this feature. Send only one request at a time.
|
||||
</p>
|
||||
|
||||
<div class="queue-mod-actions" id="entry-featured-actions">
|
||||
<button type="button" class="btn" @click="featuredOpen = false">
|
||||
Cancel
|
||||
</button>
|
||||
<button type="button" class="btn" @click="Submission().requestFeatured({{ $entry->id }})">
|
||||
<i data-lucide="star" size="14"></i>
|
||||
Request as featured
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@endif
|
||||
<template x-teleport="body">
|
||||
<div
|
||||
class="modal-overlay"
|
||||
@@ -58,7 +106,7 @@
|
||||
Are you sure you want to delete this entry? This action cannot be undone.
|
||||
</p>
|
||||
|
||||
<form action="{{ route('submit.destroy', ['section' => $section, 'entry' => $entry ]) }}" method="POST">
|
||||
<form action="{{ $news ? route('news.destroy', [ 'news' => $news ] ) : route('submit.destroy', ['section' => $section, 'entry' => $entry ]) }}" method="POST">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user