Migration complete
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
<i data-lucide="messages-square" size="14"></i>
|
||||
@elseif($item->type === 'club')
|
||||
<i data-lucide="balloon" size="14"></i>
|
||||
@elseif($item->type === 'review')
|
||||
<i data-lucide="star" size="14"></i>
|
||||
@else
|
||||
<i data-lucide="target" size="14"></i>
|
||||
@endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="filter-group" x-data="{open:false,search:''}">
|
||||
<div class="filter-group" x-data="{open:false}">
|
||||
<div class="filter-title-row" @click="open = !open">
|
||||
<div class="filter-title-left">
|
||||
<h4 class="filter-title">{{ $title }}</h4>
|
||||
@@ -18,11 +18,11 @@
|
||||
<div x-show="open" x-transition>
|
||||
<div class="internal-filter-search">
|
||||
<i data-lucide="search" size="13"></i>
|
||||
<input type="text" x-model="search" placeholder="Search...">
|
||||
<input type="text" wire:model.live.debounce.300ms="{{ $searchModel }}" placeholder="Search...">
|
||||
</div>
|
||||
<div class="filter-options">
|
||||
@foreach($items as $item)
|
||||
<label class="filter-option" x-show="search.length >= 3 && '{{strtolower($item->{$nameProperty}) }}'.includes(search.toLowerCase())">
|
||||
<label class="filter-option">
|
||||
<input type="checkbox" wire:model.live="{{ $model }}" value="{{ $item->{$idProperty} }}">
|
||||
{{ $item->{$nameProperty} }}
|
||||
</label>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="filter-group" x-data="{open: false,search:''}">
|
||||
<div class="filter-group" x-data="{open: false}">
|
||||
<div class="filter-title-row" @click="open = !open">
|
||||
<div class="filter-title-left">
|
||||
<h4 class="filter-title">{{ $title }}</h4>
|
||||
@@ -14,11 +14,11 @@
|
||||
<div x-show="open" x-transition>
|
||||
<div class="internal-filter-search">
|
||||
<i data-lucide="search" size="13"></i>
|
||||
<input type="text" x-model="search" placeholder="Search...">
|
||||
<input type="text" wire:model.live.debounce.300ms="{{ $searchModel }}" placeholder="Search...">
|
||||
</div>
|
||||
<div class="filter-options">
|
||||
@foreach($items as $item)
|
||||
<label class="filter-option" x-show="search.length >= 3 && '{{strtolower($item->{$nameProperty}) }}'.includes(search.toLowerCase())">
|
||||
<label class="filter-option">
|
||||
<input type="checkbox" wire:model.live="{{ $model }}" value="{{ $item->{$idProperty} }}">
|
||||
{{ $item->{$nameProperty} }}
|
||||
</label>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@endif
|
||||
</div>
|
||||
<div class="entry-card-info">
|
||||
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title }}</a>
|
||||
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title ?? $entry->complete_title }}</a>
|
||||
<div class="entry-card-author">
|
||||
@forelse( $entry->authors as $author)
|
||||
@if($loop->first)By @endif
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="block-error">
|
||||
<i data-lucide="{{ $errorArray['icon'] ?? '' }}"></i> {{ sprintf( $errorArray['message'], $message ) }}
|
||||
<i data-lucide="{{ $errorArray['icon'] ?? '' }}"></i> {!! sprintf( $errorArray['message'], $message ) !!}
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div x-data="GalleryManager()" x-init="init(@js($oldPaths))">
|
||||
<div x-data="GalleryManager()" x-init="init(@js($oldPaths))" x-ref="gallery-field">
|
||||
<x-form-field-title name="Screenshots" helper="At least 1 Screenshot required, Maximum 20." required="{{ $required ? 'true' : 'false' }}" />
|
||||
<div class="form-group main-image-grid">
|
||||
<div class="form-upload" style="flex:1;" :class="{ 'disabled': isFull }">
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
<i data-lucide="x"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="language-list" id="languages-group">
|
||||
<div class="language-list" x-ref="languagesGroup" id="languages-group">
|
||||
@foreach( $languages as $language )
|
||||
<label class="language-item" x-show="'{{ strtolower($language->name) }}'.includes(search.toLowerCase())">
|
||||
<input type="checkbox" name="languages[]" value="{{ $language->id }}" x-model="selected" :value="{{ $language->id }}" {{ in_array($language->id, $selected) ? 'checked' : '' }}> {{ $language->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div x-data="MainImageManager()" x-init="init('{{$oldPath}}')">
|
||||
|
||||
<div x-data="MainImageManager()" x-init="init('{{$oldPath}}')" x-ref="main-image-field">
|
||||
<x-form-field-title name="Main image" helper="This will show up on the index and on top of the entry. A screenshot or custom cover is prefered else all entries of same game will look the same." required="{{ $required ? 'true' : 'false' }}" />
|
||||
<div class="form-group main-image-grid">
|
||||
<div class="form-upload" style="flex:4;">
|
||||
|
||||
@@ -3,12 +3,7 @@
|
||||
window.mde_{{ $name }} = new EasyMDE({
|
||||
element: $el.querySelector('#field_{{ $name }}'),
|
||||
minHeight: '{{ $minHeight }}',
|
||||
toolbar: {{ Js::from( $toolbar ) }},
|
||||
autosave: {
|
||||
enabled: true,
|
||||
uniqueId: '{{ $name }}',
|
||||
delay: 1000,
|
||||
},
|
||||
toolbar: {{ Js::from( $toolbar ) }}
|
||||
})
|
||||
"
|
||||
>
|
||||
|
||||
23
resources/views/components/review-card.blade.php
Normal file
23
resources/views/components/review-card.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="comment-block">
|
||||
<x-xen-foro-avatar :user="$review->user_id" />
|
||||
|
||||
<div class="comment-content">
|
||||
<div class="comment-meta">
|
||||
<span class="comment-author">{{ $review->xenforoUser()?->username }}</span>
|
||||
<span class="comment-separator"></span>
|
||||
<x-review-star-rating :rating="$review->rating" />
|
||||
<span class="comment-separator"></span>
|
||||
<span class="comment-date">{{ $review->created_at->format('Y-m-d') }}</span>
|
||||
@if( $entryShow && $review->entry()->exists() )
|
||||
<span class="comment-separator"></span>
|
||||
<a href="{{ route('entries.show', ['section' => $review->entry?->type, 'entry' => $review->entry ]) }}">{{ $review->entry->complete_title ?? $review->entry->title }}</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="review-title">{{ $review->title }}</div>
|
||||
|
||||
<div class="comment-body markdown-body">
|
||||
{!! $review->description_html !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
5
resources/views/components/review-star-rating.blade.php
Normal file
5
resources/views/components/review-star-rating.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<span class="star-rating-display">
|
||||
@for($i = 1; $i <= 5; $i++)
|
||||
<i data-lucide="star" size="13" class="{{ $i <= $rating ? 'star-filled' : 'star-empty' }}"></i>
|
||||
@endfor
|
||||
</span>
|
||||
@@ -4,49 +4,121 @@
|
||||
<i data-lucide="menu"></i>
|
||||
</button>
|
||||
|
||||
<form class="search-bar" action="{{ route('entries.index') }}">
|
||||
<input type="text" name="s" placeholder="Search" />
|
||||
<button type="submit" class="search-button">
|
||||
<i data-lucide="search" size="18" color="var(--text2)"></i>
|
||||
</button>
|
||||
</form>
|
||||
<form id="topbar-search-form" class="search-bar" method="GET">
|
||||
|
||||
<select id="search-scope" class="search-scope-select" name="search_scope">
|
||||
<option value="entries" selected>Entries</option>
|
||||
<option value="news">News</option>
|
||||
<option value="forum">Forum</option>
|
||||
</select>
|
||||
|
||||
<input type="text" id="search-input" placeholder="Search" autocomplete="off">
|
||||
|
||||
<button type="submit" class="search-button">
|
||||
<i data-lucide="search" size="18" color="var(--text2)"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
const form = document.getElementById('topbar-search-form');
|
||||
const select = document.getElementById('search-scope');
|
||||
const input = document.getElementById('search-input');
|
||||
|
||||
const scopes = {
|
||||
entries: { action: '{{ route('entries.index') }}', param: 's' },
|
||||
news: { action: '{{ route('news.index') }}', param: 's' },
|
||||
forum: {
|
||||
action: '{{ xfRoute('search/2147483647/') }}',
|
||||
param: 'q',
|
||||
extra: { o: 'relevance' },
|
||||
},
|
||||
};
|
||||
|
||||
form.addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const term = input.value.trim();
|
||||
if (!term) return;
|
||||
|
||||
const cfg = scopes[select.value];
|
||||
const params = new URLSearchParams({ [cfg.param]: term, ...(cfg.extra || {}) });
|
||||
|
||||
window.location = cfg.action + '?' + params.toString();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div class="topbar-actions">
|
||||
|
||||
@can('is-admin')
|
||||
@php $topbarAdminSeparator = true; @endphp
|
||||
<a href="{{ config('app.forum_url') . '/admin.php' }}" class="btn">
|
||||
<a href="{{ config('app.forum_url') . '/admin.php' }}" class="btn topbar-admin-btn" title="Admin">
|
||||
<i data-lucide="landmark" size="18"></i>
|
||||
</a>
|
||||
<a href="{{ config('app.url') . '/manage' }}" class="btn">
|
||||
<a href="{{ config('app.url') . '/manage' }}" class="btn topbar-admin-btn" title="Manage">
|
||||
<i data-lucide="shield-cog" size="18"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@if( $topbarAdminSeparator )
|
||||
<div class="vertical-separator"></div>
|
||||
<div class="vertical-separator topbar-admin-btn"></div>
|
||||
@endif
|
||||
|
||||
@can('is-mod')
|
||||
@php $topbarModSeparator = true; @endphp
|
||||
<a href="{{ route('modcp.index') }}" class="btn">
|
||||
<a href="{{ route('modcp.index') }}" class="btn topbar-mod-btn" title="Moderation">
|
||||
<i data-lucide="siren" size="18"></i>
|
||||
</a>
|
||||
<a href="{{ xfRoute('approval-queue') }}" class="btn">
|
||||
<a href="{{ xfRoute('approval-queue') }}" class="btn topbar-mod-btn" title="Approvals">
|
||||
<i data-lucide="message-circle-check" size="18"></i>
|
||||
</a>
|
||||
<a href="{{ xfRoute('reports') }}" class="btn">
|
||||
<a href="{{ xfRoute('reports') }}" class="btn topbar-mod-btn" title="Reports">
|
||||
<i data-lucide="triangle-alert" size="18"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@if( $topbarModSeparator )
|
||||
<div class="vertical-separator"></div>
|
||||
<div class="vertical-separator topbar-mod-btn"></div>
|
||||
@endif
|
||||
|
||||
{{-- Users --}}
|
||||
<div x-data="{ open: false }" class="topbar-more-container" style="position: relative;">
|
||||
@canany(['is-admin','is-mod'])
|
||||
<button @click="open = !open" @click.outside="open = false" class="btn topbar-btn-more" title="More actions">
|
||||
<i data-lucide="more-vertical" size="18"></i>
|
||||
</button>
|
||||
<div x-show="open" class="topbar-more-menu">
|
||||
@can('is-admin')
|
||||
<a href="{{ config('app.forum_url') . '/admin.php' }}" class="topbar-more-item" title="Admin">
|
||||
<i data-lucide="landmark" size="16"></i>
|
||||
<span>Admin</span>
|
||||
</a>
|
||||
<a href="{{ config('app.url') . '/manage' }}" class="topbar-more-item" title="Manage">
|
||||
<i data-lucide="shield-cog" size="16"></i>
|
||||
<span>Manage</span>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@can('is-mod')
|
||||
<a href="{{ route('modcp.index') }}" class="topbar-more-item" title="Moderation">
|
||||
<i data-lucide="siren" size="16"></i>
|
||||
<span>Mod CP</span>
|
||||
</a>
|
||||
<a href="{{ xfRoute('approval-queue') }}" class="topbar-more-item" title="Approvals">
|
||||
<i data-lucide="message-circle-check" size="16"></i>
|
||||
<span>Approval Queue</span>
|
||||
</a>
|
||||
<a href="{{ xfRoute('reports') }}" class="topbar-more-item" title="Reports">
|
||||
<i data-lucide="triangle-alert" size="16"></i>
|
||||
<span>Reports</span>
|
||||
</a>
|
||||
@endcan
|
||||
</div>
|
||||
@endcanany
|
||||
</div>
|
||||
|
||||
@can('create','\App\Models\Entry')
|
||||
<a href="{{ route('submit.index') }}" class="btn">
|
||||
<a href="{{ route('submit.index') }}" class="btn" title="Submit">
|
||||
<i data-lucide="hard-drive-upload" size="18"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<span x-data class="userlink"
|
||||
@mouseenter.debounce.300ms="$store.hovercard.open($el,'{{ route('dynamic.hovercard', ['user_id' => $user?->user_id ?? 0 ]) }}')"
|
||||
@mouseleave="setTimeout(() => { const C = document.querySelector('.hovercard'); if(!C?.matches(':hover')) $store.hovercard.close(); }, 200)"
|
||||
@click="window.location.href = '{{ xfRoute('members/.') . $user?->user_id }}'"
|
||||
>
|
||||
{{ $user->username }}
|
||||
</span>
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
<?php /** @var \App\Models\EntryReview $review */ ?>
|
||||
@php if( !isset($entry) && isset($news) ){ $entry = $news; $newsMode = true; } else { $newsMode = false; } @endphp
|
||||
<div class="{{ !$newsMode ? 'grid-c2' : '' }}" style="margin-top:1%;">
|
||||
@if( !$newsMode )
|
||||
<div id="reviews-section">
|
||||
<div id="reviews-section" x-data="{reviewModalOpen: false}">
|
||||
<div class="entry-content">
|
||||
<x-entry-section-title label="Reviews" icon="star" />
|
||||
|
||||
<div class="review-header-right">
|
||||
@if($entry->reviews_count_cached > 0)
|
||||
<div class="review-avg-badge">
|
||||
<i data-lucide="star" size="13"></i>
|
||||
{{ $entry->average_rating }}
|
||||
<span class="review-avg-count">({{ $entry->reviews_count_cached }})</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@auth
|
||||
<button @click="reviewModalOpen = true" class="btn primary">
|
||||
<i data-lucide="pen-line" size="13"></i> Write a review
|
||||
</button>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
@forelse( $reviews as $review )
|
||||
<x-review-card :review="$review" />
|
||||
@empty
|
||||
<span style="text-align:center" class="whisper">Be the first to post a review</span>
|
||||
@endforelse
|
||||
<a href="{!! reviewsRoute( ['entryId' => $entry->id ]) !!}" class="modcp-list-see-all">
|
||||
See all {{ $entry->reviews_count_cached }} reviews
|
||||
</a>
|
||||
@include('reviews.submit')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -11,7 +38,7 @@
|
||||
<div class="entry-content">
|
||||
<x-entry-section-title label="Last comments" icon="message-circle" />
|
||||
@forelse( $comments as $comment )
|
||||
@if($comment['user_id'] === config('xenforo.bot_user_id') && $comment['position'] == 0)
|
||||
@if(( $comment['user_id'] === config('xenforo.bot_user_id') || $comment['username'] === 'Romhack Plaza' ) && $comment['position'] == 0)
|
||||
@continue
|
||||
@else
|
||||
<div class="comment-block">
|
||||
@@ -19,7 +46,7 @@
|
||||
|
||||
<div class="comment-content">
|
||||
<div class="comment-meta">
|
||||
<span class="comment-author">{{ $comment['User']['username'] }}</span>
|
||||
<span class="comment-author">{{ $comment['User']['username'] ?? $comment['username'] ?? 'Guest' }}</span>
|
||||
<span class="comment-separator"></span>
|
||||
<span class="comment-date">{{ date('Y-m-d', $comment['post_date']) }}</span>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div class="entry-info">
|
||||
<h1 class="entry-title">
|
||||
{{ $entry->title }}
|
||||
{{ $entry->title ?? $entry->complete_title }}
|
||||
@if( $entry->state === 'pending' )
|
||||
<div style="display:inline;color:var(--rhpz-orange);">
|
||||
-
|
||||
@@ -53,17 +53,7 @@
|
||||
@endif
|
||||
</h1>
|
||||
<div class="entry-authors">
|
||||
@forelse( $entry->authors as $author)
|
||||
@if($loop->first)
|
||||
By
|
||||
@endif
|
||||
{{ $author->name }}
|
||||
@if( !$loop->last )
|
||||
,
|
||||
@endif
|
||||
@empty
|
||||
No authors
|
||||
@endforelse
|
||||
By <a href="{!! databaseRoute( [ 'authors' => $entry->authors->pluck('id')->toArray() ] ) !!}">{{ $entry->authors->pluck('name')->implode(', ') }}</a>
|
||||
</div>
|
||||
<div class="entry-submission-byline">
|
||||
@if($entry->user_id)
|
||||
@@ -223,7 +213,7 @@
|
||||
@if( $entry->description )
|
||||
<x-entry-section-title label="Description" icon="file-text"/>
|
||||
<div class="entry-description">
|
||||
{{ $entry->description }}
|
||||
{!! $entry->description_html !!}
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->hashes->isNotEmpty() )
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ dd( $VISITOR ) }}
|
||||
|
||||
@include('activity.latest-news')
|
||||
@include('activity.featured-entries')
|
||||
|
||||
<div class="activity-tl-header" x-data x-init="$store.settings.currentActivityFilters = {{ Js::from($activeFilters) }};">
|
||||
|
||||
<h2 class="activity-tl-title">
|
||||
<i data-lucide="radio-tower" size="18"></i>
|
||||
Latest activity
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
@include( 'components.menu' )
|
||||
@include( 'layouts.menu' )
|
||||
|
||||
<main id="main-wrapper">
|
||||
@include('components.topbar')
|
||||
@@ -29,6 +29,7 @@
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
@include('components.hovercard')
|
||||
@livewireScripts
|
||||
@stack('scripts')
|
||||
|
||||
@@ -7,17 +7,24 @@
|
||||
<div class="menu-navigation">
|
||||
|
||||
@foreach( config('menu') as $menu )
|
||||
|
||||
<div class="menu-group">
|
||||
<div class="menu-group-title">{{ $menu['name'] }}</div>
|
||||
|
||||
<div class="menu-group-title">
|
||||
{{ $menu['name'] }}
|
||||
</div>
|
||||
|
||||
@foreach( $menu['items'] as $item )
|
||||
@if( !isset( $item['requires_auth'] ) || $item['requires_auth'] === true && !\Auth::guest() )
|
||||
@if( !isset( $item['requires_auth'] ) || $item['requires_auth'] === true && $VISITOR->loggedIn() )
|
||||
<a href="{{ isset($item['xf_route']) ? xfRoute($item['xf_route']) : route($item['route']) }}"
|
||||
@class(['menu-item', 'active' => request()->routeIs( $item['route'] ?? '' )]) >
|
||||
<i data-lucide="{{ $item['icon'] }}"></i><span>{{ $item['name'] }}</span>
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@@ -28,11 +35,11 @@
|
||||
</div>
|
||||
<div class="menu-user-info">
|
||||
<span class="username">
|
||||
{{ \Auth::user()?->username ?? "Guest" }}
|
||||
{{ $VISITOR->username ?? "Guest" }}
|
||||
</span>
|
||||
<span class="user_role">
|
||||
<a href="{{ \Auth::guest() ? xfRoute('login') : xfRoute('logout') . '?t=' . xfCsrfToken() }}">
|
||||
{{ \Auth::guest() ? 'Login' : 'Logout' }}
|
||||
<a href="{{ $VISITOR->guest() ? xfRoute('login') : xfRoute('logout') . '?t=' . xfCsrfToken() }}">
|
||||
{{ $VISITOR->guest() ? 'Login' : 'Logout' }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<div class="form-group grid-c2">
|
||||
<div class="form-group grid-c2" x-ref="authorsSelector">
|
||||
<div>
|
||||
@if( $newAuthor === false)
|
||||
<div class="game-selector">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
placeholder="Search..."
|
||||
class="form-input filter-bar-search"
|
||||
>
|
||||
@if( $search || $types || $platforms || $games || $statuses || $authors || $languages || $modifications || $categories || $levels || $systems )
|
||||
@if( $search || $types || $platforms || $games || $statuses || $authors || $languages || $modifications || $categories || $levels || $systems || $userId )
|
||||
<button type="button" wire:click="clearFilters" class="btn">
|
||||
<i data-lucide="x"></i> Clear filters
|
||||
</button>
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Games --}}
|
||||
<x-database-filter-without-mode-search title="Game" :items="$allGames" model="games" />
|
||||
<x-database-filter-without-mode-search title="Game" :items="$allGames" model="games" search-model="gameSearch" />
|
||||
|
||||
{{-- Platforms --}}
|
||||
<x-database-filter-without-mode title="Platform" :items="$allPlatforms" model="platforms"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<x-database-filter-without-mode title="Status" :items="$allStatuses" model="statuses"/>
|
||||
|
||||
{{-- Authors --}}
|
||||
<x-database-filter-with-mode-search title="Authors" :items="$allAuthors" model="authors" mode-model="authorsMode" :selected-mode="$authorsMode" />
|
||||
<x-database-filter-with-mode-search title="Authors" :items="$allAuthors" search-model="authorSearch" model="authors" mode-model="authorsMode" :selected-mode="$authorsMode" />
|
||||
|
||||
{{-- Languages --}}
|
||||
<x-database-filter-with-mode title="Languages" :items="$allLanguages" model="languages" mode-model="languagesMode" :selected-mode="$languagesMode" />
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
class="dropdown-item" {{ $gameId === $game->id ? 'selected' : '' }} >
|
||||
<span class="dropdown-item-name">{{ $game->name }}</span>
|
||||
@if($game->platform)
|
||||
<span class="badge">{{ $game->platform->short_name }}</span>
|
||||
<span class="badge">{{ $game->platform->short_name ?? $game->platform->name }}</span>
|
||||
@endif
|
||||
@if($game->genre)
|
||||
<span class="badge">{{ $game->genre->name }}</span>
|
||||
|
||||
68
resources/views/livewire/hashes-checker.blade.php
Normal file
68
resources/views/livewire/hashes-checker.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<div class="patcher-container" x-data="HashesChecker($wire)"
|
||||
x-ref="hashRoot" @refresh.window="refreshIcons($el)">
|
||||
<div class="form-group">
|
||||
<label class="form-label">ROM</label>
|
||||
<div class="form-upload">
|
||||
<input type="file" id="rom-field" @change="handleSubmitFile($event)" :disabled="isCalculating">
|
||||
<div class="form-upload-placeholder level">
|
||||
<i data-lucide="file-archive" size="36" style="margin-bottom:15px;color:var(--text2)"></i>
|
||||
<div style="font-size: 1.1rem;color:var(--text);margin-bottom:5px;">
|
||||
<span x-text="isCalculating ? 'Please wait' : 'Click or drag\'n drop files here.'"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($hash)
|
||||
<div>
|
||||
<x-form-field-title name="Hash" />
|
||||
<div class="form-group grid-hashes">
|
||||
<div class="hash-filename hash-first">
|
||||
<x-form-field-title name="Filename" />
|
||||
</div>
|
||||
|
||||
<div class="hash-crc32 hash-first">
|
||||
<x-form-field-title name="CRC32" />
|
||||
</div>
|
||||
|
||||
<div class="hash-sha1 hash-first">
|
||||
<x-form-field-title name="SHA-1" />
|
||||
</div>
|
||||
|
||||
<div class="hash-verified hash-first">
|
||||
<x-form-field-title name="Verified" />
|
||||
</div>
|
||||
|
||||
<div class="hash-remove hash-first">
|
||||
<x-form-field-title name="Actions" />
|
||||
</div>
|
||||
<div class="hash-filename">
|
||||
<input class="form-input" type="text" autocomplete="off" value="{{ $hash['filename'] }}" disabled>
|
||||
</div>
|
||||
<div class="hash-crc32">
|
||||
<input class="form-input" type="text" autocomplete="off" value="{{ $hash['hash_crc32'] }}" disabled>
|
||||
</div>
|
||||
<div class="hash-sha1">
|
||||
<input class="form-input" type="text" autocomplete="off" value="{{ $hash['hash_sha1'] }}" disabled>
|
||||
</div>
|
||||
<div class="hash-verified">
|
||||
<input class="form-input" type="text" autocomplete="off" value="{{ $hash['verified'] }}" disabled>
|
||||
</div>
|
||||
<div class="hash-remove">
|
||||
<button type="button" class="btn" wire:click="removeHash()">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<x-form-field-title name="Related entries" />
|
||||
<div class="form-group">
|
||||
<div class="grid-entries">
|
||||
@forelse( $entries as $entry )
|
||||
<x-entry-card :entry="$entry" />
|
||||
@empty
|
||||
No entries related.
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -3,25 +3,24 @@
|
||||
@if( count( $hashes ) > 0)
|
||||
<div class="form-group grid-hashes">
|
||||
|
||||
<div class="hash-filename">
|
||||
<div class="hash-filename hash-first">
|
||||
<x-form-field-title name="Filename" />
|
||||
</div>
|
||||
|
||||
<div class="hash-crc32">
|
||||
<div class="hash-crc32 hash-first">
|
||||
<x-form-field-title name="CRC32" />
|
||||
</div>
|
||||
|
||||
<div class="hash-sha1">
|
||||
<div class="hash-sha1 hash-first">
|
||||
<x-form-field-title name="SHA-1" />
|
||||
</div>
|
||||
|
||||
<div class="hash-verified">
|
||||
<div class="hash-verified hash-first">
|
||||
<x-form-field-title name="Verified" />
|
||||
</div>
|
||||
|
||||
<div class="hash-remove">
|
||||
<div class="hash-remove hash-first">
|
||||
<x-form-field-title name="Actions" />
|
||||
|
||||
</div>
|
||||
|
||||
@foreach( $hashes as $i => $hash )
|
||||
|
||||
51
resources/views/livewire/reviews.blade.php
Normal file
51
resources/views/livewire/reviews.blade.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<div @filters-updated.window="refreshIcons($el)">
|
||||
<div class="database-search filter-bar">
|
||||
@if($rating || $entryId)
|
||||
<button type="button" wire:click="clearFilters" class="btn">
|
||||
<i data-lucide="x"></i> Clear filters
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="database-wrapper">
|
||||
<aside class="database-filters">
|
||||
<div class="filter-group" x-data="{open: true}">
|
||||
<div class="filter-title-row" @click="open = !open">
|
||||
<h4 class="filter-title">Rating</h4>
|
||||
<i data-lucide="chevron-down" size="14" class="filter-chevron" :class="{ 'rotated': !open }"></i>
|
||||
</div>
|
||||
<div class="filter-options" x-show="open" x-transition>
|
||||
@for($i=1;$i<=5;$i++)
|
||||
<label class="filter-option">
|
||||
<input type="radio" wire:model.live="rating" value="{{ $i }}">
|
||||
{{ $i }}
|
||||
</label>
|
||||
@endfor
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="database-results">
|
||||
<div class="database-sort">
|
||||
@foreach( \App\Livewire\Reviews::SORT_OPTIONS as $k => $v )
|
||||
<button type="button" wire:click="setSort('{{ $k }}')" class="btn {{ $sortBy === $k ? 'active' : '' }}">
|
||||
{{ $v }}
|
||||
</button>
|
||||
@if( $sortBy === $k )
|
||||
<i data-lucide="{{ $sortDir === 'asc' ? 'arrow-up' : 'arrow-down' }}"></i>
|
||||
@endif
|
||||
@endforeach
|
||||
<span class="database-results-count">{{ $reviews->total() }} results</span>
|
||||
</div>
|
||||
|
||||
<div class="entry-content">
|
||||
@forelse($reviews as $review)
|
||||
<x-review-card :review="$review" :entry-show="true" />
|
||||
@empty
|
||||
<p>No reviews found.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{ $reviews->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +44,7 @@
|
||||
</h1>
|
||||
<div class="news-meta">
|
||||
@if($news->category_id)
|
||||
<a href="#" class="meta-item">
|
||||
<a href="{{ newsRoute( ['categories' => [ $news->category_id ] ]) }}" class="meta-item">
|
||||
<i data-lucide="book" size="16"></i>
|
||||
{{ $news->category->name }}
|
||||
</a>
|
||||
@@ -131,7 +131,7 @@
|
||||
<div class="news-main-content entry-content">
|
||||
@if( $news->description )
|
||||
<div class="news-body-text">
|
||||
{{ $news->description }}
|
||||
{!! $news->description_html !!}
|
||||
</div>
|
||||
@endif
|
||||
@if( $news->gallery->isNotEmpty() )
|
||||
@@ -156,7 +156,7 @@
|
||||
</div>
|
||||
<aside class="news-sidebar">
|
||||
|
||||
@if($news->entry->exists())
|
||||
@if($news->entry()->exists())
|
||||
<div class="sidebar-block">
|
||||
<h3 class="sidebar-title">
|
||||
<i data-lucide="content" size="18"></i>
|
||||
|
||||
7
resources/views/pages/user_state.blade.php
Normal file
7
resources/views/pages/user_state.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', "Forbidden - " . config('app.name') )
|
||||
|
||||
@section('content')
|
||||
<x-error-block error-type="user-state-not-valid" message="{{ $reason }}" />
|
||||
@endsection
|
||||
11
resources/views/reviews/index.blade.php
Normal file
11
resources/views/reviews/index.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', "Database - " . config('app.name') )
|
||||
|
||||
@section('content')
|
||||
{{ \Diglactic\Breadcrumbs\Breadcrumbs::render() }}
|
||||
<div class="page-title">
|
||||
Reviews
|
||||
</div>
|
||||
@livewire('reviews')
|
||||
@endsection
|
||||
70
resources/views/reviews/submit.blade.php
Normal file
70
resources/views/reviews/submit.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<div
|
||||
class="modal-overlay"
|
||||
x-show="reviewModalOpen"
|
||||
x-effect="reviewModalOpen && $nextTick(() => window.refreshIcons($el))"
|
||||
x-cloak
|
||||
x-transition.opacity.duration.300ms
|
||||
@keydown.escape.window="reviewModalOpen = false"
|
||||
@focus="window.refreshIcons($el)"
|
||||
>
|
||||
<div @click.outside="reviewModalOpen = false" class="modal-window">
|
||||
|
||||
<div class="modal-header">
|
||||
<span class="modal-title">Write a review</span>
|
||||
<button @click="reviewModalOpen = false" class="modal-close">
|
||||
<i data-lucide="x" size="18"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('reviews.store', $entry) }}" class="modal-content">
|
||||
@csrf
|
||||
|
||||
<div class="form-group" x-data="{ rating: {{ old('rating', 0) }} }">
|
||||
<label class="form-label">Your rating</label>
|
||||
<div class="star-input">
|
||||
<template x-for="i in 5" :key="i">
|
||||
<span
|
||||
@click="rating = i"
|
||||
:class="i <= rating ? 'star-filled' : 'star-empty'"
|
||||
class="star-input-icon"
|
||||
>
|
||||
<i data-lucide="star" size="22"></i>
|
||||
</span>
|
||||
</template>
|
||||
<input type="hidden" name="rating" :value="rating">
|
||||
</div>
|
||||
@error('rating')
|
||||
<span class="form-error">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="review-title">Title</label>
|
||||
<input
|
||||
type="text"
|
||||
id="review-title"
|
||||
name="title"
|
||||
class="form-input"
|
||||
maxlength="100"
|
||||
value="{{ old('title') }}"
|
||||
>
|
||||
@error('title')
|
||||
<span class="form-error">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="review-description">Review</label>
|
||||
<x-markdown-textarea name="description" value="{{ old('description', '') }}" />
|
||||
@error('description')
|
||||
<span class="form-error">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn primary" style="width: 100%; justify-content: center;">
|
||||
<i data-lucide="send" size="14"></i> Post review
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,6 +110,7 @@
|
||||
@if( section_must_be( [ 'translations', 'utilities', 'documents'] , $section ) )
|
||||
<x-form-field-title name="Languages" required="true" />
|
||||
<x-languages-selector :selected="$oldLanguages" />
|
||||
<div class="form-error-text" x-show="errorKey === 'noLanguages'" x-text="errorMessage"></div>
|
||||
@error('languages')
|
||||
<x-form-error-text message="{{ $message }}" />
|
||||
@enderror
|
||||
@@ -158,6 +159,7 @@
|
||||
@if( section_must_not_be( [ 'translations', 'utilities', 'documents' ], $section ) )
|
||||
<x-form-field-title name="Languages" required="true" />
|
||||
<x-languages-selector :selected="$oldLanguages" />
|
||||
<div class="form-error-text" x-show="errorKey === 'noLanguages'" x-text="errorMessage"></div>
|
||||
@error('languages')
|
||||
<x-form-error-text message="{{ $message }}" />
|
||||
@enderror
|
||||
@@ -168,7 +170,9 @@
|
||||
|
||||
<x-form-group-title label="{{ $words['attachments'] }}" icon="paperclip" />
|
||||
<x-main-image-field :old-path="old('main-image', $entry->main_image ?? '') ?? ''" />
|
||||
<div class="form-error-text" x-show="errorKey === 'noMainImage'" x-text="errorMessage"></div>
|
||||
<x-gallery-field :old-paths="old('gallery', $entry->gallery->pluck('image')->toArray() ?? [] )"/>
|
||||
<div class="form-error-text" x-show="errorKey === 'noGalleryImages'" x-text="errorMessage"></div>
|
||||
@error('gallery')
|
||||
<x-form-error-text message="{{ $message }}" />
|
||||
@enderror
|
||||
@@ -178,6 +182,7 @@
|
||||
|
||||
<x-form-group-title label="{{ $words['authors'] }}" icon="users" />
|
||||
<livewire:authors-selector :old-authors="old('authors', $entry->authors->map(fn($a) => ['id' => $a->id, 'name' => $a->name ])->toArray() ?? [])" :old-new-authors="old('new-authors', [])" />
|
||||
<div class="form-error-text" x-show="errorKey === 'noAuthors'" x-text="errorMessage"></div>
|
||||
@error('authors')
|
||||
<x-form-error-text message="{{ $message }}" />
|
||||
@enderror
|
||||
@@ -225,6 +230,7 @@
|
||||
<x-form-field-title name="Metadata" required="true" />
|
||||
<div class="form-type-of-checkboxes form-group level" id="entry-metadata">
|
||||
<label><input class="form-checkbox" type="checkbox" name="featured" value="1" {{ old('featured', $entry->featured ) ? 'checked' : '' }}>Featured entry</label>
|
||||
<label><input class="form-checkbox" type="checkbox" name="refresh_created_at" value="1">Refresh created at</label>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
@@ -235,9 +241,10 @@
|
||||
|
||||
@csrf
|
||||
|
||||
<div class="submit">
|
||||
<div class="submit" x-ref="submitButton">
|
||||
<x-submit-entry-status :section="$section" :is-edit="$isEdit" :current-state="$entry->state ?? null" :entry="$entry" />
|
||||
<button id="submit-button" type="submit" class="btn primary" style="padding:1%;">Submit</button>
|
||||
</div>
|
||||
<div class="form-error-text" x-show="errorKey === 'isSubmitting'" x-text="errorMessage"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
16
resources/views/tools/hasher.blade.php
Normal file
16
resources/views/tools/hasher.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', "ROM Patcher - " . config('app.name'))
|
||||
|
||||
@push('scripts')
|
||||
@vite('resources/js/HashesChecker.js')
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="page-title">
|
||||
<span>ROM Hasher</span>
|
||||
</div>
|
||||
|
||||
<livewire:hashes-checker />
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user