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,11 +1,11 @@
<!doctype html>
<html>
<head>
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Página não encontrada</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:700"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
<style>
h1 {
font-size: 80px;
@ -42,20 +42,20 @@
}
</script>
</head>
</head>
<body>
<body>
<div class="container">
<h1>404</h1>
<h2>Página não encontrada</h2>
<p>
<p id="erro">
A página que você procura não existe ou ocorreu outro erro.
</p>
<p>
<!-- Instrução para abertura de chamado no link https://atende.idz.one/index.php?a=add -->
<p>
<a id="link" href="https://atende.idz.one/index.php?a=add"
target="_blank">Clique aqui para abrir um chamado</a>
<a id="link" href="https://atende.idz.one/index.php?a=add" target="_blank">Clique aqui para abrir um
chamado</a>
</p>
@ -63,20 +63,24 @@
</div>
<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 --
URL: ${window.location.href}
ERRO:
{ERRO}`);
`+ erro);
link.href = url_chamado.href;
link.href = url_chamado.href;
const erroElement = document.getElementById('erro');
original != erro && (erroElement.innerText = erro);
</script>
</body>
</body>
</html>

View file

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