Procházet zdrojové kódy

[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 před 10 roky
rodič
revize
99f31ee
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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">