build(ui): expand application shell and implement administrative dashboard pages
This commit significantly expands the application's routing, navigation, and administrative capabilities. It introduces several new functional modules and refines the core layout for a more professional, dashboard-oriented experience. - **Routing & Navigation**: - Added routes for `wallboard`, `call-center`, `call-center/calls`, and `chat-questions`. - Updated `SidebarComponent` to include all new navigation items. - Enhanced `LayoutComponent` with dynamic navigation based on user roles (admin vs. user). - **New Administrative Pages**: - `WallboardPage`: Implements a real-time KPI dashboard with call activity trends and outcome distributions. - `CallCenterPage`: Provides a symbolic interface for managing call center connectivity and synchronization. - `CallCenterCallsPage`: Implements a call history retrieval interface with filtering capabilities. - `ChatQuestionsPage`: Adds a module for reviewing user questions from web and mobile channels. - **Core Infrastructure & Refinement**: - Updated `AppConfig` to include an `APP_INITIALIZER` for validating user identity via `AuthService` on startup. - Refined `HomeComponent` layout to a "Claude-style" continuous chat column. - Implemented global themed scrollbars and integrated the 'Lahze' font family. - Added `proxy.conf.json` and updated `angular.json` to support local backend development. - **Documentation**: - Added comprehensive API handoff guides for frontend-backend connection and MVP API catalog.
This commit is contained in:
@@ -1,15 +1,35 @@
|
||||
<div class="stream-panel" role="region" aria-label="گفتگوی صوتی" [attr.data-state]="state()">
|
||||
<div
|
||||
class="stream-panel"
|
||||
role="region"
|
||||
aria-label="گفتگوی صوتی"
|
||||
[class.is-ended]="ended()"
|
||||
[attr.data-state]="state()"
|
||||
>
|
||||
<div class="sr-only" role="status" aria-live="polite">{{ statusText() }}</div>
|
||||
|
||||
<div class="orb-container" #orbContainer aria-hidden="true">
|
||||
@if (!orbAvailable()) {
|
||||
<div class="orb-fallback"></div>
|
||||
}
|
||||
<!-- Orb layer: behind the transcript, anchored just above the controls -->
|
||||
<div class="stream-orb-layer" aria-hidden="true">
|
||||
<div class="orb-container" #orbContainer>
|
||||
@if (!orbAvailable()) {
|
||||
<div class="orb-fallback"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="stream-status" [attr.data-state]="state()">
|
||||
<span class="status-dot" aria-hidden="true"></span>
|
||||
<p class="status-text">{{ statusText() }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stream-status" [attr.data-state]="state()">
|
||||
<span class="status-dot" aria-hidden="true"></span>
|
||||
<p class="status-text">{{ statusText() }}</p>
|
||||
<!-- Transcript: overlaid on top of the orb, keeps streaming while the call runs -->
|
||||
<div
|
||||
class="stream-transcript"
|
||||
#scroller
|
||||
role="log"
|
||||
aria-label="متن گفتگو"
|
||||
aria-live="polite"
|
||||
aria-relevant="additions"
|
||||
>
|
||||
<app-voice-transcript [messages]="messages()" />
|
||||
</div>
|
||||
|
||||
@if (streamError(); as errorText) {
|
||||
@@ -24,79 +44,45 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="stream-transcript" #scroller role="log" aria-label="متن گفتگو" aria-live="polite" aria-relevant="additions">
|
||||
@for (message of messages(); track message.role + message.id) {
|
||||
<div class="bubble-row" [class.is-user]="message.role === 'user'">
|
||||
<div
|
||||
class="bubble"
|
||||
[class.is-user]="message.role === 'user'"
|
||||
[class.is-partial]="!message.final"
|
||||
[class.is-interrupted]="message.interrupted"
|
||||
dir="rtl"
|
||||
>
|
||||
@if (message.text) {
|
||||
<span class="bubble-text">{{ message.text }}</span>
|
||||
}
|
||||
@if (message.interrupted) {
|
||||
<span class="bubble-tag">(قطع شد)</span>
|
||||
}
|
||||
@if (message.sources?.length) {
|
||||
<ul class="source-list" aria-label="منابع پاسخ">
|
||||
@for (source of message.sources ?? []; track source.source_ref + source.chunk_id) {
|
||||
<li
|
||||
class="source-chip"
|
||||
[class.is-unavailable]="source.available === false"
|
||||
[attr.title]="source.excerpt ?? null"
|
||||
>
|
||||
<span class="source-ref">{{ source.source_ref }}</span>
|
||||
<span class="source-label">{{ sourceLabel(source) }}</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
} @empty {
|
||||
<p class="transcript-empty">صحبت کنید؛ گفتگو اینجا نمایش داده میشود</p>
|
||||
}
|
||||
</div>
|
||||
<!-- Controls: fade out together with the orb when the call ends -->
|
||||
<div class="stream-footer">
|
||||
<div class="stream-actions">
|
||||
<button
|
||||
type="button"
|
||||
class="stream-btn"
|
||||
[class.is-active]="muted()"
|
||||
[attr.aria-pressed]="muted()"
|
||||
[attr.aria-label]="muteLabel()"
|
||||
[attr.title]="muteLabel()"
|
||||
[disabled]="connection() !== 'connected'"
|
||||
(click)="toggleMute()"
|
||||
>
|
||||
@if (muted()) {
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<line x1="2" x2="22" y1="2" y2="22" />
|
||||
<path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" />
|
||||
<path d="M5 10v2a7 7 0 0 0 12 5" />
|
||||
<path d="M15 9.34V5a3 3 0 0 0-5.68-1.33" />
|
||||
<path d="M9 9v3a3 3 0 0 0 5.12 2.12" />
|
||||
<line x1="12" x2="12" y1="19" y2="22" />
|
||||
</svg>
|
||||
} @else {
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" />
|
||||
<path d="M19 10v2a7 7 0 0 1-14 0v-2" />
|
||||
<line x1="12" x2="12" y1="19" y2="22" />
|
||||
</svg>
|
||||
}
|
||||
<span>{{ muted() ? 'فعالسازی' : 'بیصدا' }}</span>
|
||||
</button>
|
||||
|
||||
<div class="stream-actions">
|
||||
<button
|
||||
type="button"
|
||||
class="stream-btn"
|
||||
[class.is-active]="muted()"
|
||||
[attr.aria-pressed]="muted()"
|
||||
[attr.aria-label]="muteLabel()"
|
||||
[attr.title]="muteLabel()"
|
||||
[disabled]="connection() !== 'connected'"
|
||||
(click)="toggleMute()"
|
||||
>
|
||||
@if (muted()) {
|
||||
<button type="button" class="stream-btn is-end" aria-label="پایان گفتگوی صوتی" (click)="endCall()">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<line x1="2" x2="22" y1="2" y2="22" />
|
||||
<path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" />
|
||||
<path d="M5 10v2a7 7 0 0 0 12 5" />
|
||||
<path d="M15 9.34V5a3 3 0 0 0-5.68-1.33" />
|
||||
<path d="M9 9v3a3 3 0 0 0 5.12 2.12" />
|
||||
<line x1="12" x2="12" y1="19" y2="22" />
|
||||
<line x1="18" x2="6" y1="6" y2="18" />
|
||||
<line x1="6" x2="18" y1="6" y2="18" />
|
||||
</svg>
|
||||
} @else {
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" />
|
||||
<path d="M19 10v2a7 7 0 0 1-14 0v-2" />
|
||||
<line x1="12" x2="12" y1="19" y2="22" />
|
||||
</svg>
|
||||
}
|
||||
<span>{{ muted() ? 'فعالسازی' : 'بیصدا' }}</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="stream-btn is-end" aria-label="پایان گفتگوی صوتی" (click)="endCall()">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<line x1="18" x2="6" y1="6" y2="18" />
|
||||
<line x1="6" x2="18" y1="6" y2="18" />
|
||||
</svg>
|
||||
<span>پایان گفتگو</span>
|
||||
</button>
|
||||
<span>پایان گفتگو</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user