Files
hstream/resources/views/modals/partials/download-backup.blade.php

37 lines
2.0 KiB
PHP

<div class="flex flex-col">
<a data-te-collapse-init data-te-ripple-init data-te-ripple-color="light" href="#collapseBackupDownloads" role="button" aria-expanded="false" aria-controls="collapseBackupDownloads" class="text-sm text-center cursor-pointer pt-2 text-rose-600">Backup server</a>
<div class="!visible hidden" id="collapseBackupDownloads" data-te-collapse-item>
<div class="block rounded-lg bg-neutral-200 p-6 dark:bg-neutral-900 dark:text-neutral-50">
<p class="text-sm text-red-600">Only use these if you live in Asia (e.g. Singapore/Philippines/...) and experience slow downloads (~10-100kbps) with the normal download links!</p>
<div class="flex flex-wrap justify-around">
@foreach ($dlList as $hdl)
@php
$download = $hdl->getDownloadByType('FHD');
@endphp
@isset($download)
@php
$downloadURL = $dlDomainsBackup[array_rand($dlDomainsBackup)].'/'.$download->url;
$background = 'bg-green-600';
@endphp
<livewire:download-button
:download-url="$downloadURL"
:download-id="$download->id"
:download-count="$download->count"
:episode-number="$hdl->episode"
:fill-numbers="$fillNumbers"
:file-size="$download->getFileSize()"
:background="$background">
@else
<a class="inline-flex items-center ml-4 px-4 p-4 mt-4 cursor-not-allowed bg-gray-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150" id="downloadEpisode" alt="Kekw">
<i class="fa-solid fa-download mr-2"></i> Episode {{ $hdl->episode }} (Unavailable)
</a>
@endisset
@endforeach
</div>
</div>
</div>
</div>