diff --git a/app/templates/library.html b/app/templates/library.html index b31f19e..de74373 100644 --- a/app/templates/library.html +++ b/app/templates/library.html @@ -207,12 +207,12 @@ -
+

Loading…

-
+
Page name
Created by
@@ -231,7 +231,7 @@
-
+

@@ -319,7 +319,20 @@ function libraryPage() { _renderTable() { var self = this; var body = document.getElementById('lib-table-body'); + var table = document.getElementById('lib-table'); + var emptyDiv = document.getElementById('lib-empty'); + var loadingDiv = document.getElementById('lib-loading'); if (!body) return; + + // Show/hide table vs empty state + if (this.flatItems.length === 0) { + if (table) table.style.display = 'none'; + if (emptyDiv) emptyDiv.style.display = ''; + return; + } + if (table) table.style.display = ''; + if (emptyDiv) emptyDiv.style.display = 'none'; + if (loadingDiv) loadingDiv.style.display = 'none'; var html = ''; for (var i = 0; i < this.flatItems.length; i++) { var item = this.flatItems[i];