full on update with new npm and instructions and maintenance update
This commit is contained in:
parent
dc13b98261
commit
b0bd9cc7b3
10 changed files with 2392 additions and 1281 deletions
|
|
@ -19,20 +19,24 @@ export default function ServiceButton({ url, checkUrl, className, icon, name, de
|
|||
checkStatus();
|
||||
}, [url, checkUrl]);
|
||||
|
||||
const statusColor = status === 'up' ? '#4ade80' : status === 'down' ? '#ef4444' : '#9ca3af';
|
||||
const statusGlow = status === 'up' ? 'rgba(74, 222, 128, 0.9)' : status === 'down' ? 'rgba(239, 68, 68, 0.9)' : 'transparent';
|
||||
const statusLabel = status === 'up' ? 'Active' : status === 'down' ? 'Dead' : 'Checking...';
|
||||
const isFriend = className === 'friend';
|
||||
|
||||
return (
|
||||
<a href={url} target="_blank" rel="noopener noreferrer" className={`service-button ${className}`} style={{ position: 'relative' }}>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
top: '8px',
|
||||
right: '8px',
|
||||
width: '10px',
|
||||
height: '10px',
|
||||
borderRadius: '50%',
|
||||
backgroundColor: status === 'up' ? '#4ade80' : status === 'down' ? '#ef4444' : '#9ca3af',
|
||||
boxShadow: status === 'up' ? '0 0 5px #4ade80' : status === 'down' ? '0 0 5px #ef4444' : 'none',
|
||||
transition: 'all 0.3s ease'
|
||||
}} title={status === 'up' ? 'Active' : status === 'down' ? 'Dead' : 'Checking...'} />
|
||||
<span className="service-icon">{icon}</span>
|
||||
<a
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`service-button ${className}`}
|
||||
style={{ position: 'relative', '--status-color': statusColor, '--status-glow': statusGlow } as React.CSSProperties}
|
||||
title={statusLabel}
|
||||
>
|
||||
<span className="service-icon-wrap">
|
||||
{isFriend && <span className="service-status-dot" />}
|
||||
<span className="service-icon">{icon}</span>
|
||||
</span>
|
||||
<span className="service-text">
|
||||
<span className="service-name">
|
||||
{name}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue