add error here :3

This commit is contained in:
ashley 2025-04-22 18:48:41 +00:00
parent b69b2a590e
commit 3f69953875

View File

@ -5,9 +5,6 @@
<meta content="#111111" name="theme-color" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover" />
<meta name="darkreader-lock" />
<% if (description == "This helps protect our community. Learn more (TRYING AGAIN....)") { %>
<meta http-equiv="refresh" content="5">
<% } %>
<link href="/css/yt-ukraine.svg?v=3" rel="icon" />
<link rel="manifest" href="/manifest.json" />
<style>
@ -81,26 +78,51 @@
.error-footer a:hover {
color: #d69cc8;
}
.countdown {
margin-top: 16px;
color: #ccc;
font-size: 14px;
}
</style>
<% if (description == "Error while communicating with Invidious companion: Error connecting to 'companion:8282': Connection refused") { %>
<script>
let seconds = 10;
function updateCountdown() {
const el = document.getElementById('countdown');
if (el) {
el.textContent = "Trying again in " + seconds + " seconds...";
}
if (seconds <= 0) {
location.reload();
} else {
seconds--;
setTimeout(updateCountdown, 1000);
}
}
window.addEventListener('DOMContentLoaded', updateCountdown);
</script>
<% } %>
</head>
<body>
<% if (description == "This helps protect our community. Learn more (TRYING AGAIN....)") { %>
<% if (description == "Error while communicating with Invidious companion: Error connecting to 'companion:8282': Connection refused") { %>
<p id="abstract">502</p>
<% } else if (description !== "This helps protect our community. Learn more (TRYING AGAIN....)") { %>
<% } else { %>
<p id="abstract">404</p>
<% } %>
<div class="error">
<h2><%= error %></h2>
<p><%= description %></p>
<% if (description == "Error while communicating with Invidious companion: Error connecting to 'companion:8282': Connection refused") { %>
<div class="countdown" id="countdown">Trying again in 10 seconds...</div>
<% } %>
</div>
<div class="error-footer">
<a href="https://codeberg.org/ashley/poke/issues/new/choose">Create issue</a>
<a href="https://discord.poketube.fun">Report on our Discord</a>
<% if (description == "This helps protect our community. Learn more (TRYING AGAIN....)") { %>
<% if (description == "Error while communicating with Invidious companion: Error connecting to 'companion:8282': Connection refused") { %>
<a href="https://github.com/iv-org/invidious/issues">See Invidious issues</a>
<a href="">Refresh Page</a>
<% } %>