Files
wehub-resource-sync 4ce4204b6c
CI / Lint (push) Failing after 2s
CI / Build (push) Has been skipped
SDK CI / PHP SDK (push) Failing after 1s
Split PHP SDK / PHP SDK tests (push) Failing after 1s
CI / Test (push) Failing after 1s
CI / Dashboard (push) Failing after 0s
SDK CI / JavaScript SDK (push) Failing after 0s
SDK CI / Python SDK (push) Failing after 2s
SDK CI / Java SDK (push) Failing after 1s
Split PHP SDK / Mirror sdk/php -> rmyndharis/openwa-php (push) Has been skipped
CI / Test (PostgreSQL migrations) (push) Failing after 7m47s
CI / Docker Build (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:24:08 +08:00

452 lines
9.1 KiB
CSS

.api-keys-page{
padding: 2rem;
width: 100%;
box-sizing: border-box;
}
.api-keys-page .page-header{
margin-bottom: 2rem;
}
.api-keys-page .header-content{
display: flex;
justify-content: space-between;
align-items: center;
}
/* H1 inherited from global */
.api-keys-page .btn-primary{
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.25rem;
background: var(--primary);
color: white;
border: none;
border-radius: var(--radius);
font-size: 0.9375rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.api-keys-page .btn-primary:hover{
background: var(--primary-hover);
}
.api-keys-page .api-keys-content{
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.api-keys-page .keys-table-container{
background: var(--bg-white);
border-radius: 12px;
box-shadow: var(--shadow-sm);
border: 1px solid var(--border);
width: 100%;
overflow-x: auto;
}
.api-keys-page .keys-table{
width: 100%;
font-size: 0.875rem;
border-collapse: collapse;
}
/* Table header and row styling */
.api-keys-page .keys-table thead tr.table-row.header th{
background: var(--bg-light);
font-size: 0.7rem;
font-weight: 700;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
border-bottom: 1px solid var(--border);
padding: 1.125rem 1.5rem;
text-align: left;
}
.api-keys-page .keys-table tbody tr.table-row td{
padding: 1.125rem 1.5rem;
border-bottom: 1px solid var(--border);
vertical-align: middle;
}
.api-keys-page .keys-table tbody tr.table-row:last-child td{
border-bottom: none;
}
.api-keys-page .keys-table tbody tr.table-row:hover{
background: rgba(37, 211, 102, 0.05);
}
.api-keys-page .keys-table tbody tr.table-row:nth-child(even){
background: rgba(148, 163, 184, 0.08);
}
.api-keys-page .keys-table tbody tr.table-row:nth-child(even):hover{
background: rgba(37, 211, 102, 0.05);
}
.api-keys-page .name-cell{
font-weight: 500;
color: var(--text-primary);
white-space: nowrap;
}
.api-keys-page .key-cell{
display: flex;
align-items: center;
gap: 0.5rem;
}
.api-keys-page .key-cell code{
font-size: 0.8125rem;
color: var(--text-secondary);
background: var(--bg-light);
padding: 0.375rem 0.625rem;
border-radius: 4px;
font-family: monospace;
white-space: nowrap;
}
.api-keys-page .icon-btn-sm{
padding: 0.25rem;
background: transparent;
border: none;
color: var(--text-muted);
cursor: pointer;
transition: color 0.2s;
flex-shrink: 0;
}
.api-keys-page .icon-btn-sm:hover{
color: var(--text-primary);
}
.api-keys-page .permissions-cell{
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
}
.api-keys-page .permission-badge{
font-size: 0.6875rem;
padding: 0.25rem 0.5rem;
background: rgba(59, 130, 246, 0.12);
color: var(--info);
border-radius: 4px;
font-weight: 500;
white-space: nowrap;
}
.api-keys-page .permission-badge:first-child:last-child{
background: rgba(37, 211, 102, 0.1);
color: var(--primary);
}
.api-keys-page .rate-limit{
font-family: monospace;
font-size: 0.8125rem;
color: var(--text-secondary);
white-space: nowrap;
}
.api-keys-page .actions-cell{
display: flex;
gap: 0.25rem;
justify-content: flex-end;
}
.api-keys-page .icon-btn{
padding: 0.5rem;
background: transparent;
border: 1px solid var(--border);
border-radius: 6px;
cursor: pointer;
color: var(--text-secondary);
transition: all 0.2s;
flex-shrink: 0;
}
.api-keys-page .icon-btn:hover{
background: var(--bg-light);
color: var(--text-primary);
}
.api-keys-page .icon-btn.danger:hover{
background: rgba(239, 68, 68, 0.12);
border-color: rgba(239, 68, 68, 0.3);
color: var(--error);
}
.api-keys-page .permissions-reference{
background: var(--bg-white);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
border: 1px solid var(--border);
}
.api-keys-page .permissions-reference h3{
/* Inherits from H3 */
margin-bottom: 1rem;
}
.api-keys-page .permissions-list{
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 0.75rem;
}
.api-keys-page .perm-item{
display: flex;
flex-direction: column;
gap: 0.25rem;
padding: 0.75rem;
background: var(--bg-light);
border-radius: var(--radius);
}
.api-keys-page .perm-item code{
font-size: 0.8125rem;
color: var(--primary);
background: rgba(37, 211, 102, 0.1);
padding: 0.25rem 0.5rem;
border-radius: 4px;
width: fit-content;
}
.api-keys-page .perm-item span{
font-size: 0.75rem;
color: var(--text-secondary);
}
/* Empty Table State */
.api-keys-page .empty-table-state{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
text-align: center;
color: var(--text-muted);
}
.api-keys-page .empty-table-state svg{
margin-bottom: 1rem;
opacity: 0.4;
color: var(--text-muted);
}
.api-keys-page .empty-table-state h3{
font-size: 1.125rem;
font-weight: 600;
color: var(--text-secondary);
margin: 0 0 0.5rem;
}
.api-keys-page .empty-table-state p{
margin: 0;
font-size: 0.875rem;
max-width: 300px;
}
/* Confirmation Modal Styles */
.api-keys-page .confirm-modal{
max-width: 400px;
}
.api-keys-page .confirm-icon-wrapper{
display: flex;
justify-content: center;
margin-bottom: 1rem;
}
.api-keys-page .confirm-warning-icon{
color: var(--warning);
}
.api-keys-page .confirm-message{
text-align: center;
color: var(--text-secondary);
font-size: 0.9375rem;
line-height: 1.6;
margin: 0;
}
.api-keys-page .confirm-message strong{
color: var(--text-primary);
}
.api-keys-page .btn-danger{
padding: 0.75rem 1.25rem;
background: var(--error);
color: white;
border: none;
border-radius: 8px;
font-size: 0.9375rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.api-keys-page .btn-danger:hover{
background: #b91c1c;
}
/* Mobile Responsive */
@media (max-width: 768px) {
.api-keys-page{
padding: 1rem;
}
/* Header adjustments for mobile */
.api-keys-page .header-content{
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.api-keys-page .btn-primary{
width: 100%;
justify-content: center;
}
.api-keys-page .keys-table-container{
overflow-x: visible;
border: none;
background: transparent;
box-shadow: none;
}
/* Switch to card layout on mobile */
.api-keys-page .keys-table{
display: block;
}
.api-keys-page .keys-table thead{
display: none;
}
.api-keys-page .keys-table tbody{
display: flex;
flex-direction: column;
gap: 1rem;
}
.api-keys-page .keys-table tbody tr.table-row{
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 1rem;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: var(--shadow-sm);
}
.api-keys-page .keys-table tbody tr.table-row:hover, .api-keys-page .keys-table tbody tr.table-row:nth-child(even), .api-keys-page .keys-table tbody tr.table-row:nth-child(even):hover{
background: var(--bg-white);
}
.api-keys-page .keys-table tbody tr.table-row td{
padding: 0;
border-bottom: none;
display: block;
}
/* Name cell - prominent at top */
.api-keys-page .keys-table tbody tr.table-row td:first-child{
order: 1;
}
.api-keys-page .keys-table tbody tr.table-row td:first-child .name-cell{
font-size: 1.125rem;
font-weight: 600;
display: block;
color: var(--text-primary);
}
/* Key cell */
.api-keys-page .keys-table tbody tr.table-row td:nth-child(2){
order: 2;
}
.api-keys-page .keys-table tbody tr.table-row td:nth-child(2) .key-cell{
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.api-keys-page .keys-table tbody tr.table-row td:nth-child(2) .key-cell code{
font-size: 0.75rem;
word-break: break-all;
white-space: normal;
}
/* Role & Status - wrapper for badges */
.api-keys-page .keys-table tbody tr.table-row td:nth-child(3), .api-keys-page .keys-table tbody tr.table-row td:nth-child(4){
display: inline-block;
order: 3;
}
.api-keys-page .keys-table tbody tr.table-row td:nth-child(3){
margin-right: 0.5rem;
}
/* Status badges styling */
.api-keys-page .status-badge{
font-size: 0.6875rem;
padding: 0.25rem 0.5rem;
border-radius: 9999px;
font-weight: 600;
}
.api-keys-page .status-badge.active{
background: rgba(37, 211, 102, 0.1);
color: var(--primary);
}
.api-keys-page .status-badge.inactive{
background: rgba(239, 68, 68, 0.12);
color: var(--error);
}
/* Actions cell - bottom with separator */
.api-keys-page .keys-table tbody tr.table-row td:last-child{
order: 5;
margin-top: 0.5rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border);
}
.api-keys-page .keys-table tbody tr.table-row td:last-child .actions-cell{
justify-content: flex-start;
gap: 0.5rem;
}
/* Permissions reference mobile */
.api-keys-page .permissions-reference{
padding: 1rem;
}
.api-keys-page .permissions-reference h3{
font-size: 0.9375rem;
}
}
@media (max-width: 480px) {
.api-keys-page .permissions-list{
grid-template-columns: 1fr;
}
.api-keys-page{
padding: 0.75rem;
}
}