2021-12-26 13:21:02 +01:00
|
|
|
<script>
|
2022-02-28 16:57:54 +01:00
|
|
|
import { createEventDispatcher, onMount } from "svelte";
|
|
|
|
import { formatDataVolume } from "../../util/Formatting.svelte";
|
2022-12-24 11:37:02 +01:00
|
|
|
import { download_limits } from "../DownloadLimitStore";
|
2022-02-08 11:32:36 +01:00
|
|
|
import TextBlock from "./TextBlock.svelte";
|
2021-12-26 13:21:02 +01:00
|
|
|
let dispatch = createEventDispatcher()
|
|
|
|
|
|
|
|
export const set_file = f => file = f
|
|
|
|
let file = {
|
|
|
|
name: "",
|
|
|
|
mime_type: "",
|
2022-02-28 16:57:54 +01:00
|
|
|
availability: "",
|
2021-12-26 13:21:02 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2023-01-17 22:53:41 +01:00
|
|
|
<TextBlock>
|
2022-02-28 16:57:54 +01:00
|
|
|
{#if file.availability === "file_rate_limited_captcha_required"}
|
|
|
|
<h1>
|
|
|
|
<i class="icon">file_download_off</i>
|
|
|
|
Hotlink protection enabled
|
|
|
|
</h1>
|
|
|
|
<p>
|
|
|
|
Hotlinking protection has been enabled for this file. This happens when
|
|
|
|
a file is downloaded many times outside of our file viewer page (this
|
|
|
|
page). Usually this means people are using download managers like
|
|
|
|
JDownloader 2, Aria2 or wget. Using a download manager circumvents
|
|
|
|
pixeldrain's advertisements and we lose money because of that. More
|
|
|
|
information about this protection mechanism can be found on <a
|
|
|
|
href="/#hotlinking">the home page</a>.
|
|
|
|
</p>
|
2022-03-05 10:49:12 +01:00
|
|
|
{:else if file.availability === "ip_download_limited_captcha_required"}
|
2022-02-28 16:57:54 +01:00
|
|
|
<h1>
|
|
|
|
<i class="icon">file_download_off</i>
|
|
|
|
Download limit reached
|
|
|
|
</h1>
|
|
|
|
<p>
|
2022-02-28 21:52:12 +01:00
|
|
|
You have reached your download limit for today. Without a pixeldrain
|
2022-12-24 11:37:02 +01:00
|
|
|
account you are limited to downloading {$download_limits.download_limit} files
|
|
|
|
or {formatDataVolume($download_limits.transfer_limit, 3)} per 48 hours. This limit
|
2022-02-28 21:52:12 +01:00
|
|
|
is counted per IP address, so if you're on a shared network it's
|
2022-02-28 16:57:54 +01:00
|
|
|
possible that others have also contributed to this limit.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
In the last 24 hours you have downloaded
|
2022-12-24 11:37:02 +01:00
|
|
|
{$download_limits.download_limit_used} files and used
|
|
|
|
{formatDataVolume($download_limits.transfer_limit_used, 3)} bandwidth.
|
2022-02-28 16:57:54 +01:00
|
|
|
</p>
|
|
|
|
{/if}
|
2021-12-26 13:21:02 +01:00
|
|
|
<p>
|
|
|
|
This warning disappears when the you are a
|
2022-12-24 11:37:31 +01:00
|
|
|
<a href="https://www.patreon.com/join/pixeldrain/checkout?rid=5736701&cadence=12" target="_blank" rel="noreferrer">Patreon supporter</a>,
|
2021-12-26 13:21:02 +01:00
|
|
|
or when the uploader of the file enables
|
|
|
|
<a href="/user/subscription">bandwidth sharing</a> on their Pro account
|
|
|
|
(and their data cap has not been used up). Using a download manager with
|
|
|
|
a Pro account is allowed, it will not trigger this warning for other
|
|
|
|
files.
|
|
|
|
</p>
|
|
|
|
<h2>
|
|
|
|
Continue downloading
|
|
|
|
</h2>
|
|
|
|
<p>
|
|
|
|
The file can be downloaded like usual by clicking the download button.
|
|
|
|
You will have to complete a CAPTCHA test to prove that you're not a
|
|
|
|
robot.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<img src={file.icon_href} alt="File icon" class="file_thumbnail">
|
|
|
|
<div class="file_description">
|
|
|
|
Name: {file.name}<br/>
|
|
|
|
Type: {file.mime_type}<br/>
|
2022-02-28 21:52:12 +01:00
|
|
|
<button on:click={() => {dispatch("download")}}>
|
|
|
|
<i class="icon">download</i> Download
|
2021-12-26 13:21:02 +01:00
|
|
|
</button>
|
2022-12-24 11:37:02 +01:00
|
|
|
<a href="https://www.patreon.com/join/pixeldrain" target="_blank" class="button button_highlight" rel="noreferrer">
|
2022-02-28 21:52:12 +01:00
|
|
|
<i class="icon">bolt</i> Support Pixeldrain on Patreon
|
2021-12-26 13:21:02 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2022-02-08 11:32:36 +01:00
|
|
|
</TextBlock>
|
2021-12-26 13:21:02 +01:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.file_thumbnail {
|
|
|
|
display: inline-block;
|
2022-02-08 23:55:47 +01:00
|
|
|
vertical-align: middle;
|
2021-12-26 13:21:02 +01:00
|
|
|
height: 6em;
|
2022-02-08 23:55:47 +01:00
|
|
|
border-radius: 8px;
|
2021-12-26 13:21:02 +01:00
|
|
|
}
|
|
|
|
.file_description {
|
|
|
|
display: inline-block;
|
|
|
|
text-align: left;
|
|
|
|
padding-left: 8px;
|
|
|
|
vertical-align: middle;
|
|
|
|
max-width: 600px;
|
|
|
|
}
|
|
|
|
</style>
|