Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59c8c390b6 | ||
|
|
ad525ef8d1 | ||
|
|
e6fa66bc73 |
@@ -44,8 +44,8 @@ public partial class LoginWindow : Window
|
|||||||
: "Complete sign-in, then click Done.";
|
: "Complete sign-in, then click Done.";
|
||||||
});
|
});
|
||||||
|
|
||||||
// Auto-close once clearly on the main app page
|
// Auto-close only on explicit post-login redirects, not on initial load
|
||||||
if (signedIn && (uri.Contains("/chats") || uri.Contains("/new") || uri == "https://claude.ai/"))
|
if (signedIn && (uri.Contains("/chats") || uri.Contains("/new")))
|
||||||
{
|
{
|
||||||
await SaveAndClose(cookies);
|
await SaveAndClose(cookies);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public partial class PopupWindow : Window
|
|||||||
private static readonly UsageViewModel VM = App.ViewModel;
|
private static readonly UsageViewModel VM = App.ViewModel;
|
||||||
private static readonly UpdateManager Updater = App.Updater;
|
private static readonly UpdateManager Updater = App.Updater;
|
||||||
private readonly DispatcherTimer _clockTimer;
|
private readonly DispatcherTimer _clockTimer;
|
||||||
|
private bool _dialogOpen;
|
||||||
|
|
||||||
public PopupWindow()
|
public PopupWindow()
|
||||||
{
|
{
|
||||||
@@ -29,7 +30,7 @@ public partial class PopupWindow : Window
|
|||||||
UpdateBannerState();
|
UpdateBannerState();
|
||||||
UpdateFooter();
|
UpdateFooter();
|
||||||
|
|
||||||
Deactivated += (_, _) => Hide();
|
Deactivated += (_, _) => { if (!_dialogOpen) Hide(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Card rendering ───────────────────────────────────────────────
|
// ── Card rendering ───────────────────────────────────────────────
|
||||||
@@ -178,6 +179,10 @@ public partial class PopupWindow : Window
|
|||||||
RebuildCards();
|
RebuildCards();
|
||||||
UpdateFooter();
|
UpdateFooter();
|
||||||
}
|
}
|
||||||
|
if (prop is nameof(UsageViewModel.IsSignedIn) or nameof(UsageViewModel.UserEmail))
|
||||||
|
{
|
||||||
|
InitSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUpdaterChanged(string? prop)
|
private void OnUpdaterChanged(string? prop)
|
||||||
@@ -297,14 +302,18 @@ public partial class PopupWindow : Window
|
|||||||
await Updater.DownloadAndInstallAsync();
|
await Updater.DownloadAndInstallAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SignIn_Click(object s, RoutedEventArgs e)
|
private async void SignIn_Click(object s, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
_dialogOpen = true;
|
||||||
var login = new LoginWindow { Owner = this };
|
var login = new LoginWindow { Owner = this };
|
||||||
if (login.ShowDialog() == true)
|
if (login.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
_ = VM.RefreshAsync();
|
await VM.RefreshAsync();
|
||||||
InitSettings();
|
InitSettings();
|
||||||
}
|
}
|
||||||
|
_dialogOpen = false;
|
||||||
|
Show();
|
||||||
|
Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SignOut_Click(object s, RoutedEventArgs e)
|
private async void SignOut_Click(object s, RoutedEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user