Hide order API key input
This commit is contained in:
24
index.html
24
index.html
@@ -100,17 +100,6 @@
|
||||
box-shadow: 0 2px 0 rgba(0,0,0,.18);
|
||||
}
|
||||
.pill input { accent-color: var(--accent); }
|
||||
.keybox {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
padding: 8px 10px; border-radius: 999px;
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid var(--line);
|
||||
font-size: 12px;
|
||||
}
|
||||
.keybox input {
|
||||
width: 140px; border: 0; outline: 0; background: transparent;
|
||||
color: var(--text); font-size: 12px;
|
||||
}
|
||||
main .wrap { padding-top: 14px; padding-bottom: 28px; }
|
||||
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
|
||||
.card-tile {
|
||||
@@ -342,10 +331,6 @@
|
||||
<span aria-hidden="true">🔎</span>
|
||||
<input id="q" type="search" placeholder="Artikel suchen… (z.B. Badehose, Hoodie, Kappe)" />
|
||||
</div>
|
||||
<label class="keybox" title="Bestell‑Key">
|
||||
🔑
|
||||
<input id="orderKey" type="password" placeholder="Bestell‑Key" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -504,12 +489,7 @@ document.getElementById("q").addEventListener("input", applyFilters);
|
||||
const modal = document.getElementById("orderModal");
|
||||
const form = document.getElementById("orderForm");
|
||||
const setField = (id, v) => document.getElementById(id).value = v || "";
|
||||
const orderKeyInput = document.getElementById("orderKey");
|
||||
orderKeyInput.value = sessionStorage.getItem("orderKey") || "";
|
||||
orderKeyInput.addEventListener("change", () => {
|
||||
const key = orderKeyInput.value.trim();
|
||||
if (key) sessionStorage.setItem("orderKey", key);
|
||||
});
|
||||
const ORDER_KEY = "";
|
||||
|
||||
document.addEventListener("click", (e) => {
|
||||
const imgBtn = e.target.closest(".thumb-btn");
|
||||
@@ -574,7 +554,7 @@ document.getElementById("detailModal").addEventListener("click", (e) => {
|
||||
form.addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
const payload = Object.fromEntries(new FormData(form).entries());
|
||||
const key = sessionStorage.getItem("orderKey") || "";
|
||||
const key = ORDER_KEY || "";
|
||||
const headers = { "Content-Type": "application/json" };
|
||||
if (key) headers["X-Order-Key"] = key;
|
||||
const res = await fetch("/wawi/order", {
|
||||
|
||||
Reference in New Issue
Block a user