Skip to content

Commit

Permalink
Remove migratePSUControlOption function & clean code
Browse files Browse the repository at this point in the history
Co-authored-by: Timon G. <[email protected]>
  • Loading branch information
xunleii and UnchartedBull committed Dec 22, 2020
1 parent 6b1b290 commit 799b563
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/app/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export class AppService {
(config.plugins.tpLinkSmartPlug = { enabled: true, smartPlugIP: '127.0.0.1' }),
".octodash should have required property 'previewProgressCircle'": config =>
(config.octodash.previewProgressCircle = false),
".octodash should have required property 'turnOnPrinterWhenExitingSleep'": config =>
(config.octodash.turnOnPrinterWhenExitingSleep = false),
".octodash should have required property 'turnOnPrinterWhenExitingSleep'": config => {
config.octodash.turnOnPrinterWhenExitingSleep = config.plugins.psuControl.turnOnPSUWhenExitingSleep;
delete config.plugins.psuControl.turnOnPSUWhenExitingSleep
}
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/config/config.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ interface EnclosurePlugin extends Plugin {
interface PSUControlPlugin extends Plugin {
// TODO: this option still exists to allow migration path... need to be removed
// when the new `turnOnPSUWhenExitingSleep` will be released
turnOnPSUWhenExitingSleep: boolean;
turnOnPSUWhenExitingSleep?: boolean;
}

interface TPLinkSmartPlugPlugin extends Plugin {
Expand Down

0 comments on commit 799b563

Please sign in to comment.