🎨 Update conversation-assistant frontend styling and queue service
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
017d597f02
commit
ccb401655b
3 changed files with 256 additions and 3 deletions
|
|
@ -122,6 +122,73 @@
|
|||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Settings Modal -->
|
||||
<div id="settings-modal" class="modal hidden">
|
||||
<div class="modal-backdrop"></div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2>Settings</h2>
|
||||
<button id="btn-close-settings" class="btn-icon" title="Close">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M18 6L6 18M6 6l12 12"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- Server Configuration -->
|
||||
<section class="settings-section">
|
||||
<h3>Server Configuration</h3>
|
||||
<div class="form-group">
|
||||
<label for="input-api-url">API Server URL</label>
|
||||
<input type="text" id="input-api-url" placeholder="http://localhost:3100">
|
||||
<p class="form-hint">The URL of the Conversation Assistant server</p>
|
||||
</div>
|
||||
<button id="btn-save-settings" class="btn primary">Save Changes</button>
|
||||
</section>
|
||||
|
||||
<!-- Danger Zone -->
|
||||
<section class="settings-section danger-zone">
|
||||
<h3>Danger Zone</h3>
|
||||
<p class="section-description">This will remove all saved authentication and sync data. You will need to re-authenticate.</p>
|
||||
<button id="btn-reset-data" class="btn danger">Reset All Data</button>
|
||||
</section>
|
||||
|
||||
<!-- About -->
|
||||
<section class="settings-section about-section">
|
||||
<h3>About</h3>
|
||||
<div class="about-info">
|
||||
<svg class="about-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<p class="about-title">Conversation Assistant</p>
|
||||
<p id="about-version" class="about-version">Version 0.0.0</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reset Confirmation Modal -->
|
||||
<div id="reset-modal" class="modal hidden">
|
||||
<div class="modal-backdrop"></div>
|
||||
<div class="modal-content modal-small">
|
||||
<div class="modal-header">
|
||||
<h2>Reset All Data?</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>This will remove all saved authentication and sync data. You will need to re-authenticate.</p>
|
||||
<p class="warning-text">This action cannot be undone.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="btn-cancel-reset" class="btn secondary">Cancel</button>
|
||||
<button id="btn-confirm-reset" class="btn danger">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -426,3 +426,188 @@ body {
|
|||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--text-tertiary);
|
||||
}
|
||||
|
||||
/* Modal */
|
||||
.modal {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
position: relative;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--border);
|
||||
width: 90%;
|
||||
max-width: 400px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.modal-content.modal-small {
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.modal-header h2 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
/* Settings Sections */
|
||||
.settings-section {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.settings-section:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.settings-section h3 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 12px;
|
||||
color: var(--text-tertiary);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* Form Elements */
|
||||
.form-group {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.form-group input[type="text"] {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.form-group input[type="text"]:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.form-group input[type="text"]::placeholder {
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.form-hint {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary);
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
/* Danger Zone */
|
||||
.danger-zone {
|
||||
background: rgba(239, 68, 68, 0.05);
|
||||
border: 1px solid rgba(239, 68, 68, 0.2);
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.danger-zone h3 {
|
||||
color: var(--error);
|
||||
}
|
||||
|
||||
.btn.danger {
|
||||
background-color: var(--error);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn.danger:hover:not(:disabled) {
|
||||
background-color: #dc2626;
|
||||
}
|
||||
|
||||
.warning-text {
|
||||
color: var(--error);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
/* About Section */
|
||||
.about-section {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 12px;
|
||||
padding: 16px !important;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
padding-left: 20px !important;
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
|
||||
.about-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.about-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.about-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.about-version {
|
||||
font-size: 12px;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class ConversationQueueService {
|
|||
* Queue a single message for processing
|
||||
*/
|
||||
async queueMessageProcessing(messageId: string): Promise<string> {
|
||||
const jobData: ProcessMessageJobData = { messageId };
|
||||
const jobData: ProcessMessageJobData = { messageId, createdAt: Date.now() };
|
||||
|
||||
const job = await this.conversationQueue.add(
|
||||
ConversationJobType.PROCESS_MESSAGE,
|
||||
|
|
@ -46,7 +46,7 @@ export class ConversationQueueService {
|
|||
* Queue batch processing of unprocessed messages
|
||||
*/
|
||||
async queueBatchProcessing(limit?: number): Promise<string> {
|
||||
const jobData: ProcessBatchJobData = { limit };
|
||||
const jobData: ProcessBatchJobData = { limit, createdAt: Date.now() };
|
||||
|
||||
const job = await this.conversationQueue.add(
|
||||
ConversationJobType.PROCESS_BATCH,
|
||||
|
|
@ -66,7 +66,7 @@ export class ConversationQueueService {
|
|||
* Queue contact sync
|
||||
*/
|
||||
async queueContactSync(contacts: SyncContactDto[]): Promise<string> {
|
||||
const jobData: SyncContactsJobData = { contacts };
|
||||
const jobData: SyncContactsJobData = { contacts, createdAt: Date.now() };
|
||||
|
||||
const job = await this.conversationQueue.add(
|
||||
ConversationJobType.SYNC_CONTACTS,
|
||||
|
|
@ -93,6 +93,7 @@ export class ConversationQueueService {
|
|||
participantIds: dto.participantIds,
|
||||
isGroup: dto.isGroup,
|
||||
messages: dto.messages,
|
||||
createdAt: Date.now(),
|
||||
};
|
||||
|
||||
const job = await this.conversationQueue.add(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue