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

Use correct temperature unit #407

Merged
merged 2 commits into from
Feb 7, 2020
Merged
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
2 changes: 1 addition & 1 deletion src/app/bottom-bar/bottom-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<td class="bottom-bar__printer-name"> {{ printer.name }} </td>
<td class="bottom-bar__enclosure-temperature" *ngIf="enclosureTemperature">
<img src="assets/thermometer.svg" class="bottom-bar__enclosure-temperature-icon" />
{{ enclosureTemperature.temperature }}°C
{{ enclosureTemperature.temperature }}{{ enclosureTemperature.unit }}
</td>
<td class="bottom-bar__current-status" [ngClass]="{'bottom-bar__error': printer.status.includes('error')}">
{{ printer.status }} </td>
Expand Down
1 change: 1 addition & 0 deletions src/app/bottom-bar/bottom-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ interface Printer {
export interface TemperatureReading {
temperature: number;
humidity: number;
unit: string;
}
3 changes: 2 additions & 1 deletion src/app/files/files.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class FilesComponent {
private router: Router,
private jobService: JobService) {
this.showLoader();
this.folderContent = [];
this.currentFolder = '/';
this.openFolder(this.currentFolder);
}
Expand All @@ -44,7 +45,7 @@ export class FilesComponent {
public openFolder(folderPath: string): void {
setTimeout(() => {
this.showLoader();
this.folderContent = null;
this.folderContent = [];
this.filesService.getFolder(folderPath).then(
(data) => {
this.folderContent = data;
Expand Down
2 changes: 1 addition & 1 deletion src/app/main-menu/main-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core';
})
export class MainMenuComponent implements OnInit {

public settings = true;
public settings = false;

public showSettings() {
this.settings = true;
Expand Down
3 changes: 1 addition & 2 deletions src/app/notification/notification.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
border-right: 1vw solid #5a6675;

&__show {
// FIXME
// top: 5vh;
top: 5vh;
}

&__heading {
Expand Down
3 changes: 2 additions & 1 deletion src/app/plugin-service/enclosure.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export class EnclosureService {
(data: EnclosurePluginAPI) => {
observer.next({
temperature: data.temp_sensor_temp,
humidity: data.temp_sensor_humidity
humidity: data.temp_sensor_humidity,
unit: data.use_fahrenheit ? '°F' : '°C'
} as TemperatureReading);
}, (error: HttpErrorResponse) => {
this.notificationService.setError('Can\'t retrieve enclosure temperature!', error.message);
Expand Down