Browse Source

[assist] Show a message when no databases are found

This is unlikely to happen but in case the backend for whatever reason returns an empty list for any of the sources it's better to show a message than an empty panel.
Johan Ahlen 9 năm trước cách đây
mục cha
commit
99f31ee3f9
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      desktop/core/src/desktop/templates/assist.mako

+ 3 - 1
desktop/core/src/desktop/templates/assist.mako

@@ -373,7 +373,6 @@ from desktop.views import _ko
       <!-- /ko -->
       <!-- /ko -->
     </ul>
-    <ul></ul>
     <!-- ko template: { if: ! hasEntries() && ! loading() && (definition.isTable || definition.isView), name: 'assist-no-table-entries' } --><!-- /ko -->
     <!-- ko template: { if: ! hasEntries() && ! loading() && definition.isDatabase, name: 'assist-no-database-entries' } --><!-- /ko -->
   </script>
@@ -618,6 +617,9 @@ from desktop.views import _ko
     <div class="assist-flex-fill" data-bind="visible: hasErrors() && ! loading()" style="display: none;">
       <span class="assist-errors">${ _('Error loading databases.') }</span>
     </div>
+    <div class="assist-flex-fill" data-bind="visible: ! hasErrors() && ! loading() && ! hasEntries()" style="display: none;">
+      <span class="assist-errors">${ _('No databases found.') }</span>
+    </div>
   </script>
 
   <script type="text/html" id="assist-tables-template">