Skip to content
Snippets Groups Projects
Commit 4ad677e4 authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon: Committed by Reiter, Christoph
Browse files

Shorten username if chevron becomes invisible

See issue #9
parent bde068a6
No related branches found
No related tags found
No related merge requests found
...@@ -413,6 +413,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -413,6 +413,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
.loginbox .label { .loginbox .label {
padding-left: 0.2em; padding-left: 0.2em;
} }
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
`; `;
} }
...@@ -445,12 +452,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -445,12 +452,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
renderLoggedIn() { renderLoggedIn() {
const imageURL = (this.showImage && this.person && this.person.image) ? this.person.image : null; const imageURL = (this.showImage && this.person && this.person.image) ? this.person.image : null;
const w = window.innerWidth/2 - 20 - 40;
return html` return html`
<div class="dropdown" @click="${this.onDropdownClick}"> <div class="dropdown" @click="${this.onDropdownClick}">
<div class="dropdown-trigger"> <div class="dropdown-trigger">
<a href="#"> <a href="#">
<span>${this.name}</span> <div class="ellipsis" style="max-width: ${w}px;">${this.name}</div>
<vpu-icon name="chevron-down" id="menu-chevron-icon"></vpu-icon> <vpu-icon name="chevron-down" id="menu-chevron-icon"></vpu-icon>
</a> </a>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment