Spaces:
Sleeping
Sleeping
Optimize dashboard and detail pages fully for mobile responsiveness
Browse files
frontend/css/styles.css
CHANGED
|
@@ -4795,6 +4795,27 @@ tr:hover td {
|
|
| 4795 |
color: var(--gray-200);
|
| 4796 |
}
|
| 4797 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4798 |
@media (max-width: 992px) {
|
| 4799 |
.mobile-menu-toggle {
|
| 4800 |
display: flex;
|
|
@@ -4821,8 +4842,9 @@ tr:hover td {
|
|
| 4821 |
width: 100% !important;
|
| 4822 |
}
|
| 4823 |
|
| 4824 |
-
.dashboard-grid, .stats-grid, .agents-grid {
|
| 4825 |
grid-template-columns: 1fr !important;
|
|
|
|
| 4826 |
}
|
| 4827 |
|
| 4828 |
.video-call-main {
|
|
@@ -4841,6 +4863,58 @@ tr:hover td {
|
|
| 4841 |
.step-connector {
|
| 4842 |
width: 30px;
|
| 4843 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4844 |
}
|
| 4845 |
|
| 4846 |
@media (max-width: 576px) {
|
|
|
|
| 4795 |
color: var(--gray-200);
|
| 4796 |
}
|
| 4797 |
|
| 4798 |
+
.dashboard-grid {
|
| 4799 |
+
display: grid;
|
| 4800 |
+
grid-template-columns: 1fr 1fr;
|
| 4801 |
+
gap: 2rem;
|
| 4802 |
+
}
|
| 4803 |
+
|
| 4804 |
+
.responsive-grid {
|
| 4805 |
+
display: grid;
|
| 4806 |
+
gap: 2rem;
|
| 4807 |
+
}
|
| 4808 |
+
|
| 4809 |
+
.responsive-grid.two-column {
|
| 4810 |
+
grid-template-columns: 1fr 1fr;
|
| 4811 |
+
}
|
| 4812 |
+
|
| 4813 |
+
.flex-responsive {
|
| 4814 |
+
display: flex;
|
| 4815 |
+
align-items: center;
|
| 4816 |
+
justify-content: space-between;
|
| 4817 |
+
}
|
| 4818 |
+
|
| 4819 |
@media (max-width: 992px) {
|
| 4820 |
.mobile-menu-toggle {
|
| 4821 |
display: flex;
|
|
|
|
| 4842 |
width: 100% !important;
|
| 4843 |
}
|
| 4844 |
|
| 4845 |
+
.dashboard-grid, .stats-grid, .agents-grid, .responsive-grid.two-column {
|
| 4846 |
grid-template-columns: 1fr !important;
|
| 4847 |
+
gap: 1.5rem !important;
|
| 4848 |
}
|
| 4849 |
|
| 4850 |
.video-call-main {
|
|
|
|
| 4863 |
.step-connector {
|
| 4864 |
width: 30px;
|
| 4865 |
}
|
| 4866 |
+
|
| 4867 |
+
/* Page Header Stack on Mobile */
|
| 4868 |
+
.page-header {
|
| 4869 |
+
flex-direction: column !important;
|
| 4870 |
+
align-items: flex-start !important;
|
| 4871 |
+
gap: 1rem !important;
|
| 4872 |
+
}
|
| 4873 |
+
|
| 4874 |
+
.page-header .flex {
|
| 4875 |
+
flex-direction: column !important;
|
| 4876 |
+
align-items: flex-start !important;
|
| 4877 |
+
gap: 0.5rem !important;
|
| 4878 |
+
width: 100% !important;
|
| 4879 |
+
}
|
| 4880 |
+
|
| 4881 |
+
.page-header .flex.gap-2, .page-header .flex.gap-4, .page-header .flex.gap-3 {
|
| 4882 |
+
flex-direction: row !important;
|
| 4883 |
+
flex-wrap: wrap !important;
|
| 4884 |
+
align-items: center !important;
|
| 4885 |
+
}
|
| 4886 |
+
|
| 4887 |
+
.page-header .badge {
|
| 4888 |
+
margin-left: 0 !important;
|
| 4889 |
+
margin-top: 0.25rem !important;
|
| 4890 |
+
}
|
| 4891 |
+
|
| 4892 |
+
/* Tabs Horizontal Scroll on Mobile */
|
| 4893 |
+
.tabs {
|
| 4894 |
+
display: flex !important;
|
| 4895 |
+
overflow-x: auto !important;
|
| 4896 |
+
white-space: nowrap !important;
|
| 4897 |
+
padding-bottom: 0.5rem !important;
|
| 4898 |
+
margin-bottom: 1.5rem !important;
|
| 4899 |
+
-webkit-overflow-scrolling: touch !important;
|
| 4900 |
+
gap: 0.5rem !important;
|
| 4901 |
+
border-bottom: 1px solid var(--border-color);
|
| 4902 |
+
}
|
| 4903 |
+
|
| 4904 |
+
.tabs .tab {
|
| 4905 |
+
flex: 0 0 auto !important;
|
| 4906 |
+
margin-bottom: 0 !important;
|
| 4907 |
+
}
|
| 4908 |
+
|
| 4909 |
+
.flex-responsive {
|
| 4910 |
+
flex-direction: column !important;
|
| 4911 |
+
align-items: flex-start !important;
|
| 4912 |
+
gap: 1rem !important;
|
| 4913 |
+
}
|
| 4914 |
+
|
| 4915 |
+
.flex-responsive > div {
|
| 4916 |
+
width: 100% !important;
|
| 4917 |
+
}
|
| 4918 |
}
|
| 4919 |
|
| 4920 |
@media (max-width: 576px) {
|
frontend/js/components/sidebar.js
CHANGED
|
@@ -60,10 +60,13 @@ const Sidebar = {
|
|
| 60 |
/**
|
| 61 |
* Initialize mobile sidebar hamburger toggle
|
| 62 |
*/
|
|
|
|
|
|
|
| 63 |
initMobileToggle() {
|
| 64 |
const toggle = document.getElementById('mobile-menu-toggle');
|
| 65 |
if (toggle) {
|
| 66 |
-
toggle.addEventListener('click', () => {
|
|
|
|
| 67 |
if (this.element) {
|
| 68 |
const isOpen = this.element.classList.toggle('mobile-open');
|
| 69 |
const icon = toggle.querySelector('i');
|
|
@@ -72,6 +75,18 @@ const Sidebar = {
|
|
| 72 |
}
|
| 73 |
}
|
| 74 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
},
|
| 77 |
|
|
|
|
| 60 |
/**
|
| 61 |
* Initialize mobile sidebar hamburger toggle
|
| 62 |
*/
|
| 63 |
+
|
| 64 |
+
|
| 65 |
initMobileToggle() {
|
| 66 |
const toggle = document.getElementById('mobile-menu-toggle');
|
| 67 |
if (toggle) {
|
| 68 |
+
toggle.addEventListener('click', (e) => {
|
| 69 |
+
e.stopPropagation();
|
| 70 |
if (this.element) {
|
| 71 |
const isOpen = this.element.classList.toggle('mobile-open');
|
| 72 |
const icon = toggle.querySelector('i');
|
|
|
|
| 75 |
}
|
| 76 |
}
|
| 77 |
});
|
| 78 |
+
|
| 79 |
+
document.addEventListener('click', (e) => {
|
| 80 |
+
if (this.element && this.element.classList.contains('mobile-open')) {
|
| 81 |
+
if (!this.element.contains(e.target) && !toggle.contains(e.target)) {
|
| 82 |
+
this.element.classList.remove('mobile-open');
|
| 83 |
+
const icon = toggle.querySelector('i');
|
| 84 |
+
if (icon) {
|
| 85 |
+
icon.className = 'fas fa-bars';
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
});
|
| 90 |
}
|
| 91 |
},
|
| 92 |
|
frontend/js/pages/agent-detail.js
CHANGED
|
@@ -117,7 +117,7 @@ const AgentDetailPage = {
|
|
| 117 |
return `
|
| 118 |
<div class="card" style="padding:0; overflow:hidden; border-radius:16px;">
|
| 119 |
<!-- Chat Header -->
|
| 120 |
-
<div
|
| 121 |
<div style="display:flex; align-items:center; gap:0.75rem;">
|
| 122 |
<div style="width:40px; height:40px; border-radius:12px; background:${this.agent.color}22; display:flex; align-items:center; justify-content:center; font-size:1.25rem; color:${this.agent.color};">${App.getAgentIconHtml(this.agent.icon)}</div>
|
| 123 |
<div>
|
|
@@ -213,7 +213,7 @@ const AgentDetailPage = {
|
|
| 213 |
<hr style="margin:1.5rem 0;border:none;border-top:1px solid var(--gray-100);">
|
| 214 |
` : ''}
|
| 215 |
|
| 216 |
-
<div
|
| 217 |
<div>
|
| 218 |
<h4 style="margin-bottom: 1rem; color: var(--gray-900);">Identity</h4>
|
| 219 |
<div class="mb-3">
|
|
@@ -666,7 +666,7 @@ const AgentDetailPage = {
|
|
| 666 |
</div>
|
| 667 |
</div>
|
| 668 |
|
| 669 |
-
<div
|
| 670 |
<div class="form-group" style="margin-bottom: 0;">
|
| 671 |
<label class="form-label" style="font-weight: 600; color: #111827;">Expires in (days)</label>
|
| 672 |
<input type="number" id="link-expires" class="form-input" placeholder="0 = never" min="0">
|
|
|
|
| 117 |
return `
|
| 118 |
<div class="card" style="padding:0; overflow:hidden; border-radius:16px;">
|
| 119 |
<!-- Chat Header -->
|
| 120 |
+
<div class="flex-responsive" style="padding:1.25rem 1.5rem; background:#f8fafc; border-bottom:1px solid var(--border-color);">
|
| 121 |
<div style="display:flex; align-items:center; gap:0.75rem;">
|
| 122 |
<div style="width:40px; height:40px; border-radius:12px; background:${this.agent.color}22; display:flex; align-items:center; justify-content:center; font-size:1.25rem; color:${this.agent.color};">${App.getAgentIconHtml(this.agent.icon)}</div>
|
| 123 |
<div>
|
|
|
|
| 213 |
<hr style="margin:1.5rem 0;border:none;border-top:1px solid var(--gray-100);">
|
| 214 |
` : ''}
|
| 215 |
|
| 216 |
+
<div class="responsive-grid two-column">
|
| 217 |
<div>
|
| 218 |
<h4 style="margin-bottom: 1rem; color: var(--gray-900);">Identity</h4>
|
| 219 |
<div class="mb-3">
|
|
|
|
| 666 |
</div>
|
| 667 |
</div>
|
| 668 |
|
| 669 |
+
<div class="responsive-grid two-column" style="gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200);">
|
| 670 |
<div class="form-group" style="margin-bottom: 0;">
|
| 671 |
<label class="form-label" style="font-weight: 600; color: #111827;">Expires in (days)</label>
|
| 672 |
<input type="number" id="link-expires" class="form-input" placeholder="0 = never" min="0">
|
frontend/js/pages/dashboard.js
CHANGED
|
@@ -59,7 +59,7 @@ const DashboardPage = {
|
|
| 59 |
</div>
|
| 60 |
|
| 61 |
<!-- Main Content Grid -->
|
| 62 |
-
<div
|
| 63 |
|
| 64 |
<!-- Recent Agents -->
|
| 65 |
<div class="card">
|
|
|
|
| 59 |
</div>
|
| 60 |
|
| 61 |
<!-- Main Content Grid -->
|
| 62 |
+
<div class="dashboard-grid">
|
| 63 |
|
| 64 |
<!-- Recent Agents -->
|
| 65 |
<div class="card">
|