Skip to content

Commit

Permalink
fix using linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jun 15, 2022
1 parent 8a1ae2f commit 46f3b1c
Show file tree
Hide file tree
Showing 26 changed files with 4,583 additions and 4,584 deletions.
14 changes: 7 additions & 7 deletions webapp/frontend/src/@treo/services/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export class TreoConfigService
{
let currentScrutinyConfig = defaultConfig

let localConfigStr = localStorage.getItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY)
const localConfigStr = localStorage.getItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY)
if (localConfigStr){
//check localstorage for a value
let localConfig = JSON.parse(localConfigStr)
// check localstorage for a value
const localConfig = JSON.parse(localConfigStr)
currentScrutinyConfig = Object.assign({}, currentScrutinyConfig, localConfig) // make sure defaults are available if missing from localStorage.
}
// Set the private defaults
Expand All @@ -38,20 +38,20 @@ export class TreoConfigService
/**
* Setter and getter for config
*/
//Setter
// Setter
set config(value: any)
{
// Merge the new config over to the current config
let config = _.merge({}, this._config.getValue(), value);
const config = _.merge({}, this._config.getValue(), value);

//Store the config in localstorage
// Store the config in localstorage
localStorage.setItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY, JSON.stringify(config));

// Execute the observable
this._config.next(config);
}

//Getter
// Getter
get config$(): Observable<any>
{
return this._config.asObservable();
Expand Down
14 changes: 7 additions & 7 deletions webapp/frontend/src/app/core/config/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Layout } from "app/layout/layout.types";
import { Layout } from 'app/layout/layout.types';

// Theme type
export type Theme = "light" | "dark" | "system";
export type Theme = 'light' | 'dark' | 'system';

/**
* AppConfig interface. Update this interface to strictly type your config
Expand All @@ -28,12 +28,12 @@ export interface AppConfig
* "ConfigService".
*/
export const appConfig: AppConfig = {
theme : "light",
layout: "material",
theme : 'light',
layout: 'material',

dashboardDisplay: "name",
dashboardSort: "status",
dashboardDisplay: 'name',
dashboardSort: 'status',

temperatureUnit: "celsius",
temperatureUnit: 'celsius',
};

0 comments on commit 46f3b1c

Please sign in to comment.