flare / flare-ui /src /app /dialogs /api-edit-dialog /api-edit-dialog.component.scss
ciyidogan's picture
Update flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.scss
c9df367 verified
raw
history blame
5.52 kB
.api-edit-dialog {
.mat-mdc-dialog-content {
padding: 0;
overflow: hidden;
min-height: 500px;
max-height: 80vh;
display: flex;
flex-direction: column;
}
.mat-mdc-tab-group {
flex: 1;
display: flex;
flex-direction: column;
}
.mat-mdc-tab-body-wrapper {
flex: 1;
overflow: auto;
}
.tab-content {
padding: 24px;
overflow-y: auto;
max-height: calc(80vh - 200px);
}
.section-title {
font-size: 16px;
font-weight: 500;
margin: 24px 0 16px 0;
color: #666;
&:first-child {
margin-top: 0;
}
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
h4 {
margin: 0;
font-size: 16px;
font-weight: 500;
}
}
.headers-section {
mat-form-field {
width: calc(50% - 8px);
margin-right: 16px;
&:nth-child(2n) {
margin-right: 0;
}
}
}
.headers-list, .response-mappings-list {
.header-row, .mapping-row {
display: flex;
gap: 16px;
align-items: flex-start;
margin-bottom: 16px;
mat-form-field {
flex: 1;
}
.header-value {
flex: 2;
}
.json-path-field {
flex: 2;
}
button {
margin-top: 8px;
}
}
}
.empty-state, .empty-state-small {
text-align: center;
padding: 24px;
background-color: #f5f5f5;
border-radius: 4px;
margin: 16px 0;
mat-icon {
font-size: 48px;
width: 48px;
height: 48px;
color: #ccc;
}
p {
margin-top: 16px;
color: #666;
}
}
.empty-state-small {
padding: 16px;
mat-icon {
font-size: 24px;
width: 24px;
height: 24px;
}
p {
margin-top: 8px;
font-size: 14px;
}
}
.add-header-button {
margin-top: 8px;
}
.auth-fields {
.token-fields {
margin-top: 16px;
padding: 16px;
background-color: #f5f5f5;
border-radius: 4px;
}
}
.template-helpers {
margin-top: 8px;
.template-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
padding: 16px;
}
.template-chip {
cursor: pointer;
transition: all 0.2s;
&:hover {
transform: scale(1.05);
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
}
.hint-text {
padding: 16px;
color: #666;
font-size: 14px;
line-height: 1.5;
}
}
.json-editor {
position: relative;
.json-textarea {
width: 100%;
font-family: 'Monaco', 'Consolas', monospace;
font-size: 13px;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
background-color: #f8f8f8;
resize: vertical;
&:focus {
outline: none;
border-color: #3f51b5;
background-color: #fff;
}
}
button {
margin-top: 8px;
}
}
.test-section {
.test-url {
margin-bottom: 24px;
padding: 16px;
background-color: #f5f5f5;
border-radius: 4px;
font-family: monospace;
word-break: break-all;
}
.test-info {
margin-bottom: 24px;
}
.test-actions {
display: flex;
gap: 16px;
margin-bottom: 24px;
}
.test-result {
margin-top: 24px;
.result-status {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
border-radius: 4px;
margin-bottom: 16px;
&.success {
background-color: #e8f5e9;
color: #2e7d32;
}
&.error {
background-color: #ffebee;
color: #c62828;
}
mat-icon {
font-size: 28px;
width: 28px;
height: 28px;
}
.status-code, .response-time {
margin-left: auto;
font-size: 14px;
opacity: 0.8;
}
}
.error-message {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
background-color: #ffebee;
color: #c62828;
border-radius: 4px;
margin-bottom: 16px;
}
.response-section {
margin-bottom: 16px;
h5 {
margin-bottom: 8px;
font-size: 14px;
font-weight: 500;
}
pre {
padding: 12px;
background-color: #f5f5f5;
border-radius: 4px;
overflow-x: auto;
font-size: 12px;
margin: 0;
white-space: pre-wrap;
word-break: break-word;
}
}
}
.test-note {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 12px;
background-color: #e3f2fd;
border-radius: 4px;
margin-top: 16px;
mat-icon {
color: #1976d2;
font-size: 20px;
width: 20px;
height: 20px;
}
p {
margin: 0;
font-size: 14px;
color: #1976d2;
}
}
}
.retry-settings {
display: flex;
gap: 16px;
align-items: flex-start;
margin-bottom: 24px;
mat-form-field {
flex: 1;
}
}
.auth-settings {
margin-top: 16px;
}
mat-dialog-actions {
padding: 16px 24px;
margin: 0;
border-top: 1px solid #e0e0e0;
}
// Form field density
::ng-deep {
.mat-mdc-form-field {
margin-bottom: 16px;
}
.mat-mdc-dialog-content {
max-height: 80vh;
}
}
}