melhoria no erro

This commit is contained in:
Luiz Silva 2024-08-22 08:40:26 -03:00
parent 360670ad78
commit 6f6ba112c4
2 changed files with 45 additions and 41 deletions

View file

@ -1,12 +1,12 @@
<!doctype html> <!doctype html>
<html> <html>
<head>
<meta charset="UTF-8" /> <head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta charset="UTF-8" />
<title>Página não encontrada</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="https://fonts.googleapis.com/css?family=Roboto:700" <title>Página não encontrada</title>
rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
<style> <style>
h1 { h1 {
font-size: 80px; font-size: 80px;
font-weight: 800; font-weight: 800;
@ -34,49 +34,53 @@
} }
</style> </style>
<script> <script>
const cookie = `site=${window.location.origin}`; const cookie = `site=${window.location.origin}`;
if (!document.cookie.includes(cookie)) { if (!document.cookie.includes(cookie)) {
document.cookie = cookie; document.cookie = cookie;
window.location.reload() window.location.reload()
} }
</script> </script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1>404</h1> <h1>404</h1>
<h2>Página não encontrada</h2> <h2>Página não encontrada</h2>
<p> <p id="erro">
A página que você procura não existe ou ocorreu outro erro. A página que você procura não existe ou ocorreu outro erro.
</p> </p>
<p> <p>
<!-- Instrução para abertura de chamado no link https://atende.idz.one/index.php?a=add --> <!-- Instrução para abertura de chamado no link https://atende.idz.one/index.php?a=add -->
<p> <p>
<a id="link" href="https://atende.idz.one/index.php?a=add" <a id="link" href="https://atende.idz.one/index.php?a=add" target="_blank">Clique aqui para abrir um
target="_blank">Clique aqui para abrir um chamado</a> chamado</a>
</p> </p>
</p> </p>
</div> </div>
<script>
const link = document.getElementById('link');
const url_chamado = new URL(link.href);
url_chamado.searchParams.append('message', `{Descreva o problema}
<script>
const original = `{${'ERRO'}}`
// essa variável deve ser preenchida com o erro que ocorreu
const erro = `{ERRO}`
const link = document.getElementById('link');
const url_chamado = new URL(link.href);
url_chamado.searchParams.append('message', `{Descreva o problema}
-- Mantenha o texto abaixo -- -- Mantenha o texto abaixo --
URL: ${window.location.href} URL: ${window.location.href}
ERRO: ERRO:
{ERRO}`); `+ erro);
link.href = url_chamado.href;
link.href = url_chamado.href; const erroElement = document.getElementById('erro');
original != erro && (erroElement.innerText = erro);
</script> </script>
</body> </body>
</html> </html>

View file

@ -1,6 +1,6 @@
{ {
"name": "p-estaticos", "name": "p-estaticos",
"version": "0.45.0", "version": "0.46.0",
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {