300 lines
8.3 KiB
Plaintext
300 lines
8.3 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="messages.lua"></script>
|
|
<title>Messages</title>
|
|
<style>
|
|
.conversations-list {
|
|
flex: 1;
|
|
overflow: auto;
|
|
}
|
|
|
|
.conversation-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 12px 16px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.conversation-item:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.conversation-item:active {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.conversation-avatar {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 28px;
|
|
margin-right: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 22px;
|
|
color: #000000;
|
|
}
|
|
|
|
.conversation-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.conversation-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.conversation-name {
|
|
font-size: 18px;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.conversation-time {
|
|
font-size: 14px;
|
|
color: #666666;
|
|
}
|
|
|
|
.conversation-preview {
|
|
font-size: 16px;
|
|
color: #B3B3B3;
|
|
margin-top: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.conversation-unread {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 12px;
|
|
background-color: #BB86FC;
|
|
color: #000000;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
/* Chat View */
|
|
#chat-container {
|
|
display: none;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
}
|
|
|
|
.chat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 16px;
|
|
background-color: #1E1E1E;
|
|
}
|
|
|
|
.chat-avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
margin-right: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
color: #000000;
|
|
}
|
|
|
|
.chat-header-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.chat-header-name {
|
|
font-size: 18px;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.chat-header-status {
|
|
font-size: 14px;
|
|
color: #4CAF50;
|
|
}
|
|
|
|
.chat-messages {
|
|
flex: 1;
|
|
overflow: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.message-bubble {
|
|
max-width: 75%;
|
|
padding: 12px 16px;
|
|
border-radius: 18px;
|
|
font-size: 18px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.message-sent {
|
|
align-self: flex-end;
|
|
background-color: #BB86FC;
|
|
color: #000000;
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.message-received {
|
|
align-self: flex-start;
|
|
background-color: #2D2D2D;
|
|
color: #FFFFFF;
|
|
border-bottom-left-radius: 4px;
|
|
}
|
|
|
|
.chat-input-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 16px;
|
|
background-color: #1E1E1E;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-input {
|
|
flex: 1;
|
|
padding: 12px 18px;
|
|
background-color: #2D2D2D;
|
|
border-radius: 24px;
|
|
color: #FFFFFF;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.chat-input:hover {
|
|
background-color: #3D3D3D;
|
|
}
|
|
|
|
.chat-input:focus {
|
|
background-color: #353535;
|
|
}
|
|
|
|
.chat-send-btn {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 28px;
|
|
background-color: #BB86FC;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.chat-send-btn:hover {
|
|
background-color: #9C64FC;
|
|
}
|
|
|
|
.chat-send-btn:active {
|
|
background-color: #7C44DC;
|
|
}
|
|
|
|
.chat-send-btn img {
|
|
width: 28px;
|
|
height: 28px;
|
|
pointer-events: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="app-screen" onload="initLayout(document); initMessages(document)" data-model="messages">
|
|
<!-- 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>
|
|
|
|
<!-- Conversations List Container -->
|
|
<div id="conversations-container" style="display: flex; flex-direction: column; flex: 1;">
|
|
<!-- App Bar -->
|
|
<div class="app-bar">
|
|
<div class="app-bar-back" onclick="goBack()">
|
|
<img src="../../icons/back.tga"/>
|
|
</div>
|
|
<span class="app-bar-title">Messages</span>
|
|
<div class="app-bar-actions">
|
|
<div class="app-bar-action">
|
|
<img src="../../icons/search.tga"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Conversations List -->
|
|
<div class="app-content with-nav">
|
|
<div class="conversations-list" id="conversations-list">
|
|
<!-- Populated by Lua -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- FAB -->
|
|
<div class="btn-fab" onclick="newConversation()">
|
|
<img src="../../icons/add.tga" style="width: 32px; height: 32px;"/>
|
|
</div>
|
|
|
|
<!-- System Navigation Bar -->
|
|
<div class="system-nav-bar">
|
|
<div class="system-nav-btn" onclick="onBackPressed()">
|
|
<img src="../../icons/back.tga"/>
|
|
</div>
|
|
<div class="system-nav-home" onclick="onHomePressed()"></div>
|
|
<div class="system-nav-btn" onclick="onRecentPressed()">
|
|
<img src="../../icons/menu.tga"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Container -->
|
|
<div id="chat-container">
|
|
<!-- Chat Header -->
|
|
<div class="app-bar">
|
|
<div class="app-bar-back" onclick="hideChat()">
|
|
<img src="../../icons/back.tga"/>
|
|
</div>
|
|
<div class="chat-avatar" id="chat-avatar" style="background-color: #4CAF50;">J</div>
|
|
<div class="chat-header-info">
|
|
<div class="chat-header-name" id="chat-name">Contact</div>
|
|
<div class="chat-header-status">Online</div>
|
|
</div>
|
|
<div class="btn-icon" onclick="callFromChat()">
|
|
<img src="../../icons/phone.tga" style="width: 32px; height: 32px;"/>
|
|
</div>
|
|
<div class="btn-icon">
|
|
<img src="../../icons/more.tga" style="width: 32px; height: 32px;"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Messages -->
|
|
<div class="chat-messages" id="chat-messages">
|
|
<!-- Populated by Lua -->
|
|
</div>
|
|
|
|
<!-- Input Bar -->
|
|
<div class="chat-input-bar">
|
|
<div class="btn-icon" style="width: 48px; height: 48px;">
|
|
<img src="../../icons/add.tga" style="width: 28px; height: 28px;"/>
|
|
</div>
|
|
<input class="chat-input" type="text" placeholder="Type a message..." id="message-input"/>
|
|
<div class="chat-send-btn" onclick="sendMessage()">
|
|
<img src="../../icons/send.tga"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</rml>
|