Rename account module to my-account
This commit is contained in:
parent
3186046d17
commit
4bb6886d28
|
@ -1 +0,0 @@
|
|||
export * from './account-change-password.component'
|
|
@ -1 +0,0 @@
|
|||
export * from './account-details.component'
|
|
@ -1,11 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="sub-menu">
|
||||
<a routerLink="/account/settings" routerLinkActive="active" class="title-page">My account</a>
|
||||
|
||||
<a routerLink="/account/videos" routerLinkActive="active" class="title-page">My videos</a>
|
||||
</div>
|
||||
|
||||
<div class="margin-content">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
|
@ -1,8 +0,0 @@
|
|||
import { Component } from '@angular/core'
|
||||
|
||||
@Component({
|
||||
selector: 'my-account',
|
||||
templateUrl: './account.component.html',
|
||||
styleUrls: [ './account.component.scss' ]
|
||||
})
|
||||
export class AccountComponent {}
|
|
@ -1,30 +0,0 @@
|
|||
import { NgModule } from '@angular/core'
|
||||
import { SharedModule } from '../shared'
|
||||
import { AccountRoutingModule } from './account-routing.module'
|
||||
import { AccountChangePasswordComponent } from './account-settings/account-change-password/account-change-password.component'
|
||||
import { AccountDetailsComponent } from './account-settings/account-details/account-details.component'
|
||||
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
||||
import { AccountComponent } from './account.component'
|
||||
import { AccountVideosComponent } from './account-videos/account-videos.component'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
AccountRoutingModule,
|
||||
SharedModule
|
||||
],
|
||||
|
||||
declarations: [
|
||||
AccountComponent,
|
||||
AccountSettingsComponent,
|
||||
AccountChangePasswordComponent,
|
||||
AccountDetailsComponent,
|
||||
AccountVideosComponent
|
||||
],
|
||||
|
||||
exports: [
|
||||
AccountComponent
|
||||
],
|
||||
|
||||
providers: []
|
||||
})
|
||||
export class AccountModule { }
|
|
@ -1,3 +0,0 @@
|
|||
export * from './account-routing.module'
|
||||
export * from './account.component'
|
||||
export * from './account.module'
|
|
@ -6,7 +6,7 @@ import { ResetPasswordModule } from '@app/reset-password'
|
|||
|
||||
import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
|
||||
|
||||
import { AccountModule } from './account'
|
||||
import { MyAccountModule } from './my-account'
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module'
|
||||
import { AppComponent } from './app.component'
|
||||
|
@ -46,7 +46,7 @@ export function metaFactory (serverService: ServerService): MetaLoader {
|
|||
|
||||
AppRoutingModule,
|
||||
|
||||
AccountModule,
|
||||
MyAccountModule,
|
||||
CoreModule,
|
||||
LoginModule,
|
||||
ResetPasswordModule,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</a>
|
||||
|
||||
<div class="logged-in-info">
|
||||
<a routerLink="/account/settings" class="logged-in-username">{{ user.username }}</a>
|
||||
<a routerLink="/my-account/settings" class="logged-in-username">{{ user.username }}</a>
|
||||
<div class="logged-in-email">{{ user.email }}</div>
|
||||
</div>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
<ul *dropdownMenu class="dropdown-menu">
|
||||
<li>
|
||||
<a i18n routerLink="/account/settings" class="dropdown-item" title="My account">
|
||||
<a i18n routerLink="/my-account/settings" class="dropdown-item" title="My account">
|
||||
My account
|
||||
</a>
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export * from './my-account-routing.module'
|
||||
export * from './my-account.component'
|
||||
export * from './my-account.module'
|
|
@ -1,22 +1,20 @@
|
|||
import { NgModule } from '@angular/core'
|
||||
import { RouterModule, Routes } from '@angular/router'
|
||||
|
||||
import { MetaGuard } from '@ngx-meta/core'
|
||||
|
||||
import { LoginGuard } from '../core'
|
||||
import { AccountComponent } from './account.component'
|
||||
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
||||
import { AccountVideosComponent } from './account-videos/account-videos.component'
|
||||
import { MyAccountComponent } from './my-account.component'
|
||||
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
||||
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
|
||||
|
||||
const accountRoutes: Routes = [
|
||||
const myAccountRoutes: Routes = [
|
||||
{
|
||||
path: 'account',
|
||||
component: AccountComponent,
|
||||
path: 'my-account',
|
||||
component: MyAccountComponent,
|
||||
canActivateChild: [ MetaGuard, LoginGuard ],
|
||||
children: [
|
||||
{
|
||||
path: 'settings',
|
||||
component: AccountSettingsComponent,
|
||||
component: MyAccountSettingsComponent,
|
||||
data: {
|
||||
meta: {
|
||||
title: 'Account settings'
|
||||
|
@ -25,7 +23,7 @@ const accountRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'videos',
|
||||
component: AccountVideosComponent,
|
||||
component: MyAccountVideosComponent,
|
||||
data: {
|
||||
meta: {
|
||||
title: 'Account videos'
|
||||
|
@ -37,7 +35,7 @@ const accountRoutes: Routes = [
|
|||
]
|
||||
|
||||
@NgModule({
|
||||
imports: [ RouterModule.forChild(accountRoutes) ],
|
||||
imports: [ RouterModule.forChild(myAccountRoutes) ],
|
||||
exports: [ RouterModule ]
|
||||
})
|
||||
export class AccountRoutingModule {}
|
||||
export class MyAccountRoutingModule {}
|
|
@ -0,0 +1 @@
|
|||
export * from './my-account-change-password.component'
|
|
@ -5,10 +5,10 @@ import { FormReactive, USER_PASSWORD, UserService } from '../../../shared'
|
|||
|
||||
@Component({
|
||||
selector: 'my-account-change-password',
|
||||
templateUrl: './account-change-password.component.html',
|
||||
styleUrls: [ './account-change-password.component.scss' ]
|
||||
templateUrl: './my-account-change-password.component.html',
|
||||
styleUrls: [ './my-account-change-password.component.scss' ]
|
||||
})
|
||||
export class AccountChangePasswordComponent extends FormReactive implements OnInit {
|
||||
export class MyAccountChangePasswordComponent extends FormReactive implements OnInit {
|
||||
error: string = null
|
||||
|
||||
form: FormGroup
|
|
@ -0,0 +1 @@
|
|||
export * from './my-account-details.component'
|
|
@ -7,11 +7,10 @@ import { FormReactive, User, UserService } from '../../../shared'
|
|||
|
||||
@Component({
|
||||
selector: 'my-account-details',
|
||||
templateUrl: './account-details.component.html',
|
||||
styleUrls: [ './account-details.component.scss' ]
|
||||
templateUrl: './my-account-details.component.html',
|
||||
styleUrls: [ './my-account-details.component.scss' ]
|
||||
})
|
||||
|
||||
export class AccountDetailsComponent extends FormReactive implements OnInit {
|
||||
export class MyAccountDetailsComponent extends FormReactive implements OnInit {
|
||||
@Input() user: User = null
|
||||
|
||||
form: FormGroup
|
|
@ -8,10 +8,10 @@ import { UserService } from '../../shared/users'
|
|||
|
||||
@Component({
|
||||
selector: 'my-account-settings',
|
||||
templateUrl: './account-settings.component.html',
|
||||
styleUrls: [ './account-settings.component.scss' ]
|
||||
templateUrl: './my-account-settings.component.html',
|
||||
styleUrls: [ './my-account-settings.component.scss' ]
|
||||
})
|
||||
export class AccountSettingsComponent implements OnInit {
|
||||
export class MyAccountSettingsComponent implements OnInit {
|
||||
@ViewChild('avatarfileInput') avatarfileInput
|
||||
|
||||
user: User = null
|
|
@ -15,12 +15,12 @@ import { VideoService } from '../../shared/video/video.service'
|
|||
|
||||
@Component({
|
||||
selector: 'my-account-videos',
|
||||
templateUrl: './account-videos.component.html',
|
||||
styleUrls: [ './account-videos.component.scss' ]
|
||||
templateUrl: './my-account-videos.component.html',
|
||||
styleUrls: [ './my-account-videos.component.scss' ]
|
||||
})
|
||||
export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||
export class MyAccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||
titlePage = 'My videos'
|
||||
currentRoute = '/account/videos'
|
||||
currentRoute = '/my-account/videos'
|
||||
checkedVideos: { [ id: number ]: boolean } = {}
|
||||
pagination: ComponentPagination = {
|
||||
currentPage: 1,
|
|
@ -0,0 +1,11 @@
|
|||
<div class="row">
|
||||
<div class="sub-menu">
|
||||
<a routerLink="/my-account/settings" routerLinkActive="active" class="title-page">My account</a>
|
||||
|
||||
<a routerLink="/my-account/videos" routerLinkActive="active" class="title-page">My videos</a>
|
||||
</div>
|
||||
|
||||
<div class="margin-content">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
import { Component } from '@angular/core'
|
||||
|
||||
@Component({
|
||||
selector: 'my-account',
|
||||
templateUrl: './my-account.component.html'
|
||||
})
|
||||
export class MyAccountComponent {}
|
|
@ -0,0 +1,30 @@
|
|||
import { NgModule } from '@angular/core'
|
||||
import { SharedModule } from '../shared'
|
||||
import { MyAccountRoutingModule } from './my-account-routing.module'
|
||||
import { MyAccountChangePasswordComponent } from './my-account-settings/my-account-change-password/my-account-change-password.component'
|
||||
import { MyAccountDetailsComponent } from './my-account-settings/my-account-details/my-account-details.component'
|
||||
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
||||
import { MyAccountComponent } from './my-account.component'
|
||||
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
MyAccountRoutingModule,
|
||||
SharedModule
|
||||
],
|
||||
|
||||
declarations: [
|
||||
MyAccountComponent,
|
||||
MyAccountSettingsComponent,
|
||||
MyAccountChangePasswordComponent,
|
||||
MyAccountDetailsComponent,
|
||||
MyAccountVideosComponent
|
||||
],
|
||||
|
||||
exports: [
|
||||
MyAccountComponent
|
||||
],
|
||||
|
||||
providers: []
|
||||
})
|
||||
export class MyAccountModule { }
|
Loading…
Reference in New Issue