Merge pull request 'dev' (#33) from dev into master

Reviewed-on: #33
This commit is contained in:
2026-07-02 08:42:04 +00:00
13 changed files with 47 additions and 7 deletions

View File

@@ -19,10 +19,14 @@ class ShortLinkController extends Controller
'l' => 'lua-scripts',
];
public function index(){
return response()->redirectToRoute('home');
}
public function legacy( int $wpId )
{
$log = DB::table('migrations_logs')
->where('source_system')
->where('source_system', 'wp')
->whereIn('source_table', ['wp_posts', 'wp_posts__news'] )
->where('source_id', $wpId)
->first(['target_table', 'target_id']);

View File

@@ -30,6 +30,8 @@ use Spatie\Activitylog\Support\LogOptions;
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereWebsite($value)
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
* @property-read int|null $activities_as_subject_count
* @mixin \Eloquent
*/
class Author extends Model

View File

@@ -105,6 +105,11 @@ use Spatie\Activitylog\Support\LogOptions;
* @property-read float $average_rating
* @property-read int $reviews_count_cached
* @property-read string $description_html
* @property int $nsfw
* @property int $old_download_count
* @property-read int $total_downloads
* @method static Builder<static>|Entry whereNsfw($value)
* @method static Builder<static>|Entry whereOldDownloadCount($value)
* @mixin \Eloquent
*/
class Entry extends Model

View File

@@ -38,6 +38,8 @@ use Spatie\Activitylog\Support\LogOptions;
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withTrashed(bool $withTrashed = true)
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withoutTrashed()
* @property-read string $description_html
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
* @property-read int|null $activities_as_subject_count
* @mixin \Eloquent
*/
class EntryReview extends Model

View File

@@ -29,6 +29,8 @@ use Spatie\Activitylog\Support\LogOptions;
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game wherePlatformId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereUpdatedAt($value)
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
* @property-read int|null $activities_as_subject_count
* @mixin \Eloquent
*/
class Game extends Model

View File

@@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereUpdatedAt($value)
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Entry> $entries
* @property-read int|null $entries_count
* @mixin \Eloquent
*/
class Level extends Model

View File

@@ -100,6 +100,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVisible($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVoteScore($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereWarningPoints($value)
* @property int $nsfw_content
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereNsfwContent($value)
* @mixin \Eloquent
*/
class LogXfUser extends Model

View File

@@ -20,6 +20,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereUpdatedAt($value)
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Entry> $entries
* @property-read int|null $entries_count
* @mixin \Eloquent
*/
class Modification extends Model

View File

@@ -58,6 +58,9 @@ use Spatie\Activitylog\Support\LogOptions;
* @method static Builder<static>|News whereYoutubeLink($value)
* @method static Builder<static>|News withTrashed(bool $withTrashed = true)
* @method static Builder<static>|News withoutTrashed()
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
* @property-read int|null $activities_as_subject_count
* @property-read string $description_html
* @mixin \Eloquent
*/
class News extends Model

View File

@@ -1,5 +1,6 @@
@import './base/variables.css';
@import './base/reset.css';
@import 'theme-overrides.css';
@import './layout/menu.css';
@import './layout/content.css';

View File

@@ -0,0 +1,12 @@
.light-mode {
--fix-white: #fff;
.news-meta {
color: var(--fix-white) !important;
}
.news-header .news-actions .btn {
color: var(--fix-white) !important;
}
.entry-badge {
color: var(--fix-white) !important;
}
}

View File

@@ -1,11 +1,13 @@
<div class="entry-card">
<div class="entry-cover-wrapper">
<span class="entry-badge">{{ $entry->getRealPlatform()?->name ?? 'Unknown' }}</span>
@if( $entry->main_image )
<img src="{{ Storage::url($entry->main_image) }}">
@else
<i data-lucide="image" size="40" color="var(--border)"></i>
@endif
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}">
<span class="entry-badge">{{ $entry->getRealPlatform()?->name ?? 'Unknown' }}</span>
@if( $entry->main_image )
<img src="{{ Storage::url($entry->main_image) }}">
@else
<i data-lucide="image" size="40" color="var(--border)"></i>
@endif
</a>
</div>
<div class="entry-card-info">
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title ?? $entry->complete_title }}</a>

View File

@@ -137,6 +137,7 @@ Route::name('redirect.')->controller(\App\Http\Controllers\RedirectController::c
// ShortLinkController
Route::domain('rhpz.org')->name('shorturl.')->controller(\App\Http\Controllers\ShortLinkController::class)->group(function () {
Route::get('/', 'index' )->name('index');
Route::get('/{id}', 'legacy' )->where('id', '[0-9]+')->name('legacy');
Route::get('/{letter}/{id}', 'redirect' )->where(['letter' => '[a-z]', 'id' => '[0-9]+'])->name('redirect');
});