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 { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
|
||||||
|
|
||||||
import { AccountModule } from './account'
|
import { MyAccountModule } from './my-account'
|
||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module'
|
import { AppRoutingModule } from './app-routing.module'
|
||||||
import { AppComponent } from './app.component'
|
import { AppComponent } from './app.component'
|
||||||
|
@ -46,7 +46,7 @@ export function metaFactory (serverService: ServerService): MetaLoader {
|
||||||
|
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
|
|
||||||
AccountModule,
|
MyAccountModule,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
LoginModule,
|
LoginModule,
|
||||||
ResetPasswordModule,
|
ResetPasswordModule,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="logged-in-info">
|
<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 class="logged-in-email">{{ user.email }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<ul *dropdownMenu class="dropdown-menu">
|
<ul *dropdownMenu class="dropdown-menu">
|
||||||
<li>
|
<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
|
My account
|
||||||
</a>
|
</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 { NgModule } from '@angular/core'
|
||||||
import { RouterModule, Routes } from '@angular/router'
|
import { RouterModule, Routes } from '@angular/router'
|
||||||
|
|
||||||
import { MetaGuard } from '@ngx-meta/core'
|
import { MetaGuard } from '@ngx-meta/core'
|
||||||
|
|
||||||
import { LoginGuard } from '../core'
|
import { LoginGuard } from '../core'
|
||||||
import { AccountComponent } from './account.component'
|
import { MyAccountComponent } from './my-account.component'
|
||||||
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
||||||
import { AccountVideosComponent } from './account-videos/account-videos.component'
|
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
|
||||||
|
|
||||||
const accountRoutes: Routes = [
|
const myAccountRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'account',
|
path: 'my-account',
|
||||||
component: AccountComponent,
|
component: MyAccountComponent,
|
||||||
canActivateChild: [ MetaGuard, LoginGuard ],
|
canActivateChild: [ MetaGuard, LoginGuard ],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'settings',
|
path: 'settings',
|
||||||
component: AccountSettingsComponent,
|
component: MyAccountSettingsComponent,
|
||||||
data: {
|
data: {
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Account settings'
|
title: 'Account settings'
|
||||||
|
@ -25,7 +23,7 @@ const accountRoutes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'videos',
|
path: 'videos',
|
||||||
component: AccountVideosComponent,
|
component: MyAccountVideosComponent,
|
||||||
data: {
|
data: {
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Account videos'
|
title: 'Account videos'
|
||||||
|
@ -37,7 +35,7 @@ const accountRoutes: Routes = [
|
||||||
]
|
]
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ RouterModule.forChild(accountRoutes) ],
|
imports: [ RouterModule.forChild(myAccountRoutes) ],
|
||||||
exports: [ RouterModule ]
|
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({
|
@Component({
|
||||||
selector: 'my-account-change-password',
|
selector: 'my-account-change-password',
|
||||||
templateUrl: './account-change-password.component.html',
|
templateUrl: './my-account-change-password.component.html',
|
||||||
styleUrls: [ './account-change-password.component.scss' ]
|
styleUrls: [ './my-account-change-password.component.scss' ]
|
||||||
})
|
})
|
||||||
export class AccountChangePasswordComponent extends FormReactive implements OnInit {
|
export class MyAccountChangePasswordComponent extends FormReactive implements OnInit {
|
||||||
error: string = null
|
error: string = null
|
||||||
|
|
||||||
form: FormGroup
|
form: FormGroup
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './my-account-details.component'
|
|
@ -7,11 +7,10 @@ import { FormReactive, User, UserService } from '../../../shared'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-details',
|
selector: 'my-account-details',
|
||||||
templateUrl: './account-details.component.html',
|
templateUrl: './my-account-details.component.html',
|
||||||
styleUrls: [ './account-details.component.scss' ]
|
styleUrls: [ './my-account-details.component.scss' ]
|
||||||
})
|
})
|
||||||
|
export class MyAccountDetailsComponent extends FormReactive implements OnInit {
|
||||||
export class AccountDetailsComponent extends FormReactive implements OnInit {
|
|
||||||
@Input() user: User = null
|
@Input() user: User = null
|
||||||
|
|
||||||
form: FormGroup
|
form: FormGroup
|
|
@ -8,10 +8,10 @@ import { UserService } from '../../shared/users'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-settings',
|
selector: 'my-account-settings',
|
||||||
templateUrl: './account-settings.component.html',
|
templateUrl: './my-account-settings.component.html',
|
||||||
styleUrls: [ './account-settings.component.scss' ]
|
styleUrls: [ './my-account-settings.component.scss' ]
|
||||||
})
|
})
|
||||||
export class AccountSettingsComponent implements OnInit {
|
export class MyAccountSettingsComponent implements OnInit {
|
||||||
@ViewChild('avatarfileInput') avatarfileInput
|
@ViewChild('avatarfileInput') avatarfileInput
|
||||||
|
|
||||||
user: User = null
|
user: User = null
|
|
@ -15,12 +15,12 @@ import { VideoService } from '../../shared/video/video.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-videos',
|
selector: 'my-account-videos',
|
||||||
templateUrl: './account-videos.component.html',
|
templateUrl: './my-account-videos.component.html',
|
||||||
styleUrls: [ './account-videos.component.scss' ]
|
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'
|
titlePage = 'My videos'
|
||||||
currentRoute = '/account/videos'
|
currentRoute = '/my-account/videos'
|
||||||
checkedVideos: { [ id: number ]: boolean } = {}
|
checkedVideos: { [ id: number ]: boolean } = {}
|
||||||
pagination: ComponentPagination = {
|
pagination: ComponentPagination = {
|
||||||
currentPage: 1,
|
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