File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ export const ApplicationRoutes = {
101101 register : 'register' ,
102102 thirdPartySignIn : 'third-party-signin-completed' ,
103103 account : 'account' ,
104+ deactivate : 'account/deactivate' ,
104105 trustedParties : 'trusted-parties' ,
105106 resetPasswordEmail : 'reset-password-email' ,
106107 selfService : 'self-service' ,
@@ -125,6 +126,7 @@ export const ApplicationRoutesLabels = {
125126 [ ApplicationRoutes . register ] : $localize `:@@share.register:Register - ORCID` ,
126127 [ ApplicationRoutes . thirdPartySignIn ] : $localize `:@@share.signin:Sign in - ORCID` ,
127128 [ ApplicationRoutes . account ] : $localize `:@@share.account:Account settings - ORCID` ,
129+ [ ApplicationRoutes . deactivate ] : $localize `:@@share.deactivateAccount:Deactivate account - ORCID` ,
128130 [ ApplicationRoutes . trustedParties ] : $localize `:@@share.trustedParties:Trusted parties - ORCID ` ,
129131 [ ApplicationRoutes . resetPasswordEmail ] : $localize `:@@share.resetPasswordEmail:Reset password - ORCID` ,
130132 [ ApplicationRoutes . selfService ] : $localize `:@@share.selfService:Self Service - ORCID` ,
Original file line number Diff line number Diff line change @@ -35,19 +35,19 @@ export class TitleService {
3535 `${ dynamicTitle } ${ ApplicationDynamicRoutesLabels . orcidPageTitle } `
3636 )
3737 } else {
38- Object . keys ( ApplicationRoutesLabels ) . forEach ( ( route ) => {
39- if ( event . url . startsWith ( ' /' + route ) ) {
40- // MY ORCID
41- if ( dynamicTitle ) {
42- this . setTitle (
43- ` ${ dynamicTitle } ${ ApplicationDynamicRoutesLabels . orcidMyPageTitle } `
44- )
45- } else {
46- // OTHER PAGES
47- this . setTitle ( ApplicationRoutesLabels [ route ] )
48- }
49- }
50- } )
38+ const route = Object . keys ( ApplicationRoutesLabels ) . find (
39+ ( route ) => event . url ?. split ( '?' ) [ 0 ] == ' /' + route
40+ )
41+ // MY ORCID
42+ if ( dynamicTitle ) {
43+ this . setTitle (
44+ ` ${ dynamicTitle } ${ ApplicationDynamicRoutesLabels . orcidMyPageTitle } `
45+ )
46+ }
47+ if ( route !== null && route !== undefined ) {
48+ // OTHER PAGES
49+ this . setTitle ( ApplicationRoutesLabels [ route ] )
50+ }
5151 }
5252 } )
5353 }
Original file line number Diff line number Diff line change @@ -617,6 +617,7 @@ share.account=Account settings - ORCID
617617share.trustedParties =Trusted parties - ORCID
618618share.resetPasswordEmail =Reset password - ORCID
619619share.selfService =Self Service - ORCID
620+ share.deactivateAccount =Deactivate account - ORCID
620621share.orcidTitle =- ORCID
621622share.myOrcidTitle =- My ORCID
622623share.developerTools =Developer tools - ORCID
You can’t perform that action at this time.
0 commit comments