This commit is contained in:
cay 2026-04-08 16:55:53 +01:00
parent 14a00ce320
commit 583566c00d

View File

@ -182,71 +182,525 @@
</svg>
</div>
<!-- Header -->
<div class="popup-header">
<span class="popup-title" id="popup-building-name">Gebäude</span>
<button class="popup-close" id="popup-close-btn">✕</button>
</div>
<div class="popup-tabs">
<button class="popup-tab active" data-tab="info">Info</button>
<button class="popup-tab" data-tab="actions">Aktionen</button>
<button class="popup-tab" data-tab="upgrade">Upgrade</button>
<div class="popup-title-wrap">
<div class="popup-title-gem"></div>
<span id="popup-title">Gebäude</span>
<div class="popup-title-gem"></div>
</div>
<span class="popup-close">✕</span>
</div>
<!-- Body: Sidebar + Content -->
<div class="popup-body">
<div class="tab-content active" id="tab-info"></div>
<div class="tab-content" id="tab-actions"></div>
<div class="tab-content" id="tab-upgrade"></div>
<!-- Vertikale Tab-Sidebar -->
<div class="popup-tabs">
<!-- Info Tab -->
<button class="tab active" data-tab="info">
<svg
class="tab-icon tab-icon-default"
viewBox="0 0 26 26"
fill="none"
>
<path
d="M13 3 L22 7 L22 14 C22 18.5 17.5 22 13 23 C8.5 22 4 18.5 4 14 L4 7 Z"
stroke="#6a4820"
stroke-width="1.5"
fill="#1a0e04"
/>
<path
d="M13 6 L19.5 9 L19.5 14 C19.5 17.5 16.5 20.2 13 21 C9.5 20.2 6.5 17.5 6.5 14 L6.5 9 Z"
stroke="#7a5828"
stroke-width="1"
fill="#221408"
/>
<circle cx="13" cy="13" r="2" fill="#6a4820" />
<line
x1="13"
y1="9"
x2="13"
y2="11"
stroke="#6a4820"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="13"
y1="15"
x2="13"
y2="17"
stroke="#6a4820"
stroke-width="1.5"
stroke-linecap="round"
/>
</svg>
<svg
class="tab-icon tab-icon-active"
viewBox="0 0 26 26"
fill="none"
>
<path
d="M13 3 L22 7 L22 14 C22 18.5 17.5 22 13 23 C8.5 22 4 18.5 4 14 L4 7 Z"
stroke="#c8960c"
stroke-width="1.5"
fill="#3a2208"
/>
<path
d="M13 6 L19.5 9 L19.5 14 C19.5 17.5 16.5 20.2 13 21 C9.5 20.2 6.5 17.5 6.5 14 L6.5 9 Z"
stroke="#e0b040"
stroke-width="1"
fill="#4a3010"
/>
<circle cx="13" cy="13" r="2" fill="#f0d060" />
<line
x1="13"
y1="9"
x2="13"
y2="11"
stroke="#f0d060"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="13"
y1="15"
x2="13"
y2="17"
stroke="#f0d060"
stroke-width="1.5"
stroke-linecap="round"
/>
</svg>
<div class="tab-tip">Info</div>
</button>
<!-- Aktionen Tab -->
<button class="tab" data-tab="actions">
<svg
class="tab-icon tab-icon-default"
viewBox="0 0 26 26"
fill="none"
>
<line
x1="5"
y1="5"
x2="21"
y2="21"
stroke="#6a4820"
stroke-width="2"
stroke-linecap="round"
/>
<line
x1="21"
y1="5"
x2="5"
y2="21"
stroke="#6a4820"
stroke-width="2"
stroke-linecap="round"
/>
<line
x1="2"
y1="10"
x2="8"
y2="6"
stroke="#6a4820"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="24"
y1="10"
x2="18"
y2="6"
stroke="#6a4820"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="3"
y1="7"
x2="7"
y2="3"
stroke="#5a3810"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="23"
y1="7"
x2="19"
y2="3"
stroke="#5a3810"
stroke-width="1.5"
stroke-linecap="round"
/>
<circle
cx="13"
cy="13"
r="2"
fill="#1a0e04"
stroke="#5a3810"
stroke-width="1"
/>
</svg>
<svg
class="tab-icon tab-icon-active"
viewBox="0 0 26 26"
fill="none"
>
<line
x1="5"
y1="5"
x2="21"
y2="21"
stroke="#d4a030"
stroke-width="2"
stroke-linecap="round"
/>
<line
x1="21"
y1="5"
x2="5"
y2="21"
stroke="#d4a030"
stroke-width="2"
stroke-linecap="round"
/>
<line
x1="2"
y1="10"
x2="8"
y2="6"
stroke="#f0d060"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="24"
y1="10"
x2="18"
y2="6"
stroke="#f0d060"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="3"
y1="7"
x2="7"
y2="3"
stroke="#c8960c"
stroke-width="1.5"
stroke-linecap="round"
/>
<line
x1="23"
y1="7"
x2="19"
y2="3"
stroke="#c8960c"
stroke-width="1.5"
stroke-linecap="round"
/>
<circle
cx="13"
cy="13"
r="2.5"
fill="#3a2208"
stroke="#f0d060"
stroke-width="1"
/>
</svg>
<div class="tab-tip">Aktionen</div>
</button>
<!-- Upgrade Tab -->
<button class="tab" data-tab="upgrade">
<svg
class="tab-icon tab-icon-default"
viewBox="0 0 26 26"
fill="none"
>
<rect
x="5"
y="18"
width="16"
height="3"
rx="1"
fill="#3a2808"
stroke="#5a3810"
stroke-width="1"
/>
<rect
x="7"
y="14"
width="12"
height="5"
rx="1"
fill="#2a1c08"
stroke="#5a3810"
stroke-width="1"
/>
<rect
x="14"
y="5"
width="7"
height="5"
rx="1"
fill="#2a1c08"
stroke="#6a4820"
stroke-width="1.2"
/>
<line
x1="16"
y1="10"
x2="9"
y2="17"
stroke="#6a4820"
stroke-width="2"
stroke-linecap="round"
/>
<circle cx="8" cy="13" r="0.8" fill="#6a4820" />
<circle cx="6" cy="11" r="0.5" fill="#5a3810" />
</svg>
<svg
class="tab-icon tab-icon-active"
viewBox="0 0 26 26"
fill="none"
>
<rect
x="5"
y="18"
width="16"
height="3"
rx="1"
fill="#4a3010"
stroke="#c8960c"
stroke-width="1"
/>
<rect
x="7"
y="14"
width="12"
height="5"
rx="1"
fill="#3a2208"
stroke="#c8960c"
stroke-width="1"
/>
<rect
x="14"
y="5"
width="7"
height="5"
rx="1"
fill="#4a3010"
stroke="#f0d060"
stroke-width="1.2"
/>
<line
x1="16"
y1="10"
x2="9"
y2="17"
stroke="#d4a030"
stroke-width="2"
stroke-linecap="round"
/>
<circle cx="8" cy="13" r="1" fill="#f0d060" />
<circle cx="6" cy="11" r="0.7" fill="#c8960c" />
<circle cx="10" cy="11" r="0.6" fill="#f0d060" />
</svg>
<div class="tab-tip">Upgrade</div>
</button>
</div>
<!-- Tab-Inhalte -->
<div class="popup-content">
<div class="tab-content active" id="tab-info"></div>
<div class="tab-content" id="tab-actions"></div>
<div class="tab-content" id="tab-upgrade"></div>
</div>
</div>
</div>
<div id="online-users">
<div class="online-header">Spieler Online</div>
<div id="online-list"></div>
</div>
<div id="game-chat">
<div class="chat-header" id="chat-title">Globalchat</div>
<div class="chat-channels">
<button data-channel="global" class="active">Global</button>
<button data-channel="guild">Gilde</button>
<button data-channel="private">Privat</button>
</div>
<textarea id="chat-messages" readonly></textarea>
<div class="chat-input">
<input id="chat-text" placeholder="Nachricht..." />
<button id="chat-send">Senden</button>
</div>
</div>
<div id="map-tooltip"></div>
<!-- ================================
HUD
================================ -->
<div id="hud"></div>
<div id="hud">
<!-- Charakter Panel -->
<div id="hud-character">
<div id="hud-avatar-wrap">
<img
id="hud-avatar"
src="/images/avatar_placeholder.svg"
alt="Avatar"
/>
<div id="hud-vip">VIP 0</div>
</div>
<div id="hud-info">
<div id="hud-name">...</div>
<div id="hud-energy">
<span id="hud-energy-label">Energie</span>
<div id="hud-energy-bar-wrap">
<span id="hud-energy-value">40 / 40</span>
<div id="hud-energy-plus">+</div>
</div>
</div>
</div>
</div>
<!-- Währungs Panel -->
<div id="hud-currency">
<div class="hud-res-row">
<div class="hud-res">
<span class="hud-res-icon">⚪</span>
<span class="hud-res-value" id="hud-silver">0</span>
</div>
<div class="hud-sep"></div>
<div class="hud-res">
<span class="hud-res-icon">💠</span>
<span class="hud-res-value" id="hud-gems">0</span>
</div>
<div class="hud-sep"></div>
<div class="hud-res">
<span class="hud-res-icon">🪙</span>
<span class="hud-res-value" id="hud-gold">0</span>
</div>
<button id="hud-gold-btn">Gold</button>
</div>
<div class="hud-res-row">
<div class="hud-res">
<span class="hud-res-icon">🪵</span>
<span class="hud-res-value" id="hud-wood">0</span>
</div>
<div class="hud-sep"></div>
<div class="hud-res">
<span class="hud-res-icon">🪨</span>
<span class="hud-res-value" id="hud-stone">0</span>
</div>
</div>
</div>
</div>
<!-- ================================
QUICKMENU
Quick Menu Panel
================================ -->
<div id="quickmenu">
<div class="qm-slot" data-popup="carddeck">
<span class="qm-slot-icon">🃏</span>
<div id="quickmenu-panel">
<div class="qm-slot" data-popup="qm-popup-carddeck">
<img
src="/images/quickmenu/carddeck.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Kartendeck</span>
</div>
<div class="qm-slot" data-popup="events">
<span class="qm-slot-icon">📅</span>
<div class="qm-slot" data-popup="qm-popup-events">
<img
src="/images/quickmenu/events.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Tägliche Events</span>
</div>
<div class="qm-slot" data-popup="heldenbonus">
<span class="qm-slot-icon">⚔️</span>
<div class="qm-slot" data-popup="qm-popup-heldenbonus">
<img
src="/images/quickmenu/heldenbonus.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Helden Bonus</span>
</div>
<div class="qm-slot" data-popup="sealedliga">
<span class="qm-slot-icon">🏆</span>
<div class="qm-slot" data-popup="qm-popup-sealedliga">
<img
src="/images/quickmenu/sealedliga.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Sealed Liga</span>
</div>
<div class="qm-slot" data-popup="beschwoerer">
<span class="qm-slot-icon">💀</span>
<div class="qm-slot" data-popup="qm-popup-beschwoerer">
<img
src="/images/quickmenu/beschwoerer.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Beschwörer der Seelen</span>
</div>
<div class="qm-slot" data-popup="onlinebonus">
<span class="qm-slot-icon">🎁</span>
<div class="qm-slot" data-popup="qm-popup-onlinebonus">
<img
src="/images/quickmenu/onlinebonus.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Online Bonus</span>
</div>
<div class="qm-slot" data-popup="aktionen">
<span class="qm-slot-icon">⚡</span>
<div class="qm-slot" data-popup="qm-popup-aktionen">
<img
src="/images/quickmenu/aktionen.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Aktionen</span>
</div>
<div class="qm-slot" data-popup="basar">
<span class="qm-slot-icon">🏪</span>
<div class="qm-slot" data-popup="qm-popup-basar">
<img
src="/images/quickmenu/basar.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Basar</span>
</div>
<div class="qm-slot" data-popup="boosteraktion">
<span class="qm-slot-icon">🎴</span>
<div class="qm-slot" data-popup="qm-popup-boosteraktion">
<img
src="/images/quickmenu/boosteraktion.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">10 Booster Aktion</span>
</div>
<div class="qm-slot" data-popup="boosterjagd">
<span class="qm-slot-icon">🎯</span>
<div class="qm-slot" data-popup="qm-popup-boosterjagd">
<img
src="/images/quickmenu/boosterjagd.png"
alt=""
onerror="this.style.display = 'none'"
/>
<span class="qm-slot-label">Boosterjagd</span>
</div>
</div>
@ -353,7 +807,6 @@
<button class="notification-btn" id="notification-ok">OK</button>
</div>
</div>
<!-- Music -->
<div id="music-control">
<button id="music-mute-btn" title="Musik ein/ausschalten">🔊</button>
@ -381,11 +834,11 @@
"/music/dueg-oth-musik-hintergrund-142725.mp3",
];
const audio = document.getElementById("bg-music");
const audio = document.getElementById("bg-music");
const muteBtn = document.getElementById("music-mute-btn");
const vol = document.getElementById("music-volume");
const vol = document.getElementById("music-volume");
let muted = localStorage.getItem("dok_muted") === "true";
let muted = localStorage.getItem("dok_muted") === "true";
let started = false;
if (localStorage.getItem("dok_vol") !== null)
@ -399,7 +852,12 @@
audio.src = shuffled[i];
audio.muted = muted;
if (!muted) {
audio.play().then(() => { started = true; }).catch(() => {});
audio
.play()
.then(() => {
started = true;
})
.catch(() => {});
}
}
@ -414,16 +872,27 @@
localStorage.setItem("dok_muted", muted);
if (!muted) {
if (!audio.src) playTrack(index);
audio.play().then(() => { started = true; }).catch(() => {});
audio
.play()
.then(() => {
started = true;
})
.catch(() => {});
}
}
muteBtn.addEventListener("click", () => { muted = !muted; applyMute(); });
muteBtn.addEventListener("click", () => {
muted = !muted;
applyMute();
});
vol.addEventListener("input", () => {
audio.volume = parseFloat(vol.value);
localStorage.setItem("dok_vol", vol.value);
if (parseFloat(vol.value) > 0 && muted) { muted = false; applyMute(); }
if (parseFloat(vol.value) > 0 && muted) {
muted = false;
applyMute();
}
muteBtn.textContent = parseFloat(vol.value) === 0 ? "🔇" : "🔊";
});
@ -432,7 +901,12 @@
function tryResume() {
if (!muted && (audio.paused || !started)) {
audio.play().then(() => { started = true; }).catch(() => {});
audio
.play()
.then(() => {
started = true;
})
.catch(() => {});
}
}
document.addEventListener("click", tryResume);
@ -454,20 +928,24 @@
</script>
<script>
window.showNotification = function (message, title = "Hinweis", icon = "⚔️") {
window.showNotification = function (
message,
title = "Hinweis",
icon = "⚔️",
) {
document.getElementById("notification-message").textContent = message;
document.getElementById("notification-title").textContent = title;
document.getElementById("notification-icon").textContent = icon;
document.getElementById("notification-title").textContent = title;
document.getElementById("notification-icon").textContent = icon;
const overlay = document.getElementById("game-notification-overlay");
const box = document.getElementById("game-notification");
const box = document.getElementById("game-notification");
overlay.style.display = "block";
box.style.display = "block";
box.style.display = "block";
document.getElementById("notification-ok").onclick = () => {
overlay.style.display = "none";
box.style.display = "none";
box.style.display = "none";
};
};
</script>