From f11e6a3699cbe1c08e10bb6ff31fc6bb7ddb6dd3 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 18 Jan 2020 11:53:57 +0100 Subject: [PATCH] Change icons - Change default profile picture - Change dark mode icon to flat one that matches the color schmee - Move icons to assets/images --- src/app/app.module.ts | 12 +- src/app/models/user.ts | 2 +- src/app/services/feed/feed.service.ts | 4 +- src/app/services/profile/profile.service.ts | 4 +- src/assets/images/account_circle-24px.svg | 81 ------- src/assets/images/default-profilepic.svg | 200 ++++++++++++++++++ .../images/gv-logo-flat.svg} | 83 +------- .../images/gv-logo-white.svg} | 0 8 files changed, 218 insertions(+), 168 deletions(-) delete mode 100644 src/assets/images/account_circle-24px.svg create mode 100755 src/assets/images/default-profilepic.svg rename src/{app/gv-new-logo.svg => assets/images/gv-logo-flat.svg} (52%) mode change 100644 => 100755 rename src/{app/gv-new-logo-white.svg => assets/images/gv-logo-white.svg} (100%) mode change 100644 => 100755 diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 99d543d..e696687 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -68,10 +68,6 @@ import {MatDatepickerModule} from '@angular/material/datepicker'; import {MatNativeDateModule} from '@angular/material/'; import {MatSnackBarModule} from '@angular/material/snack-bar'; -// import logo from 'src/assets/gv-new-logo.svg'; -import logo from '!!raw-loader!./gv-new-logo-white.svg'; -import logo_green from '!!raw-loader!./gv-new-logo.svg'; - const config: SocketIoConfig = { url: 'http://localhost:4444', options: {} }; @@ -162,9 +158,9 @@ const appRoutes: Routes = [ }) export class AppModule { constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) { - iconRegistry.addSvgIconLiteral( - 'logo', sanitizer.bypassSecurityTrustHtml(logo)); - iconRegistry.addSvgIconLiteral( - 'logo_green', sanitizer.bypassSecurityTrustHtml(logo_green)); + iconRegistry.addSvgIcon( + 'logo', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-white.svg')); + iconRegistry.addSvgIcon( + 'logo_green', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-flat.svg')); } } diff --git a/src/app/models/user.ts b/src/app/models/user.ts index 2c26c05..25c1773 100644 --- a/src/app/models/user.ts +++ b/src/app/models/user.ts @@ -65,7 +65,7 @@ export class User { if (path) { return environment.greenvironmentUrl + path; } else { - return 'assets/images/account_circle-24px.svg'; + return 'assets/images/default-profilepic.svg'; } } } diff --git a/src/app/services/feed/feed.service.ts b/src/app/services/feed/feed.service.ts index 99217fe..f912f11 100644 --- a/src/app/services/feed/feed.service.ts +++ b/src/app/services/feed/feed.service.ts @@ -239,7 +239,7 @@ export class FeedService { if (post.author.profilePicture) { profilePicture = environment.greenvironmentUrl + post.author.profilePicture; } else { - profilePicture = 'assets/images/account_circle-24px.svg'; + profilePicture = 'assets/images/default-profilepic.svg'; } const author = new Author(post.author.id, post.author.name, post.author.handle, profilePicture); const temp = new Date(Number(post.createdAt)); @@ -271,7 +271,7 @@ export class FeedService { if (post.author.profilePicture) { profilePicture = environment.greenvironmentUrl + post.author.profilePicture; } else { - profilePicture = 'assets/images/account_circle-24px.svg'; + profilePicture = 'assets/images/default-profilepic.svg'; } const author = new Author(post.author.id, post.author.name, post.author.handle, profilePicture); const temp = new Date(Number(post.createdAt)); diff --git a/src/app/services/profile/profile.service.ts b/src/app/services/profile/profile.service.ts index 1a28185..1eecb07 100644 --- a/src/app/services/profile/profile.service.ts +++ b/src/app/services/profile/profile.service.ts @@ -85,7 +85,7 @@ export class ProfileService { if (response.data.getUser.profilePicture) { profile.profilePicture = environment.greenvironmentUrl + response.data.getUser.profilePicture; } else { - profile.profilePicture = 'assets/images/account_circle-24px.svg'; + profile.profilePicture = 'assets/images/default-profilepic.svg'; } const temp = new Date(Number(response.data.getUser.joinedAt)); const date = temp.toLocaleString('en-GB'); @@ -102,7 +102,7 @@ export class ProfileService { if (post.author.profilePicture) { profilePicture = environment.greenvironmentUrl + post.author.profilePicture; } else { - profilePicture = 'assets/images/account_circle-24px.svg'; + profilePicture = 'assets/images/default-profilepic.svg'; } const author = new Author(post.author.id, post.author.name, post.author.handle, profilePicture); const ptemp = new Date(Number(post.createdAt)); diff --git a/src/assets/images/account_circle-24px.svg b/src/assets/images/account_circle-24px.svg deleted file mode 100644 index 6b911ac..0000000 --- a/src/assets/images/account_circle-24px.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/src/assets/images/default-profilepic.svg b/src/assets/images/default-profilepic.svg new file mode 100755 index 0000000..fa37d4d --- /dev/null +++ b/src/assets/images/default-profilepic.svg @@ -0,0 +1,200 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/app/gv-new-logo.svg b/src/assets/images/gv-logo-flat.svg old mode 100644 new mode 100755 similarity index 52% rename from src/app/gv-new-logo.svg rename to src/assets/images/gv-logo-flat.svg index b1cb0cb..b23d0b4 --- a/src/app/gv-new-logo.svg +++ b/src/assets/images/gv-logo-flat.svg @@ -7,7 +7,6 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="64px" @@ -16,73 +15,9 @@ version="1.1" id="SVGRoot" inkscape:version="0.92.4 5da689c313, 2019-01-14" - sodipodi:docname="gv-new-logo.svg"> + sodipodi:docname="gv-flat-logo.svg"> - - - - - - - - - - - - - - - - + id="defs3412" /> image/svg+xml - + @@ -120,19 +55,19 @@ inkscape:label="Layer 2" style="display:inline">