mirror of
https://github.com/MikroWizard/mikrofront.git
synced 2025-06-29 13:50:02 +02:00
add Safe Update pro feature
This commit is contained in:
parent
9786895628
commit
22e101c9fe
2 changed files with 6 additions and 17 deletions
|
@ -185,15 +185,13 @@
|
||||||
setting for any change to prevent/fix the configuration.</c-form-feedback>
|
setting for any change to prevent/fix the configuration.</c-form-feedback>
|
||||||
</c-form-check>
|
</c-form-check>
|
||||||
|
|
||||||
<c-form-check [switch]="true" sizing="xl">
|
<c-form-check *ngIf="ispro" [switch]="true" sizing="xl">
|
||||||
<input cFormCheckInput [(ngModel)]="sysconfigs['safe_install']['value']" type="checkbox" />
|
<input cFormCheckInput [(ngModel)]="sysconfigs['safe_install']['value']" type="checkbox" />
|
||||||
<label cFormCheckLabel>Safe Update</label>
|
<label cFormCheckLabel>Safe Update</label>
|
||||||
<c-form-feedback style="display: block;color: #979797;margin-top: 0;" [valid]="true">
|
<c-form-feedback style="display: block;color: #979797;margin-top: 0;" [valid]="true"><code style="padding: 0!important;">PRO</code>
|
||||||
* Download and install reqired firmware before installing the target firmware . for example it will install
|
* Download and install reqired firmware before installing the target firmware . for example it will install
|
||||||
latest 7.12 then upgrade to newer version >7.13</c-form-feedback>
|
latest 7.12 then upgrade to newer version >7.13</c-form-feedback>
|
||||||
</c-form-check>
|
</c-form-check>
|
||||||
|
|
||||||
|
|
||||||
<button cButton color="primary" (click)="saveSysSetting()">Save</button>
|
<button cButton color="primary" (click)="saveSysSetting()">Save</button>
|
||||||
|
|
||||||
</c-card-body>
|
</c-card-body>
|
||||||
|
|
|
@ -22,19 +22,6 @@ import {
|
||||||
import { ToasterComponent } from "@coreui/angular";
|
import { ToasterComponent } from "@coreui/angular";
|
||||||
import { AppToastComponent } from "../toast-simple/toast.component";
|
import { AppToastComponent } from "../toast-simple/toast.component";
|
||||||
import { TimeZones } from "./timezones-data";
|
import { TimeZones } from "./timezones-data";
|
||||||
interface IUser {
|
|
||||||
name: string;
|
|
||||||
state: string;
|
|
||||||
registered: string;
|
|
||||||
country: string;
|
|
||||||
usage: number;
|
|
||||||
period: string;
|
|
||||||
payment: string;
|
|
||||||
activity: string;
|
|
||||||
avatar: string;
|
|
||||||
status: string;
|
|
||||||
color: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "settings.component.html",
|
templateUrl: "settings.component.html",
|
||||||
|
@ -44,6 +31,7 @@ interface IUser {
|
||||||
export class SettingsComponent implements OnInit {
|
export class SettingsComponent implements OnInit {
|
||||||
public uid: number;
|
public uid: number;
|
||||||
public uname: string;
|
public uname: string;
|
||||||
|
public ispro:boolean=false;
|
||||||
public filterText: string;
|
public filterText: string;
|
||||||
public filters: any = {};
|
public filters: any = {};
|
||||||
public firms: any = {};
|
public firms: any = {};
|
||||||
|
@ -63,6 +51,7 @@ export class SettingsComponent implements OnInit {
|
||||||
this.data_provider.getSessionInfo().then((res) => {
|
this.data_provider.getSessionInfo().then((res) => {
|
||||||
_self.uid = res.uid;
|
_self.uid = res.uid;
|
||||||
_self.uname = res.name;
|
_self.uname = res.name;
|
||||||
|
_self.ispro = res.ISPRO;
|
||||||
const userId = _self.uid;
|
const userId = _self.uid;
|
||||||
|
|
||||||
if (res.role != "admin") {
|
if (res.role != "admin") {
|
||||||
|
@ -222,6 +211,8 @@ export class SettingsComponent implements OnInit {
|
||||||
].filter((x: any) => x.match(/^6\./g));
|
].filter((x: any) => x.match(/^6\./g));
|
||||||
_self.firmwaretoinstall = res.firmwaretoinstall;
|
_self.firmwaretoinstall = res.firmwaretoinstall;
|
||||||
_self.firmwaretoinstallv6 = res.firmwaretoinstallv6;
|
_self.firmwaretoinstallv6 = res.firmwaretoinstallv6;
|
||||||
|
_self.updateBehavior = res.updateBehavior;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue