|
|
|
@@ -24,6 +24,7 @@ import PublicIcon from '@mui/icons-material/Public';
|
|
|
|
import ShieldIcon from '@mui/icons-material/Shield';
|
|
|
|
import ShieldIcon from '@mui/icons-material/Shield';
|
|
|
|
import GppBadIcon from '@mui/icons-material/GppBad';
|
|
|
|
import GppBadIcon from '@mui/icons-material/GppBad';
|
|
|
|
import PeopleIcon from '@mui/icons-material/People';
|
|
|
|
import PeopleIcon from '@mui/icons-material/People';
|
|
|
|
|
|
|
|
import VerifiedUserIcon from '@mui/icons-material/VerifiedUser';
|
|
|
|
import { useAccounts, type Account } from '../hooks/useAccounts';
|
|
|
|
import { useAccounts, type Account } from '../hooks/useAccounts';
|
|
|
|
import { useAppTheme } from '../theme/ThemeContext';
|
|
|
|
import { useAppTheme } from '../theme/ThemeContext';
|
|
|
|
import type { ThemeType } from '../theme/SteamTheme';
|
|
|
|
import type { ThemeType } from '../theme/SteamTheme';
|
|
|
|
@@ -490,17 +491,53 @@ const AccountRow: React.FC<{
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</TableCell>
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="right">
|
|
|
|
<TableCell align="right">
|
|
|
|
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5 }}>
|
|
|
|
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5, alignItems: 'center' }}>
|
|
|
|
{account?.steamLoginSecure ? (
|
|
|
|
{/* Fast Switcher Button - Always available if we have a login name */}
|
|
|
|
|
|
|
|
{account.loginName && (
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
variant="contained" size="small" onClick={() => onSwitch(account.loginName || '')}
|
|
|
|
variant="contained"
|
|
|
|
sx={{ height: 28, fontSize: '0.7rem', bgcolor: 'secondary.main', '&:hover': { opacity: 0.9 } }}
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
onClick={() => onSwitch(account.loginName || '')}
|
|
|
|
|
|
|
|
sx={{
|
|
|
|
|
|
|
|
height: 28,
|
|
|
|
|
|
|
|
fontSize: '0.7rem',
|
|
|
|
|
|
|
|
bgcolor: 'secondary.main',
|
|
|
|
|
|
|
|
'&:hover': { opacity: 0.9 },
|
|
|
|
|
|
|
|
minWidth: 60
|
|
|
|
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
LOGIN
|
|
|
|
LOGIN
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
) : (
|
|
|
|
|
|
|
|
<Button variant="outlined" size="small" onClick={onAuth} sx={{ height: 28, fontSize: '0.7rem' }}>AUTH</Button>
|
|
|
|
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* Scraper Auth Button - Controls the optional cooldown tracking */}
|
|
|
|
|
|
|
|
<Tooltip title={account.steamLoginSecure && !account.authError ? "Session valid - Tracking active" : (account.steamLoginSecure ? "Refresh scraper session" : "Authenticate for cooldown tracking")}>
|
|
|
|
|
|
|
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
|
|
|
|
|
|
|
|
<IconButton
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
onClick={onAuth}
|
|
|
|
|
|
|
|
disabled={!!(account.steamLoginSecure && !account.authError)}
|
|
|
|
|
|
|
|
sx={{
|
|
|
|
|
|
|
|
color: account.steamLoginSecure && !account.authError ? 'success.main' : (account.authError ? 'error.main' : 'warning.main'),
|
|
|
|
|
|
|
|
border: '1px solid',
|
|
|
|
|
|
|
|
borderColor: account.steamLoginSecure && !account.authError ? 'success.main' : 'divider',
|
|
|
|
|
|
|
|
borderRadius: 1,
|
|
|
|
|
|
|
|
opacity: account.steamLoginSecure && !account.authError ? 1 : 1,
|
|
|
|
|
|
|
|
background: account.steamLoginSecure && !account.authError ? 'rgba(163, 207, 6, 0.1)' : 'transparent'
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{account.steamLoginSecure && !account.authError ? <VerifiedUserIcon fontSize="inherit" /> : (account.authError ? <LockResetIcon fontSize="inherit" /> : <BoltIcon fontSize="inherit" />)}
|
|
|
|
|
|
|
|
</IconButton>
|
|
|
|
|
|
|
|
{account.steamLoginSecure && !account.authError && (
|
|
|
|
|
|
|
|
<Typography variant="caption" sx={{ color: 'success.main', fontWeight: 'bold', fontSize: '0.6rem', letterSpacing: '0.5px' }}>
|
|
|
|
|
|
|
|
TRACKING
|
|
|
|
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Divider orientation="vertical" flexItem sx={{ mx: 0.5, my: 0.5 }} />
|
|
|
|
|
|
|
|
|
|
|
|
<IconButton size="small" onClick={handleOpenShare} disabled={!serverConfig?.token}><ShareIcon fontSize="inherit" sx={{ color: 'primary.main' }}/></IconButton>
|
|
|
|
<IconButton size="small" onClick={handleOpenShare} disabled={!serverConfig?.token}><ShareIcon fontSize="inherit" sx={{ color: 'primary.main' }}/></IconButton>
|
|
|
|
<IconButton size="small" sx={{ color: 'text.secondary' }} onClick={() => (window as any).electronAPI.openExternal(account?.profileUrl || '')}><OpenInNewIcon fontSize="inherit"/></IconButton>
|
|
|
|
<IconButton size="small" sx={{ color: 'text.secondary' }} onClick={() => (window as any).electronAPI.openExternal(account?.profileUrl || '')}><OpenInNewIcon fontSize="inherit"/></IconButton>
|
|
|
|
<IconButton size="small" sx={{ color: 'error.main' }} onClick={() => onDelete(account?._id || '')}><DeleteIcon fontSize="inherit"/></IconButton>
|
|
|
|
<IconButton size="small" sx={{ color: 'error.main' }} onClick={() => onDelete(account?._id || '')}><DeleteIcon fontSize="inherit"/></IconButton>
|
|
|
|
|