353 lines
9.5 KiB
Plaintext
353 lines
9.5 KiB
Plaintext
<rml>
|
|
<head>
|
|
<link type="text/rcss" href="../../ui/html.rcss"/>
|
|
<link type="text/rcss" href="../../ui/theme.rcss"/>
|
|
<link type="text/rcss" href="../../ui/components.rcss"/>
|
|
<link type="text/rcss" href="../../ui/layout.rcss"/>
|
|
<script src="../../scripts/navigation.lua"></script>
|
|
<script src="../../scripts/layout.lua"></script>
|
|
<script src="contacts.lua"></script>
|
|
<title>Contacts</title>
|
|
<style>
|
|
.contacts-list {
|
|
flex: 1;
|
|
overflow: auto;
|
|
}
|
|
|
|
.contact-letter {
|
|
padding: 8px 16px;
|
|
font-size: 18px;
|
|
font-weight: 500;
|
|
color: #BB86FC;
|
|
background-color: #1E1E1E;
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
|
|
.contact-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 12px 16px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.contact-item:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.contact-item:active {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.contact-avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
margin-right: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
color: #000000;
|
|
}
|
|
|
|
.contact-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.contact-name {
|
|
font-size: 18px;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.contact-phone {
|
|
font-size: 16px;
|
|
color: #B3B3B3;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.contact-call-btn {
|
|
width: 56px;
|
|
height: 56px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
border-radius: 28px;
|
|
}
|
|
|
|
.contact-call-btn:hover {
|
|
background-color: rgba(76, 175, 80, 0.2);
|
|
}
|
|
|
|
.contact-call-btn:active {
|
|
background-color: rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
.contact-call-btn img {
|
|
width: 28px;
|
|
height: 28px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Contact Detail View */
|
|
#contact-detail {
|
|
display: none;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
}
|
|
|
|
.detail-header {
|
|
padding: 32px 16px;
|
|
text-align: center;
|
|
background-color: #1E1E1E;
|
|
}
|
|
|
|
.detail-avatar {
|
|
width: 96px;
|
|
height: 96px;
|
|
border-radius: 48px;
|
|
margin: 0 auto 16px auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 40px;
|
|
color: #000000;
|
|
}
|
|
|
|
.detail-name {
|
|
font-size: 28px;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.detail-actions {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 32px;
|
|
padding: 20px;
|
|
background-color: #1E1E1E;
|
|
border-bottom: 1px solid #333333;
|
|
}
|
|
|
|
.detail-action-btn {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
}
|
|
|
|
.detail-action-btn:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.detail-action-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
background-color: #BB86FC;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.detail-action-icon img {
|
|
width: 24px;
|
|
height: 24px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.detail-action-label {
|
|
font-size: 14px;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.detail-info {
|
|
flex: 1;
|
|
padding: 16px;
|
|
}
|
|
|
|
.detail-row {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 16px 0;
|
|
border-bottom: 1px solid #333333;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.detail-row:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.detail-icon {
|
|
width: 40px;
|
|
margin-right: 16px;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.detail-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.detail-label {
|
|
font-size: 14px;
|
|
color: #888888;
|
|
}
|
|
|
|
.detail-value {
|
|
font-size: 18px;
|
|
color: #FFFFFF;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.detail-action {
|
|
padding: 8px;
|
|
}
|
|
|
|
/* Phone app bottom tabs */
|
|
.phone-tabs {
|
|
height: 72px;
|
|
background-color: #1E1E1E;
|
|
display: flex;
|
|
}
|
|
|
|
.phone-tab {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
color: #666666;
|
|
}
|
|
|
|
.phone-tab:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.phone-tab.active {
|
|
color: #BB86FC;
|
|
}
|
|
|
|
.phone-tab img {
|
|
width: 28px;
|
|
height: 28px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.phone-tab span {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Search style adjustments */
|
|
.search-input {
|
|
flex: 1;
|
|
background-color: transparent;
|
|
font-size: 18px;
|
|
color: #FFFFFF;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="app-screen" onload="initLayout(document); initContacts(document)" data-model="contacts">
|
|
<!-- System Status Bar -->
|
|
<div class="system-status-bar">
|
|
<span id="status-time" class="system-status-time">12:30</span>
|
|
<div class="system-status-icons">
|
|
<img src="../../icons/wifi.tga"/>
|
|
<img src="../../icons/signal.tga"/>
|
|
<img src="../../icons/battery.tga"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- App Bar -->
|
|
<div class="app-bar">
|
|
<div class="app-bar-back" onclick="goBack()">
|
|
<img src="../../icons/back.tga"/>
|
|
</div>
|
|
<span class="app-bar-title">Contacts</span>
|
|
<div class="app-bar-actions">
|
|
<div class="app-bar-action" onclick="addContact()">
|
|
<img src="../../icons/add.tga"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Contacts List Container -->
|
|
<div id="contacts-list-container" class="app-content" style="display: flex; flex-direction: column;">
|
|
<!-- Search Bar -->
|
|
<div class="search-bar">
|
|
<img src="../../icons/search.tga" class="search-icon" style="width: 24px; height: 24px;"/>
|
|
<input class="search-input" type="text" placeholder="Search contacts" onchange="onSearchInput(this)"/>
|
|
</div>
|
|
|
|
<!-- Contacts List -->
|
|
<div class="contacts-list" id="contacts-list">
|
|
<!-- Populated by Lua -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Contact Detail View -->
|
|
<div id="contact-detail">
|
|
<div class="detail-header">
|
|
<div class="detail-avatar" id="detail-avatar">A</div>
|
|
<div class="detail-name" id="detail-name">Contact Name</div>
|
|
</div>
|
|
|
|
<div class="detail-actions">
|
|
<div class="detail-action-btn" onclick="callContact(selected_contact and selected_contact.id or '')">
|
|
<div class="detail-action-icon">
|
|
<img src="../../icons/call_small.tga"/>
|
|
</div>
|
|
<span class="detail-action-label">Call</span>
|
|
</div>
|
|
<div class="detail-action-btn" onclick="messageContact(selected_contact and selected_contact.id or '')">
|
|
<div class="detail-action-icon" style="background-color: #03DAC6;">
|
|
<img src="../../icons/message.tga"/>
|
|
</div>
|
|
<span class="detail-action-label">Message</span>
|
|
</div>
|
|
<div class="detail-action-btn" onclick="editContact(selected_contact and selected_contact.id or '')">
|
|
<div class="detail-action-icon" style="background-color: #FF9800;">
|
|
<img src="../../icons/edit.tga"/>
|
|
</div>
|
|
<span class="detail-action-label">Edit</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="detail-info" id="detail-info">
|
|
<!-- Populated by Lua -->
|
|
</div>
|
|
|
|
<div style="padding: 16px;">
|
|
<div class="btn btn-outlined" style="width: 100%; text-align: center;" onclick="hideContactDetail()">
|
|
Back to Contacts
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- FAB -->
|
|
<div class="btn-fab" onclick="addContact()">
|
|
<img src="../../icons/add.tga" style="width: 32px; height: 32px;"/>
|
|
</div>
|
|
|
|
<!-- Phone App Bottom Tabs -->
|
|
<div class="phone-tabs">
|
|
<div class="phone-tab" onclick="navigateTo('dialer')">
|
|
<img src="../../icons/dialpad.tga"/>
|
|
<span>Keypad</span>
|
|
</div>
|
|
<div class="phone-tab" onclick="switchTab('recent')">
|
|
<img src="../../icons/history.tga"/>
|
|
<span>Recent</span>
|
|
</div>
|
|
<div class="phone-tab active">
|
|
<img src="../../icons/contacts.tga"/>
|
|
<span>Contacts</span>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</rml>
|