Add downloads info tooltip in details window
This commit is contained in:
@@ -93,6 +93,8 @@ let update_chart = (timespan, interval) => {
|
||||
})
|
||||
}
|
||||
|
||||
let download_info = false
|
||||
|
||||
onMount(() => {
|
||||
chart.data().datasets = [
|
||||
{
|
||||
@@ -151,20 +153,31 @@ onMount(() => {
|
||||
{(file.bandwidth_used_paid/file.size).toFixed(1)}x file size
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom: none">
|
||||
<td>Unique downloads</td>
|
||||
<tr>
|
||||
<td>
|
||||
Unique downloads
|
||||
<button class="button round"
|
||||
class:button_highlight={download_info}
|
||||
style="margin: 0;"
|
||||
on:click={() => download_info = !download_info}
|
||||
>
|
||||
<i class="icon">help</i>
|
||||
</button>
|
||||
</td>
|
||||
<td>{formatThousands(file.downloads)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
The unique download counter only counts downloads once per IP
|
||||
address. So this number shows how many individual people have
|
||||
attempted to download the file. The download counter on the
|
||||
toolbar on the other hand shows how many real downloads the file
|
||||
has had. Real downloads are counted by dividing the total
|
||||
bandwidth usage by the size of the file.
|
||||
</td>
|
||||
</tr>
|
||||
{#if download_info}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
The unique download counter only counts downloads once per IP
|
||||
address. So this number shows how many individual people have
|
||||
attempted to download the file. The download counter on the
|
||||
toolbar on the other hand shows how many real downloads the file
|
||||
has had. Real downloads are counted by dividing the total
|
||||
bandwidth usage by the size of the file.
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td>Upload Date</td>
|
||||
<td>{formatDate(file.date_upload, true, true, true)}</td>
|
||||
@@ -199,12 +212,6 @@ onMount(() => {
|
||||
Charts rendered by the amazing <a href="https://www.chartjs.org/" target="_blank">Chart.js</a>.
|
||||
</p>
|
||||
|
||||
<h3>About</h3>
|
||||
<p>
|
||||
Pixeldrain is a file sharing platform.
|
||||
<a href="/" target="_blank">Visit the home page for more information.</a>
|
||||
</p>
|
||||
|
||||
<h3>Keyboard Controls</h3>
|
||||
<table style="max-width: 100%;">
|
||||
<tr><td colspan="2">File Shortcuts</td></tr>
|
||||
|
Reference in New Issue
Block a user