diff --git a/angular.json b/angular.json index 17b3766..9491b2a 100644 --- a/angular.json +++ b/angular.json @@ -264,6 +264,9 @@ "configurations": { "production": { "browserTarget": "market:build:production" + }, + "development": { + "browserTarget": "market:build:development" } } }, @@ -448,6 +451,9 @@ "configurations": { "production": { "browserTarget": "sso:build:production" + }, + "development": { + "browserTarget": "sso:build:development" } } }, @@ -660,6 +666,9 @@ "configurations": { "production": { "browserTarget": "account:build:production" + }, + "development": { + "browserTarget": "account:build:development" } } }, @@ -856,6 +865,9 @@ "configurations": { "production": { "browserTarget": "precise:build:production" + }, + "development": { + "browserTarget": "precise:build:development" } } }, diff --git a/projects/account/src/environments/environment.dev.ts b/projects/account/src/environments/environment.dev.ts index 877adf1..207e3c3 100644 --- a/projects/account/src/environments/environment.dev.ts +++ b/projects/account/src/environments/environment.dev.ts @@ -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', diff --git a/projects/globalnav/src/lib/globalnav.component.ts b/projects/globalnav/src/lib/globalnav.component.ts index fda81ae..8ed90ac 100644 --- a/projects/globalnav/src/lib/globalnav.component.ts +++ b/projects/globalnav/src/lib/globalnav.component.ts @@ -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; + } }