feat(settings): Only display settings in Agent-electron (#358)
close #252
This commit is contained in:
committed by
László Monda
parent
3db019812a
commit
db8a4413de
@@ -4,11 +4,7 @@
|
|||||||
<span class="macro__name pane-title__name">Settings</span>
|
<span class="macro__name pane-title__name">Settings</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!runInElectron">
|
<auto-update-settings [version]="version"
|
||||||
To be done...
|
|
||||||
</div>
|
|
||||||
<auto-update-settings *ngIf="runInElectron"
|
|
||||||
[version]="version"
|
|
||||||
[settings]="autoUpdateSettings$ | async"
|
[settings]="autoUpdateSettings$ | async"
|
||||||
[checkingForUpdate]="checkingForUpdate$ | async"
|
[checkingForUpdate]="checkingForUpdate$ | async"
|
||||||
(toggleCheckForUpdateOnStartUp)="toogleCheckForUpdateOnStartUp($event)"
|
(toggleCheckForUpdateOnStartUp)="toogleCheckForUpdateOnStartUp($event)"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
|
|||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
import { runInElectron } from '../../util/index';
|
|
||||||
import { AppState, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
|
import { AppState, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
|
||||||
import {
|
import {
|
||||||
CheckForUpdateNowAction,
|
CheckForUpdateNowAction,
|
||||||
@@ -20,7 +19,6 @@ import { AutoUpdateSettings } from '../../models/auto-update-settings';
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
export class SettingsComponent {
|
export class SettingsComponent {
|
||||||
runInElectron = runInElectron();
|
|
||||||
// TODO: From where do we get the version number? The electron gives back in main process, but the web...
|
// TODO: From where do we get the version number? The electron gives back in main process, but the web...
|
||||||
version = '1.0.0';
|
version = '1.0.0';
|
||||||
autoUpdateSettings$: Observable<AutoUpdateSettings>;
|
autoUpdateSettings$: Observable<AutoUpdateSettings>;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="menu--bottom">
|
<ul class="menu--bottom" *ngIf="runInElectron">
|
||||||
<li class="sidebar__level-1--item" [routerLinkActive]="['active']">
|
<li class="sidebar__level-1--item" [routerLinkActive]="['active']">
|
||||||
<a class="sidebar__level-1" [routerLink]="['/settings']">
|
<a class="sidebar__level-1" [routerLink]="['/settings']">
|
||||||
<i class="fa fa-gear"></i> Settings
|
<i class="fa fa-gear"></i> Settings
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'rxjs/add/operator/do';
|
|||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/let';
|
import 'rxjs/add/operator/let';
|
||||||
|
|
||||||
|
import { runInElectron } from '../../util/index';
|
||||||
import { Keymap } from '../../config-serializer/config-items/keymap';
|
import { Keymap } from '../../config-serializer/config-items/keymap';
|
||||||
import { Macro } from '../../config-serializer/config-items/macro';
|
import { Macro } from '../../config-serializer/config-items/macro';
|
||||||
|
|
||||||
@@ -32,6 +33,8 @@ import { getKeymaps, getMacros } from '../../store/reducers/user-configuration';
|
|||||||
styleUrls: ['./side-menu.component.scss']
|
styleUrls: ['./side-menu.component.scss']
|
||||||
})
|
})
|
||||||
export class SideMenuComponent {
|
export class SideMenuComponent {
|
||||||
|
runInElectron = runInElectron();
|
||||||
|
|
||||||
private keymaps$: Observable<Keymap[]>;
|
private keymaps$: Observable<Keymap[]>;
|
||||||
private macros$: Observable<Macro[]>;
|
private macros$: Observable<Macro[]>;
|
||||||
private animation: { [key: string]: 'active' | 'inactive' };
|
private animation: { [key: string]: 'active' | 'inactive' };
|
||||||
|
|||||||
@@ -4,13 +4,11 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { addOnRoutes } from '../shared/components/add-on';
|
import { addOnRoutes } from '../shared/components/add-on';
|
||||||
import { keymapRoutes } from '../components/keymap';
|
import { keymapRoutes } from '../components/keymap';
|
||||||
import { macroRoutes } from '../shared/components/macro';
|
import { macroRoutes } from '../shared/components/macro';
|
||||||
import { settingsRoutes } from '../shared/components/settings';
|
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
...keymapRoutes,
|
...keymapRoutes,
|
||||||
...macroRoutes,
|
...macroRoutes,
|
||||||
...addOnRoutes,
|
...addOnRoutes
|
||||||
...settingsRoutes
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const appRoutingProviders: any[] = [];
|
export const appRoutingProviders: any[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user