From 19a993ba51e433d248c5042fb63c9cc1e3ea9b54 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 30 Jul 2020 08:30:21 +0100 Subject: [PATCH] Added the new feature suggestion to the navbar --- .../ClientApp/src/app/interfaces/ICommon.ts | 3 ++- .../src/app/my-nav/my-nav.component.html | 11 +++++------ .../src/app/my-nav/my-nav.component.ts | 17 +++++++++-------- src/Ombi/wwwroot/translations/en.json | 4 +++- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/interfaces/ICommon.ts b/src/Ombi/ClientApp/src/app/interfaces/ICommon.ts index f0bcd8983..13a91af6c 100644 --- a/src/Ombi/ClientApp/src/app/interfaces/ICommon.ts +++ b/src/Ombi/ClientApp/src/app/interfaces/ICommon.ts @@ -29,6 +29,7 @@ export interface IUsersModel { export interface INavBar { icon: string; + faIcon: string; name: string; link: string; requiresAdmin: boolean; @@ -36,5 +37,5 @@ export interface INavBar { toolTip?: boolean; toolTipMessage?: string; style?: string; - donation?: boolean; + externalLink?: boolean; } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html index c849d80e8..93c689741 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html @@ -5,20 +5,19 @@
- - + - {{nav.icon}} + {{nav.icon}} +  {{nav.name | translate}} - + {{nav.icon}}  {{nav.name | translate}} - - +
diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts index 465cae4e1..5b142dd58 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts @@ -34,7 +34,7 @@ export class MyNavComponent implements OnInit { } public async ngOnInit() { - + this.issuesEnabled = await this.settingsService.issueEnabled().toPromise(); console.log("issues enabled: " + this.issuesEnabled); this.theme = this.store.get("theme"); @@ -42,14 +42,15 @@ export class MyNavComponent implements OnInit { this.store.save("theme","dark"); } this.navItems = [ - { name: "NavigationBar.Discover", icon: "find_replace", link: "/discover", requiresAdmin: false, enabled: true }, - { name: "NavigationBar.Requests", icon: "list", link: "/requests-list", requiresAdmin: false, enabled: true }, - { name: "NavigationBar.Issues", icon: "notification_important", link: "/issues", requiresAdmin: false, enabled: this.issuesEnabled }, - { name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true, enabled: true }, + { name: "NavigationBar.Discover", icon: "find_replace", link: "/discover", requiresAdmin: false, enabled: true, faIcon: null }, + { name: "NavigationBar.Requests", icon: "list", link: "/requests-list", requiresAdmin: false, enabled: true, faIcon: null }, + { name: "NavigationBar.Issues", icon: "notification_important", link: "/issues", requiresAdmin: false, enabled: this.issuesEnabled, faIcon: null }, + { name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true, enabled: true, faIcon: null }, // { name: "NavigationBar.Calendar", icon: "calendar_today", link: "/calendar", requiresAdmin: false, enabled: true }, - { name: "NavigationBar.Donate", icon: "attach_money", link: "https://www.paypal.me/PlexRequestsNet", donation: true, requiresAdmin: true, enabled: true, toolTip: true, style: "color:red;", toolTipMessage: 'NavigationBar.DonateTooltip' }, - { name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true, enabled: true }, - { name: "NavigationBar.UserPreferences", icon: "person", link: "/user-preferences", requiresAdmin: false, enabled: true }, + { name: "NavigationBar.Donate", icon: "attach_money", link: "https://www.paypal.me/PlexRequestsNet", externalLink: true, requiresAdmin: true, enabled: true, toolTip: true, style: "color:red;", toolTipMessage: 'NavigationBar.DonateTooltip', faIcon: null }, + { name: "NavigationBar.FeatureSuggestion", icon: null, link: "https://features.ombi.io/", externalLink: true, requiresAdmin: false, enabled: true, toolTip: true, toolTipMessage: 'NavigationBar.FeatureSuggestionTooltip', faIcon: "fa-lightbulb-o" }, + { name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true, enabled: true, faIcon: null }, + { name: "NavigationBar.UserPreferences", icon: "person", link: "/user-preferences", requiresAdmin: false, enabled: true, faIcon: null }, ]; } diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index 7549a7b61..4b198982a 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -67,7 +67,9 @@ "RecentlyAdded": "Recently Added", "ChangeTheme": "Change Theme", "Calendar": "Calendar", - "UserPreferences": "Preferences" + "UserPreferences": "Preferences", + "FeatureSuggestion":"Feature Suggestion", + "FeatureSuggestionTooltip":"Have a great new idea? Suggest it here!" }, "Search": { "Title": "Search",