mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-06-16 21:03:58 +08:00
fix(config): make api key modal input layout responsive
This commit is contained in:
@@ -39,6 +39,16 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.apiKeyModalInputRow {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
|
||||
:global(.input) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.payloadRuleModelRow,
|
||||
.payloadRuleModelRowProtocolFirst,
|
||||
@@ -47,6 +57,11 @@
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.apiKeyModalInputRow {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.payloadRowActionButton {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -274,16 +274,16 @@ function ApiKeysCardEditor({
|
||||
</>
|
||||
}
|
||||
>
|
||||
<Input
|
||||
label={t('config_management.visual.api_keys.input_label')}
|
||||
placeholder={t('config_management.visual.api_keys.input_placeholder')}
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
disabled={disabled}
|
||||
error={formError || undefined}
|
||||
hint={t('config_management.visual.api_keys.input_hint')}
|
||||
style={{ paddingRight: 148 }}
|
||||
rightElement={
|
||||
<div className="form-group">
|
||||
<label>{t('config_management.visual.api_keys.input_label')}</label>
|
||||
<div className={styles.apiKeyModalInputRow}>
|
||||
<input
|
||||
className="input"
|
||||
placeholder={t('config_management.visual.api_keys.input_placeholder')}
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
@@ -293,8 +293,10 @@ function ApiKeysCardEditor({
|
||||
>
|
||||
{t('config_management.visual.api_keys.generate')}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="hint">{t('config_management.visual.api_keys.input_hint')}</div>
|
||||
{formError && <div className="error-box">{formError}</div>}
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user