Compare commits

..

15 commits

31 changed files with 10320 additions and 85 deletions

View file

@ -9,7 +9,6 @@
/storage/*.key /storage/*.key
/vendor /vendor
.env .env
.env.example
.env.backup .env.backup
.env.production .env.production
.phpunit.result.cache .phpunit.result.cache

5
.gitignore vendored
View file

@ -21,4 +21,7 @@ yarn-error.log
/.nova /.nova
/.vscode /.vscode
/.zed /.zed
composer.lock
**/caddy
frankenphp
frankenphp-worker.php

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\App;
use Livewire\Component;
class Footer extends Component
{
public function render()
{
return view('livewire.app.footer');
}
}

View file

@ -7,16 +7,12 @@ use Livewire\Component;
class Pfp extends Component class Pfp extends Component
{ {
public string $user = ''; public User $user;
public string $size = '3rem'; public string $size = '3rem';
public string $shape = 'circle'; public string $shape = 'rounded';
public function render() public function render()
{ {
$u = User::find($this->user); return view('livewire.app.pfp');
return view('livewire.app.pfp', [
'pfp' => $u->getAvatarBase64(),
'name' => $u->name,
]);
} }
} }

View file

@ -0,0 +1,32 @@
<?php
namespace App\Livewire\App;
use App\Models\User;
use Livewire\Component;
class UserCard extends Component
{
public User $user;
public function placeholder()
{
return <<<HTML
<article class="wa-stack">
<div class="wa-frame wa-border-radius-l">
<wa-spinner style="font-size: 2rem;"></wa-spinner>
</div>
<div class="wa-stack wa-gap-3xs">
<wa-skeleton effect="pulse"></wa-skeleton>
<wa-skeleton effect="pulse"></wa-skeleton>
</div>
</article>
HTML;
}
public function render()
{
return view('livewire.app.user-card');
}
}

View file

