Browse Source

HUE-6245 [frontend] Only show main button when there is only one app

Romain Rigaux 8 năm trước cách đây
mục cha
commit
7451a67
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      desktop/core/src/desktop/templates/hue.mako

+ 2 - 2
desktop/core/src/desktop/templates/hue.mako

@@ -114,12 +114,12 @@ ${ hueIcons.symbols() }
         <div class="btn-group" data-bind="visible: true" style="display:none; margin-top: 8px">
           <!-- ko if: mainQuickCreateAction -->
           <!-- ko with: mainQuickCreateAction -->
-          <button class="btn btn-primary disable-feedback hue-main-create-btn" data-bind="hueLink: url, attr: {title: tooltip}">
+          <button class="btn btn-primary disable-feedback hue-main-create-btn" data-bind="hueLink: url, attr: {title: tooltip}, style: { borderBottomRightRadius: $parent.quickCreateActions().length > 1 ? '0px' : '4px', borderTopRightRadius: $parent.quickCreateActions().length > 1 ? '0px' : '4px' }">
             <span data-bind="text: displayName"></span>
           </button>
           <!-- /ko -->
           <!-- /ko -->
-          <button class="btn btn-primary dropdown-toggle hue-main-create-btn-dropdown" data-toggle="dropdown">
+          <button class="btn btn-primary dropdown-toggle hue-main-create-btn-dropdown" data-toggle="dropdown" data-bind="visible: quickCreateActions().length > 1">
             <!-- ko ifnot: mainQuickCreateAction -->${ _('More') } <!-- /ko -->
             <span class="caret"></span>
           </button>