Merge remote-tracking branch 'origin/dev' into feature/enhance-profile

pull/87/head
Chris Veilleux 2022-07-29 12:13:34 -05:00
commit 79a7decf16
3 changed files with 34 additions and 1 deletions

View File

@ -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() {

View File

@ -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',

View File

@ -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;
}
}