refactor(geoip): reconcile geoip system (#31)

This commit is contained in:
hampus-fluxer
2026-01-05 23:19:05 +01:00
committed by GitHub
parent 5d047b2856
commit 2e007b5076
86 changed files with 982 additions and 2648 deletions

View File

@@ -97,6 +97,9 @@ const AuthSession: React.FC<AuthSessionProps> = observer(
const platformLabel =
authSession.clientPlatform === 'Fluxer Desktop' ? t`Fluxer Desktop` : authSession.clientPlatform;
const hasLocation = Boolean(authSession.clientLocation);
const locationRowVisible = hasLocation || !isCurrent;
return (
<div
className={clsx(styles.authSession, selectionMode && !isCurrent && styles.authSessionSelectable)}
@@ -114,17 +117,17 @@ const AuthSession: React.FC<AuthSessionProps> = observer(
{platformLabel}
</span>
<div className={styles.authSessionLocation}>
<span className={styles.locationText}>{authSession.clientLocation}</span>
{!isCurrent && (
<>
<span aria-hidden className={styles.locationSeparator} />
{locationRowVisible && (
<div className={styles.authSessionLocation}>
{hasLocation && <span className={styles.locationText}>{authSession.clientLocation}</span>}
{!isCurrent && hasLocation && <span aria-hidden className={styles.locationSeparator} />}
{!isCurrent && (
<span className={styles.lastUsed}>
{DateUtils.getShortRelativeDateString(authSession.approxLastUsedAt ?? new Date(0))}
</span>
</>
)}
</div>
)}
</div>
)}
</div>
</div>