import { render } from 'solid-js/web'; import { createSignal, onMount, Show, For } from 'solid-js'; // --- Icons for new features --- const BellIcon = () => ; const MegaphoneIcon = () => ; function App() { const [loading, setLoading] = createSignal(true); const [status, setStatus] = createSignal(''); const [userData, setUserData] = createSignal(null); const [globalNotifications, setGlobalNotifications] = createSignal({}); const [showUserNotifications, setShowUserNotifications] = createSignal(false); const [showGlobalNotifications, setShowGlobalNotifications] = createSignal(false); const getToken = () => localStorage.getItem('exocore-token') || ''; const getCookies = () => localStorage.getItem('exocore-cookies') || ''; async function fetchUserInfo() { const token = getToken(); const cookies = getCookies(); if (!token || !cookies) { window.location.href = '/private/server/exocore/web/public/login'; return; } try { const res = await fetch('/private/server/exocore/web/userinfo', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ token, cookies }), }); const data = await res.json(); if (data.data?.user && data.data.user.verified === 'success') { setUserData(data.data.user); setGlobalNotifications(data.data.global?.notifications || {}); setStatus(''); } else { window.location.href = '/private/server/exocore/web/public/login'; } } catch (err) { setStatus('Failed to fetch user info: ' + err.message); } finally { setLoading(false); } } function timeAgo(dateString) { const date = new Date(dateString); const now = new Date(); const seconds = Math.floor((now - date) / 1000); let interval = seconds / 86400; if (interval > 1) return Math.floor(interval) + " days ago"; interval = seconds / 3600; if (interval > 1) return Math.floor(interval) + " hours ago"; interval = seconds / 60; if (interval > 1) return Math.floor(interval) + " minutes ago"; return "Just now"; } onMount(() => { const link = document.createElement('link'); link.href = 'https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap'; link.rel = 'stylesheet'; document.head.appendChild(link); // Styles are now controlled by the
Loading user info...

} > {status() || 'Could not load user data.'}
} > <>
No announcements
}> {([from, message]) => (

From: {from}

{message}

)}
No notifications
}> {(notif) => (

From: {notif.from}

{notif.message}

{timeAgo(notif.date)}

)}

Hello, {userData().user}!

Level: {userData().level}

Days since joined: {userData().count_days}

Manage Plan Follow Exocore on Facebook ); } render(() => , document.getElementById('app')); add const planStylesConfig = { "Core Access": { textGrad1: '#D0A9F5', textGrad2: '#E8D4F7', cardGrad1: '#6A0DAD', cardGrad2: '#A74AC7', cardBorder: '#4B0082', textColor: '#FFFFFF', iconFill: '#E8D4F7', glowColor: '#E0BBE4' }, "Prime Core": { textGrad1: '#FFEB3B', textGrad2: '#FFF59D', cardGrad1: '#FBC02D', cardGrad2: '#FFD700', cardBorder: '#B98B00', textColor: '#1A1A1A', iconFill: '#424242', glowColor: '#FFFACD' }, "Alpha Core": { textGrad1: '#00BCD4', textGrad2: '#80DEEA', cardGrad1: '#03A9F4', cardGrad2: '#4FC3F7', cardBorder: '#0277BD', textColor: '#FFFFFF', iconFill: '#B2EBF2', glowColor: '#80DEEA' }, "EXO Elite": { textGrad1: '#F44336', textGrad2: '#FF8A80', cardGrad1: '#D32F2F', cardGrad2: '#E57373', cardBorder: '#9A0007', textColor: '#FFFFFF', iconFill: '#FFCDD2', glowColor: '#FF8A80' }, "Hacker Core": { textGrad1: '#4CAF50', textGrad2: '#A5D6A7', cardGrad1: '#388E3C', cardGrad2: '#66BB6A', cardBorder: '#1B5E20', textColor: '#FFFFFF', iconFill: '#C8E6C9', glowColor: '#A5D6A7' } }; const defaultPlanStyle = { textGrad1: '#B0BEC5', textGrad2: '#ECEFF1', cardGrad1: '#455A64', cardGrad2: '#607D8B', cardBorder: '#263238', textColor: '#FFFFFF', iconFill: '#ECEFF1', glowColor: '#90A4AE' };