Merge pull request #84 from MycroftAI/feature/improve-menu
Add account menu to sidenavfeature/add-device-navigation^2
commit
302e235326
12
angular.json
12
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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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