Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for the skysocks UI #1452

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class SkysocksClientSettingsComponent implements OnInit, OnDestroy {
* If true, all the ways provided by default by the UI for closing the modal window are disabled.
*/
get disableDismiss(): boolean {
return this.button && this.settingsButton ? (this.button.isLoading || this.settingsButton.isLoading) : false;
return (this.button && this.button.isLoading) || (this.settingsButton && this.settingsButton.isLoading);
}

// Validates an IPv4 address.
Expand Down Expand Up @@ -613,7 +613,9 @@ export class SkysocksClientSettingsComponent implements OnInit, OnDestroy {
}

this.button.showLoading(false);
this.settingsButton.showLoading(false);
if (this.settingsButton) {
this.settingsButton.showLoading(false);
}
this.working = true;

const data = { pk: publicKey };
Expand Down Expand Up @@ -674,13 +676,17 @@ export class SkysocksClientSettingsComponent implements OnInit, OnDestroy {
// Allow to continue using the component.
this.working = false;
this.button.reset(false);
this.settingsButton.reset(false);
if (this.settingsButton) {
this.settingsButton.reset(false);
}
}

private onServerDataChangeError(err: OperationError) {
this.working = false;
this.button.showError(false);
this.settingsButton.reset(false);
if (this.settingsButton) {
this.settingsButton.reset(false);
}
err = processServiceError(err);

this.snackbarService.showError(err);
Expand Down