fix(plugins): Hide Grid/Table view buttons when no plugins installed

- Hide Grid and Table view buttons when plugins list is empty
- Only show Plugin Store button when no plugins are installed
- Improves UX by preventing clicks on non-functional buttons
- Combined with null checks, ensures no JavaScript errors occur
This commit is contained in:
master3395
2026-01-26 03:33:32 +01:00
parent 43f10f7796
commit 42f66f30ea

View File

@@ -1011,11 +1011,12 @@
{% trans "CyberPanel Plugin Store" %}
</button>
{% else %}
<button class="view-btn" onclick="toggleView('grid')">
<!-- Hide Grid/Table views when no plugins installed - only show Store -->
<button class="view-btn" onclick="toggleView('grid')" style="display: none;">
<i class="fas fa-th-large"></i>
{% trans "Grid View" %}
</button>
<button class="view-btn" onclick="toggleView('table')">
<button class="view-btn" onclick="toggleView('table')" style="display: none;">
<i class="fas fa-list"></i>
{% trans "Table View" %}
</button>