Add a dropdown menu that allows users to select a library.

This commit is contained in:
2025-11-27 21:48:48 +09:00
parent 355886e797
commit 1b6dddacc8
4 changed files with 97 additions and 7 deletions
+13
View File
@@ -32,6 +32,19 @@
<label for="port" class="form-label">端口</label>
<input type="text" class="form-control" id="port" name="port" value="{{ port }}">
</div>
<div class="mb-3">
<label for="library_name" class="form-label">音乐库</label>
<select class="form-select" id="library_name" name="library_name" {% if not music_libraries %}disabled{% endif %}>
{% if music_libraries %}
{% for library in music_libraries %}
<option value="{{ library }}" {% if selected_library == library %}selected{% endif %}>{{ library }}</option>
{% endfor %}
{% else %}
<option value="" selected>暂无可用的音乐库</option>
{% endif %}
</select>
<div class="form-text">仅显示音乐类型的库,可在连接成功后自动刷新。</div>
</div>
<button type="submit" class="btn btn-primary">连接</button>
</form>