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

Update edit.component.ts #43

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
20 changes: 14 additions & 6 deletions main/http_server/axe-os/src/app/components/edit/edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,24 @@ export class EditComponent implements OnInit {
];

public BM1370DropdownFrequency = [
{ name: '525 (eco)', value: 525 },
{ name: '500', value: 500 },
{ name: '525', value: 525 },
{ name: '550', value: 550 },
{ name: '575', value: 575 },
{ name: '590', value: 590 },
{ name: '600 (default)', value: 600 },
];

public BM1370CoreVoltage = [
{ name: '1100', value: 1100 },
{ name: '1150', value: 1150 },
{ name: '1200 (default)', value: 1200 },
{ name: '1250', value: 1250 },
{ name: '1300', value: 1300 },
{ name: '1120', value: 1120 },
{ name: '1130', value: 1130 },
{ name: '1140', value: 1140 },
{ name: '1150 (default)', value: 1150 },
{ name: '1160', value: 1160 },
{ name: '1170', value: 1170 },
{ name: '1180', value: 1180 },
{ name: '1190', value: 1190 },
{ name: '1200', value: 1200 },
];

constructor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<div *ngIf="devToolsOpen" class="pro-mode-warning">
<p>Warning: You are now in Pro Mode. Adjusting settings with incorrect or unsuitable values may damage the device. Proceed with caution and at your own risk.</p>
</div>

<div class="card">
<h2>Settings</h2>

<app-edit></app-edit>
</div>


<div *ngIf="devToolsOpen" class="pro-mode-warning">
<p>Warning: You are now in Pro Mode. Adjusting settings with incorrect or unsuitable values may damage the device. Proceed with caution and at your own risk.</p>
</div>

<div class="grid">
Expand All @@ -14,20 +19,19 @@ <h2>Latest Release: <p-button (onClick)="checkLatestRelease = true">Check</p-but
</div>
<div class="card" *ngIf="checkLatestRelease == true">
<ng-container *ngIf="latestRelease$ | async as latestRelease">
<h5>Current Version: {{(info$ | async)?.version}}</h5>
<h2>Latest Release: {{latestRelease.name}}</h2>

<div *ngFor="let asset of latestRelease.assets">
<div *ngIf="asset.name === expectedFileName">
<a style="text-decoration: underline;" target="_blank"
[href]="asset.browser_download_url">{{ expectedFileName }}</a>
<h5>Current Version: {{(info$ | async)?.version}}</h5>
<h2>Latest Release: {{latestRelease.name}}</h2>
<div *ngFor="let asset of latestRelease.assets">
<div *ngIf="asset.name === expectedFileName">
<a style="text-decoration: underline;" target="_blank"
[href]="asset.browser_download_url">{{ expectedFileName }}</a>
</div>
<div *ngIf="asset.name == 'www.bin'">
<a style="text-decoration: underline;" target="_blank"
[href]="asset.browser_download_url">www.bin</a>
</div>
</div>
<div *ngIf="asset.name == 'www.bin'">
<a style="text-decoration: underline;" target="_blank"
[href]="asset.browser_download_url">www.bin</a>
</div>
</div>
</ng-container>
</ng-container>
</div>
</div>
<div class="col-12 lg:col-6 xl:col-4">
Expand All @@ -36,19 +40,15 @@ <h2>Update Firmware <span *ngIf="firmwareUpdateProgress != null">{{firmwareUpdat
<!-- <input type="file" id="file" (change)="otaUpdate($event)" accept=".bin"> -->
<p-fileUpload [customUpload]="true" mode="basic" accept=".bin" (uploadHandler)="otaUpdate($event)"
[auto]="true" chooseLabel="Browse"></p-fileUpload>

<small>({{ expectedFileName }})</small>
</div>

</div>
<div class="col-12 lg:col-12 xl:col-4">
<div class="card">
<h2>Update Website <span *ngIf="websiteUpdateProgress != null">{{websiteUpdateProgress}}%</span></h2>

<p-fileUpload [customUpload]="true" mode="basic" accept=".bin" (uploadHandler)="otaWWWUpdate($event)"
[auto]="true" chooseLabel="Browse"></p-fileUpload>

<small>(www.bin)</small>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,16 @@ select {

a {
color: white;
}
}

.pro-mode-warning {
background-color: #ffcccb;
color: #b22222;
border: 1px solid #b22222;
padding: 10px;
margin: 10px 0;
text-align: center;
font-weight: bold;
border-radius: 5px;
}

Loading