mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-05 17:31:39 +02:00
a9dd31b86e
- Replace type filter checkboxes with clickable toggle badges in Pending Contacts (CLI/REP/ROOM/SENS) - more compact and better mobile UX - Make Pending Contacts buttons (Approve, Map, Copy Key) smaller and uniform, matching Existing Contacts button style - Optimize Existing Contacts filter toolbar to fit in one row on mobile (narrower dropdown, more compact sort buttons) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81 lines
3.0 KiB
HTML
81 lines
3.0 KiB
HTML
{% extends "contacts_base.html" %}
|
|
|
|
{% block title %}Existing Contacts - mc-webui{% endblock %}
|
|
|
|
{% block page_content %}
|
|
<div id="existingPageContent" class="p-3">
|
|
<!-- Page Header -->
|
|
<div class="mb-3">
|
|
<h4 class="mb-2">
|
|
<i class="bi bi-person-lines-fill"></i> Existing Contacts
|
|
<span class="badge counter-badge counter-ok rounded-pill" id="contactsCounter" style="display: none; font-size: 0.8rem;">0 / 350</span>
|
|
</h4>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="d-flex gap-2 mb-3">
|
|
<button class="btn btn-outline-secondary btn-sm" onclick="navigateTo('/contacts/manage');">
|
|
<i class="bi bi-arrow-left"></i> Back
|
|
</button>
|
|
<button class="btn btn-outline-primary btn-sm" id="refreshExistingBtn">
|
|
<i class="bi bi-arrow-clockwise"></i> Refresh
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Search Toolbar -->
|
|
<div class="search-toolbar">
|
|
<input type="text" class="form-control" id="searchInput" placeholder="Search by name or public key...">
|
|
</div>
|
|
|
|
<!-- Filter and Sort Toolbar -->
|
|
<div class="filter-sort-toolbar">
|
|
<!-- Type Filter -->
|
|
<select class="form-select" id="typeFilter">
|
|
<option value="ALL">All Types</option>
|
|
<option value="CLI">CLI</option>
|
|
<option value="REP">REP</option>
|
|
<option value="ROOM">ROOM</option>
|
|
<option value="SENS">SENS</option>
|
|
</select>
|
|
|
|
<!-- Sort Buttons -->
|
|
<div class="sort-buttons">
|
|
<button class="sort-btn" data-sort="name" id="sortByName" title="Sort by contact name">
|
|
<span>Name</span>
|
|
<i class="bi bi-sort-down"></i>
|
|
</button>
|
|
<button class="sort-btn active" data-sort="last_advert" id="sortByLastAdvert" title="Sort by last advertisement time">
|
|
<span>Last advert</span>
|
|
<i class="bi bi-sort-down"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Loading State -->
|
|
<div id="existingLoading" class="text-center py-5" style="display: none;">
|
|
<div class="spinner-border text-primary" role="status">
|
|
<span class="visually-hidden">Loading...</span>
|
|
</div>
|
|
<p class="mt-3 text-muted">Loading contacts...</p>
|
|
</div>
|
|
|
|
<!-- Empty State -->
|
|
<div id="existingEmpty" class="empty-state" style="display: none;">
|
|
<i class="bi bi-inbox"></i>
|
|
<p class="mb-0">No contacts found</p>
|
|
<small class="text-muted">Contacts will appear here once added</small>
|
|
</div>
|
|
|
|
<!-- Existing Contacts List (Full-screen) -->
|
|
<div id="existingList" class="contacts-list-fullscreen">
|
|
<!-- Dynamically populated by contacts.js -->
|
|
</div>
|
|
|
|
<!-- Error State -->
|
|
<div id="existingError" class="alert alert-danger" style="display: none;" role="alert">
|
|
<i class="bi bi-exclamation-triangle"></i>
|
|
<span id="existingErrorMessage">Failed to load contacts</span>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|