Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1293331c50 |
@@ -495,8 +495,7 @@ ipcMain.handle('open-external', (event, url: string) => shell.openExternal(url))
|
|||||||
|
|
||||||
ipcMain.handle('open-steam-login', async (event, expectedSteamId: string) => {
|
ipcMain.handle('open-steam-login', async (event, expectedSteamId: string) => {
|
||||||
const loginSession = session.fromPartition('persist:steam-login');
|
const loginSession = session.fromPartition('persist:steam-login');
|
||||||
// Removed: automatic clearStorageData to allow cookie persistence
|
await loginSession.clearStorageData({ storages: ['cookies', 'localstorage', 'indexdb'] });
|
||||||
|
|
||||||
return new Promise<boolean>((resolve) => {
|
return new Promise<boolean>((resolve) => {
|
||||||
const loginWindow = new BrowserWindow({
|
const loginWindow = new BrowserWindow({
|
||||||
width: 800, height: 700, parent: mainWindow || undefined, modal: true, title: 'Login to Steam',
|
width: 800, height: 700, parent: mainWindow || undefined, modal: true, title: 'Login to Steam',
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ 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';
|
||||||
@@ -491,53 +490,17 @@ const AccountRow: React.FC<{
|
|||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="right">
|
<TableCell align="right">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5, alignItems: 'center' }}>
|
<Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 0.5 }}>
|
||||||
{/* Fast Switcher Button - Always available if we have a login name */}
|
{account?.steamLoginSecure ? (
|
||||||
{account.loginName && (
|
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained" size="small" onClick={() => onSwitch(account.loginName || '')}
|
||||||
size="small"
|
sx={{ height: 28, fontSize: '0.7rem', bgcolor: 'secondary.main', '&:hover': { opacity: 0.9 } }}
|
||||||
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>
|
||||||
|
|||||||
Reference in New Issue
Block a user