Small fixes

This commit is contained in:
2021-07-06 20:08:51 +02:00
parent 3fd84f2b74
commit a208c8bc61
5 changed files with 18 additions and 9 deletions

View File

@@ -53,7 +53,7 @@ body{
background-color: #111111; /* Fallback */
background-color: var(--layer_1_color);
background-repeat: repeat;
background-blend-mode: darken;
background-blend-mode: luminosity;
margin: 0;
font-family: system-ui, sans-serif;
font-size: 17px;

View File

@@ -77,7 +77,7 @@ let set_status = async (action, report_type) => {
<iframe
title="File preview"
src="/u/{report.file.id}?embed"
style="border: none; width: 100%; height: 400px; border-radius: 6px;"
style="border: none; width: 100%; height: 500px; border-radius: 6px;"
></iframe>
{/if}
</div>

View File

@@ -181,11 +181,11 @@ onDestroy(() => {
<td>{peer.position}</td>
<td>{peer.reachable}</td>
<td>{peer.unreachable_count}</td>
<td>{peer.load_1_min}</td>
<td>{peer.load_5_min}</td>
<td>{peer.load_15_min}</td>
<td>{peer.load_1_min.toFixed(1)}</td>
<td>{peer.load_5_min.toFixed(1)}</td>
<td>{peer.load_15_min.toFixed(1)}</td>
<td>{formatDuration(peer.latency, 3)}</td>
<td>{formatDataVolume(peer.free_space, 3)}</td>
<td>{formatDataVolume(peer.free_space, 4)}</td>
<td>{formatDataVolume(peer.min_free_space, 3)}</td>
</tr>
{/each}
@@ -252,7 +252,7 @@ onDestroy(() => {
<td>{q.query_name}</td>
<td>{q.calls}</td>
<td>{formatDuration(q.average_duration, 3)}</td>
<td>{formatDuration(q.total_duration, 3)}</td>
<td>{formatDuration(q.total_duration, 0)}</td>
<td>
{#each q.callers as caller}
{caller.count}x {caller.name}<br/>

View File

@@ -276,7 +276,7 @@ const share = () => {
<i class="icon">menu</i>
</button>
<a href="/" id="button_home" class="button button_home">
<PixeldrainLogo style="hieght: 1.6em; width: 1.6em; margin: 0 0.2em 0 0; color: currentColor;"></PixeldrainLogo>
<PixeldrainLogo style="height: 1.6em; width: 1.6em; margin: 0 0.2em 0 0; color: currentColor;"></PixeldrainLogo>
</a>
<div class="file_viewer_headerbar_title">
{#each state.parents as parent}

View File

@@ -107,7 +107,16 @@ export const start = () => {
} else if (xhr.status >= 400) {
// Request failed
console.log("Upload error. status: " + xhr.status + " response: " + xhr.response);
let resp = JSON.parse(xhr.response);
let resp = {}
if (xhr.status === 429) {
resp = {
value: "too_many_requests",
message: "Too many requests. Please wait a few seconds",
}
} else {
resp = JSON.parse(xhr.response)
}
if (resp.value == "file_too_large" || resp.value == "ip_banned" || tries === 3) {
// Permanent failure