melhoria no erro
This commit is contained in:
parent
360670ad78
commit
6f6ba112c4
2 changed files with 45 additions and 41 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<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;
|
||||
|
|
@ -48,14 +48,14 @@
|
|||
<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,18 +63,22 @@
|
|||
</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;
|
||||
|
||||
const erroElement = document.getElementById('erro');
|
||||
original != erro && (erroElement.innerText = erro);
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "p-estaticos",
|
||||
"version": "0.45.0",
|
||||
"version": "0.46.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue