mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-10 12:59:25 +02:00
added more validation for AxeOS settings
This commit is contained in:
parent
dea4a7587b
commit
a5bcec5cd4
@ -22,7 +22,7 @@
|
||||
<input formControlName="wifiPass" type="password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Stratum URL:</label>
|
||||
<label>Stratum URL: (Do not include 'stratum+tcp://' or port</label>
|
||||
<input formControlName="stratumURL" type="text">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -116,22 +116,22 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>Fan Speed {{form.controls['fanspeed'].value}}% <span
|
||||
*ngIf="form.controls['autofanspeed'].value == true">(disabled, automatic) </span> <b
|
||||
*ngIf="form.controls['fanspeed'].value < 33" style="color:red">Danger: Could Cause
|
||||
<div class="form-group" *ngIf="form.controls['autofanspeed'].value != true">
|
||||
<label>Fan Speed {{form.controls['fanspeed'].value}}%
|
||||
<b *ngIf="form.controls['fanspeed'].value < 33" style="color:red">Danger: Could Cause
|
||||
Overheating</b> <b *ngIf="form.controls['fanspeed'].value == 100" style="color: #F2A900">S19
|
||||
Simulator</b></label>
|
||||
<input formControlName="fanspeed" type="range" [min]="0" [max]="100">
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<button [disabled]="form.invalid" (click)="updateSystem()" class="btn btn-primary mr-2">Save</button>
|
||||
<b style="line-height: 34px;">You must restart this device after saving for changes to take effect.</b>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</ng-container>
|
||||
|
||||
<div class="mt-2">
|
||||
<button (click)="updateSystem()" class="btn btn-primary mr-2">Save</button>
|
||||
<b style="line-height: 34px;">You must restart this device after saving for changes to take effect.</b>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -42,8 +42,17 @@ export class EditComponent {
|
||||
this.form = this.fb.group({
|
||||
flipscreen: [info.flipscreen == 1],
|
||||
invertscreen: [info.invertscreen == 1],
|
||||
stratumURL: [info.stratumURL, [Validators.required]],
|
||||
stratumPort: [info.stratumPort, [Validators.required]],
|
||||
stratumURL: [info.stratumURL, [
|
||||
Validators.required,
|
||||
Validators.pattern(/^(?!.*stratum\+tcp:\/\/).*$/),
|
||||
Validators.pattern(/^[^:]*$/),
|
||||
]],
|
||||
stratumPort: [info.stratumPort, [
|
||||
Validators.required,
|
||||
Validators.pattern(/^[^:]*$/),
|
||||
Validators.min(0),
|
||||
Validators.max(65353)
|
||||
]],
|
||||
stratumUser: [info.stratumUser, [Validators.required]],
|
||||
ssid: [info.ssid, [Validators.required]],
|
||||
wifiPass: [info.wifiPass, [Validators.required]],
|
||||
|
@ -94,6 +94,18 @@ button {
|
||||
|
||||
}
|
||||
|
||||
button:disabled,
|
||||
button[disabled] {
|
||||
background: #45657f;
|
||||
border: 1px solid #1c4567;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background: #45657f;
|
||||
border: 1px solid #1c4567;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="number"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user