Update server button styles and connection logic for online servers

This commit is contained in:
2025-10-04 23:01:56 +08:00
parent d79c6b1b49
commit 98d83ec852

View File

@@ -310,9 +310,9 @@ function Servers() {
style={{
width: '100%',
padding: '0.75rem',
background: server.status === 'online' ? 'var(--accent-primary)' : 'var(--text-secondary)',
color: 'white',
border: 'none',
background: 'transparent',
color: server.status === 'online' ? 'var(--accent-primary)' : 'var(--text-secondary)',
border: `2px solid ${server.status === 'online' ? 'var(--accent-primary)' : 'var(--text-secondary)'}`,
borderRadius: '6px',
fontWeight: 'bold',
cursor: server.status === 'online' ? 'pointer' : 'not-allowed',
@@ -321,8 +321,7 @@ function Servers() {
disabled={server.status !== 'online'}
onClick={() => {
if (server.status === 'online') {
// In a real app, this would connect to the server
alert(`Connecting to ${server.name}...`)
window.open(`steam://connect/${server.ip}:${server.port}`)
}
}}
>