Added Download file, play for homebrews and ZIP explorer.
This commit is contained in:
@@ -17,10 +17,13 @@
|
||||
<div class="modal-body">
|
||||
<div class="file-list">
|
||||
@forelse( $files as $file )
|
||||
@if( $file->state === 'private' )
|
||||
@continue
|
||||
@endif
|
||||
<div class="file-item">
|
||||
<div class="file-info">
|
||||
<span class="file-name">{{ $file->filename }}</span>
|
||||
<span class="file-meta">{{ $file->filesize }} - {{ $file->download_count }} downloads</span>
|
||||
<span class="file-name">@if($file->state === 'archived')<i data-lucide="archive"></i> @endif{{ $file->filename }}</span>
|
||||
<span class="file-meta">{{ $file->prettyFileSize() }} - {{ $file->download_count }} downloads</span>
|
||||
</div>
|
||||
<div style="display:flex;flex-direction:column;gap:15px;">
|
||||
<a href="{{ route('fs.download', ['entry_id' => $entryId, 'file' => $file->file_uuid] ) }}" class="btn primary"><i data-lucide="download"></i> Download</a>
|
||||
|
||||
@@ -100,7 +100,41 @@
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="upload-item-actions" x-data="{ showMetadata: false }">
|
||||
<div class="upload-item-actions" x-data="{ showMetadata: false, showFileExplorer: false }">
|
||||
<button type="button" class="btn" x-show="file.download_url" @click="handleDownloadFile(i)">
|
||||
<i data-lucide="download"></i>
|
||||
</button>
|
||||
<button type="button" class="btn" x-show="file.file_explorer" @click="handleFileExplorer(i); showFileExplorer = true;">
|
||||
<i data-lucide="package-open"></i>
|
||||
</button>
|
||||
<template x-if="file.file_explorer" x-teleport="body">
|
||||
<div class="modal-overlay"
|
||||
x-cloak
|
||||
x-show="showFileExplorer"
|
||||
x-transition.opacity.duration.300ms
|
||||
@click.self="showFileExplorer = false"
|
||||
@keydown.escape.window="showFileExplorer = false">
|
||||
<div class="modal-window" x-show="showFileExplorer" x-transition>
|
||||
|
||||
<div class="modal-header">
|
||||
<span class="modal-title" style="display: flex; align-items: center; gap: 8px;">
|
||||
File explorer: <span x-text="file.name" style="color: var(--rhpz-orange);"></span>
|
||||
</span>
|
||||
<button type="button" class="modal-close" @click="showFileExplorer = false">
|
||||
<i data-lucide="x" size="20"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-content">
|
||||
<ul>
|
||||
<template x-for="(f,j) in file.file_explorer_files" :key="j">
|
||||
<li><span x-text="f"></span></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<button type="button" class="btn" x-show="file.error" @click="handleRetryFile(i)">
|
||||
<i data-lucide="refresh-cw"></i>
|
||||
</button>
|
||||
@@ -109,7 +143,7 @@
|
||||
<i data-lucide="settings"></i>
|
||||
</button>
|
||||
@endif
|
||||
<button type="button" class="btn" x-show="file.done || file.error" @click="handleRemoveFile(i)">
|
||||
<button type="button" class="btn" x-show="(file.done || file.error) && file.state !== 'archived'" @click="handleRemoveFile(i)">
|
||||
<i data-lucide="x"></i>
|
||||
</button>
|
||||
<template x-teleport="body">
|
||||
|
||||
17
resources/views/tools/play-homebrew.blade.php
Normal file
17
resources/views/tools/play-homebrew.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', "Play Online - " . config('app.name'))
|
||||
|
||||
@push('scripts')
|
||||
@vite('resources/js/PlayOnline.js')
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="page-title">
|
||||
<span>Play Online</span>
|
||||
</div>
|
||||
|
||||
<div id="rom-patcher-container" class="patcher-container" x-data="PlayOnline({{ Js::from($filePath) }}, {{ JS::from($emuConfig ?? [])}})">
|
||||
<div id="game"></div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user