diff --git a/src/assets/dns-shared.css b/src/assets/dns-shared.css new file mode 100644 index 0000000..09c9432 --- /dev/null +++ b/src/assets/dns-shared.css @@ -0,0 +1,496 @@ +/* DNS Shared Styles - Used by DnsExternalView and DnsZonesView */ + +/* Button Base */ +.dns-view .btn { + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.625rem 1.25rem; + border-radius: var(--radius-sm); + font-weight: 500; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; + border: none; +} + +.dns-view .btn-primary { + background: #6366f1; + color: white; +} + +.dns-view .btn-primary:hover:not(:disabled) { + background: #4f46e5; +} + +.dns-view .btn-primary:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.dns-view .btn-secondary { + background: white; + border: 1px solid #e5e7eb; + color: #374151; +} + +.dns-view .btn-secondary:hover:not(:disabled) { + background: #f9fafb; +} + +.dns-view .btn-secondary.btn-sm { + padding: 0.5rem 0.75rem; + font-size: 0.8125rem; +} + +.dns-view .btn-danger { + background: #fef2f2; + border: 1px solid #fecaca; + color: #dc2626; +} + +.dns-view .btn-danger:hover:not(:disabled) { + background: #fee2e2; +} + +.dns-view .btn-icon { + padding: 0.625rem; + background: white; + border: 1px solid #e5e7eb; + color: #6b7280; +} + +.dns-view .btn-icon:hover:not(:disabled) { + background: #f9fafb; + color: #374151; +} + +.dns-view .btn-icon:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.dns-view .btn-icon-sm { + padding: 0.375rem; + background: none; + border: none; + color: #6b7280; + cursor: pointer; + border-radius: var(--radius-sm); + transition: all 0.2s; +} + +.dns-view .btn-icon-sm:hover { + background: #f3f4f6; + color: #374151; +} + +.dns-view .btn-icon-sm.danger:hover { + background: #fee2e2; + color: #dc2626; +} + +/* Form Styles */ +.dns-view .form-group { + margin-bottom: 1rem; +} + +.dns-view .form-group label { + display: block; + font-size: 0.875rem; + font-weight: 600; + color: #374151; + margin-bottom: 0.5rem; +} + +.dns-view .form-group input, +.dns-view .form-group select, +.dns-view .form-group textarea { + width: 100%; + padding: 0.75rem 1rem; + border: 1px solid #d1d5db; + border-radius: var(--radius-sm); + font-size: 0.875rem; + transition: all 0.2s; + font-family: inherit; +} + +.dns-view .form-group input:focus, +.dns-view .form-group select:focus, +.dns-view .form-group textarea:focus { + outline: none; + border-color: #6366f1; + box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); +} + +.dns-view .form-group input:disabled, +.dns-view .form-group select:disabled, +.dns-view .form-group textarea:disabled { + background: #f9fafb; + color: #9ca3af; +} + +.dns-view .form-group textarea { + resize: vertical; + min-height: 80px; +} + +.dns-view .form-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; +} + +.dns-view .hint { + display: block; + font-size: 0.75rem; + color: #6b7280; + margin-top: 0.375rem; +} + +.dns-view .error-message { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.75rem 1rem; + background: #fef2f2; + border: 1px solid #fecaca; + border-radius: var(--radius-sm); + color: #dc2626; + font-size: 0.875rem; + margin-bottom: 1rem; +} + +.dns-view .checkbox-group label { + display: flex; + align-items: center; + gap: 0.5rem; + cursor: pointer; +} + +.dns-view .checkbox-group input[type="checkbox"] { + width: auto; +} + +/* Modal Styles */ +.dns-view .modal-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + backdrop-filter: blur(4px); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.dns-view .modal-container { + background: white; + border-radius: var(--radius-sm); + width: 100%; + max-width: 480px; + box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25); +} + +.dns-view .modal-header { + padding: 1.25rem 1.5rem; + border-bottom: 1px solid #e5e7eb; + display: flex; + justify-content: space-between; + align-items: center; +} + +.dns-view .modal-header h3 { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 1.125rem; + font-weight: 600; + color: #111827; + margin: 0; +} + +.dns-view .modal-header h3 i { + color: #6366f1; +} + +.dns-view .close-btn { + background: none; + border: none; + color: #9ca3af; + cursor: pointer; + padding: 0.5rem; + border-radius: var(--radius-sm); + transition: all 0.2s; +} + +.dns-view .close-btn:hover { + background: #f3f4f6; + color: #6b7280; +} + +.dns-view .modal-body { + padding: 1.5rem; +} + +.dns-view .modal-footer { + padding: 1rem 1.5rem; + border-top: 1px solid #e5e7eb; + display: flex; + justify-content: flex-end; + gap: 0.75rem; +} + +/* Section Styles */ +.dns-view .section-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1rem; +} + +.dns-view .section-header h3 { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 1rem; + font-weight: 600; + color: #1f2937; + margin: 0; +} + +.dns-view .section-actions { + display: flex; + align-items: center; + gap: 0.5rem; +} + +/* Loading & Empty States */ +.dns-view .loading-state, +.dns-view .empty-state { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.75rem; + padding: 3rem; + color: #6b7280; +} + +.dns-view .loading-state i, +.dns-view .empty-state i { + font-size: 2rem; +} + +/* Breadcrumb */ +.dns-view .breadcrumb { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.dns-view .breadcrumb-btn { + display: flex; + align-items: center; + gap: 0.375rem; + padding: 0.375rem 0.75rem; + background: none; + border: none; + color: #6b7280; + font-size: 0.875rem; + cursor: pointer; + transition: color 0.2s; +} + +.dns-view .breadcrumb-btn:hover { + color: #4f46e5; +} + +.dns-view .breadcrumb-separator { + color: #d1d5db; +} + +.dns-view .breadcrumb-current { + display: flex; + align-items: center; + gap: 0.375rem; + font-weight: 600; + color: #1f2937; +} + +.dns-view .breadcrumb-current i { + color: #6366f1; +} + +/* Zone Styles */ +.dns-view .zones-grid { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.dns-view .zone-card { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem 1.25rem; + background: #f9fafb; + border: 1px solid #e5e7eb; + border-radius: var(--radius-sm); + cursor: pointer; + transition: all 0.2s; +} + +.dns-view .zone-card:hover { + background: #f3f4f6; + border-color: #6366f1; +} + +.dns-view .zone-name { + display: flex; + align-items: center; + gap: 0.5rem; + font-weight: 600; + color: #1f2937; +} + +.dns-view .zone-name i { + color: #6366f1; +} + +.dns-view .zone-meta { + display: flex; + align-items: center; + gap: 0.75rem; +} + +.dns-view .zone-records { + font-size: 0.75rem; + color: #6b7280; +} + +.dns-view .zone-status { + padding: 0.25rem 0.5rem; + border-radius: 9999px; + font-size: 0.7rem; + font-weight: 600; + text-transform: uppercase; +} + +.dns-view .zone-status.active { + background: #dcfce7; + color: #166534; +} + +/* Records Table */ +.dns-view .records-table { + overflow-x: auto; +} + +.dns-view .records-table table { + width: 100%; + border-collapse: collapse; +} + +.dns-view .records-table th, +.dns-view .records-table td { + padding: 0.75rem 1rem; + text-align: left; + border-bottom: 1px solid #e5e7eb; +} + +.dns-view .records-table th { + background: #f9fafb; + font-size: 0.75rem; + font-weight: 600; + color: #6b7280; + text-transform: uppercase; +} + +.dns-view .records-table tbody tr:hover { + background: #f9fafb; +} + +/* Record Type Badges */ +.dns-view .record-type { + display: inline-block; + padding: 0.25rem 0.5rem; + border-radius: var(--radius-sm); + font-size: 0.75rem; + font-weight: 600; + font-family: monospace; +} + +.dns-view .record-type.a { + background: #dbeafe; + color: #1e40af; +} + +.dns-view .record-type.aaaa { + background: #e0e7ff; + color: #3730a3; +} + +.dns-view .record-type.cname { + background: #fef3c7; + color: #92400e; +} + +.dns-view .record-type.mx { + background: #fce7f3; + color: #9d174d; +} + +.dns-view .record-type.txt { + background: #dcfce7; + color: #166534; +} + +.dns-view .record-type.ns { + background: #f3e8ff; + color: #6b21a8; +} + +.dns-view .record-type.srv { + background: #fed7aa; + color: #c2410c; +} + +.dns-view .record-type.caa { + background: #e0f2fe; + color: #0369a1; +} + +.dns-view .record-type.ptr { + background: #fae8ff; + color: #a21caf; +} + +.dns-view .record-name { + font-family: monospace; + font-weight: 500; +} + +.dns-view .record-content { + font-family: monospace; + font-size: 0.875rem; + color: #6b7280; + max-width: 300px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dns-view .actions-cell { + display: flex; + gap: 0.25rem; +} + +/* Responsive */ +@media (max-width: 768px) { + .dns-view .form-row { + grid-template-columns: 1fr; + } +} diff --git a/src/layouts/DashboardLayout.vue b/src/layouts/DashboardLayout.vue index c66e5fe..4edb1eb 100644 --- a/src/layouts/DashboardLayout.vue +++ b/src/layouts/DashboardLayout.vue @@ -116,6 +116,22 @@ + +