1482 lines
52 KiB
HTML
1482 lines
52 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-theme="light">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>User Dashboard - BNKops Influence</title>
|
|
<link rel="icon" href="data:,">
|
|
<link rel="stylesheet" href="css/styles.css">
|
|
<style>
|
|
.dashboard-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.dashboard-header {
|
|
background: #2c3e50;
|
|
color: white;
|
|
padding: 2rem 0;
|
|
margin-bottom: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.user-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.user-details h3 {
|
|
margin: 0 0 0.5rem 0;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.user-details p {
|
|
margin: 0;
|
|
color: #666;
|
|
}
|
|
|
|
.dashboard-nav {
|
|
display: flex;
|
|
background: #34495e;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.nav-btn {
|
|
flex: 1;
|
|
padding: 1rem;
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.nav-btn:hover {
|
|
background: #2196f3;
|
|
}
|
|
|
|
.nav-btn.active {
|
|
background: #2196f3;
|
|
}
|
|
|
|
.tab-content {
|
|
display: none;
|
|
}
|
|
|
|
.tab-content.active {
|
|
display: block;
|
|
}
|
|
|
|
.campaign-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.campaign-card {
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
padding: 0;
|
|
background: white;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.campaign-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.campaign-card-cover {
|
|
background-size: cover;
|
|
background-position: center;
|
|
min-height: 180px;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.campaign-card-cover-overlay {
|
|
background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
|
|
width: 100%;
|
|
padding: 1.5rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.campaign-card-cover-overlay h3 {
|
|
margin: 0;
|
|
color: white;
|
|
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.campaign-card > .campaign-meta,
|
|
.campaign-card > .campaign-actions {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.campaign-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.campaign-header h3 {
|
|
margin: 0;
|
|
color: #2c3e50;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.status-badge {
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 20px;
|
|
font-size: 0.8rem;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.status-draft {
|
|
background: #f39c12;
|
|
color: white;
|
|
}
|
|
|
|
.status-active {
|
|
background: #27ae60;
|
|
color: white;
|
|
}
|
|
|
|
.status-paused {
|
|
background: #e74c3c;
|
|
color: white;
|
|
}
|
|
|
|
.status-archived {
|
|
background: #95a5a6;
|
|
color: white;
|
|
}
|
|
|
|
.campaign-meta {
|
|
color: #666;
|
|
font-size: 0.9rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.campaign-meta p {
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.campaign-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.5rem 1rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 0.9rem;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #2196f3;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #95a5a6;
|
|
color: white;
|
|
}
|
|
|
|
.btn-success {
|
|
background: #27ae60;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #e74c3c;
|
|
color: white;
|
|
}
|
|
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: #666;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.spinner {
|
|
border: 4px solid #f3f3f3;
|
|
border-radius: 50%;
|
|
border-top: 4px solid #2196f3;
|
|
width: 40px;
|
|
height: 40px;
|
|
animation: spin 1s linear infinite;
|
|
margin: 0 auto 1rem;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.message-success {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
border: 1px solid #c3e6cb;
|
|
border-left: 4px solid #27ae60;
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.message-error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
border: 1px solid #f5c6cb;
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.password-success-animation {
|
|
animation: successPulse 0.6s ease-out;
|
|
}
|
|
|
|
@keyframes successPulse {
|
|
0% {
|
|
transform: scale(1);
|
|
box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
|
|
}
|
|
50% {
|
|
transform: scale(1.02);
|
|
box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
|
|
}
|
|
}
|
|
|
|
.success-checkmark {
|
|
display: inline-block;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
background: #27ae60;
|
|
color: white;
|
|
text-align: center;
|
|
line-height: 24px;
|
|
margin-right: 0.5rem;
|
|
font-weight: bold;
|
|
animation: checkmarkPop 0.4s ease-out;
|
|
}
|
|
|
|
@keyframes checkmarkPop {
|
|
0% {
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
50% {
|
|
transform: scale(1.2);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Toast notification styles */
|
|
.toast-notification {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
background: #27ae60;
|
|
color: white;
|
|
padding: 1rem 1.5rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
|
z-index: 10000;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
font-weight: 500;
|
|
animation: toastSlideIn 0.4s ease-out;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.toast-notification.error {
|
|
background: #e74c3c;
|
|
}
|
|
|
|
.toast-notification .toast-icon {
|
|
font-size: 1.5rem;
|
|
width: 32px;
|
|
height: 32px;
|
|
background: rgba(255,255,255,0.2);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
@keyframes toastSlideIn {
|
|
0% {
|
|
transform: translateX(400px);
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes toastSlideOut {
|
|
0% {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translateX(400px);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.toast-notification.toast-exit {
|
|
animation: toastSlideOut 0.4s ease-in forwards;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: #f8f9fa;
|
|
padding: 1.5rem;
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-card h3 {
|
|
font-size: 2rem;
|
|
margin: 0 0 0.5rem 0;
|
|
color: #2196f3;
|
|
}
|
|
|
|
.stat-card p {
|
|
margin: 0;
|
|
color: #666;
|
|
}
|
|
|
|
.account-info {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
margin-bottom: 0.5rem;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 2px solid #e0e6ed;
|
|
border-radius: 8px;
|
|
font-size: 0.95rem;
|
|
transition: border-color 0.3s, box-shadow 0.3s;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group textarea:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: #2196f3;
|
|
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
|
|
}
|
|
|
|
.form-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group textarea,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 2px solid #e0e6ed;
|
|
border-radius: 8px;
|
|
font-size: 0.95rem;
|
|
transition: border-color 0.3s, box-shadow 0.3s;
|
|
resize: vertical;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.section-header {
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
margin: 2rem 0 1rem 0;
|
|
padding-bottom: 0.5rem;
|
|
border-bottom: 2px solid #e0e6ed;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.checkbox-group {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.checkbox-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.checkbox-item input[type="checkbox"] {
|
|
width: auto;
|
|
margin: 0;
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
.checkbox-item label {
|
|
margin: 0;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.user-badge {
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 20px;
|
|
font-size: 0.8rem;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.user-badge.admin {
|
|
background: #e74c3c;
|
|
color: white;
|
|
}
|
|
|
|
.user-badge.user {
|
|
background: #2196f3;
|
|
color: white;
|
|
}
|
|
|
|
.user-badge.temp {
|
|
background: #f39c12;
|
|
color: white;
|
|
}
|
|
|
|
/* Campaign Selector Dropdown Styles */
|
|
.campaign-selector {
|
|
margin-bottom: 2rem;
|
|
background: #f8f9fa;
|
|
padding: 1.5rem;
|
|
border-radius: 12px;
|
|
border: 2px solid #e9ecef;
|
|
}
|
|
|
|
.campaign-selector label {
|
|
display: block;
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
margin-bottom: 0.75rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.search-dropdown {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.search-dropdown input {
|
|
width: 100%;
|
|
padding: 0.75rem 2.5rem 0.75rem 0.75rem;
|
|
border: 2px solid #e0e6ed;
|
|
border-radius: 8px;
|
|
font-size: 0.95rem;
|
|
background: white;
|
|
transition: border-color 0.3s, box-shadow 0.3s;
|
|
}
|
|
|
|
.search-dropdown input:focus {
|
|
outline: none;
|
|
border-color: #2196f3;
|
|
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
|
|
}
|
|
|
|
.dropdown-arrow {
|
|
position: absolute;
|
|
right: 0.75rem;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: #666;
|
|
pointer-events: none;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
right: 0;
|
|
background: white;
|
|
border: 2px solid #e0e6ed;
|
|
border-top: none;
|
|
border-radius: 0 0 8px 8px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
z-index: 1000;
|
|
display: none;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.dropdown-menu.show {
|
|
display: block;
|
|
}
|
|
|
|
.dropdown-item {
|
|
padding: 0.75rem;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid #f1f3f4;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.dropdown-item.selected {
|
|
background: #e3f2fd;
|
|
color: #1976d2;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dropdown-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.dropdown-item.no-results {
|
|
color: #666;
|
|
font-style: italic;
|
|
cursor: default;
|
|
}
|
|
|
|
.dropdown-item.no-results:hover {
|
|
background: white;
|
|
}
|
|
|
|
/* Response moderation styles */
|
|
.response-card {
|
|
background: white;
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.response-card.pending {
|
|
border-left: 4px solid #f39c12;
|
|
}
|
|
|
|
.response-card.approved {
|
|
border-left: 4px solid #27ae60;
|
|
}
|
|
|
|
.response-card.rejected {
|
|
border-left: 4px solid #e74c3c;
|
|
}
|
|
|
|
.response-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.response-meta {
|
|
color: #666;
|
|
font-size: 0.9rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.response-meta p {
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.response-content {
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.response-content h4 {
|
|
margin: 0 0 0.5rem 0;
|
|
color: #2c3e50;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.response-content p {
|
|
margin: 0;
|
|
color: #444;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.response-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.response-screenshot {
|
|
max-width: 200px;
|
|
margin-top: 0.5rem;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.response-screenshot:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.dashboard-nav {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.campaign-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.user-info {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.stats-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Dark mode overrides for dashboard */
|
|
[data-theme="dark"] .dashboard-container {
|
|
background-color: var(--page-bg-color, #121212);
|
|
}
|
|
|
|
[data-theme="dark"] .user-info {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
}
|
|
|
|
[data-theme="dark"] .user-details h3 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .user-details p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
[data-theme="dark"] .dashboard-nav {
|
|
background: #252525;
|
|
}
|
|
|
|
[data-theme="dark"] .campaign-card {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .campaign-card-body h3 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .campaign-card-body p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
[data-theme="dark"] .stats-grid .stat-item {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .stat-label {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
[data-theme="dark"] .stat-value {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .responses-list {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .response-item {
|
|
border-bottom-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .response-item:hover {
|
|
background: #252525;
|
|
}
|
|
|
|
[data-theme="dark"] .response-rep-name {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .form-group input,
|
|
[data-theme="dark"] .form-group select,
|
|
[data-theme="dark"] .form-group textarea {
|
|
background-color: #252525;
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .form-group label {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .section-header h2 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .account-section {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .account-section h3 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
/* ==========================================
|
|
Comprehensive Dark Mode for Dashboard
|
|
========================================== */
|
|
|
|
/* Stat cards */
|
|
[data-theme="dark"] .stat-card {
|
|
background: #252525;
|
|
}
|
|
|
|
[data-theme="dark"] .stat-card h3 {
|
|
color: var(--md-primary-fg-color, #2196f3);
|
|
}
|
|
|
|
[data-theme="dark"] .stat-card p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
/* Account info section */
|
|
[data-theme="dark"] .account-info {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
[data-theme="dark"] .account-info h3 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87)) !important;
|
|
}
|
|
|
|
[data-theme="dark"] .account-info p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6)) !important;
|
|
}
|
|
|
|
/* Campaign selector */
|
|
[data-theme="dark"] .campaign-selector {
|
|
background: #252525;
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .campaign-selector label {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
/* Search dropdown */
|
|
[data-theme="dark"] .search-dropdown input {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .search-dropdown input::placeholder {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
[data-theme="dark"] .dropdown-menu {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .dropdown-item {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
border-bottom-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .dropdown-item:hover {
|
|
background: #252525;
|
|
}
|
|
|
|
[data-theme="dark"] .dropdown-item.selected {
|
|
background: rgba(33, 150, 243, 0.2);
|
|
color: var(--md-primary-fg-color-light, #42a5f5);
|
|
}
|
|
|
|
/* Response cards */
|
|
[data-theme="dark"] .response-card {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
[data-theme="dark"] .response-meta {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
[data-theme="dark"] .response-content {
|
|
background: #252525;
|
|
}
|
|
|
|
[data-theme="dark"] .response-content h4 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
[data-theme="dark"] .response-content p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
/* Campaign header */
|
|
[data-theme="dark"] .campaign-header h3 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
/* Section headers */
|
|
[data-theme="dark"] .section-header {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
border-bottom-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
/* Tab content headings */
|
|
[data-theme="dark"] .tab-content h2 {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
/* Checkbox items */
|
|
[data-theme="dark"] .checkbox-item label {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
}
|
|
|
|
/* Empty state */
|
|
[data-theme="dark"] .empty-state {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
/* Loading text */
|
|
[data-theme="dark"] .loading p {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
/* Message success/error */
|
|
[data-theme="dark"] .message-success {
|
|
background: rgba(39, 174, 96, 0.15);
|
|
border-color: rgba(39, 174, 96, 0.3);
|
|
color: #4ade80;
|
|
}
|
|
|
|
[data-theme="dark"] .message-error {
|
|
background: rgba(231, 76, 60, 0.15);
|
|
border-color: rgba(231, 76, 60, 0.3);
|
|
color: #f87171;
|
|
}
|
|
|
|
/* Campaign meta */
|
|
[data-theme="dark"] .campaign-meta {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6));
|
|
}
|
|
|
|
/* Filter selects */
|
|
[data-theme="dark"] #responses-campaign-filter,
|
|
[data-theme="dark"] #responses-status-filter {
|
|
background: var(--card-bg-color, #1e1e1e);
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87));
|
|
border-color: var(--card-border-color, #333);
|
|
}
|
|
|
|
/* Email body formatting tips box */
|
|
[data-theme="dark"] div[style*="background: #e3f2fd"] {
|
|
background: rgba(33, 150, 243, 0.15) !important;
|
|
}
|
|
|
|
[data-theme="dark"] div[style*="background: #e3f2fd"] strong {
|
|
color: var(--md-primary-fg-color-light, #42a5f5) !important;
|
|
}
|
|
|
|
[data-theme="dark"] div[style*="background: #e3f2fd"] li,
|
|
[data-theme="dark"] div[style*="background: #e3f2fd"] code {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87)) !important;
|
|
}
|
|
|
|
/* Inline color overrides */
|
|
[data-theme="dark"] [style*="color: #666"],
|
|
[data-theme="dark"] [style*="color:#666"] {
|
|
color: var(--text-muted-color, rgba(255, 255, 255, 0.6)) !important;
|
|
}
|
|
|
|
[data-theme="dark"] [style*="color: #2c3e50"],
|
|
[data-theme="dark"] [style*="color:#2c3e50"] {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87)) !important;
|
|
}
|
|
|
|
[data-theme="dark"] [style*="color: #444"],
|
|
[data-theme="dark"] [style*="color:#444"] {
|
|
color: var(--text-color, rgba(255, 255, 255, 0.87)) !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="dashboard-header">
|
|
<div class="dashboard-container">
|
|
<h1>My Campaign Dashboard</h1>
|
|
<p>Manage your influence campaigns</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dashboard-container">
|
|
<!-- User Info -->
|
|
<div class="user-info">
|
|
<div class="user-details">
|
|
<h3 id="user-name">Loading...</h3>
|
|
<p id="user-email">Loading...</p>
|
|
</div>
|
|
<div class="user-actions">
|
|
<span id="user-role-badge" class="user-badge">User</span>
|
|
<button id="logout-btn" class="btn btn-secondary">Logout</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Navigation -->
|
|
<nav class="dashboard-nav">
|
|
<button class="nav-btn active" data-tab="campaigns">My Campaigns</button>
|
|
<button class="nav-btn" data-tab="create">Create Campaign</button>
|
|
<button class="nav-btn" data-tab="edit">Edit Campaign</button>
|
|
<button class="nav-btn" data-tab="responses">Responses</button>
|
|
<button class="nav-btn" data-tab="analytics">Analytics</button>
|
|
<button class="nav-btn" data-tab="account">Account</button>
|
|
</nav>
|
|
|
|
<!-- Success/Error Messages -->
|
|
<div id="message-container" class="hidden"></div>
|
|
|
|
<!-- My Campaigns Tab -->
|
|
<div id="campaigns-tab" class="tab-content active">
|
|
<div style="margin-bottom: 2rem;">
|
|
<h2 style="margin: 0;">My Campaigns</h2>
|
|
</div>
|
|
|
|
<div id="campaigns-loading" class="loading hidden">
|
|
<div class="spinner"></div>
|
|
<p>Loading your campaigns...</p>
|
|
</div>
|
|
|
|
<div id="campaigns-list" class="campaign-grid">
|
|
<!-- Campaigns will be loaded here -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Create Campaign Tab -->
|
|
<div id="create-tab" class="tab-content">
|
|
<h2>Create New Campaign</h2>
|
|
|
|
<!-- Campaign Search Dropdown -->
|
|
<div class="campaign-selector">
|
|
<label for="create-campaign-selector">Select existing campaign as template (optional):</label>
|
|
<div class="search-dropdown">
|
|
<input type="text" id="create-campaign-selector" placeholder="Search campaigns..." autocomplete="off">
|
|
<div class="dropdown-arrow">▼</div>
|
|
<div class="dropdown-menu" id="create-dropdown-menu">
|
|
<div class="dropdown-item" data-campaign-id="new">Create New Campaign</div>
|
|
<!-- Campaign options will be populated here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="create-campaign-form">
|
|
<div class="form-grid">
|
|
<div class="form-group">
|
|
<label for="create-title">Campaign Title *</label>
|
|
<input type="text" id="create-title" name="title" required
|
|
placeholder="Save Alberta Parks">
|
|
</div>
|
|
|
|
<div class="form-group status-select">
|
|
<label for="create-status">Campaign Status</label>
|
|
<select id="create-status" name="status">
|
|
<option value="draft">📝 Draft</option>
|
|
<option value="active">🚀 Active</option>
|
|
<option value="paused">⏸️ Paused</option>
|
|
<option value="archived">📦 Archived</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="create-description">Description</label>
|
|
<textarea id="create-description" name="description" rows="3"
|
|
placeholder="A brief description of the campaign"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="create-email-subject">Email Subject *</label>
|
|
<input type="text" id="create-email-subject" name="email_subject" required
|
|
placeholder="Protect Alberta's Provincial Parks">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="create-email-body">Email Body *</label>
|
|
<textarea id="create-email-body" name="email_body" rows="8" required
|
|
placeholder="Dear [Representative Name],
|
|
|
|
I am writing as your constituent to express my concern about...
|
|
|
|
Sincerely,
|
|
[Your Name]"></textarea>
|
|
<div style="background: #e3f2fd; padding: 1rem; border-radius: 8px; margin-top: 0.75rem; font-size: 0.9rem;">
|
|
<strong style="color: #1565c0;">Dynamic Variables:</strong>
|
|
<ul style="margin: 0.5rem 0 0 1.5rem; padding: 0; color: #444;">
|
|
<li><code>[Representative Name]</code> - Replaced with the recipient's actual name</li>
|
|
<li><code>[Your Name]</code> - Replaced with the sender's name</li>
|
|
<li><code>[Your Postal Code]</code> - Replaced with the sender's postal code</li>
|
|
</ul>
|
|
<strong style="color: #1565c0; display: block; margin-top: 0.75rem;">Formatting Tips:</strong>
|
|
<ul style="margin: 0.5rem 0 0 1.5rem; padding: 0; color: #444;">
|
|
<li>Start a line with <code>-</code> or <code>*</code> for bullet points</li>
|
|
<li>Start a line with <code>1.</code> or <code>2.</code> for numbered lists</li>
|
|
<li>Use blank lines to separate paragraphs</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="create-call-to-action">Call to Action</label>
|
|
<textarea id="create-call-to-action" name="call_to_action" rows="3"
|
|
placeholder="Join thousands of Albertans in protecting our provincial parks. Send an email to your representatives today!"></textarea>
|
|
</div>
|
|
|
|
<div class="section-header">⚙️ Campaign Settings</div>
|
|
<div class="form-group">
|
|
<div class="checkbox-group">
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-allow-smtp" name="allow_smtp_email" checked>
|
|
<label for="create-allow-smtp">📧 Allow SMTP Email Sending</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-allow-mailto" name="allow_mailto_link" checked>
|
|
<label for="create-allow-mailto">🔗 Allow Mailto Links</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-collect-info" name="collect_user_info" checked>
|
|
<label for="create-collect-info">👤 Collect User Information</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-show-count" name="show_email_count" checked>
|
|
<label for="create-show-count">📊 Show Email Count</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-allow-editing" name="allow_email_editing">
|
|
<label for="create-allow-editing">✏️ Allow Email Editing</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-show-response-wall" name="show_response_wall">
|
|
<label for="create-show-response-wall">💬 Show Response Wall Button</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header">🏛️ Target Government Levels</div>
|
|
<div class="form-group">
|
|
<div class="checkbox-group">
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-federal" name="target_government_levels" value="Federal" checked>
|
|
<label for="create-federal">🍁 Federal (MPs)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-provincial" name="target_government_levels" value="Provincial" checked>
|
|
<label for="create-provincial">🏛️ Provincial (MLAs)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-municipal" name="target_government_levels" value="Municipal" checked>
|
|
<label for="create-municipal">🏙️ Municipal (Mayors, Councillors)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="create-school" name="target_government_levels" value="School Board">
|
|
<label for="create-school">🎓 School Board</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<button type="submit" class="btn btn-primary">Create Campaign</button>
|
|
<button type="button" class="btn btn-secondary" data-action="cancel-create">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Edit Campaign Tab -->
|
|
<div id="edit-tab" class="tab-content">
|
|
<h2>Edit Campaign</h2>
|
|
|
|
<!-- Campaign Search Dropdown -->
|
|
<div class="campaign-selector">
|
|
<label for="edit-campaign-selector">Select campaign to edit:</label>
|
|
<div class="search-dropdown">
|
|
<input type="text" id="edit-campaign-selector" placeholder="Search campaigns..." autocomplete="off">
|
|
<div class="dropdown-arrow">▼</div>
|
|
<div class="dropdown-menu" id="edit-dropdown-menu">
|
|
<div class="dropdown-item" data-campaign-id="">Select a campaign to edit...</div>
|
|
<!-- Campaign options will be populated here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="edit-campaign-form">
|
|
<div class="form-grid">
|
|
<div class="form-group">
|
|
<label for="edit-title">Campaign Title *</label>
|
|
<input type="text" id="edit-title" name="title" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="edit-status">Status</label>
|
|
<select id="edit-status" name="status">
|
|
<option value="draft">📝 Draft</option>
|
|
<option value="active">🚀 Active</option>
|
|
<option value="paused">⏸️ Paused</option>
|
|
<option value="archived">📦 Archived</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="edit-description">Description</label>
|
|
<textarea id="edit-description" name="description" rows="3"></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="edit-email-subject">Email Subject *</label>
|
|
<input type="text" id="edit-email-subject" name="email_subject" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="edit-email-body">Email Body *</label>
|
|
<textarea id="edit-email-body" name="email_body" rows="8" required></textarea>
|
|
<div style="background: #e3f2fd; padding: 1rem; border-radius: 8px; margin-top: 0.75rem; font-size: 0.9rem;">
|
|
<strong style="color: #1565c0;">Dynamic Variables:</strong>
|
|
<ul style="margin: 0.5rem 0 0 1.5rem; padding: 0; color: #444;">
|
|
<li><code>[Representative Name]</code> - Replaced with the recipient's actual name</li>
|
|
<li><code>[Your Name]</code> - Replaced with the sender's name</li>
|
|
<li><code>[Your Postal Code]</code> - Replaced with the sender's postal code</li>
|
|
</ul>
|
|
<strong style="color: #1565c0; display: block; margin-top: 0.75rem;">Formatting Tips:</strong>
|
|
<ul style="margin: 0.5rem 0 0 1.5rem; padding: 0; color: #444;">
|
|
<li>Start a line with <code>-</code> or <code>*</code> for bullet points</li>
|
|
<li>Start a line with <code>1.</code> or <code>2.</code> for numbered lists</li>
|
|
<li>Use blank lines to separate paragraphs</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="edit-call-to-action">Call to Action</label>
|
|
<textarea id="edit-call-to-action" name="call_to_action" rows="3"></textarea>
|
|
</div>
|
|
|
|
<div class="section-header">⚙️ Campaign Settings</div>
|
|
<div class="form-group">
|
|
<div class="checkbox-group">
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-allow-smtp" name="allow_smtp_email">
|
|
<label for="edit-allow-smtp">📧 Allow SMTP Email Sending</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-allow-mailto" name="allow_mailto_link">
|
|
<label for="edit-allow-mailto">🔗 Allow Mailto Links</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-collect-info" name="collect_user_info">
|
|
<label for="edit-collect-info">👤 Collect User Information</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-show-count" name="show_email_count">
|
|
<label for="edit-show-count">📊 Show Email Count</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-allow-editing" name="allow_email_editing">
|
|
<label for="edit-allow-editing">✏️ Allow Email Editing</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-show-response-wall" name="show_response_wall">
|
|
<label for="edit-show-response-wall">💬 Show Response Wall Button</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header">🏛️ Target Government Levels</div>
|
|
<div class="form-group">
|
|
<div class="checkbox-group">
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-federal" name="target_government_levels" value="Federal">
|
|
<label for="edit-federal">🍁 Federal (MPs)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-provincial" name="target_government_levels" value="Provincial">
|
|
<label for="edit-provincial">🏛️ Provincial (MLAs)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-municipal" name="target_government_levels" value="Municipal">
|
|
<label for="edit-municipal">🏙️ Municipal (Mayors, Councillors)</label>
|
|
</div>
|
|
<div class="checkbox-item">
|
|
<input type="checkbox" id="edit-school" name="target_government_levels" value="School Board">
|
|
<label for="edit-school">🎓 School Board</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<button type="submit" class="btn btn-primary">Update Campaign</button>
|
|
<button type="button" class="btn btn-secondary" data-action="cancel-edit">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Analytics Tab -->
|
|
<!-- Analytics Tab -->
|
|
<div id="analytics-tab" class="tab-content">
|
|
<h2>Your Campaign Analytics</h2>
|
|
|
|
<div id="analytics-loading" class="loading hidden">
|
|
<div class="spinner"></div>
|
|
<p>Loading analytics...</p>
|
|
</div>
|
|
|
|
<div id="analytics-content">
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3 id="total-campaigns">0</h3>
|
|
<p>Total Campaigns</p>
|
|
</div>
|
|
<div class="stat-card">
|
|
<h3 id="active-campaigns">0</h3>
|
|
<p>Active Campaigns</p>
|
|
</div>
|
|
<div class="stat-card">
|
|
<h3 id="total-emails">0</h3>
|
|
<p>Emails Sent</p>
|
|
</div>
|
|
<div class="stat-card">
|
|
<h3 id="total-users-reached">0</h3>
|
|
<p>Users Reached</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Responses Tab -->
|
|
<div id="responses-tab" class="tab-content">
|
|
<h2>Moderate Responses</h2>
|
|
|
|
<div style="display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;">
|
|
<div class="campaign-selector" style="flex: 1; min-width: 300px; margin: 0;">
|
|
<label for="responses-campaign-filter">Filter by Campaign:</label>
|
|
<select id="responses-campaign-filter" style="width: 100%; padding: 0.75rem; border: 2px solid #e0e6ed; border-radius: 8px;">
|
|
<option value="">All My Campaigns</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="campaign-selector" style="flex: 1; min-width: 200px; margin: 0;">
|
|
<label for="responses-status-filter">Filter by Status:</label>
|
|
<select id="responses-status-filter" style="width: 100%; padding: 0.75rem; border: 2px solid #e0e6ed; border-radius: 8px;">
|
|
<option value="all">All Statuses</option>
|
|
<option value="pending" selected>Pending</option>
|
|
<option value="approved">Approved</option>
|
|
<option value="rejected">Rejected</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="responses-loading" class="loading hidden">
|
|
<div class="spinner"></div>
|
|
<p>Loading responses...</p>
|
|
</div>
|
|
|
|
<div id="responses-list">
|
|
<!-- Responses will be loaded here -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Account Tab -->
|
|
<div id="account-tab" class="tab-content">
|
|
<h2>Account Settings</h2>
|
|
|
|
<div class="account-info">
|
|
<h3 style="color: #2c3e50; margin-bottom: 1.5rem;">Account Information</h3>
|
|
<form id="account-form">
|
|
<div class="form-group">
|
|
<label for="account-name">Full Name</label>
|
|
<input type="text" id="account-name" name="name" readonly>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="account-email">Email Address</label>
|
|
<input type="email" id="account-email" name="email" readonly>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="account-phone">Phone Number</label>
|
|
<input type="tel" id="account-phone" name="phone" readonly>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="account-role">User Role</label>
|
|
<input type="text" id="account-role" name="role" readonly>
|
|
</div>
|
|
<div class="form-group" id="account-expiration" style="display: none;">
|
|
<label for="account-expires">Account Expires</label>
|
|
<input type="text" id="account-expires" name="expires" readonly>
|
|
</div>
|
|
</form>
|
|
|
|
<p style="color: #666; font-size: 0.9rem; margin-top: 1rem;">
|
|
To update your account information, please contact an administrator.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Password Change Section -->
|
|
<div class="account-info" style="margin-top: 2rem;">
|
|
<h3 style="color: #2c3e50; margin-bottom: 1rem;">Change Password</h3>
|
|
<p style="color: #666; font-size: 0.9rem; margin-bottom: 1.5rem;">
|
|
For security reasons, please use a strong password with at least 8 characters.
|
|
</p>
|
|
|
|
<div id="password-message" class="hidden"></div>
|
|
|
|
<form id="change-password-form">
|
|
<div class="form-group">
|
|
<label for="current-password">Current Password *</label>
|
|
<input type="password" id="current-password" name="currentPassword" required
|
|
placeholder="Enter your current password">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="new-password">New Password *</label>
|
|
<input type="password" id="new-password" name="newPassword" required
|
|
placeholder="Enter your new password (min 8 characters)"
|
|
minlength="8">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="confirm-password">Confirm New Password *</label>
|
|
<input type="password" id="confirm-password" name="confirmPassword" required
|
|
placeholder="Re-enter your new password"
|
|
minlength="8">
|
|
</div>
|
|
<div class="form-row">
|
|
<button type="submit" class="btn btn-primary">Change Password</button>
|
|
<button type="button" class="btn btn-secondary" id="cancel-password-change">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Theme Toggle Button -->
|
|
<button class="theme-toggle" id="theme-toggle-btn" aria-label="Toggle dark mode">
|
|
<svg class="sun-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"/>
|
|
</svg>
|
|
<svg class="moon-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"/>
|
|
</svg>
|
|
</button>
|
|
|
|
<!-- Theme Toggle Script -->
|
|
<script>
|
|
// Load saved theme preference immediately
|
|
(function() {
|
|
const savedTheme = localStorage.getItem('theme');
|
|
if (savedTheme) {
|
|
document.documentElement.setAttribute('data-theme', savedTheme);
|
|
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
document.documentElement.setAttribute('data-theme', 'dark');
|
|
}
|
|
})();
|
|
|
|
// Add event listener for theme toggle button
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const themeToggleBtn = document.getElementById('theme-toggle-btn');
|
|
if (themeToggleBtn) {
|
|
themeToggleBtn.addEventListener('click', function() {
|
|
const html = document.documentElement;
|
|
const currentTheme = html.getAttribute('data-theme');
|
|
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
|
|
html.setAttribute('data-theme', newTheme);
|
|
localStorage.setItem('theme', newTheme);
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script src="js/api-client.js"></script>
|
|
<script src="js/auth.js"></script>
|
|
<script src="js/dashboard.js"></script>
|
|
</body>
|
|
</html> |