A lot of things.

This commit is contained in:
2026-05-27 21:24:38 +02:00
parent b361f07954
commit d02baa89d6
43 changed files with 1340 additions and 231 deletions

View File

@@ -8,7 +8,7 @@
@endif
</div>
<div class="entry-card-info">
<div class="entry-card-title">{{ $entry->title }}</div>
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title }}</a>
<div class="entry-card-author">
@forelse( $entry->authors as $author)
@if($loop->first)By @endif
@@ -24,13 +24,13 @@
@foreach( $entry->modifications as $modif )
<span class="badge orange">{{ $modif->name }}</span>
@endforeach
@if( $entry->status_id )
<span class="badge">{{ $entry->status->name }}</span>
@endif
@foreach( $entry->languages as $lang )
<span class="badge">{{ $lang->name }}</span>
@endforeach
@endif
@if( $entry->status_id )
<span class="badge">{{ $entry->status->name }}</span>
@endif
@foreach( $entry->languages as $lang )
<span class="badge">{{ $lang->name }}</span>
@endforeach
</div>
<div class="entry-card-meta">
<span><i data-lucide="download" size="12"></i> x</span>

View File

@@ -14,7 +14,7 @@
</div>
</div>
<div class="form-gallery form-group level" style="flex:4;">
<template x-for="(image,i) in images" :key="image.serverFilePath">
<template x-for="(image,i) in images" :key="image.key">
<div class="gallery-item">
<div class="form-image-preview-wrap">
<img :src="image.preview" :alt="image.name">
@@ -27,7 +27,7 @@
</div>
</div>
<template x-for="(image, i) in images" :key="image.serverFilePath">
<template x-for="(image, i) in images" :key="image.key">
<input type="hidden" name="gallery[]" :value="image.serverFilePath">
</template>

View File

@@ -1,7 +1,7 @@
<?php /** @var \App\Models\Language $language */ ?>
<div class="languages-selector form-group level" x-data="{
search: '',
selected: {{ JS::from( (array) $selected ) }},
selected: @js((array) $selected),
toggle(value){
const i = this.selected.indexOf(value);
i === -1 ? this.selected.push(value) : this.selected.splice(i,1);

View File

@@ -0,0 +1,72 @@
<div
x-data
x-show="$store.settings.start"
x-cloak
class="settings-dropdown"
@keydown.escape.window="$store.settings.close()"
>
<div class="settings-header">
<span>Settings</span>
</div>
<div class="settings-section">
<div class="settings-section-title">
<i data-lucide="sun-moon" size="14"></i>
Theme
</div>
<button type="button" class="settings-theme-toggle" @click="$store.settings.toggleTheme()">
<template x-if="$store.settings.currentTheme === 'default'">
<span class="settings-theme-toggle-inner">
<i data-lucide="moon" size="15"></i>
Dark
<span class="settings-theme-toggle-badge">ON</span>
</span>
</template>
<template x-if="$store.settings.currentTheme === 'alternate'">
<span class="settings-theme-toggle-inner">
<i data-lucide="sun" size="15"></i>
Light
<span class="settings-theme-toggle-badge">ON</span>
</span>
</template>
</button>
</div>
<div class="settings-separator"></div>
<div class="settings-section">
<div class="settings-section-title">
<i data-lucide="layout-grid" size="14"></i>
Entries per page
</div>
<div class="settings-perpage">
<template x-for="n in $store.settings.entriesPerPage" :key="n">
<button
type="button"
class="settings-perpage-btn"
:class="{ 'active': $store.settings.currentEntriesPerPage == n }"
@click="$store.settings.entriesPerPageChanged(n)"
x-text="n"
></button>
</template>
</div>
<div class="settings-separator"></div>
@auth
<div class="settings-section">
<div class="settings-section-title">
<i data-lucide="user-cog" size="14"></i>
Account
</div>
<a href="{{ xfRoute('account/account-details') }}" class="settings-link">
<i data-lucide="settings-2" size="14"></i>
XenForo settings
<i data-lucide="external-link" size="12" style="margin-left:auto"></i>
</a>
</div>
@endauth
</div>
</div>

View File

@@ -1,4 +1,4 @@
@php $topbarModSeparator = false; $topBarAdminSeparator = false; @endphp
@php $topbarModSeparator = false; $topbarAdminSeparator = false; @endphp
<header id="topbar">
<button class="mobile-toggle">
<i data-lucide="menu"></i>
@@ -43,11 +43,11 @@
@endif
{{-- Users --}}
@if( !\Auth::guest() && \Auth::user()->can('romhackplaza', 'canSubmitEntry') )
@can('create','\App\Models\Entry')
<a href="#" class="btn">
<i data-lucide="hard-drive-upload" size="18"></i>
</a>
@endif
@endcan
@if( !\Auth::guest() )
<div x-data x-init="$store.notifications.unviewed = {{ \Auth::user()->alerts_unviewed }}" style="position:relative">
<button type="button" class="btn" :class="{ 'active': $store.notifications.start }" @click="$store.notifications.open($el)" @click.outside="$store.notifications.close()">
@@ -76,9 +76,19 @@
@include('components.conversations')
</div>
@endif
<button class="btn">
<i data-lucide="settings" size="18"></i>
</button>
<div x-data style="position: relative;" x-init="$store.settings.xfUrls = { 'default': '{{ xfStyleVariationUrl( 'default' ) }}', 'alternate': '{{ xfStyleVariationUrl( 'alternate' ) }}' }">
<button
type="button"
class="btn"
:class="{ 'active': $store.settings.start }"
@click="$store.settings.open()"
@click.outside="$store.settings.close()"
>
<i data-lucide="settings" size="18"></i>
</button>
@include('components.settings-dropdown')
</div>
</div>
</header>

View File

@@ -0,0 +1,38 @@
<div class="grid-c2" style="margin-top:1%;">
<div id="reviews-section">
<div class="entry-content">
<x-entry-section-title label="Reviews" icon="star" />
</div>
</div>
<div id="comments-section">
<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)
@continue
@else
<div class="comment-block">
<x-xen-foro-avatar :user="$comment['user_id']" />
<div class="comment-content">
<div class="comment-meta">
<span class="comment-author">{{ $comment['User']['username'] }}</span>
<span class="comment-separator"></span>
<span class="comment-date">{{ date('Y-m-d', $comment['post_date']) }}</span>
</div>
<div class="comment-body">
{!! $comment['message'] !!}
</div>
</div>
</div>
@endif
@empty
<span class="whisper">Be the first to post a comment</span>
@endforelse
<a href="{{ xfRoute("threads/{$entry->comments_thread_id}/latest") }}" class="btn primary" style="margin-top: 1%;">
<i data-lucide="pen"></i> Post a comment
</a>
</div>
</div>
</div>

