Skip to content

Commit db8a441

Browse files
ert78gbmondalaci
authored andcommitted
feat(settings): Only display settings in Agent-electron (#358)
close #252
1 parent 3db0198 commit db8a441

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

shared/src/components/settings/settings.component.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ <h1 class="col-xs-12 pane-title">
44
<span class="macro__name pane-title__name">Settings</span>
55
</h1>
66
</div>
7-
<div *ngIf="!runInElectron">
8-
To be done...
9-
</div>
10-
<auto-update-settings *ngIf="runInElectron"
11-
[version]="version"
7+
<auto-update-settings [version]="version"
128
[settings]="autoUpdateSettings$ | async"
139
[checkingForUpdate]="checkingForUpdate$ | async"
1410
(toggleCheckForUpdateOnStartUp)="toogleCheckForUpdateOnStartUp($event)"

shared/src/components/settings/settings.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
22
import { Store } from '@ngrx/store';
33
import { Observable } from 'rxjs/Observable';
44

5-
import { runInElectron } from '../../util/index';
65
import { AppState, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
76
import {
87
CheckForUpdateNowAction,
@@ -20,7 +19,6 @@ import { AutoUpdateSettings } from '../../models/auto-update-settings';
2019
}
2120
})
2221
export class SettingsComponent {
23-
runInElectron = runInElectron();
2422
// TODO: From where do we get the version number? The electron gives back in main process, but the web...
2523
version = '1.0.0';
2624
autoUpdateSettings$: Observable<AutoUpdateSettings>;

shared/src/components/side-menu/side-menu.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
</ul>
6262
</li>
6363
</ul>
64-
<ul class="menu--bottom">
64+
<ul class="menu--bottom" *ngIf="runInElectron">
6565
<li class="sidebar__level-1--item" [routerLinkActive]="['active']">
6666
<a class="sidebar__level-1" [routerLink]="['/settings']">
6767
<i class="fa fa-gear"></i> Settings
6868
</a>
6969
</li>
70-
</ul>
70+
</ul>

shared/src/components/side-menu/side-menu.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'rxjs/add/operator/do';
88
import 'rxjs/add/operator/map';
99
import 'rxjs/add/operator/let';
1010

11+
import { runInElectron } from '../../util/index';
1112
import { Keymap } from '../../config-serializer/config-items/keymap';
1213
import { Macro } from '../../config-serializer/config-items/macro';
1314

@@ -32,6 +33,8 @@ import { getKeymaps, getMacros } from '../../store/reducers/user-configuration';
3233
styleUrls: ['./side-menu.component.scss']
3334
})
3435
export class SideMenuComponent {
36+
runInElectron = runInElectron();
37+
3538
private keymaps$: Observable<Keymap[]>;
3639
private macros$: Observable<Macro[]>;
3740
private animation: { [key: string]: 'active' | 'inactive' };

web/src/main-app/main-app.routes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import { RouterModule, Routes } from '@angular/router';
44
import { addOnRoutes } from '../shared/components/add-on';
55
import { keymapRoutes } from '../components/keymap';
66
import { macroRoutes } from '../shared/components/macro';
7-
import { settingsRoutes } from '../shared/components/settings';
87

98
const appRoutes: Routes = [
109
...keymapRoutes,
1110
...macroRoutes,
12-
...addOnRoutes,
13-
...settingsRoutes
11+
...addOnRoutes
1412
];
1513

1614
export const appRoutingProviders: any[] = [];

0 commit comments

Comments
 (0)