浏览代码

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

Romain Rigaux 8 年之前
父节点
当前提交
7451a67
共有 1 个文件被更改,包括 2 次插入2 次删除
  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>