Hide profile button if only one profile exists (#1045)

This commit is contained in:
toasted-nutbread 2020-11-19 18:49:30 -05:00 committed by GitHub
parent e5255a03e6
commit 1216926fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,7 @@
</div>
</label>
<div class="nav-button-container">
<button class="nav-button action-select-profile" data-icon="profile" title="Change primary profile">
<button class="nav-button action-select-profile" data-icon="profile" title="Change primary profile" hidden>
<span class="profile-select-container"><select class="profile-select" id="profile-select">
<optgroup label="Primary Profile" id="profile-select-option-group"></optgroup>
</select></span>

View File

@ -288,7 +288,8 @@ body[data-loaded=true] .toggle-group {
mask-image: url(/mixed/img/profile.svg);
-webkit-mask-image: url(/mixed/img/profile.svg);
}
.nav-button:first-child {
.nav-button:first-child,
.nav-button:first-child[hidden]+.nav-button {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}

View File

@ -42,6 +42,8 @@ class DisplayController {
this._setupOptions(primaryProfile);
}
document.querySelector('.action-select-profile').hidden = (profiles.length <= 1);
this._updateProfileSelect(profiles, profileCurrent);
setTimeout(() => {