Bug: Fixed some small icon issues.
This commit is contained in:
@@ -195,6 +195,15 @@ class ModuleManager:
|
||||
''', [module_key, module['name'], module['version'],
|
||||
module['author'], module['description']])
|
||||
|
||||
# Also register in old Modules table for compatibility
|
||||
old_module = query_db('SELECT module_id FROM Modules WHERE module_key = ?', [module_key], one=True)
|
||||
if not old_module:
|
||||
execute_db('''
|
||||
INSERT INTO Modules (module_name, module_key, description, icon, is_active)
|
||||
VALUES (?, ?, ?, ?, 1)
|
||||
''', [module['name'], module_key, module['description'], module.get('icon', '')])
|
||||
|
||||
|
||||
# Also register in old Modules table for compatibility
|
||||
old_module = query_db('SELECT module_id FROM Modules WHERE module_key = ?', [module_key], one=True)
|
||||
if not old_module:
|
||||
@@ -213,6 +222,8 @@ class ModuleManager:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return {'success': False, 'message': f'Installation failed: {str(e)}'}
|
||||
|
||||
|
||||
|
||||
def uninstall_module(self, module_key: str, drop_tables: bool = True) -> Dict:
|
||||
"""
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"version": "1.0.0",
|
||||
"author": "STUFF",
|
||||
"description": "Cycle counting and physical inventory workflows with session-based tracking",
|
||||
"icon": "fa-clipboard-check",
|
||||
"requires_roles": ["owner", "admin", "staff"],
|
||||
"routes_prefix": "/invcount",
|
||||
"has_migrations": true,
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<div class="modules-grid">
|
||||
{% for module in modules %}
|
||||
<a href="/{{ module.module_key }}/admin" class="module-card module-card-link">
|
||||
<div class="module-icon">
|
||||
{% if module.icon %}
|
||||
<i class="{{ module.icon }}"></i>
|
||||
{% else %}
|
||||
📦
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="module-icon">
|
||||
{% if module.icon %}
|
||||
<i class="fa-solid {{ module.icon }}"></i>
|
||||
{% else %}
|
||||
📦
|
||||
{% endif %}
|
||||
</div>
|
||||
<h3 class="module-name">{{ module.module_name }}</h3>
|
||||
<p class="module-desc">{{ module.description }}</p>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user