fix(admin-invites): stack create form fields vertically, unify row height and spacing
This commit is contained in:
@@ -288,10 +288,11 @@ code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-si
|
||||
|
||||
/* Admin invite form */
|
||||
.admin-invite-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
|
||||
.aif-row { display: flex; flex-direction: column; gap: .3rem; }
|
||||
.aif-field { display: flex; flex-direction: column; gap: .15rem; }
|
||||
.aif-grow { flex: 1 1 200px; min-width: 0; }
|
||||
.aif-label { font-size: .75rem; color: var(--text-muted); }
|
||||
.aif-input, .aif-select { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; background: #fff; }
|
||||
.aif-label { font-size: .8rem; color: var(--text-muted); line-height: 1.2; }
|
||||
.aif-input, .aif-select { width: 100%; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: 6px; font-size: .9rem; background: #fff; line-height: 1.3; }
|
||||
.aif-input:focus, .aif-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
|
||||
.aif-short { width: 80px; }
|
||||
.aif-date { width: 180px; }
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<!-- Add new code -->
|
||||
<div style="margin-bottom:2rem;padding:1.5rem;background:var(--card-bg);border-radius:var(--radius);border:1px solid var(--border)">
|
||||
<h3 style="margin-bottom:1rem;font-size:1rem">创建邀请码</h3>
|
||||
<form method="post" action="/admin/invites/add" class="admin-invite-form">
|
||||
<div class="aif-field aif-grow">
|
||||
<form method="post" action="/admin/invites/add" class="admin-invite-form" style="flex-direction:column;gap:.85rem">
|
||||
<div class="aif-row">
|
||||
<label class="aif-label">邀请码(留空自动生成)</label>
|
||||
<input type="text" name="code" maxlength="8" placeholder="自动生成" class="aif-input" style="text-transform:uppercase">
|
||||
</div>
|
||||
<div class="aif-field">
|
||||
<div class="aif-row">
|
||||
<label class="aif-label">限制类型</label>
|
||||
<select name="limit_type" id="limit_type" onchange="toggleLimitFields()" class="aif-select">
|
||||
<option value="unlimited">无限制</option>
|
||||
@@ -28,16 +28,16 @@
|
||||
<option value="expires">有效期</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="aif-field" id="max_uses_field" style="display:none">
|
||||
<label class="aif-label">最大次数</label>
|
||||
<input type="number" name="max_uses" min="1" value="1" class="aif-input aif-short">
|
||||
<div class="aif-row" id="max_uses_field" style="display:none">
|
||||
<label class="aif-label">最大使用次数</label>
|
||||
<input type="number" name="max_uses" min="1" value="1" class="aif-input">
|
||||
</div>
|
||||
<div class="aif-field" id="expires_field" style="display:none">
|
||||
<div class="aif-row" id="expires_field" style="display:none">
|
||||
<label class="aif-label">过期时间</label>
|
||||
<input type="datetime-local" name="expires_at" class="aif-input aif-date">
|
||||
<input type="datetime-local" name="expires_at" class="aif-input">
|
||||
</div>
|
||||
<div class="aif-field aif-btn-wrap">
|
||||
<button type="submit" class="btn btn-primary aif-btn">创建</button>
|
||||
<div class="aif-row" style="justify-content:flex-end">
|
||||
<button type="submit" class="btn btn-primary">创建</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user