View File

@@ -59,9 +59,19 @@
<button class="btn primary" onclick="Livewire.dispatch('entryOpenFilesModal', { entryId: {{ $entry->id }} })">
<i data-lucide="download"></i> Download
</button>
@can('update',$entry)
<a href="{{ route('submit.edit', ['section' => $entry->type, 'entry' => $entry ] ) }}" class="btn primary">
<i data-lucide="edit"></i> Edit
</a>
@endcan
<button class="btn">
<i data-lucide="message-square"></i> Comments
</button>
@auth
<a href="{{ xfRoute("romhackplaza_entry/{$entry->id}/report") }}" class="btn">
<i data-lucide="flag"></i> Report / Claim Ownership
</a>
@endauth
</div>
</div>
</div>
@@ -94,5 +104,6 @@
@endif
</div>
</article>
@include('entries.comments')
@livewire('entry-files-modal')
@endsection

View File

@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="{{ \Illuminate\Support\Facades\Cookie::get('theme', 'default') === 'alternate' ? 'light-mode' : '' }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@include('meta')
@vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles
@stack('styles')
@@ -15,14 +16,14 @@
<main id="main-wrapper">
@include('components.topbar')
@if(session('success'))
<x-success-block success-type="custom" :message="session('success')" />
@endif
@if(session('error'))
<x-error-block error-type="custom" :message="session('error')" />
@endif
<div id="content">
@if(session('success'))
<x-success-block success-type="custom" :message="session('success')" />
@endif
@if(session('error'))
<x-error-block error-type="custom" :message="session('error')" />
@endif
@yield('content')
</div>
</main>

View File

@@ -0,0 +1 @@
<meta name="config-session-domain" content="{{ config('session.domain') }}">

View File

@@ -84,6 +84,12 @@
@if( section_must_be( 'translations', $section ) )
<x-form-field-title name="Languages" required="true" />
<x-languages-selector :selected="$oldLanguages" />
@error('languages')
<x-form-error-text message="{{ $message }}" />
@enderror
@error('languages.*')
<x-form-error-text message="{{ $message }}" />
@enderror
@endif
<div class="form-group" x-ref="descriptionField">