diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.html b/main/http_server/axe-os/src/app/components/edit/edit.component.html
index d1d4adf66..1d1db9098 100644
--- a/main/http_server/axe-os/src/app/components/edit/edit.component.html
+++ b/main/http_server/axe-os/src/app/components/edit/edit.component.html
@@ -198,11 +198,15 @@
-
You must restart this device after saving for changes to take effect.
+
+
+
+
diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.ts b/main/http_server/axe-os/src/app/components/edit/edit.component.ts
index 6b4fe4bab..8e207c18a 100644
--- a/main/http_server/axe-os/src/app/components/edit/edit.component.ts
+++ b/main/http_server/axe-os/src/app/components/edit/edit.component.ts
@@ -19,7 +19,7 @@ export class EditComponent implements OnInit {
public firmwareUpdateProgress: number | null = null;
public websiteUpdateProgress: number | null = null;
-
+ public savedChanges: boolean = false;
public devToolsOpen: boolean = false;
public eASICModel = eASICModel;
public ASICModel!: eASICModel;
@@ -205,9 +205,11 @@ export class EditComponent implements OnInit {
.subscribe({
next: () => {
this.toastr.success('Success!', 'Saved.');
+ this.savedChanges = true;
},
error: (err: HttpErrorResponse) => {
this.toastr.error('Error.', `Could not save. ${err.message}`);
+ this.savedChanges = false;
}
});
}
@@ -232,4 +234,17 @@ export class EditComponent implements OnInit {
this.showFallbackStratumPassword = !this.showFallbackStratumPassword;
}
+ public restart() {
+ this.systemService.restart()
+ .pipe(this.loadingService.lockUIUntilComplete())
+ .subscribe({
+ next: () => {
+ this.toastr.success('Success!', 'Bitaxe restarted');
+ },
+ error: (err: HttpErrorResponse) => {
+ this.toastr.error('Error', `Could not restart. ${err.message}`);
+ }
+ });
+ }
+
}
diff --git a/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.html b/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.html
index 071c31f1e..647643aa4 100644
--- a/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.html
+++ b/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.html
@@ -26,9 +26,13 @@
-
You must restart this device after saving for changes to take effect.
+
+
+
+
diff --git a/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.ts b/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.ts
index c4ad4e2e4..ff07b2380 100644
--- a/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.ts
+++ b/main/http_server/axe-os/src/app/components/network-edit/network.edit.component.ts
@@ -14,6 +14,7 @@ import { SystemService } from 'src/app/services/system.service';
export class NetworkEditComponent implements OnInit {
public form!: FormGroup;
+ public savedChanges: boolean = false;
@Input() uri = '';
@@ -56,9 +57,11 @@ export class NetworkEditComponent implements OnInit {
.subscribe({
next: () => {
this.toastr.success('Success!', 'Saved.');
+ this.savedChanges = true;
},
error: (err: HttpErrorResponse) => {
this.toastr.error('Error.', `Could not save. ${err.message}`);
+ this.savedChanges = false;
}
});
}
@@ -67,4 +70,17 @@ export class NetworkEditComponent implements OnInit {
toggleWifiPasswordVisibility() {
this.showWifiPassword = !this.showWifiPassword;
}
+
+ public restart() {
+ this.systemService.restart()
+ .pipe(this.loadingService.lockUIUntilComplete())
+ .subscribe({
+ next: () => {
+ this.toastr.success('Success!', 'Bitaxe restarted');
+ },
+ error: (err: HttpErrorResponse) => {
+ this.toastr.error('Error', `Could not restart. ${err.message}`);
+ }
+ });
+ }
}