+
@@ -92,6 +80,11 @@
{{ 'NavigationBar.Filter.People' | translate}} -->
+
diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss
index 27346079b..c9daf031c 100644
--- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss
+++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss
@@ -69,10 +69,11 @@
text-align: center;
width: 80%;
}
+
.profile-img {
float: left;
- height: 40px;
- margin-right: 15px;
+ width: 45px;
+ border-radius: 100%;
}
.profile-info {
overflow: hidden;
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 c7e0b793b..d65307bdb 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
@@ -8,8 +8,9 @@ import { SettingsService, SettingsStateService } from '../services';
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
import { SearchFilter } from './SearchFilter';
import { Md5 } from 'ts-md5/dist/md5';
-import { RequestType } from '../interfaces';
+import { IUser, RequestType, UserType } from '../interfaces';
import { FilterService } from '../discover/services/filter-service';
+import { ILocalUser } from '../auth/IUserLogin';
export enum SearchFilterType {
Movie = 1,
@@ -62,7 +63,6 @@ export class MyNavComponent implements OnInit {
tvShows: true
}
- this.setWelcomeText();
if (this.email) {
const md5 = new Md5();
this.emailHash = md5.appendStr(this.email).end();
@@ -92,8 +92,7 @@ export class MyNavComponent implements OnInit {
{ id: "nav-userDonate", name: "NavigationBar.Donate", icon: "fas fa-dollar-sign", link: customizationSettings.customDonationUrl, externalLink: true, requiresAdmin: false, enabled: customizationSettings.enableCustomDonations, toolTip: true, toolTipMessage: customizationSettings.customDonationMessage },
{ id: "nav-featureSuggestion", name: "NavigationBar.FeatureSuggestion", icon: "far fa-lightbulb", link: "https://features.ombi.io/", externalLink: true, requiresAdmin: true, enabled: true, toolTip: true, toolTipMessage: 'NavigationBar.FeatureSuggestionTooltip'},
{ id: "nav-settings", name: "NavigationBar.Settings", icon: "fas fa-cogs", link: "/Settings/About", requiresAdmin: true, enabled: true },
- { id: "nav-userPreferences", name: "NavigationBar.UserPreferences", icon: "fas fa-user", link: "/user-preferences", requiresAdmin: false, enabled: true },
- ];
+ ];
}
public logOut() {
@@ -119,18 +118,8 @@ export class MyNavComponent implements OnInit {
this.store.save("searchFilter", JSON.stringify(this.searchFilter));
}
- private setWelcomeText() {
- var d = new Date();
- var hour = d.getHours();
-
- if (hour >= 0 && hour < 12) {
- this.welcomeText = 'NavigationBar.MorningWelcome';
- }
- if (hour >= 12 && hour < 18) {
- this.welcomeText = 'NavigationBar.AfternoonWelcome';
- }
- if (hour >= 18 && hour < 24) {
- this.welcomeText = 'NavigationBar.EveningWelcome';
- }
+ public getUserImage(): string {
+ var fallback = this.applicationLogo ? this.applicationLogo : 'https://raw.githubusercontent.com/Ombi-app/Ombi/gh-pages/img/android-chrome-512x512.png';
+ return `https://www.gravatar.com/avatar/${this.emailHash}?d=${fallback}`;
}
}