feat/optional-cooldown #2
@@ -495,7 +495,8 @@ ipcMain.handle('open-external', (event, url: string) => shell.openExternal(url))
|
||||
|
||||
ipcMain.handle('open-steam-login', async (event, expectedSteamId: string) => {
|
||||
const loginSession = session.fromPartition('persist:steam-login');
|
||||
await loginSession.clearStorageData({ storages: ['cookies', 'localstorage', 'indexdb'] });
|
||||
// Removed: automatic clearStorageData to allow cookie persistence
|
||||
|
||||
return new Promise<boolean>((resolve) => {
|
||||
const loginWindow = new BrowserWindow({
|
||||
width: 800, height: 700, parent: mainWindow || undefined, modal: true, title: 'Login to Steam',
|
||||
|
||||
@@ -510,18 +510,20 @@ const AccountRow: React.FC<{
|
||||
)}
|
||||
|
||||
{/* Scraper Auth Button - Controls the optional cooldown tracking */}
|
||||
<Tooltip title={account.steamLoginSecure ? "Refresh scraper session" : "Authenticate for cooldown tracking"}>
|
||||
<Tooltip title={account.steamLoginSecure && !account.authError ? "Session valid" : (account.steamLoginSecure ? "Refresh scraper session" : "Authenticate for cooldown tracking")}>
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={onAuth}
|
||||
disabled={!!(account.steamLoginSecure && !account.authError)}
|
||||
sx={{
|
||||
color: account.steamLoginSecure ? 'success.main' : 'warning.main',
|
||||
color: account.steamLoginSecure && !account.authError ? 'success.main' : (account.authError ? 'error.main' : 'warning.main'),
|
||||
border: '1px solid',
|
||||
borderColor: 'divider',
|
||||
borderRadius: 1
|
||||
borderRadius: 1,
|
||||
opacity: account.steamLoginSecure && !account.authError ? 0.6 : 1
|
||||
}}
|
||||
>
|
||||
{account.steamLoginSecure ? <BoltIcon fontSize="inherit" /> : <LockResetIcon fontSize="inherit" />}
|
||||
{account.steamLoginSecure && !account.authError ? <ShieldIcon fontSize="inherit" /> : (account.authError ? <LockResetIcon fontSize="inherit" /> : <BoltIcon fontSize="inherit" />)}
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user