fix: restore overflow on sound cards + fix connectedSince uptime
- Restore overflow:hidden on html/body, sound-card, modal, admin items - Only .now-playing and .np-name keep unbounded width (Last Played bubble) - Fix Verbunden seit 0s: auto-set connectedSince when connection is ready but timestamp was not recorded (e.g. after redeploy)
This commit is contained in:
parent
de67a15050
commit
197af92909
2 changed files with 1656 additions and 1639 deletions
|
|
@ -1526,11 +1526,15 @@ app.get('/api/events', (req: Request, res: Response) => {
|
|||
try {
|
||||
const statsSnap: Record<string, any> = {};
|
||||
for (const [gId, st] of guildAudioState) {
|
||||
const status = st.connection.state?.status ?? 'unknown';
|
||||
if (status === 'ready' && !connectedSince.has(gId)) {
|
||||
connectedSince.set(gId, new Date().toISOString());
|
||||
}
|
||||
const ch = client.channels.cache.get(st.channelId);
|
||||
statsSnap[gId] = {
|
||||
voicePing: (st.connection.ping as any)?.ws ?? null,
|
||||
gatewayPing: client.ws.ping,
|
||||
status: st.connection.state?.status ?? 'unknown',
|
||||
status,
|
||||
channelName: ch && 'name' in ch ? (ch as any).name : null,
|
||||
connectedSince: connectedSince.get(gId) ?? null,
|
||||
};
|
||||
|
|
@ -1620,13 +1624,17 @@ app.listen(PORT, () => {
|
|||
setInterval(() => {
|
||||
if (sseClients.size === 0 || guildAudioState.size === 0) return;
|
||||
for (const [gId, st] of guildAudioState) {
|
||||
const status = st.connection.state?.status ?? 'unknown';
|
||||
if (status === 'ready' && !connectedSince.has(gId)) {
|
||||
connectedSince.set(gId, new Date().toISOString());
|
||||
}
|
||||
const ch = client.channels.cache.get(st.channelId);
|
||||
sseBroadcast({
|
||||
type: 'voicestats',
|
||||
guildId: gId,
|
||||
voicePing: (st.connection.ping as any)?.ws ?? null,
|
||||
gatewayPing: client.ws.ping,
|
||||
status: st.connection.state?.status ?? 'unknown',
|
||||
status,
|
||||
channelName: ch && 'name' in ch ? (ch as any).name : null,
|
||||
connectedSince: connectedSince.get(gId) ?? null,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@
|
|||
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: var(--bg-deep);
|
||||
color: var(--text-normal);
|
||||
font-family: var(--font);
|
||||
|
|
@ -376,6 +377,7 @@ input, select {
|
|||
border-radius: 16px;
|
||||
width: 340px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,.4);
|
||||
overflow: hidden;
|
||||
animation: slideUp .2s ease;
|
||||
}
|
||||
@keyframes slideUp {
|
||||
|
|
@ -969,6 +971,7 @@ input, select {
|
|||
transition: all var(--transition);
|
||||
border: 2px solid transparent;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
aspect-ratio: 1;
|
||||
opacity: 0;
|
||||
animation: card-enter 350ms ease-out forwards;
|
||||
|
|
@ -1064,6 +1067,8 @@ input, select {
|
|||
color: var(--text-normal);
|
||||
z-index: 1;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
|
@ -1689,6 +1694,8 @@ input, select {
|
|||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-normal);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
|
@ -1696,6 +1703,8 @@ input, select {
|
|||
margin-top: 3px;
|
||||
font-size: 11px;
|
||||
color: var(--text-faint);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue