Skip to content

Commit

Permalink
Migrate to latest Play version - addresses #92
Browse files Browse the repository at this point in the history
Fixes admin app.
  • Loading branch information
resamsel committed Oct 3, 2020
1 parent 85dfd1c commit d80f94e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 46 deletions.
1 change: 0 additions & 1 deletion ui/apps/translatr-admin/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { AppFacade } from './+state/app.facade';
})
export class AppComponent {
constructor(readonly facade: AppFacade, readonly translocoService: TranslocoService) {
facade.loadMe();
facade.me$
.pipe(filter(x => !!x && !!x.preferredLanguage))
.subscribe(me => translocoService.setActiveLang(me.preferredLanguage));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,59 @@ export const routes: Routes = [
{
component: DashboardPageComponent,
path: '',
canActivate: [AuthGuard]
},
{
component: DashboardInfoComponent,
path: '',
data: {
icon: 'view_quilt',
name: 'Dashboard'
}
},
{
path: 'users',
data: {
icon: 'group',
name: 'Users'
},
canActivate: [AuthGuard],
children: [
{
component: DashboardUsersComponent,
path: ''
component: DashboardInfoComponent,
path: '',
data: {
icon: 'view_quilt',
name: 'Dashboard'
}
},
{
path: 'users',
data: {
icon: 'group',
name: 'Users'
},
children: [
{
component: DashboardUsersComponent,
path: '',
pathMatch: 'full'
},
{
component: DashboardUserComponent,
path: ':id'
}
]
},
{
component: DashboardProjectsComponent,
path: 'projects',
data: {
icon: 'library_books',
name: 'Projects'
}
},
{
component: DashboardAccessTokensComponent,
path: 'accesstokens',
data: {
icon: 'vpn_key',
name: 'Access Tokens'
}
},
{
component: DashboardUserComponent,
path: ':id'
component: DashboardFeatureFlagsComponent,
path: 'featureflags',
data: {
icon: 'flag',
name: 'Feature Flags'
}
}
]
},
{
component: DashboardProjectsComponent,
path: 'projects',
data: {
icon: 'library_books',
name: 'Projects'
}
},
{
component: DashboardAccessTokensComponent,
path: 'accesstokens',
data: {
icon: 'vpn_key',
name: 'Access Tokens'
}
},
{
component: DashboardFeatureFlagsComponent,
path: 'featureflags',
data: {
icon: 'flag',
name: 'Feature Flags'
}
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class DashboardPageComponent {
constructor(
private readonly facade: AppFacade,
private readonly router: Router,
@Inject(DASHBOARD_ROUTES) private routes: Array<{ children: NameIconRoute[] }>
@Inject(DASHBOARD_ROUTES) private routes: Array<NameIconRoute>
) {}

routerLink(route: Route) {
Expand Down
1 change: 1 addition & 0 deletions ui/libs/utils/src/lib/routing/name-icon-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface NameIconRoute extends Route {
icon: string;
name: string;
};
children: Array<NameIconRoute>;
}

0 comments on commit d80f94e

Please sign in to comment.