@ -15,7 +15,7 @@ class Upload extends Component
{ {
use WithFileUploads; use WithFileUploads;
#[Validate('image|max:10240')] #[Validate('image|max:65536')]
public $file; public $file;
#[Validate('required|in:safe,suggestive,explicit')] #[Validate('required|in:safe,suggestive,explicit')]

View file

@ -0,0 +1,14 @@
<?php
namespace App\Livewire\Pages;
use App\Models\User;
use Livewire\Component;
class Users extends Component
{
public function render()
{
return view('livewire.pages.users', [ 'users' => User::all() ]);
}
}

View file

@ -20,6 +20,18 @@ class PostFeature extends Component
})->first(); })->first();
} }
public function placeholder()
{
return <<<HTML
<div class="wa-stack" style="max-height: 80vh;">
<div class="wa-frame wa-border-radius-l">
<wa-spinner style="font-size: 3rem; --track-width: 10px;"></wa-spinner>
</div>
</div>
HTML;
}
public function render() public function render()
{ {
if ($this->post == null) if ($this->post == null)

View file

@ -0,0 +1,25 @@
<?php
namespace App\Livewire\Posts;
use App\Models\Post;
use Livewire\Component;
class FullImage extends Component
{
public Post $post;
public function placeholder()
{
return <<<'HTML'
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; aspect-ratio: 1280/720;">
<wa-spinner style="font-size: 3rem; --track-width: 10px;"></wa-spinner>
</div>
HTML;
}
public function render()
{
return view('livewire.posts.full-image');
}
}

View file

@ -14,7 +14,7 @@ class Image extends Component
return <<<'HTML' return <<<'HTML'
<div class="wa-stack" style="display: flex; align-items: center; justify-content: center; max-height: 80vh;"> <div class="wa-stack" style="display: flex; align-items: center; justify-content: center; max-height: 80vh;">
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%;"> <div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%;">
<wa-spinner></wa-spinner> <wa-spinner style="font-size: 3rem; --track-width: 10px;"></wa-spinner>
</div> </div>
</div> </div>
HTML; HTML;

View file

@ -22,7 +22,7 @@ return Application::configure(basePath: dirname(__DIR__))
} }
) )
->withMiddleware(function (Middleware $middleware) { ->withMiddleware(function (Middleware $middleware) {
// $middleware->trustProxies(at: '*');
}) })
->withExceptions(function (Exceptions $exceptions) { ->withExceptions(function (Exceptions $exceptions) {
// //

View file

@ -11,8 +11,10 @@
"require": { "require": {
"php": "^8.2", "php": "^8.2",
"ext-gmp": "*", "ext-gmp": "*",
"intervention/image-driver-vips": "^1.0",
"intervention/image-laravel": "^1.5", "intervention/image-laravel": "^1.5",
"laravel/framework": "^12.0", "laravel/framework": "^12.0",
"laravel/octane": "^2.9",
"laravel/sanctum": "^4.0", "laravel/sanctum": "^4.0",
"laravel/tinker": "^2.10.1", "laravel/tinker": "^2.10.1",
"league/flysystem": "^3.29", "league/flysystem": "^3.29",

9852
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

224
config/octane.php Normal file
View file

@ -0,0 +1,224 @@
<?php
use Laravel\Octane\Contracts\OperationTerminated;
use Laravel\Octane\Events\RequestHandled;
use Laravel\Octane\Events\RequestReceived;
use Laravel\Octane\Events\RequestTerminated;
use Laravel\Octane\Events\TaskReceived;
use Laravel\Octane\Events\TaskTerminated;
use Laravel\Octane\Events\TickReceived;
use Laravel\Octane\Events\TickTerminated;
use Laravel\Octane\Events\WorkerErrorOccurred;
use Laravel\Octane\Events\WorkerStarting;
use Laravel\Octane\Events\WorkerStopping;
use Laravel\Octane\Listeners\CloseMonologHandlers;
use Laravel\Octane\Listeners\CollectGarbage;
use Laravel\Octane\Listeners\DisconnectFromDatabases;
use Laravel\Octane\Listeners\EnsureUploadedFilesAreValid;
use Laravel\Octane\Listeners\EnsureUploadedFilesCanBeMoved;
use Laravel\Octane\Listeners\FlushOnce;
use Laravel\Octane\Listeners\FlushTemporaryContainerInstances;
use Laravel\Octane\Listeners\FlushUploadedFiles;
use Laravel\Octane\Listeners\ReportException;
use Laravel\Octane\Listeners\StopWorkerIfNecessary;
use Laravel\Octane\Octane;
return [
/*
|--------------------------------------------------------------------------
| Octane Server
|--------------------------------------------------------------------------
|
| This value determines the default "server" that will be used by Octane
| when starting, restarting, or stopping your server via the CLI. You
| are free to change this to the supported server of your choosing.
|
| Supported: "roadrunner", "swoole", "frankenphp"
|
*/
'server' => env('OCTANE_SERVER', 'frankenphp'),
/*
|--------------------------------------------------------------------------
| Force HTTPS
|--------------------------------------------------------------------------
|
| When this configuration value is set to "true", Octane will inform the
| framework that all absolute links must be generated using the HTTPS
| protocol. Otherwise your links may be generated using plain HTTP.
|
*/
'https' => env('OCTANE_HTTPS', true),
/*
|--------------------------------------------------------------------------
| Octane Listeners
|--------------------------------------------------------------------------
|
| All of the event listeners for Octane's events are defined below. These
| listeners are responsible for resetting your application's state for
| the next request. You may even add your own listeners to the list.
|
*/
'listeners' => [
WorkerStarting::class => [
EnsureUploadedFilesAreValid::class,
EnsureUploadedFilesCanBeMoved::class,
],
RequestReceived::class => [
...Octane::prepareApplicationForNextOperation(),
...Octane::prepareApplicationForNextRequest(),
//
],
RequestHandled::class => [
//
],
RequestTerminated::class => [
// FlushUploadedFiles::class,
],
TaskReceived::class => [
...Octane::prepareApplicationForNextOperation(),
//
],
TaskTerminated::class => [
//
],
TickReceived::class => [
...Octane::prepareApplicationForNextOperation(),
//
],
TickTerminated::class => [
//
],
OperationTerminated::class => [
FlushOnce::class,
FlushTemporaryContainerInstances::class,
// DisconnectFromDatabases::class,
// CollectGarbage::class,
],
WorkerErrorOccurred::class => [
ReportException::class,
StopWorkerIfNecessary::class,
],
WorkerStopping::class => [
CloseMonologHandlers::class,
],
],
/*
|--------------------------------------------------------------------------
| Warm / Flush Bindings
|--------------------------------------------------------------------------
|
| The bindings listed below will either be pre-warmed when a worker boots
| or they will be flushed before every new request. Flushing a binding
| will force the container to resolve that binding again when asked.
|
*/
'warm' => [
...Octane::defaultServicesToWarm(),
],
'flush' => [
//
],
/*
|--------------------------------------------------------------------------
| Octane Swoole Tables
|--------------------------------------------------------------------------
|
| While using Swoole, you may define additional tables as required by the
| application. These tables can be used to store data that needs to be
| quickly accessed by other workers on the particular Swoole server.
|
*/
'tables' => [
'example:1000' => [
'name' => 'string:1000',
'votes' => 'int',
],
],
/*
|--------------------------------------------------------------------------
| Octane Swoole Cache Table
|--------------------------------------------------------------------------
|
| While using Swoole, you may leverage the Octane cache, which is powered
| by a Swoole table. You may set the maximum number of rows as well as
| the number of bytes per row using the configuration options below.
|
*/
'cache' => [
'rows' => 1000,
'bytes' => 10000,
],
/*
|--------------------------------------------------------------------------
| File Watching
|--------------------------------------------------------------------------
|
| The following list of files and directories will be watched when using
| the --watch option offered by Octane. If any of the directories and
| files are changed, Octane will automatically reload your workers.
|
*/
'watch' => [
'app',
'bootstrap',
'config/**/*.php',
'database/**/*.php',
'public/**/*.php',
'resources/**/*.php',
'routes',
'composer.lock',
'.env',
],
/*
|--------------------------------------------------------------------------
| Garbage Collection Threshold
|--------------------------------------------------------------------------
|
| When executing long-lived PHP scripts such as Octane, memory can build
| up before being cleared by PHP. You can force Octane to run garbage
| collection if your application consumes this amount of megabytes.
|
*/
'garbage' => 50,
/*
|--------------------------------------------------------------------------
| Maximum Execution Time
|--------------------------------------------------------------------------
|
| The following setting configures the maximum execution time for requests
| being handled by Octane. You may set this value to 0 to indicate that
| there isn't a specific time limit on Octane request execution time.
|
*/
'max_execution_time' => 30,
];

View file

@ -1,28 +1,27 @@
# Stage 1: Build FROM dunglas/frankenphp
FROM joseluisq/php-fpm:8.4 AS build
RUN apk add --no-cache nodejs npm # Copy php.ini
COPY ./deploy/php.ini $PHP_INI_DIR/php.ini
WORKDIR /var/www/html RUN apt update -y && apt install -y --no-install-recommends git nodejs npm
COPY --chown=www-data:www-data . . COPY --from=composer:lts /usr/bin/composer /usr/bin/composer
RUN chmod -R 775 /var/www/html/storage \ RUN install-php-extensions \
&& chmod -R 775 /var/www/html/bootstrap/cache gd \
opcache \
redis \
mongodb \
pcntl \
gmp \
imagick \
zip
RUN composer install --no-dev --prefer-dist \ COPY . /app
&& npm install \
&& npm run build
RUN chown -R www-data:www-data /var/www/html/vendor \ RUN cp .env.example .env
&& chmod -R 775 /var/www/html/vendor RUN sed -i'' -e 's/^APP_ENV=.*/APP_ENV=production/' -e 's/^APP_DEBUG=.*/APP_DEBUG=false/' .env
# Stage 2: Deploy RUN composer install --ignore-platform-reqs --no-dev -a
FROM joseluisq/php-fpm:8.4 RUN npm install && npm run build
COPY --from=build /var/www/html /var/www/html ENTRYPOINT ["php", "artisan", "octane:frankenphp", "--host=0.0.0.0"]
WORKDIR /var/www/html
VOLUME ["/var/www/html/storage/app"]
EXPOSE 9000
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=9000", "--tries=1"]

View file

@ -7,35 +7,9 @@ services:
context: ../ context: ../
dockerfile: ./deploy/Dockerfile dockerfile: ./deploy/Dockerfile
volumes: volumes:
- ../storage/app:/var/www/html/storage/app - ..:/app
environment:
APP_NAME: ${APP_NAME}
APP_ENV: ${APP_ENV}
APP_DEBUG: ${APP_DEBUG}
APP_KEY: ${APP_KEY}
APP_URL: ${APP_URL}
DB_CONNECTION: ${DB_CONNECTION}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
AUTHENTIK_BASE_URL: ${AUTHENTIK_BASE_URL}
AUTHENTIK_CLIENT_ID: ${AUTHENTIK_CLIENT_ID}
AUTHENTIK_CLIENT_SECRET: ${AUTHENTIK_CLIENT_SECRET}
AUTHENTIK_REDIRECT_URI: ${APP_URL}/auth/callback
SESSION_DRIVER: ${SESSION_DRIVER}
FILESYSTEM_DISK: ${FILESYSTEM_DISK}
CACHE_STORE: ${CACHE_STORE}
REDIS_CLIENT: ${REDIS_CLIENT}
REDIS_HOST: ${REDIS_HOST}
MAIL_MAILER: ${MAIL_MAILER}
MAIL_SCHEME: ${MAIL_SCHEME}
MAIL_HOST: ${MAIL_HOST}
MAIL_PORT: ${MAIL_PORT}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS}
MAIL_FROM_NAME: ${MAIL_FROM_NAME}
ports: ports:
- "9000:9000" - "8000:8000"
networks: networks:
- nyaabooru-internal - nyaabooru-internal
depends_on: depends_on:

2
deploy/php.ini Normal file
View file

@ -0,0 +1,2 @@
upload_max_filesize = 64M
post_max_filesize = 72M

2
public/.user.ini Normal file
View file

@ -0,0 +1,2 @@
upload_max_filesize=64M
post_max_filesize=72M

View file

@ -45,6 +45,11 @@ wa-page[view='mobile'] {
border-block-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border); border-block-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
} }
[slot='footer'] {
--wa-link-decoration-default: none;
border-block-start: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
}
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php'; @source '../../storage/framework/views/*.php';
@source '../**/*.blade.php'; @source '../**/*.blade.php';

View file

@ -1,9 +1,10 @@
<!doctype html> <!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-dark"> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-cloak wa-dark">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<script type="module" src="https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/webawesome.loader.js" data-fa-kit-code="ba9cf75857"></script> <script type="module" src="https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/webawesome.loader.js" data-fa-kit-code="ba9cf75857"></script>
@vite(['resources/css/app.css', 'resources/js/app.js']) @vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles @livewireStyles
@ -18,6 +19,10 @@
<main> <main>
{{ $slot }} {{ $slot }}
</main> </main>
<footer slot="footer">
@livewire('app.footer')
</footer>
</wa-page> </wa-page>
@stack('modals') @stack('modals')

View file

@ -0,0 +1,12 @@
<div class="wa-split">
<div class="wa-stack wa-gap-2xs">
<div class="wa-cluster wa-heading-l">
<wa-icon name="paw-simple"></wa-icon>
<span>{{ config('app.name') }}</span>
</div>
<span class="wa-caption-l">&copy; 2025 NyaaStudios; All rights reserved.</span>
</div>
<div class="wa-cluster wa-heading-m">
<wa-icon-button family="brands" name="github" href="https://github.com/NyaaStudios/nyaabooru" target="_blank"></wa-icon-button>
</div>
</div>

View file

@ -11,5 +11,5 @@
@endauth @endauth
</div> </div>
<livewire:post-feature /> <livewire:post-feature lazy />
</div> </div>

View file

@ -23,6 +23,11 @@
<wa-icon slot="prefix" name="tags"></wa-icon> <wa-icon slot="prefix" name="tags"></wa-icon>
Tags Tags
</wa-button> </wa-button>
<wa-button appearance="plain" href="{{ route('users') }}" wire:navigate.hover>
<wa-icon slot="prefix" name="users"></wa-icon>
Users
</wa-button>
@endauth @endauth
</div> </div>
@ -36,9 +41,15 @@
@auth @auth
<wa-button href="{{ url('/profiles/' . Auth::id()) }}" appearance="plain" wire:navigate.hover> <wa-button href="{{ url('/profiles/' . Auth::id()) }}" appearance="plain" wire:navigate.hover>
{{ Auth::user()->name }} <div class="wa-cluster wa-align-items-center">
<livewire:app.pfp :user="auth()->user()" size="2rem" shape="rounded" />
{{ Auth::user()->name }}
</div>
</wa-button>
<wa-button href="{{ route('logout') }}" appearance="plain">
<wa-icon name="arrow-left-from-bracket" slot="prefix"></wa-icon>
Sign out
</wa-button> </wa-button>
<wa-icon-button href="{{ route('logout') }}" appearance="plain" name="arrow-left-from-bracket"></wa-icon-button>
@endauth @endauth
</div> </div>
</div> </div>

View file

@ -1,3 +1,8 @@
<div> <wa-avatar
<wa-avatar image="{{ $pfp }}" label="{{ $name }}'s Profile Picture" shape="{{ $shape }}" loading="lazy" style="--size: {{ $size }}"></wa-avatar> @if(Illuminate\Support\Facades\Storage::has("avatars/$user->id"))
</div> image="{{ $user->getAvatarBase64() }}"
@endif
label="avatar for {{ $user->name }}"
shape="{{ $shape }}"
style="--size: {{ $size }}"
></wa-avatar>

View file

@ -0,0 +1,13 @@
<article class="wa-stack">
<a class="wa-frame wa-border-radius-l" style="max-inline-size: 15rem;" href="{{ url("/profiles/$user->id") }}" wire:navigate.hover>
@if (\Illuminate\Support\Facades\Storage::has("avatars/$user->id"))
<img src="{{ $user->getAvatarBase64() }}"/>
@else
<wa-icon name="user"></wa-icon>
@endif
</a>
<div class="wa-stack wa-gap-3xs">
<span class="wa-heading-s">{{ $user->name }}</span>
<span class="wa-caption-m">Joined <wa-format-date value="{{ $user->created_at }}"></wa-format-date></span>
</div>
</article>

View file

@ -1,8 +1,11 @@
<div class="wa-stack wa-gap-3xl"> <div class="wa-stack wa-gap-3xl">
<div class="wa-stack"> <div class="wa-stack wa-gap-xl">
<div class="wa-flank wa-align-items-center"> <div class="wa-flank wa-align-items-center">
<livewire:app.pfp user="{{ $user->id }}" size="5rem" shape="rounded" /> <livewire:app.pfp :$user size="5rem" shape="rounded" />
<h1>{{ $user->name }}</h1> <div class="wa-stack wa-gap-2xs">
<h1>{{ $user->name }}</h1>
<span class="wa-caption-l">Member since <wa-format-date value="{{ $user->created_at }}"></wa-format-date></span>
</div>
</div> </div>
<div class="wa-grid" style="--min-column-size: 30ch;"> <div class="wa-grid" style="--min-column-size: 30ch;">

View file

@ -0,0 +1,9 @@
<div class="wa-stack wa-gap-3xl">
<h1>Users</h1>
<div class="wa-cluster wa-gap-3xl">
@foreach ($users as $user)
<livewire:app.user-card :$user />
@endforeach
</div>
</div>

View file

@ -1,16 +1,18 @@
<div class="wa-flank wa-align-items-center"> <wa-card>
<livewire:app.pfp :user="$comment->user->id" /> <div class="wa-flank wa-align-items-start">
<div class="wa-split"> <livewire:app.pfp :user="$comment->user" />
<div class="wa-stack wa-gap-3xs"> <div class="wa-split">
<div class="wa-cluster wa-align-items-center"> <div class="wa-stack wa-gap-3xs">
<strong>{{ $comment->user->name }}</strong> <div class="wa-cluster wa-align-items-center">
<span class="wa-caption-m" wire:poll.visible>{{ $comment->created_at->diffForHumans() }}</span> <strong>{{ $comment->user->name }}</strong>
<span class="wa-caption-m" wire:poll.visible>{{ $comment->created_at->diffForHumans() }}</span>
</div>
<span>{{ $comment->message }}</span>
</div> </div>
<span>{{ $comment->message }}</span>
</div>
@if (Auth::id() == $comment->user->id) @if (Auth::id() == $comment->user->id)
<wa-icon-button href="{{ url("/delete/comment/$comment->id") }}" name="times" label="Delete"></wa-icon-button> <wa-icon-button href="{{ url("/delete/comment/$comment->id") }}" name="times" label="Delete"></wa-icon-button>
@endif @endif
</div>
</div> </div>
</div> </wa-card>

View file

@ -0,0 +1,3 @@
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; {{ $post->getAspectRatio() }}">
<img src="{{ $post->getFullUrl() }}" />
</div>

View file

@ -19,6 +19,7 @@
<wa-icon-button href="{{ url("posts/$post->id/edit") }}" name="file-pen" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button> <wa-icon-button href="{{ url("posts/$post->id/edit") }}" name="file-pen" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
<wa-icon-button href="{{ url("posts/$post->id/download") }}" name="download" style="color: var(--wa-color-text-link);"></wa-icon-button> <wa-icon-button href="{{ url("posts/$post->id/download") }}" name="download" style="color: var(--wa-color-text-link);"></wa-icon-button>
<wa-icon-button name="arrow-up-right-and-arrow-down-left-from-center" wire:click="$js.showFullImage" style="color: var(--wa-color-text-link);"></wa-icon-button>
</div> </div>
<wa-divider></wa-divider> <wa-divider></wa-divider>
@ -70,7 +71,9 @@
{{-- Main content --}} {{-- Main content --}}
<div class="wa-stack wa-gap-2xl" wire:poll.visible> <div class="wa-stack wa-gap-2xl" wire:poll.visible>
<livewire:posts.image :$post lazy /> <a wire:click="$js.showFullImage" style="cursor: pointer;">
<livewire:posts.image :$post lazy />
</a>
<span class="wa-heading-m"> <span class="wa-heading-m">
<wa-format-number value="{{ $post->comments->count() }}"></wa-format-number> <wa-format-number value="{{ $post->comments->count() }}"></wa-format-number>
@ -86,6 +89,19 @@
@foreach ($comments as $comment) @foreach ($comments as $comment)
<livewire:posts.comment :$comment :key="$comment->id" /> <livewire:posts.comment :$comment :key="$comment->id" />
@endforeach @endforeach
{{-- Full image dialog --}}
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 90%;" wire:ignore>
<livewire:posts.full-image :$post lazy />
</wa-dialog>
@script
<script>
$js('showFullImage', () => {
document.querySelector('#fullImagePreview').open = true
});
</script>
@endscript
</div> </div>
</div> </div>

View file

@ -4,6 +4,7 @@ use App\Http\Controllers\DeletionController;
use App\Livewire\App\Home as AppHome; use App\Livewire\App\Home as AppHome;
use App\Livewire\Pages\Profile as ProfilePage; use App\Livewire\Pages\Profile as ProfilePage;
use App\Livewire\Pages\Upload as UploadPage; use App\Livewire\Pages\Upload as UploadPage;
use App\Livewire\Pages\Users as UsersPage;
use App\Livewire\Posts\Index as PostsPage; use App\Livewire\Posts\Index as PostsPage;
use App\Livewire\Posts\Edit as EditPost; use App\Livewire\Posts\Edit as EditPost;
use App\Livewire\Posts\View as ViewPost; use App\Livewire\Posts\View as ViewPost;
@ -19,6 +20,7 @@ Route::get('/', AppHome::class)->name('home');
Route::middleware('auth')->group(function () { Route::middleware('auth')->group(function () {
Route::get('/upload', UploadPage::class)->name('upload'); Route::get('/upload', UploadPage::class)->name('upload');
Route::get('/profiles/{user}', ProfilePage::class); Route::get('/profiles/{user}', ProfilePage::class);
Route::get('/users', UsersPage::class)->name('users');
}); });
// Post routes // Post routes