feat: decouple fast switching from scraper authentication to make cooldown tracking optional
This commit is contained in:
@@ -490,17 +490,43 @@ const AccountRow: React.FC<{
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell align="right">
|
||||
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5 }}>
|
||||
{account?.steamLoginSecure ? (
|
||||
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5, alignItems: 'center' }}>
|
||||
{/* Fast Switcher Button - Always available if we have a login name */}
|
||||
{account.loginName && (
|
||||
<Button
|
||||
variant="contained" size="small" onClick={() => onSwitch(account.loginName || '')}
|
||||
sx={{ height: 28, fontSize: '0.7rem', bgcolor: 'secondary.main', '&:hover': { opacity: 0.9 } }}
|
||||
variant="contained"
|
||||
size="small"
|
||||
onClick={() => onSwitch(account.loginName || '')}
|
||||
sx={{
|
||||
height: 28,
|
||||
fontSize: '0.7rem',
|
||||
bgcolor: 'secondary.main',
|
||||
'&:hover': { opacity: 0.9 },
|
||||
minWidth: 60
|
||||
}}
|
||||
>
|
||||
LOGIN
|
||||
</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 ? "Refresh scraper session" : "Authenticate for cooldown tracking"}>
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={onAuth}
|
||||
sx={{
|
||||
color: account.steamLoginSecure ? 'success.main' : 'warning.main',
|
||||
border: '1px solid',
|
||||
borderColor: 'divider',
|
||||
borderRadius: 1
|
||||
}}
|
||||
>
|
||||
{account.steamLoginSecure ? <BoltIcon fontSize="inherit" /> : <LockResetIcon fontSize="inherit" />}
|
||||
</IconButton>
|
||||
</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" 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>
|
||||
|
||||
Reference in New Issue
Block a user