Migliorato auto-login e gestione cookie WebView2
- Introdotto il pre-caricamento di WebView2 per ridurre i tempi di attesa. - Implementato il pattern TaskCompletionSource per attendere l'inizializzazione di WebView2 (timeout 60s). - Centralizzata la logica di verifica e importazione automatica dei cookie. - Mostrate istruzioni di login solo se necessario, migliorando l'UX. - Risolti problemi di timeout e threading durante l'inizializzazione di WebView2. - Puliti e ottimizzati i log per maggiore chiarezza. - Rimossa la gestione manuale dei cookie, ora automatizzata.
This commit is contained in:
@@ -89,52 +89,7 @@
|
||||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="30,20">
|
||||
|
||||
<!-- SEZIONE 1: Configurazione Sessione -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Configurazione Sessione"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Cookie di Autenticazione"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<TextBox x:Name="SettingsCookieTextBox"
|
||||
Height="300"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,15"/>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Come ottenere la stringa cookie completa:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#00D800"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="20">
|
||||
1. Apri Chrome e vai su https://it.bidoo.com<LineBreak/>
|
||||
2. Effettua il login con le tue credenziali<LineBreak/>
|
||||
3. Premi F12 per aprire Developer Tools<LineBreak/>
|
||||
4. Vai alla tab "Application" → "Storage" → "Cookies" → "https://it.bidoo.com"<LineBreak/>
|
||||
5. Copia TUTTA la stringa di cookie (seleziona tutti i cookie e copia i valori)<LineBreak/>
|
||||
6. Formato: "cookie1=value1; cookie2=value2; __stattrb=xxxxx; ..."<LineBreak/>
|
||||
7. Incolla la stringa completa qui sopra
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 2: Impostazioni Export -->
|
||||
<!-- SEZIONE 1: Impostazioni Export -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
@@ -206,7 +161,7 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 3: Impostazioni Predefinite Aste -->
|
||||
<!-- SEZIONE 2: Impostazioni Predefinite Aste -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
@@ -254,7 +209,7 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 4: Stato Iniziale Aste -->
|
||||
<!-- SEZIONE 3: Stato Iniziale Aste -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
@@ -333,6 +288,69 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 4: Protezione Account -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Protezione Account"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Impostazioni di sicurezza per proteggere il tuo account dalle puntate eccessive."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Puntate Minime da Mantenere -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="Puntate Minime da Mantenere"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Numero minimo di puntate residue da mantenere sull'account. Se > 0, non punterà se scende sotto questa soglia (0 = nessun limite)"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1"
|
||||
x:Name="MinimumRemainingBidsTextBox"
|
||||
Text="0"
|
||||
Margin="10,10"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}" Margin="0,15,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="🛡️ Protezione Puntate"
|
||||
FontWeight="Bold"
|
||||
Foreground="#00D800"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="18">
|
||||
• Se impostato > 0, il sistema non punterà se le puntate residue scenderebbero sotto questa soglia.<LineBreak/>
|
||||
• Utile per mantenere sempre un "cuscinetto" di sicurezza sull'account.<LineBreak/>
|
||||
• Nel banner principale apparirà un indicatore colorato: <LineBreak/>
|
||||
- <Bold>Verde:</Bold> Puntate abbondanti (oltre +10 dal limite)<LineBreak/>
|
||||
- <Bold>Giallo:</Bold> Vicino al limite (entro 10 puntate)<LineBreak/>
|
||||
- <Bold>Rosso:</Bold> Al limite o sotto (puntate bloccate)<LineBreak/>
|
||||
• Valore 0 = nessun limite (comportamento default).
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 5: Limiti Log -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
|
||||
Reference in New Issue
Block a user