From dbd5b232665f902a011f5447c7eaa61cb5db6f76 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 2 Nov 2016 22:52:41 +0100 Subject: [PATCH] Title handling improved. --- .../Identity/IdentityServices.cs | 1 - src/Squidex/Startup.cs | 3 +- .../app-libs/icomoon/fonts/icomoon.eot | Bin 0 -> 1804 bytes .../app-libs/icomoon/fonts/icomoon.svg | 12 +++ .../app-libs/icomoon/fonts/icomoon.ttf | Bin 0 -> 1640 bytes .../app-libs/icomoon/fonts/icomoon.woff | Bin 0 -> 1716 bytes src/Squidex/app-libs/icomoon/selection.json | 101 ++++++++++++++++++ src/Squidex/app-libs/icomoon/style.css | 33 ++++++ src/Squidex/app/app.component.html | 4 +- src/Squidex/app/app.component.scss | 8 ++ src/Squidex/app/app.module.ts | 6 +- src/Squidex/app/app.routes.ts | 11 +- .../components/apps/apps-page.component.html | 2 +- .../components/apps/apps-page.component.ts | 17 ++- .../components/auth/login-page.component.ts | 13 ++- .../components/auth/logout-page.component.ts | 7 +- .../layout/apps-menu.component.html | 15 +-- .../layout/apps-menu.component.scss | 32 ++++++ .../components/layout/apps-menu.component.ts | 27 ++++- .../app/components/layout/declarations.ts | 1 + .../app/components/layout/layout.module.ts | 2 + .../layout/not-found-page.component.html | 3 + .../layout/not-found-page.component.ts | 25 +++++ .../app/framework/angular/animations.ts | 2 +- .../framework/services/title.service.spec.ts | 22 +++- .../app/framework/services/title.service.ts | 26 +++-- .../app/shared/services/auth.service.ts | 23 +++- src/Squidex/app/theme/_bootstrap.scss | 6 +- src/Squidex/app/theme/_vars.scss | 2 + src/Squidex/app/theme/vendor.scss | 5 +- src/Squidex/wwwroot/index.html | 4 +- 31 files changed, 366 insertions(+), 47 deletions(-) create mode 100644 src/Squidex/app-libs/icomoon/fonts/icomoon.eot create mode 100644 src/Squidex/app-libs/icomoon/fonts/icomoon.svg create mode 100644 src/Squidex/app-libs/icomoon/fonts/icomoon.ttf create mode 100644 src/Squidex/app-libs/icomoon/fonts/icomoon.woff create mode 100644 src/Squidex/app-libs/icomoon/selection.json create mode 100644 src/Squidex/app-libs/icomoon/style.css create mode 100644 src/Squidex/app/components/layout/not-found-page.component.html create mode 100644 src/Squidex/app/components/layout/not-found-page.component.ts diff --git a/src/Squidex/Configurations/Identity/IdentityServices.cs b/src/Squidex/Configurations/Identity/IdentityServices.cs index 27e3522ff..2b759c8f6 100644 --- a/src/Squidex/Configurations/Identity/IdentityServices.cs +++ b/src/Squidex/Configurations/Identity/IdentityServices.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Reflection; using System.Security.Cryptography.X509Certificates; -using IdentityServer4.Configuration; using IdentityServer4.Models; using IdentityServer4.Stores; using IdentityServer4.Stores.InMemory; diff --git a/src/Squidex/Startup.cs b/src/Squidex/Startup.cs index 3c6eac834..ffb910f47 100644 --- a/src/Squidex/Startup.cs +++ b/src/Squidex/Startup.cs @@ -7,7 +7,6 @@ // ========================================================================== using System; -using System.Collections.Generic; using Autofac; using Autofac.Extensions.DependencyInjection; using Microsoft.AspNetCore.Builder; @@ -101,6 +100,8 @@ namespace Squidex UseIdentity(app); UseApi(app); UseFrontend(app); + + app.UseMyEventStore(); } private void UseIdentity(IApplicationBuilder app) diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.eot b/src/Squidex/app-libs/icomoon/fonts/icomoon.eot new file mode 100644 index 0000000000000000000000000000000000000000..5582d0e6daab86492c0b997c28301d1841521479 GIT binary patch literal 1804 zcmai#OK)366vxk*xxP>9+KwM_BHO*rQ>rS*j$c7gH>;4Ot*AoCGT60^6J+~Fjw2AVHcX0d>Q=^ zoKqbAIU0GroKx^Lj(!_gsNebbA|O$ra~>^@>RTT25BGoGqtP?oGsx={GVlh!%6izu`DwGT5Ql+?1|?m}7a}*&qvMe!jK>l* zil3`i=H};A8k!s$L{sNzG|8s15YNX7XLPZKSI{z1na}YugVp+WLb-vg6i`<+GpI#_ zkq}oj(`33nX(q=EW5H1jWn#+A*x{fR*6k~itR;|O*v?ql3F_l47-lqSPU<={O-r*ac0e3w^=wkU9Ij;Ia=0G6~-cloznHB zVK6OPyOx?&Fr+7MDL8>v$hKav87rWmpwgP4xE`%#(z6^ThNP@e$olIQDz}n)2$9dG zGqtGB4I`;*Y1@b}Tg%4qhV&RyK6II zT_HS&hx|JGm3BK|HZmQ_ma~y!B+IXlU~@$IO_C#kbmn{av^36mt2?kM2u*U21N$ zI|tpy;NqQdDY@eIhfb&6Zx0&7cFVbc + + +Generated by IcoMoon + + + + + + + + \ No newline at end of file diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.ttf b/src/Squidex/app-libs/icomoon/fonts/icomoon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7d0e40d6d8ba3545fbeec24bdd39b6ffbb85d9cd GIT binary patch literal 1640 zcmah}&2Jk;6n}4Ky`R>u9e>1$YdMJl-Kpc9k_zO7X#s!3gO8)_b)Tn1p6__`>6Ja0`&zhaz`@P?r_jWxqfB;~@ z1K?12_q~->XDal7nD1yb+x^zj^zP4}0brW^oo?&+h~^0SV%EF8vk$-e`pZ4?PXXA| zgHCJTvUcAFP=vmEK!ld(-;=*X{=z|jbZP^BL_X;u)$`gd{21RM{}K6izjb;9I{ZZb zH{`p6R=@LP%Xm%xIo0^|$U7cUpJeK$hy&;E<0A-B?I-L9V!jAwd<7*mgl@u++Wx1l z16&|KAD_cIr$IsSEiTRVfv6@%nqtAseN`G1SR>w~ei{7`+zTB4F&_I_?gjW5$G=W1 zlsCC90+Py^;21#d4PWxN?*F*Qr!#%-plNzKOTEKVolDxu{(E-zJUbpd2x zHCb8}Or=mRR*IE!wX~Yd;C1RON_DwVjNV3HortbsBA%owL9A9?T3%AAG%-{}QQWuAQOiJeInOH$Hk*4%#D|n6Z>OtLw}(HHACTa7+uE5lcwSIVmxw{woRH z4TVaK-BJ>J%?5vl3k`3}W|7!@t#&x)YB@ty7>gQqTGvyC!L(TYMtV^}M^D{Ra0V^M zwqCLYE2N-MWi+AUdaRz!EOL}GBxE^`_2+9;?xb`FkuPSl^_b2LBc*E@+lVscs_AMk zO_I^FflOIU->AnlCRBP_sFp`fmaRv)qYvAJ91njPm?* zMTbNf?@jFXK%oYaz!7QWKc?}*XH1Ag7T0i_Jkf&+Kgty@EBG?`u;E)7MbKmhT?vGn zlIMi05-WsHBo5KHNJy*_e^+7?X5n*jZWV(Vn<4>bgu4=R!nY+>2!A4R2$DcIlb@>+ zzb&x|Wq5kn_WGVTfJ1152YnhI40b!i<3n%Y7V`zzg$@kim;@A{b&8OO!j)N9lG~l` zNv}1eq8)1V1bWbd;g!k_Z!mJZok3^V8g=&F`)6*W?cJl^^04989#Qo!Ei>>tYQc!+ aed6xJ89f{R3)~A{fO-sW$;p4^U-&PE&d((P literal 0 HcmV?d00001 diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.woff b/src/Squidex/app-libs/icomoon/fonts/icomoon.woff new file mode 100644 index 0000000000000000000000000000000000000000..673b29bdeb9805d584d75dfdfbcdffaa7d64b9f2 GIT binary patch literal 1716 zcmah}O>7%Q6n<}Jyua4kj(_4rw!6-+R8@{0{{=zaoJ^BaRSF@;U^g*#knOD;M>L27 zy&%K|4&hJ^h(nJRCypF?K;i;ILZv5e2&olZIaOfZ>`ox4i5Tn6eD8bTn>Vw5yYJj; zHUWW#_7&Lv+6#P%|2uBIzOo8{2C*$^k*U!8dxQ2J;(Fw7OPk*L@xyNWP;y_BFSXL5 z-Tv`g#C-$69!UG_^G|nso%TL}khwK!w!QOek4WOaAb&xcUf|#M2IITLQ7)vVIe>5X zy*;V>nS4hYzKgF7+IOk0_?>*$Hv@hcwg(-6P?&0eAnpF9`TUM|IHvoa{G;Q9IDZ2_ zfe@YTKKqXRkAoF|gEE@rpB)%I>q)#0@C^B*$s<_jWW*rZ>2Q7ES0R+4n8X>Hr78mg z)@ZfpNiq5%xX*C%=VU@05C$LP3{40A9pf&%=`Qy z(5*4yFkMUO4o>HAI+@T2Ef;Wksa9`DpaQF@@~UL2#Y(AKs#a>{)l?QQQs+>qE5%am zD*EbVYz>o%6jcdg_1e<%l18P8p(47rMAeiwi=|{SQ94zZ8+d_Q1!~I$US)8-wVM)G zkX1t3b=?Z<@o+4{g>G5QFlMdvlxeQG!W1)eR?dlr?Wo~gD9PJW5{^1KJ3m7??uu!} z)7GqEFw4>fkHo@pJ#0m7DY531#GHCj61ouzl^MGtlDn-9{ty>7yiJEi?irfz - Squidex + + +
diff --git a/src/Squidex/app/app.component.scss b/src/Squidex/app/app.component.scss index 01319f4c0..c38a19956 100644 --- a/src/Squidex/app/app.component.scss +++ b/src/Squidex/app/app.component.scss @@ -4,6 +4,14 @@ @include box-shadow(0, 4px, 4px, 0.2px); } +.navbar-brand { + padding-top: 0; + padding-bottom: 0; + margin-top: -0.2rem; + margin-bottom: -0.2rem; + font-size: 1.8rem; +} + .search-form { margin-left: 15px; } diff --git a/src/Squidex/app/app.module.ts b/src/Squidex/app/app.module.ts index 01b21d2b1..8a5387725 100644 --- a/src/Squidex/app/app.module.ts +++ b/src/Squidex/app/app.module.ts @@ -16,6 +16,8 @@ import { DragService, DragServiceFactory, DecimalSeparatorConfig, + TitlesConfig, + TitleService } from './framework'; import { @@ -54,10 +56,12 @@ const baseUrl = window.location.protocol + '//' + window.location.host + '/'; AppsService, AuthGuard, AuthService, + TitleService, { provide: ApiUrlConfig, useValue: new ApiUrlConfig(baseUrl) }, { provide: CurrencyConfig, useValue: new CurrencyConfig('EUR', '€', true) }, { provide: DecimalSeparatorConfig, useValue: new DecimalSeparatorConfig('.') }, - { provide: DragService, useFactory: DragServiceFactory } + { provide: DragService, useFactory: DragServiceFactory }, + { provide: TitlesConfig, useValue: new TitlesConfig({}, null, 'Squidex Headless CMS') } ], bootstrap: [AppComponent] }) diff --git a/src/Squidex/app/app.routes.ts b/src/Squidex/app/app.routes.ts index c8595ebd7..488d89d5d 100644 --- a/src/Squidex/app/app.routes.ts +++ b/src/Squidex/app/app.routes.ts @@ -11,7 +11,8 @@ import * as Ng2Router from '@angular/router'; import { AppsPageComponent, LoginPageComponent, - LogoutPageComponent + LogoutPageComponent, + NotFoundPageComponent } from './components'; import { @@ -36,6 +37,14 @@ export const routes: Ng2Router.Routes = [ { path: 'logout', component: LogoutPageComponent + }, + { + path: '404', + component: NotFoundPageComponent + }, + { + path: '**', + component: NotFoundPageComponent } ]; diff --git a/src/Squidex/app/components/apps/apps-page.component.html b/src/Squidex/app/components/apps/apps-page.component.html index 26449ea61..4f5ce2c4f 100644 --- a/src/Squidex/app/components/apps/apps-page.component.html +++ b/src/Squidex/app/components/apps/apps-page.component.html @@ -2,7 +2,7 @@

You are not collaborating to any app yet

- +
diff --git a/src/Squidex/app/components/apps/apps-page.component.ts b/src/Squidex/app/components/apps/apps-page.component.ts index 3a4bb1aff..41d26567a 100644 --- a/src/Squidex/app/components/apps/apps-page.component.ts +++ b/src/Squidex/app/components/apps/apps-page.component.ts @@ -7,7 +7,11 @@ import * as Ng2 from '@angular/core'; -import { fadeAnimation, ModalView } from './../../framework'; +import { + fadeAnimation, + ModalView, + TitleService +} from './../../framework'; @Ng2.Component({ selector: 'sqx-apps-page', @@ -17,6 +21,15 @@ import { fadeAnimation, ModalView } from './../../framework'; fadeAnimation() ] }) -export class AppsPageComponent { +export class AppsPageComponent implements Ng2.OnInit { public modalDialog = new ModalView(); + + constructor( + private readonly title: TitleService + ) { + } + + public ngOnInit() { + this.title.setTitle('Apps'); + } } \ No newline at end of file diff --git a/src/Squidex/app/components/auth/login-page.component.ts b/src/Squidex/app/components/auth/login-page.component.ts index 552fe816b..bfa8d59b9 100644 --- a/src/Squidex/app/components/auth/login-page.component.ts +++ b/src/Squidex/app/components/auth/login-page.component.ts @@ -10,27 +10,30 @@ import * as Ng2Router from '@angular/router'; import { AuthService } from './../../shared'; +import { TitleService } from './../../framework'; + @Ng2.Component({ selector: 'login', - template: '' + template }) export class LoginPageComponent implements Ng2.OnInit { public showError = false; constructor( private readonly authService: AuthService, - private readonly router: Ng2Router.Router + private readonly router: Ng2Router.Router, + private readonly title: TitleService, ) { } public ngOnInit() { this.authService.loginComplete().subscribe( () => { - debugger; - this.router.navigate(['/']); + this.router.navigate(['/'], { replaceUrl: true }); }, e => { - debugger; + this.title.setTitle('Login failed'); + this.showError = true; } ); diff --git a/src/Squidex/app/components/auth/logout-page.component.ts b/src/Squidex/app/components/auth/logout-page.component.ts index 37eb393e2..b93b01dbf 100644 --- a/src/Squidex/app/components/auth/logout-page.component.ts +++ b/src/Squidex/app/components/auth/logout-page.component.ts @@ -12,10 +12,9 @@ import { AuthService } from './../../shared'; @Ng2.Component({ selector: 'logout', - template: '' + template }) export class LogoutPageComponent implements Ng2.OnInit { - public showFailedError = false; constructor( private readonly authService: AuthService, @@ -26,10 +25,10 @@ export class LogoutPageComponent implements Ng2.OnInit { public ngOnInit() { this.authService.logoutComplete().subscribe( () => { - this.router.navigate(['/']); + this.router.navigate(['/'], { replaceUrl: true }); }, () => { - this.showFailedError = true; + this.router.navigate(['/'], { replaceUrl: true }); } ); } diff --git a/src/Squidex/app/components/layout/apps-menu.component.html b/src/Squidex/app/components/layout/apps-menu.component.html index d61412a7f..96969fb5f 100644 --- a/src/Squidex/app/components/layout/apps-menu.component.html +++ b/src/Squidex/app/components/layout/apps-menu.component.html @@ -1,20 +1,21 @@