palworld added

This commit is contained in:
Alexander Zielonka
2026-01-07 12:35:23 +01:00
30 changed files with 5846 additions and 123 deletions

View File

@@ -1,6 +1,6 @@
const serverInfo = {
minecraft: {
address: 'minecraft.dimension47.de',
address: 'minecraft.zeasy.dev',
logo: '/minecraft.png',
links: [
{ label: 'ATM10 Modpack', url: 'https://www.curseforge.com/minecraft/modpacks/all-the-mods-10' }
@@ -8,7 +8,7 @@ const serverInfo = {
},
factorio: {
hint: 'Serverpasswort: affe',
address: 'factorio.dimension47.de',
address: 'factorio.zeasy.dev',
logo: '/factorio.png',
links: [
{ label: 'Steam', url: 'https://store.steampowered.com/app/427520/Factorio/' }
@@ -20,6 +20,21 @@ const serverInfo = {
links: [
{ label: 'Steam', url: 'https://store.steampowered.com/app/1604030/V_Rising/' }
]
},
zomboid: {
hint: 'Version 42.13.1',
address: 'pz.zeasy.dev:16261',
logo: '/zomboid.png',
links: [
{ label: 'Steam', url: 'https://store.steampowered.com/app/108600/Project_Zomboid/' }
]
},
palworld: {
address: 'palworld.zeasy.dev:8211',
logo: '/palworld.png',
links: [
{ label: 'Steam', url: 'https://store.steampowered.com/app/1623730/Palworld/' }
]
}
}
@@ -28,11 +43,25 @@ const getServerInfo = (serverName) => {
if (name.includes('minecraft') || name.includes('all the mods')) return serverInfo.minecraft
if (name.includes('factorio')) return serverInfo.factorio
if (name.includes('vrising') || name.includes('v rising')) return serverInfo.vrising
if (name.includes('zomboid')) return serverInfo.zomboid
if (name.includes('palworld')) return serverInfo.palworld
return null
}
export default function ServerCard({ server, onClick, isAuthenticated }) {
const info = getServerInfo(server.name)
export default function ServerCard({ server, onClick, isAuthenticated, displaySettings }) {
const defaultInfo = getServerInfo(server.name)
// Merge default info with database display settings (database takes priority)
const info = defaultInfo ? {
...defaultInfo,
address: displaySettings?.address || defaultInfo.address,
hint: displaySettings?.hint || defaultInfo.hint
} : (displaySettings ? {
address: displaySettings.address,
hint: displaySettings.hint,
logo: null,
links: []
} : null)
const formatUptime = (seconds) => {
const hours = Math.floor(seconds / 3600)
@@ -106,27 +135,20 @@ export default function ServerCard({ server, onClick, isAuthenticated }) {
</div>
)}
{/* Whitelist notice for Minecraft - only for authenticated users */}
{isAuthenticated && server.type === 'minecraft' && (
{/* Server hint - only for authenticated users */}
{isAuthenticated && info?.hint && (
<div className="mb-4 text-xs text-neutral-500">
{info.hint}
</div>
)}
{/* Whitelist notice for Minecraft - only if no custom hint is set */}
{isAuthenticated && server.type === 'minecraft' && !displaySettings?.hint && (
<div className="mb-4 text-xs text-neutral-500">
Whitelist erforderlich - im Whitelist-Tab freischalten
</div>
)}
{/* Factorio notice - only for authenticated users */}
{isAuthenticated && server.type === 'factorio' && (
<div className="mb-4 text-xs text-neutral-500">
Serverpasswort: affe
</div>
)}
{/* V Rising notice - only for authenticated users */}
{isAuthenticated && server.type === 'vrising' && (
<div className="mb-4 text-xs text-neutral-500">
In der Serverliste suchen - Passwort: affe
</div>
)}
{/* Metrics */}
<div className="space-y-3">
{/* CPU */}
@@ -162,13 +184,25 @@ export default function ServerCard({ server, onClick, isAuthenticated }) {
{/* Footer Stats */}
<div className="flex items-center justify-between mt-4 pt-4 border-t border-neutral-800 text-sm">
<div className="text-neutral-400">
<span className="text-white font-medium">{server.players.online}</span>
{server.players.max ? ' / ' + server.players.max : ''} players
<div className="flex items-center gap-3">
<div className="text-neutral-400">
<span className="text-white font-medium">{server.players.online}</span>
{server.players.max ? ' / ' + server.players.max : ''} Spieler
</div>
{server.running && server.autoShutdown?.enabled && server.autoShutdown?.emptySinceMinutes !== null && (
<div className="flex items-center gap-1.5 text-yellow-500">
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span className="text-xs">
Shutdown in {server.autoShutdown.timeoutMinutes - server.autoShutdown.emptySinceMinutes}m
</span>
</div>
)}
</div>
{server.running && (
<div className="text-neutral-400">
Uptime: <span className="text-white">{formatUptime(server.metrics.uptime)}</span>
Laufzeit: <span className="text-white">{formatUptime(server.metrics.uptime)}</span>
</div>
)}
</div>