mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-09 02:03:12 +02:00
refactor(contacts): Implement multi-page Contact Management with advanced sorting
Split Contact Management into 3 dedicated pages for improved mobile usability: - /contacts/manage - Settings & navigation hub (manual approval + cleanup) - /contacts/pending - Full-screen pending contacts view - /contacts/existing - Full-screen existing contacts with search/filter/sort New Features: - Advanced sorting: Name (A-Z/Z-A) & Last advert (newest/oldest) - URL-based sort state (?sort=name&order=asc) - Activity indicators: 🟢 active, 🟡 recent, 🔴 inactive - Changed terminology: "Last seen" → "Last advert" (more accurate) - Cleanup tool moved from Settings modal to Contact Management page Technical Changes: - Created contacts_base.html standalone template - Split contacts.html into 3 specialized templates - Refactored contacts.js for multi-page support with page detection - Added 2 new Flask routes: /contacts/pending, /contacts/existing - Removed cleanup section from base.html Settings modal Mobile-first design: Each page has full-screen space with touch-friendly navigation and back buttons. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
+26
-2
@@ -44,10 +44,34 @@ def direct_messages():
|
||||
@views_bp.route('/contacts/manage')
|
||||
def contact_management():
|
||||
"""
|
||||
Contact Management view - manual approval settings and pending contacts list.
|
||||
Contact Management Settings - manual approval + cleanup + navigation.
|
||||
"""
|
||||
return render_template(
|
||||
'contacts.html',
|
||||
'contacts-manage.html',
|
||||
device_name=config.MC_DEVICE_NAME,
|
||||
refresh_interval=config.MC_REFRESH_INTERVAL
|
||||
)
|
||||
|
||||
|
||||
@views_bp.route('/contacts/pending')
|
||||
def contact_pending_list():
|
||||
"""
|
||||
Full-screen pending contacts list.
|
||||
"""
|
||||
return render_template(
|
||||
'contacts-pending.html',
|
||||
device_name=config.MC_DEVICE_NAME,
|
||||
refresh_interval=config.MC_REFRESH_INTERVAL
|
||||
)
|
||||
|
||||
|
||||
@views_bp.route('/contacts/existing')
|
||||
def contact_existing_list():
|
||||
"""
|
||||
Full-screen existing contacts list with search, filter, sort.
|
||||
"""
|
||||
return render_template(
|
||||
'contacts-existing.html',
|
||||
device_name=config.MC_DEVICE_NAME,
|
||||
refresh_interval=config.MC_REFRESH_INTERVAL
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user