remake init data
json dump
This commit is contained in:
@@ -1,10 +1,2 @@
|
||||
<app-side-bar-user
|
||||
class="pc-sidebar"
|
||||
>
|
||||
</app-side-bar-user>
|
||||
|
||||
<div class="pc-container">
|
||||
<app-breadcrumbs></app-breadcrumbs>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
|
||||
<app-inner-layout [moduleRoutes]="userRouts" [basePath]="basePath"></app-inner-layout>
|
||||
|
||||
@@ -4,43 +4,24 @@ import {MatSidenav} from '@angular/material/sidenav';
|
||||
import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
import {SideBarUserComponent} from '../side-bar-user.component/side-bar-user.component';
|
||||
import {BreadcrumbsComponent} from '../../../components/breadcrumbs.component/breadcrumbs.component';
|
||||
import {InnerLayoutComponent} from '../../../components/inner-layout.component/inner-layout.component';
|
||||
import {MODERATOR_ROUTS} from '../../moderator-module/moderator.routing';
|
||||
import {USER_ROUTS} from '../user.routing';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user.component',
|
||||
imports: [
|
||||
RouterOutlet,
|
||||
SideBarUserComponent,
|
||||
BreadcrumbsComponent
|
||||
BreadcrumbsComponent,
|
||||
InnerLayoutComponent
|
||||
],
|
||||
templateUrl: './user.component.html',
|
||||
styleUrl: './user.component.scss',
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
export class UserComponent implements OnInit {
|
||||
@ViewChild(MatSidenav)
|
||||
sidenav!: MatSidenav;
|
||||
isMobile= true;
|
||||
isCollapsed = true;
|
||||
export class UserComponent {
|
||||
|
||||
|
||||
constructor(private observer: BreakpointObserver) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.observer.observe(['(max-width: 800px)']).subscribe((screenSize) => {
|
||||
this.isMobile = screenSize.matches;
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
toggleMenu() {
|
||||
if(this.isMobile){
|
||||
this.sidenav.toggle();
|
||||
this.isCollapsed = false;
|
||||
} else {
|
||||
this.sidenav.open();
|
||||
this.isCollapsed = !this.isCollapsed;
|
||||
}
|
||||
}
|
||||
userRouts = USER_ROUTS;
|
||||
basePath = '/main/user';
|
||||
}
|
||||
|
||||
@@ -2,47 +2,47 @@ import {RouterModule, Routes} from '@angular/router';
|
||||
|
||||
import {UserComponent} from './user.component/user.component';
|
||||
|
||||
const USER_ROUTES: Routes = [
|
||||
export const USER_ROUTS: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: UserComponent,
|
||||
|
||||
data:{breadcrumb: 'User'},
|
||||
data:{title: 'User'},
|
||||
children: [
|
||||
{ path: '', pathMatch: 'full', redirectTo: 'user-welcome' }, // default redirect
|
||||
|
||||
{
|
||||
path: 'user-welcome',
|
||||
loadComponent: () => import('../user-module/user-welcome.component/user-welcome.component').then((c) => c.UserWelcomeComponent),
|
||||
data:{breadcrumb: 'Welcome'}
|
||||
data:{title: 'Welcome', icon:'dashboard', nav:true}
|
||||
},
|
||||
{
|
||||
path: 'tutorials-list',
|
||||
loadComponent: () => import('../user-module/tutorials-list.component/tutorials-list.component').then((c) => c.TutorialsListComponent),
|
||||
data:{breadcrumb: 'Tutorials List'}
|
||||
data:{title: 'Tutorials List', icon:'list', nav:true}
|
||||
},
|
||||
{
|
||||
path: 'tutorial-add',
|
||||
loadComponent: () => import('../user-module/tutorial-add.component/tutorial-add.component').then((c) => c.TutorialAddComponent),
|
||||
data:{breadcrumb: 'Add Tutorial'}
|
||||
data:{title: 'Add Tutorial'}
|
||||
},
|
||||
{
|
||||
path: 'tutorial-edit',
|
||||
loadComponent: () => import('../user-module/tutorial-edit.component/tutorial-edit.component').then((c) => c.TutorialEditComponent),
|
||||
data:{breadcrumb: 'Edit Tutorial'}
|
||||
data:{title: 'Edit Tutorial'}
|
||||
},
|
||||
{
|
||||
path: 'ai-models',
|
||||
loadComponent: () => import('../user-module/ai-models.component/ai-models.component').then((c) => c.AiModelsComponent),
|
||||
data:{breadcrumb: 'AI'}
|
||||
data:{title: 'AI'}
|
||||
},
|
||||
{
|
||||
path: 'images',
|
||||
loadComponent: () => import('../user-module/images.component/images.component').then((c) => c.ImagesComponent),
|
||||
data:{breadcrumb: 'Images'}
|
||||
data:{title: 'Images', icon: 'imagesmode', nav:true}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export const userRouting = RouterModule.forChild(USER_ROUTES);
|
||||
export const userRouting = RouterModule.forChild(USER_ROUTS);
|
||||
|
||||
Reference in New Issue
Block a user