From 9381d8c81e20933b18073d9af40471a7e2e7a14d Mon Sep 17 00:00:00 2001 From: Dmitry Nehaychik <4dmitr@gmail.com> Date: Fri, 23 Feb 2018 15:09:19 +0300 Subject: [PATCH] feat(auth): configurable auth social icons (#1545) Closes #1515 --- .angular-cli.json | 1 + package-lock.json | 5 +++++ package.json | 1 + src/app/@core/core.module.ts | 26 ++++++++++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/.angular-cli.json b/.angular-cli.json index 705b4a53e9..e460c01114 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -29,6 +29,7 @@ "../node_modules/roboto-fontface/css/roboto/roboto-fontface.css", "../node_modules/ionicons/scss/ionicons.scss", "../node_modules/font-awesome/scss/font-awesome.scss", + "../node_modules/socicon/css/socicon.css", "../node_modules/nebular-icons/scss/nebular-icons.scss", "../node_modules/pace-js/templates/pace-theme-flash.tmpl.css", "./app/@theme/styles/styles.scss" diff --git a/package-lock.json b/package-lock.json index 4461d7cde6..b1ca5e66ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11281,6 +11281,11 @@ "hoek": "2.16.3" } }, + "socicon": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/socicon/-/socicon-3.0.5.tgz", + "integrity": "sha1-v6Bvz38rbzzcOUQzd0I1jp4FC20=" + }, "socket.io": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz", diff --git a/package.json b/package.json index 8a6040db07..5b089d9c6e 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "pace-js": "1.0.2", "roboto-fontface": "0.8.0", "rxjs": "5.5.5", + "socicon": "3.0.5", "tinymce": "4.5.7", "typeface-exo": "0.0.22", "web-animations-js": "2.2.5", diff --git a/src/app/@core/core.module.ts b/src/app/@core/core.module.ts index df116eab98..7ee6cb3379 100644 --- a/src/app/@core/core.module.ts +++ b/src/app/@core/core.module.ts @@ -8,6 +8,24 @@ import { throwIfAlreadyLoaded } from './module-import-guard'; import { DataModule } from './data/data.module'; import { AnalyticsService } from './utils/analytics.service'; +const socialLinks = [ + { + url: 'https://github.com/akveo/nebular', + target: '_blank', + icon: 'socicon-github', + }, + { + url: 'https://www.facebook.com/akveo/', + target: '_blank', + icon: 'socicon-facebook', + }, + { + url: 'https://twitter.com/akveo_inc', + target: '_blank', + icon: 'socicon-twitter', + }, +]; + const NB_CORE_PROVIDERS = [ ...DataModule.forRoot().providers, ...NbAuthModule.forRoot({ @@ -22,6 +40,14 @@ const NB_CORE_PROVIDERS = [ }, }, }, + forms: { + login: { + socialLinks: socialLinks, + }, + register: { + socialLinks: socialLinks, + }, + }, }).providers, NbSecurityModule.forRoot({ accessControl: {