Added Core Features chroium, config,console_ui,headless,webserver,states

This commit is contained in:
Joey Pillunat 2025-10-24 11:52:34 +02:00
parent 4c6c6d572c
commit c3c60efb81
13 changed files with 688 additions and 0 deletions

61
Core/web_server/assets.rs Normal file
View file

@ -0,0 +1,61 @@
pub const DEFAULT_INDEX_HTML: &str = r#"
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Aurora Print UI</title>
<link rel="stylesheet" href="/static/styles.css" />
</head>
<body>
<header>
<h1>Aurora Print</h1>
</header>
<main>
<section class="card">
<h2>Gerät erkennen</h2>
<label for="ip">IP-Adresse</label>
<input id="ip" type="text" placeholder="z.B. 192.168.1.50" />
<button id="btn-start">Start</button>
<p id="status" class="status"></p>
</section>
</main>
<script src="/static/app.js"></script>
</body>
</html>
"#;
pub const DEFAULT_APP_JS: &str = r#"
document.addEventListener('DOMContentLoaded', () => {
const ip = document.getElementById('ip');
const btn = document.getElementById('btn-start');
const status = document.getElementById('status');
btn.addEventListener('click', async () => {
const val = (ip.value || '').trim();
if (!val) {
status.textContent = 'Bitte IP eingeben.';
return;
}
status.textContent = `Erkenne Gerät bei ${val} (Demo)`;
});
});
"#;
pub const DEFAULT_STYLES_CSS: &str = r#"
* { box-sizing: border-box; }
body { margin: 0; font: 16px system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
background: #0b0f19; color: #e6eefc; }
header { padding: 16px 24px; border-bottom: 1px solid #1c2233; }
h1 { margin: 0; font-size: 20px; }
main { max-width: 720px; margin: 32px auto; padding: 0 16px; }
.card { background: #121829; border: 1px solid #1f2740; border-radius: 12px; padding: 16px;
box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
label { display:block; margin: 8px 0 4px; color: #9db4ff; }
input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #34406a;
background: #0e1424; color: #e6eefc; }
button { margin-top: 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid #3a5bff;
background: #3056ff; color: white; cursor: pointer; }
button:hover { filter: brightness(1.05); }
.status { margin-top: 10px; color: #9db4ff; }
"#;