Upload beautify

This commit is contained in:
2026-02-17 17:14:43 +01:00
parent b053c0cc48
commit 41287914aa
106 changed files with 4948 additions and 906 deletions

View File

@@ -1,98 +0,0 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Legacy\HomeController;
use App\Http\Controllers\Legacy\ArtController;
use App\Http\Controllers\Legacy\AvatarController;
use App\Http\Controllers\Legacy\ForumController;
use App\Http\Controllers\Legacy\NewsController;
use App\Http\Controllers\Legacy\CategoryController;
use App\Http\Controllers\Legacy\FeaturedArtworksController;
use App\Http\Controllers\Legacy\DailyUploadsController;
use App\Http\Controllers\Legacy\ChatController;
use App\Http\Controllers\Legacy\ProfileController as LegacyProfileController;
use App\Http\Controllers\Legacy\TopFavouritesController;
use App\Http\Controllers\Legacy\FavouritesController;
use App\Http\Controllers\Legacy\TopAuthorsController;
use App\Http\Controllers\Legacy\TodayInHistoryController;
use App\Http\Controllers\Legacy\TodayDownloadsController;
use App\Http\Controllers\Legacy\MonthlyCommentatorsController;
use App\Http\Controllers\Legacy\MembersController;
use App\Http\Controllers\Legacy\LatestController;
use App\Http\Controllers\Legacy\LatestCommentsController;
use App\Http\Controllers\Legacy\InterviewController;
use App\Http\Controllers\Legacy\StatisticsController;
use App\Http\Controllers\BrowseCategoriesController;
use App\Http\Controllers\GalleryController;
use App\Http\Controllers\Legacy\ReceivedCommentsController;
use App\Http\Controllers\Legacy\UserController as LegacyUserController;
use App\Http\Controllers\BrowseGalleryController;
// Legacy site routes
Route::get('/', [HomeController::class, 'index'])->name('legacy.home');
Route::get('/home', [HomeController::class, 'index']);
Route::get('/art/{id}/{slug?}', [ArtController::class, 'show'])->where('id', '\\d+')->name('legacy.art.show');
Route::match(['get','post'], '/art/{id}/comment', [ArtController::class, 'show'])->where('id', '\\d+');
Route::get('/avatar/{id}/{name?}', [AvatarController::class, 'show'])->where('id', '\\d+')->name('legacy.avatar');
Route::get('/forum', [ForumController::class, 'index'])->name('legacy.forum.index');
Route::get('/forum/{topic_id}/{slug?}', [ForumController::class, 'topic'])->where('topic_id', '\\d+')->name('legacy.forum.topic');
Route::get('/news/{id}/{slug?}', [NewsController::class, 'show'])->where('id', '\\d+')->name('legacy.news.show');
Route::get('/categories', [CategoryController::class, 'index'])->name('legacy.categories');
Route::get('/category/{group}/{slug?}/{id?}', [BrowseGalleryController::class, 'legacyCategory'])->name('legacy.category');
Route::get('/browse', [BrowseGalleryController::class, 'browse'])->name('legacy.browse');
Route::get('/featured', [FeaturedArtworksController::class, 'index'])->name('legacy.featured');
Route::get('/featured-artworks', [FeaturedArtworksController::class, 'index'])->name('legacy.featured_artworks');
Route::get('/daily-uploads', [DailyUploadsController::class, 'index'])->name('legacy.daily_uploads');
Route::get('/chat', [ChatController::class, 'index'])->name('legacy.chat');
Route::get('/browse-categories', [BrowseCategoriesController::class, 'index'])->name('browse.categories');
// Support profile URLs with numeric id and optional slug: /profile/1/gregor
Route::get('/profile/{id}/{username?}', [LegacyProfileController::class, 'show'])
->where('id', '\\d+')
->name('legacy.profile.id');
// Backward-compatible route for /profile/{username}
Route::get('/profile/{username?}', [LegacyProfileController::class, 'show'])->name('legacy.profile');
Route::get('/top-favourites', [TopFavouritesController::class, 'index'])->name('legacy.top_favourites');
Route::get('/top-authors', [TopAuthorsController::class, 'index'])->name('legacy.top_authors');
// My buddies / who I follow (legacy)
Route::middleware('auth')->get('/mybuddies.php', [\App\Http\Controllers\Legacy\MyBuddiesController::class, 'index'])->name('legacy.mybuddies.php');
Route::middleware('auth')->get('/mybuddies', [\App\Http\Controllers\Legacy\MyBuddiesController::class, 'index'])->name('legacy.mybuddies');
Route::middleware('auth')->delete('/mybuddies/{id}', [\App\Http\Controllers\Legacy\MyBuddiesController::class, 'destroy'])->name('legacy.mybuddies.delete');
// Who follows me (legacy)
Route::middleware('auth')->get('/buddies.php', [\App\Http\Controllers\Legacy\BuddiesController::class, 'index'])->name('legacy.buddies.php');
Route::middleware('auth')->get('/buddies', [\App\Http\Controllers\Legacy\BuddiesController::class, 'index'])->name('legacy.buddies');
// User favourites (port of oldSite /favourites.php)
Route::get('/favourites/{id?}/{username?}', [FavouritesController::class, 'index'])->name('legacy.favourites');
Route::post('/favourites/{userId}/delete/{artworkId}', [FavouritesController::class, 'destroy'])->name('legacy.favourites.delete');
// User gallery (port of oldSite gallery link)
Route::get('/gallery/{id}/{username?}', [GalleryController::class, 'show'])->name('legacy.gallery');
// Received comments (requires authentication)
Route::middleware('auth')->get('/recieved-comments', [ReceivedCommentsController::class, 'index'])->name('legacy.received_comments');
// User account settings (legacy /user)
Route::middleware('auth')->match(['get','post'], '/user', [LegacyUserController::class, 'index'])->name('legacy.user');
Route::get('/today-in-history', [TodayInHistoryController::class, 'index'])->name('legacy.today_in_history');
Route::get('/today-downloads', [TodayDownloadsController::class, 'index'])->name('legacy.today_downloads');
Route::get('/monthly-commentators', [MonthlyCommentatorsController::class, 'index'])->name('legacy.monthly_commentators');
Route::get('/members', [MembersController::class, 'index'])->name('legacy.members');
Route::get('/latest', [LatestController::class, 'index'])->name('legacy.latest');
Route::get('/latest-comments', [LatestCommentsController::class, 'index'])->name('legacy.latest_comments');
Route::get('/interviews', [InterviewController::class, 'index'])->name('legacy.interviews');
Route::middleware(['auth'])->group(function () {
Route::get('/statistics', [StatisticsController::class, 'index'])->name('legacy.statistics');
});

View File

@@ -1,17 +1,100 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\User\ProfileController;
use App\Models\ContentType;
use App\Http\Controllers\AvatarController;
use App\Http\Controllers\ManageController;
use App\Http\Controllers\User\AvatarController;
use App\Http\Controllers\Dashboard\ManageController;
use App\Http\Controllers\Dashboard\ArtworkController as DashboardArtworkController;
use App\Http\Controllers\Web\HomeController;
use App\Http\Controllers\Web\ArtController;
use App\Http\Controllers\Misc\AvatarController as LegacyAvatarController;
use App\Http\Controllers\Community\ForumController;
use App\Http\Controllers\Community\NewsController;
use App\Http\Controllers\Web\CategoryController;
use App\Http\Controllers\Web\FeaturedArtworksController;
use App\Http\Controllers\Web\DailyUploadsController;
use App\Http\Controllers\Community\ChatController;
use App\Http\Controllers\User\TopFavouritesController;
use App\Http\Controllers\User\FavouritesController;
use App\Http\Controllers\User\TopAuthorsController;
use App\Http\Controllers\User\TodayInHistoryController;
use App\Http\Controllers\User\TodayDownloadsController;
use App\Http\Controllers\User\MonthlyCommentatorsController;
use App\Http\Controllers\User\MembersController;
use App\Http\Controllers\Community\LatestController;
use App\Http\Controllers\Community\LatestCommentsController;
use App\Http\Controllers\Community\InterviewController;
use App\Http\Controllers\User\StatisticsController;
use App\Http\Controllers\User\ReceivedCommentsController;
use App\Http\Controllers\User\UserController as LegacyUserController;
use App\Http\Controllers\Web\BrowseCategoriesController;
use App\Http\Controllers\Web\GalleryController;
use App\Http\Controllers\Web\BrowseGalleryController;
use Inertia\Inertia;
// Legacy routes are defined in routes/legacy.php and provide the site's
// legacy pages (art, forum, news, profile, etc.). We keep the auth routes
// and dashboard as before.
require __DIR__.'/legacy.php';
// Legacy route set migrated from routes/legacy.php into this file.
Route::get('/', [HomeController::class, 'index'])->name('legacy.home');
Route::get('/home', [HomeController::class, 'index']);
Route::get('/art/{id}/{slug?}', [ArtController::class, 'show'])->where('id', '\\d+')->name('legacy.art.show');
Route::match(['get','post'], '/art/{id}/comment', [ArtController::class, 'show'])->where('id', '\\d+');
Route::get('/avatar/{id}/{name?}', [LegacyAvatarController::class, 'show'])->where('id', '\\d+')->name('legacy.avatar');
Route::get('/forum', [ForumController::class, 'index'])->name('legacy.forum.index');
Route::get('/forum/{topic_id}/{slug?}', [ForumController::class, 'topic'])->where('topic_id', '\\d+')->name('legacy.forum.topic');
Route::get('/news/{id}/{slug?}', [NewsController::class, 'show'])->where('id', '\\d+')->name('legacy.news.show');
Route::get('/categories', [CategoryController::class, 'index'])->name('legacy.categories');
Route::get('/category/{group}/{slug?}/{id?}', [BrowseGalleryController::class, 'legacyCategory'])->name('legacy.category');
Route::get('/browse', [BrowseGalleryController::class, 'browse'])->name('legacy.browse');
Route::get('/featured', [FeaturedArtworksController::class, 'index'])->name('legacy.featured');
Route::get('/featured-artworks', [FeaturedArtworksController::class, 'index'])->name('legacy.featured_artworks');
Route::get('/daily-uploads', [DailyUploadsController::class, 'index'])->name('legacy.daily_uploads');
Route::get('/chat', [ChatController::class, 'index'])->name('legacy.chat');
Route::get('/browse-categories', [BrowseCategoriesController::class, 'index'])->name('browse.categories');
Route::get('/profile/{id}/{username?}', [ProfileController::class, 'show'])
->where('id', '\\d+')
->name('legacy.profile.id');
Route::get('/profile/{username?}', [ProfileController::class, 'show'])->name('legacy.profile');
Route::get('/top-favourites', [TopFavouritesController::class, 'index'])->name('legacy.top_favourites');
Route::get('/top-authors', [TopAuthorsController::class, 'index'])->name('legacy.top_authors');
Route::middleware('auth')->get('/mybuddies.php', [\App\Http\Controllers\User\MyBuddiesController::class, 'index'])->name('legacy.mybuddies.php');
Route::middleware('auth')->get('/mybuddies', [\App\Http\Controllers\User\MyBuddiesController::class, 'index'])->name('legacy.mybuddies');
Route::middleware('auth')->delete('/mybuddies/{id}', [\App\Http\Controllers\User\MyBuddiesController::class, 'destroy'])->name('legacy.mybuddies.delete');
Route::middleware('auth')->get('/buddies.php', [\App\Http\Controllers\User\BuddiesController::class, 'index'])->name('legacy.buddies.php');
Route::middleware('auth')->get('/buddies', [\App\Http\Controllers\User\BuddiesController::class, 'index'])->name('legacy.buddies');
Route::get('/favourites/{id?}/{username?}', [FavouritesController::class, 'index'])->name('legacy.favourites');
Route::post('/favourites/{userId}/delete/{artworkId}', [FavouritesController::class, 'destroy'])->name('legacy.favourites.delete');
Route::get('/gallery/{id}/{username?}', [GalleryController::class, 'show'])->name('legacy.gallery');
Route::middleware('auth')->get('/recieved-comments', [ReceivedCommentsController::class, 'index'])->name('legacy.received_comments');
Route::middleware('auth')->match(['get','post'], '/user', [LegacyUserController::class, 'index'])->name('legacy.user');
Route::get('/today-in-history', [TodayInHistoryController::class, 'index'])->name('legacy.today_in_history');
Route::get('/today-downloads', [TodayDownloadsController::class, 'index'])->name('legacy.today_downloads');
Route::get('/monthly-commentators', [MonthlyCommentatorsController::class, 'index'])->name('legacy.monthly_commentators');
Route::get('/members', [MembersController::class, 'index'])->name('legacy.members');
Route::get('/latest', [LatestController::class, 'index'])->name('legacy.latest');
Route::get('/latest-comments', [LatestCommentsController::class, 'index'])->name('legacy.latest_comments');
Route::get('/interviews', [InterviewController::class, 'index'])->name('legacy.interviews');
Route::middleware(['auth'])->group(function () {
Route::get('/statistics', [StatisticsController::class, 'index'])->name('legacy.statistics');
});
Route::get('/dashboard', function () {
return view('dashboard');
@@ -26,12 +109,14 @@ Route::middleware(['auth'])->prefix('dashboard')->name('dashboard.')->group(func
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
// Backwards-compatible settings path used by some layouts/links
Route::get('/settings', [ProfileController::class, 'edit'])->name('settings');
Route::match(['post','put','patch'], '/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
// Password change endpoint (accepts POST or PUT from legacy and new forms)
Route::match(['post', 'put'], '/profile/password', [ProfileController::class, 'password'])->name('profile.password');
// Avatar upload (backend only) - processes and stores avatars
Route::post('/avatar/upload', [AvatarController::class, 'upload'])->name('avatar.upload');
Route::post('/avatar/upload', [AvatarController::class, 'upload'])->middleware('throttle:20,1')->name('avatar.upload');
});
Route::middleware(['auth'])->group(function () {
@@ -115,12 +200,12 @@ Route::bind('artwork', function ($value) {
// to serve photography's root page. This catch-all route delegates to a controller that
// will forward to the appropriate existing controller (artwork or category handlers).
// Provide a named route alias for legacy artwork URL generation used in tests.
Route::get('/{contentTypeSlug}/{categoryPath}/{artwork}', [\App\Http\Controllers\BrowseGalleryController::class, 'showArtwork'])
Route::get('/{contentTypeSlug}/{categoryPath}/{artwork}', [\App\Http\Controllers\Web\BrowseGalleryController::class, 'showArtwork'])
->where('contentTypeSlug', 'photography|wallpapers|skins|other')
->where('categoryPath', '[^/]+(?:/[^/]+)*')
->name('artworks.show');
Route::get('/{contentTypeSlug}/{path?}', [\App\Http\Controllers\BrowseGalleryController::class, 'content'])
Route::get('/{contentTypeSlug}/{path?}', [\App\Http\Controllers\Web\BrowseGalleryController::class, 'content'])
->where('contentTypeSlug', 'photography|wallpapers|skins|other')
->where('path', '.*')
->name('content.route');
@@ -143,5 +228,3 @@ Route::middleware(['auth'])->prefix('admin')->name('admin.')->group(function ()
Route::resource('artworks', \App\Http\Controllers\Admin\ArtworkController::class)->except(['show']);
});