Add scheme dropdown and load defaults from config

This commit is contained in:
Koha9
2025-06-21 19:34:07 +09:00
parent 7ab55e3ae4
commit d4ed9d22f5
4 changed files with 68 additions and 7 deletions
+9 -2
View File
@@ -13,13 +13,20 @@
<label for="pw" class="form-label">密码</label>
<input type="password" class="form-control" id="pw" name="pw">
</div>
<div class="mb-3">
<label for="scheme" class="form-label">协议</label>
<select class="form-select" id="scheme" name="scheme">
<option value="http" {% if scheme == 'http' %}selected{% endif %}>http</option>
<option value="https" {% if scheme == 'https' %}selected{% endif %}>https</option>
</select>
</div>
<div class="mb-3">
<label for="url" class="form-label">服务器地址</label>
<input type="text" class="form-control" id="url" name="url" placeholder="127.0.0.1 或 https://example.com">
<input type="text" class="form-control" id="url" name="url" placeholder="127.0.0.1 或 plex.sample.com" value="{{ server_url }}">
</div>
<div class="mb-3">
<label for="port" class="form-label">端口</label>
<input type="text" class="form-control" id="port" name="port" value="32400">
<input type="text" class="form-control" id="port" name="port" value="{{ port }}">
</div>
<button type="submit" class="btn btn-primary">连接</button>
</form>