forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KEYCLOAK-7334: Update vertical na/Integrate patternfly-ng (keycloak#5241
- Loading branch information
Showing
22 changed files
with
916 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
473 changes: 237 additions & 236 deletions
473
themes/src/main/resources/theme/keycloak-preview/account/index.ftl
Large diffs are not rendered by default.
Oops, something went wrong.
92 changes: 47 additions & 45 deletions
92
themes/src/main/resources/theme/keycloak-preview/account/resources/app/app-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
/* | ||
* Copyright 2018 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import {KeycloakGuard} from './keycloak-service/keycloak.guard'; | ||
|
||
import { HomePageComponent } from './content/home-page/home-page.component'; | ||
|
||
declare const resourceUrl: string; | ||
|
||
export const routes: Routes = [ | ||
{path: '', canActivateChild:[KeycloakGuard], children: [ | ||
{ path: 'account', loadChildren: resourceUrl + '/app/content/account-page/account.module.js#AccountModule' }, | ||
{ path: 'password', loadChildren: resourceUrl + '/app/content/password-page/password.module.js#PasswordModule' }, | ||
{ path: 'authenticator', loadChildren: resourceUrl + '/app/content/authenticator-page/authenticator.module.js#AuthenticatorModule' }, | ||
{ path: 'device-activity', loadChildren: resourceUrl + '/app/content/device-activity-page/device-activity.module.js#DeviceActivityModule' }, | ||
{ path: 'sessions', loadChildren: resourceUrl + '/app/content/sessions-page/sessions.module.js#SessionsModule' }, | ||
{ path: 'applications', loadChildren: resourceUrl + '/app/content/applications-page/applications.module.js#ApplicationsModule' }, | ||
{ path: ':**', loadChildren: resourceUrl + '/app/content/page-not-found/page-not-found.module.js#PageNotFoundModule' }, | ||
] | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forRoot(routes)], | ||
exports: [RouterModule], | ||
declarations: [HomePageComponent] | ||
}) | ||
export class AppRoutingModule {} | ||
|
||
/* | ||
* Copyright 2018 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import {KeycloakGuard} from './keycloak-service/keycloak.guard'; | ||
|
||
import { HomePageComponent } from './content/home-page/home-page.component'; | ||
|
||
declare const resourceUrl: string; | ||
|
||
export const routes: Routes = [ | ||
{path: '', canActivateChild:[KeycloakGuard], children: [ | ||
{ path: 'account', loadChildren: resourceUrl + '/app/content/account-page/account.module.js#AccountModule' }, | ||
{ path: 'password', loadChildren: resourceUrl + '/app/content/password-page/password.module.js#PasswordModule' }, | ||
{ path: 'authenticator', loadChildren: resourceUrl + '/app/content/authenticator-page/authenticator.module.js#AuthenticatorModule' }, | ||
{ path: 'device-activity', loadChildren: resourceUrl + '/app/content/device-activity-page/device-activity.module.js#DeviceActivityModule' }, | ||
{ path: 'sessions', loadChildren: resourceUrl + '/app/content/sessions-page/sessions.module.js#SessionsModule' }, | ||
{ path: 'applications', loadChildren: resourceUrl + '/app/content/applications-page/applications.module.js#ApplicationsModule' }, | ||
{ path: 'linked-accounts', loadChildren: resourceUrl + '/app/content/linked-accounts-page/linked-accounts.module.js#LinkedAccountsModule' }, | ||
{ path: 'my-resources', loadChildren: resourceUrl + '/app/content/my-resources-page/my-resources.module.js#MyResourcesModule' }, | ||
{ path: ':**', loadChildren: resourceUrl + '/app/content/page-not-found/page-not-found.module.js#PageNotFoundModule' }, | ||
] | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forRoot(routes)], | ||
exports: [RouterModule], | ||
declarations: [HomePageComponent] | ||
}) | ||
export class AppRoutingModule {} | ||
|
9 changes: 6 additions & 3 deletions
9
themes/src/main/resources/theme/keycloak-preview/account/resources/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<div *ngIf="kcService.authenticated()"> | ||
<!--<div *ngIf="kcService.authenticated()"> | ||
<app-top-nav [showSideNav]="showSideNav"></app-top-nav> | ||
</div> | ||
<app-side-nav *ngIf="showSideNav"></app-side-nav> | ||
<div class="container-fluid container-pf-alt-nav-pf-vertical-alt {{this.contentWidthClass}}"> <!-- collapsed-nav hidden-nav --> | ||
<div class="container-fluid container-pf-alt-nav-pf-vertical-alt {{this.contentWidthClass}}"> <!-- collapsed-nav hidden-nav | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div>--> | ||
|
||
|
||
<vertical-nav *ngIf="showSideNav"></vertical-nav> |
161 changes: 83 additions & 78 deletions
161
themes/src/main/resources/theme/keycloak-preview/account/resources/app/app.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,83 @@ | ||
/* | ||
* Copyright 2017 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { HttpModule } from '@angular/http'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { LocationStrategy, HashLocationStrategy } from '@angular/common'; | ||
|
||
import { TranslateLoader } from '@ngx-translate/core'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
import { KeycloakService } from './keycloak-service/keycloak.service'; | ||
import { KEYCLOAK_HTTP_PROVIDER } from './keycloak-service/keycloak.http'; | ||
import {KeycloakGuard} from './keycloak-service/keycloak.guard'; | ||
|
||
import {ResponsivenessService} from './responsiveness-service/responsiveness.service' | ||
|
||
import { AccountServiceClient } from './account-service/account.service'; | ||
import {TranslateUtil} from './ngx-translate/translate.util'; | ||
|
||
import { DeclaredVarTranslateLoader } from './ngx-translate/declared.var.translate.loader'; | ||
import { AppComponent } from './app.component'; | ||
import { TopNavComponent } from './top-nav/top-nav.component'; | ||
import { NotificationComponent } from './top-nav/notification.component'; | ||
import { ToastNotifier } from './top-nav/toast.notifier'; | ||
import { SideNavComponent } from './side-nav/side-nav.component'; | ||
|
||
/* Routing Module */ | ||
import { AppRoutingModule } from './app-routing.module'; | ||
|
||
const decs = [ | ||
AppComponent, | ||
TopNavComponent, | ||
NotificationComponent, | ||
SideNavComponent, | ||
]; | ||
|
||
export const ORIGINAL_INCOMING_URL: Location = window.location; | ||
|
||
@NgModule({ | ||
declarations: decs, | ||
imports: [ | ||
BrowserModule, | ||
FormsModule, | ||
HttpModule, | ||
TranslateModule.forRoot({ | ||
loader: {provide: TranslateLoader, useClass: DeclaredVarTranslateLoader} | ||
}), | ||
AppRoutingModule, | ||
], | ||
providers: [ | ||
KeycloakService, | ||
KeycloakGuard, | ||
KEYCLOAK_HTTP_PROVIDER, | ||
ResponsivenessService, | ||
AccountServiceClient, | ||
TranslateUtil, | ||
ToastNotifier, | ||
{ provide: LocationStrategy, useClass: HashLocationStrategy } | ||
], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } | ||
/* | ||
* Copyright 2017 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { HttpModule } from '@angular/http'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { LocationStrategy, HashLocationStrategy } from '@angular/common'; | ||
|
||
import { TranslateLoader } from '@ngx-translate/core'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
import { KeycloakService } from './keycloak-service/keycloak.service'; | ||
import { KEYCLOAK_HTTP_PROVIDER } from './keycloak-service/keycloak.http'; | ||
import {KeycloakGuard} from './keycloak-service/keycloak.guard'; | ||
|
||
import {ResponsivenessService} from './responsiveness-service/responsiveness.service' | ||
|
||
import { AccountServiceClient } from './account-service/account.service'; | ||
import {TranslateUtil} from './ngx-translate/translate.util'; | ||
|
||
import { DeclaredVarTranslateLoader } from './ngx-translate/declared.var.translate.loader'; | ||
import { AppComponent } from './app.component'; | ||
import { TopNavComponent } from './top-nav/top-nav.component'; | ||
import { NotificationComponent } from './top-nav/notification.component'; | ||
import { ToastNotifier } from './top-nav/toast.notifier'; | ||
import { SideNavComponent } from './side-nav/side-nav.component'; | ||
import {VerticalNavComponent} from './vertical-nav/vertical-nav.component'; | ||
|
||
import { NavigationModule } from 'patternfly-ng/navigation'; | ||
|
||
/* Routing Module */ | ||
import { AppRoutingModule } from './app-routing.module'; | ||
|
||
const decs = [ | ||
AppComponent, | ||
TopNavComponent, | ||
NotificationComponent, | ||
SideNavComponent, | ||
VerticalNavComponent, | ||
]; | ||
|
||
export const ORIGINAL_INCOMING_URL: Location = window.location; | ||
|
||
@NgModule({ | ||
declarations: decs, | ||
imports: [ | ||
BrowserModule, | ||
FormsModule, | ||
HttpModule, | ||
NavigationModule, | ||
TranslateModule.forRoot({ | ||
loader: {provide: TranslateLoader, useClass: DeclaredVarTranslateLoader} | ||
}), | ||
AppRoutingModule, | ||
], | ||
providers: [ | ||
KeycloakService, | ||
KeycloakGuard, | ||
KEYCLOAK_HTTP_PROVIDER, | ||
ResponsivenessService, | ||
AccountServiceClient, | ||
TranslateUtil, | ||
ToastNotifier, | ||
{ provide: LocationStrategy, useClass: HashLocationStrategy } | ||
], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
Empty file.
1 change: 1 addition & 0 deletions
1
...ew/account/resources/app/content/linked-accounts-page/linked-accounts-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Placeholder for Linked Accounts Page (formerly known as Federated Identity)</h1> |
32 changes: 32 additions & 0 deletions
32
...view/account/resources/app/content/linked-accounts-page/linked-accounts-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2018 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import {Component, OnInit} from '@angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-linked-accounts-page', | ||
templateUrl: './linked-accounts-page.component.html', | ||
styleUrls: ['./linked-accounts-page.component.css'] | ||
}) | ||
export class LinkedAccountsPageComponent implements OnInit { | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...view/account/resources/app/content/linked-accounts-page/linked-accounts-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2018 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { LinkedAccountsPageComponent } from './linked-accounts-page.component'; | ||
|
||
const routes: Routes = [ | ||
{ path: '**', component: LinkedAccountsPageComponent }, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class LinkedAccountsRoutingModule {} | ||
|
34 changes: 34 additions & 0 deletions
34
...loak-preview/account/resources/app/content/linked-accounts-page/linked-accounts.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2018 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
import { LinkedAccountsPageComponent } from './linked-accounts-page.component'; | ||
import { LinkedAccountsRoutingModule } from './linked-accounts-routing.module'; | ||
|
||
@NgModule({ | ||
imports: [ CommonModule, FormsModule, TranslateModule, LinkedAccountsRoutingModule ], | ||
declarations: [ LinkedAccountsPageComponent ], | ||
providers: [ ] | ||
}) | ||
export class LinkedAccountsModule {} | ||
|
||
|
||
|
Empty file.
1 change: 1 addition & 0 deletions
1
...-preview/account/resources/app/content/my-resources-page/my-resources-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Placeholder for My Resources Page</h1> |
Oops, something went wrong.