Merge remote-tracking branch 'origin/dev' into feature/enhance-profile
commit
79a7decf16
|
@ -155,6 +155,16 @@ export class AddComponent implements OnInit {
|
|||
|
||||
onDefaultsSubmit() {
|
||||
this.deviceService.addAccountDefaults(this.defaultsForm).subscribe();
|
||||
this.deviceForm.patchValue(
|
||||
{
|
||||
city: this.defaultsForm.controls['city'].value,
|
||||
country: this.defaultsForm.controls['country'].value,
|
||||
region: this.defaultsForm.controls['region'].value,
|
||||
timezone: this.defaultsForm.controls['timezone'].value,
|
||||
wakeWord: this.defaultsForm.controls['wakeWord'].value,
|
||||
voice: this.defaultsForm.controls['voice'].value
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
onFinished() {
|
||||
|
|
|
@ -19,7 +19,7 @@ and limitations under the License.
|
|||
export const environment = {
|
||||
production: false,
|
||||
mycroftUrls: {
|
||||
account: 'https://home-test.mycroft.ai',
|
||||
account: 'https://account.mycroft.test',
|
||||
chat: 'https://chat.mycroft.ai',
|
||||
forum: 'https://community.mycroft.ai',
|
||||
marketplace: 'https://market.mycroft.test',
|
||||
|
|
|
@ -26,6 +26,7 @@ import {
|
|||
faRocket,
|
||||
faRss,
|
||||
faStore,
|
||||
faUser,
|
||||
faUsers
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
@ -61,6 +62,7 @@ export class GlobalnavComponent implements OnInit {
|
|||
|
||||
buildNavigationItems(): void {
|
||||
this.navigationItems = [
|
||||
this.defineAccountNav(),
|
||||
this.defineAboutNav(),
|
||||
this.defineGetStartedNav(),
|
||||
this.defineBlogNav(),
|
||||
|
@ -143,4 +145,25 @@ export class GlobalnavComponent implements OnInit {
|
|||
text: 'Marketplace'
|
||||
};
|
||||
}
|
||||
|
||||
private defineAccountNav(): PrimaryNavItem {
|
||||
const accountMenu = {
|
||||
children: null,
|
||||
icon: faUser,
|
||||
text: 'My Mycroft',
|
||||
url: null
|
||||
};
|
||||
if (this.isLoggedIn) {
|
||||
accountMenu.children = [
|
||||
{text: 'Dashboard', url: this.mycroftUrls.account + '/dashboard', target: '_self'},
|
||||
{text: 'Devices', url: this.mycroftUrls.account + '/devices', target: '_self'},
|
||||
{text: 'Skills', url: this.mycroftUrls.account + '/skills', target: '_self'},
|
||||
{text: 'Personal Data', url: this.mycroftUrls.account + '/personal-data', target: '_self'},
|
||||
{text: 'Profile', url: this.mycroftUrls.account + '/profile', target: '_self'}
|
||||
];
|
||||
} else {
|
||||
accountMenu.url = this.mycroftUrls.account;
|
||||
}
|
||||
return accountMenu;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue