Skip to content

Commit

Permalink
Merge pull request #40 from restorecommerce/feature/account-profile-a…
Browse files Browse the repository at this point in the history
…nd-preferences-design

Feature/account profile and preferences design
  • Loading branch information
yosvelquintero authored Sep 14, 2023
2 parents 4141a07 + d3e08f8 commit 375423d
Show file tree
Hide file tree
Showing 131 changed files with 4,827 additions and 2,339 deletions.
7 changes: 6 additions & 1 deletion apps/restorecommerce/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { RouterModule, TitleStrategy } from '@angular/router';

import { VCLDateAdapterModule } from '@vcl/ng-vcl';

Expand All @@ -14,6 +14,7 @@ import { environment } from '../environments/environment';
import { AppComponent } from './app.component';
import { appRoutes } from './app.routes';
import { AppStateModule } from './app.state.module';
import { RoutesTitleStrategyService } from './routes-title-strategy.service';

@NgModule({
declarations: [AppComponent],
Expand All @@ -37,6 +38,10 @@ import { AppStateModule } from './app.state.module';
provide: 'apiUrl',
useValue: environment.urls.api,
},
{
provide: TitleStrategy,
useClass: RoutesTitleStrategyService,
},
],
bootstrap: [AppComponent],
})
Expand Down
21 changes: 21 additions & 0 deletions apps/restorecommerce/src/app/routes-title-strategy.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { RouterStateSnapshot, TitleStrategy } from '@angular/router';

import { APP } from '@console-core/config';

@Injectable({ providedIn: 'root' })
export class RoutesTitleStrategyService extends TitleStrategy {
constructor(private readonly title: Title) {
super();
}

override updateTitle(routerState: RouterStateSnapshot): void {
const text = this.buildTitle(routerState);
if (text === undefined) {
return;
}

this.title.setTitle(`${text} | ${APP.name}`);
}
}
2 changes: 1 addition & 1 deletion apps/restorecommerce/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>restorecommerce</title>
<title>Restorecommerce</title>
<base href="/" />
<meta
name="viewport"
Expand Down
Loading

0 comments on commit 375423d

Please sign in to comment.