|
70 | 70 | </dd.Interactive> |
71 | 71 | </Hds::Dropdown> |
72 | 72 | {{/if}} |
73 | | - |
74 | | - <Hds::Dropdown |
75 | | - @enableCollisionDetection={{true}} |
76 | | - data-test-side-nav-user-dropdown |
77 | | - as |dd| |
78 | | - > |
79 | | - {{#if this.session.data.authenticated.username}} |
| 73 | + {{#if this.session.data.authenticated.username}} |
| 74 | + <Hds::Dropdown |
| 75 | + @enableCollisionDetection={{true}} |
| 76 | + class='user-menu-dropdown' |
| 77 | + data-test-side-nav-user-dropdown |
| 78 | + as |dd| |
| 79 | + > |
80 | 80 | <dd.ToggleButton |
81 | 81 | @icon='user' |
82 | 82 | @text={{this.session.data.authenticated.username}} |
| 83 | + {{hds-tooltip this.session.data.authenticated.username}} |
| 84 | + class='user-menu-dropdown__toggle-button' |
| 85 | + /> |
| 86 | + <dd.Title @text={{t 'titles.authenticated'}} /> |
| 87 | + <dd.Description |
| 88 | + @text={{this.session.data.authenticated.username}} |
83 | 89 | /> |
84 | | - {{else}} |
| 90 | + <dd.Separator /> |
| 91 | + |
| 92 | + <dd.Interactive @route='account.change-password'>{{t |
| 93 | + 'actions.change-password' |
| 94 | + }}</dd.Interactive> |
| 95 | + <dd.Separator /> |
| 96 | + |
| 97 | + <dd.Interactive {{on 'click' this.invalidateSession}}>{{t |
| 98 | + 'actions.deauthenticate' |
| 99 | + }}</dd.Interactive> |
| 100 | + <dd.Separator /> |
| 101 | + |
| 102 | + <dd.Title @text={{t 'actions.toggle-color-theme'}} /> |
| 103 | + {{#each this.themes as |theme|}} |
| 104 | + <dd.Radio |
| 105 | + @value={{theme.value}} |
| 106 | + checked={{eq this.session.data.theme theme.value}} |
| 107 | + {{on 'change' (fn this.toggleTheme theme.value)}} |
| 108 | + > |
| 109 | + {{t (concat 'themes.' theme.label)}} |
| 110 | + </dd.Radio> |
| 111 | + {{/each}} |
| 112 | + </Hds::Dropdown> |
| 113 | + {{else}} |
| 114 | + <Hds::Dropdown |
| 115 | + @enableCollisionDetection={{true}} |
| 116 | + data-test-side-nav-user-dropdown |
| 117 | + as |dd| |
| 118 | + > |
85 | 119 | <dd.ToggleIcon @icon='user' @text={{t 'titles.user-menu'}} /> |
86 | | - {{/if}} |
87 | | - |
88 | | - <dd.Interactive @route='account.change-password'>{{t |
89 | | - 'actions.change-password' |
90 | | - }}</dd.Interactive> |
91 | | - <dd.Separator /> |
92 | | - |
93 | | - <dd.Interactive {{on 'click' this.invalidateSession}}>{{t |
94 | | - 'actions.deauthenticate' |
95 | | - }}</dd.Interactive> |
96 | | - <dd.Separator /> |
97 | | - |
98 | | - <dd.Title @text={{t 'actions.toggle-color-theme'}} /> |
99 | | - {{#each this.themes as |theme|}} |
100 | | - <dd.Radio |
101 | | - @value={{theme.value}} |
102 | | - checked={{eq this.session.data.theme theme.value}} |
103 | | - {{on 'change' (fn this.toggleTheme theme.value)}} |
104 | | - > |
105 | | - {{t (concat 'themes.' theme.label)}} |
106 | | - </dd.Radio> |
107 | | - {{/each}} |
108 | | - </Hds::Dropdown> |
| 120 | + |
| 121 | + <dd.Interactive @route='account.change-password'>{{t |
| 122 | + 'actions.change-password' |
| 123 | + }}</dd.Interactive> |
| 124 | + <dd.Separator /> |
| 125 | + |
| 126 | + <dd.Interactive {{on 'click' this.invalidateSession}}>{{t |
| 127 | + 'actions.deauthenticate' |
| 128 | + }}</dd.Interactive> |
| 129 | + <dd.Separator /> |
| 130 | + |
| 131 | + <dd.Title @text={{t 'actions.toggle-color-theme'}} /> |
| 132 | + {{#each this.themes as |theme|}} |
| 133 | + <dd.Radio |
| 134 | + @value={{theme.value}} |
| 135 | + checked={{eq this.session.data.theme theme.value}} |
| 136 | + {{on 'change' (fn this.toggleTheme theme.value)}} |
| 137 | + > |
| 138 | + {{t (concat 'themes.' theme.label)}} |
| 139 | + </dd.Radio> |
| 140 | + {{/each}} |
| 141 | + </Hds::Dropdown> |
| 142 | + {{/if}} |
109 | 143 | </:actions> |
110 | 144 | </Hds::SideNav::Header> |
111 | 145 | </:header> |
|
0 commit comments