mirror of https://github.com/rancher/ui.git
variable width user-dropdown
This commit is contained in:
parent
f7b5409cf9
commit
f8dadaaf16
|
|
@ -31,8 +31,7 @@ $dropdown-caret-color : $mid-grey !default;
|
||||||
left: auto;
|
left: auto;
|
||||||
display: none; // none by default, but block on "open" of the menu
|
display: none; // none by default, but block on "open" of the menu
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 200px;
|
max-width: 100vw;
|
||||||
max-width: 400px;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0; // override default ul
|
margin: 0; // override default ul
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
$gh-block-color: $text-color;
|
$gh-block-color: $text-color;
|
||||||
|
$size: 35px;
|
||||||
|
|
||||||
.gh-block-list {
|
.gh-block-list {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
@ -13,8 +14,12 @@ $gh-block-color: $text-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-block {
|
.gh-block {
|
||||||
|
width: calc(100% + #{$size});
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
.gh-block-content {
|
.gh-block-content {
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
|
margin-right: 35px; // temp but adds space for non-existent floated avatar
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-avatar {
|
.gh-avatar {
|
||||||
|
|
@ -42,7 +47,6 @@ $gh-block-color: $text-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$size: 35px;
|
|
||||||
|
|
||||||
.gh-avatar {
|
.gh-avatar {
|
||||||
width: $size;
|
width: $size;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="gh-block-content">
|
<div class="gh-block-content">
|
||||||
<div class="clip gh-block-name">
|
<div class="gh-block-name">
|
||||||
{{#if loading}}
|
{{#if loading}}
|
||||||
{{t 'identityBlock.loading'}}
|
{{t 'identityBlock.loading'}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -28,7 +28,9 @@
|
||||||
<a href="{{principal.profileURL}}" target="_blank">{{login}}</a>
|
<a href="{{principal.profileURL}}" target="_blank">{{login}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if principal.displayName}}
|
{{#if principal.displayName}}
|
||||||
{{principal.displayName}} <small>( {{principal.loginName}} )</small>
|
<div>
|
||||||
|
{{principal.displayName}} {{#if principal.loginName }}<small>( {{principal.loginName}} )</small>{{/if}}
|
||||||
|
</div>
|
||||||
{{else if principal.loginName}}
|
{{else if principal.loginName}}
|
||||||
{{principal.loginName}}
|
{{principal.loginName}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@ export default Mixin.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
showMenu: function(el, drpd, offset) {
|
showMenu: function(el, drpd, offset) {
|
||||||
|
drpd.css({width: drpd.width()});
|
||||||
drpd.addClass('invisible');
|
drpd.addClass('invisible');
|
||||||
drpd.addClass('block');
|
drpd.addClass('block');
|
||||||
positionDropdown(drpd, el, drpd.hasClass('dropdown-menu-right'), offset);
|
positionDropdown(drpd, el, drpd.hasClass('dropdown-menu-right'), offset);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
display: none;
|
display: none;
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 160px;
|
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
margin: 2px 0 0;
|
margin: 2px 0 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue