Auto-fill group IDs from names in web UI

This commit is contained in:
Artem Kokos
2026-05-21 21:54:28 +07:00
parent f55e00bce1
commit 928e4c71b7
3 changed files with 88 additions and 2 deletions

View File

@@ -233,8 +233,8 @@
<div class="section-kicker">Новая группа</div>
<h2 class="text-xl font-black tracking-tight mb-5">Собрать комнату из найденных ламп</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 mb-5">
<input v-model="newGroup.id" placeholder="ID (bedroom)" class="bg-black/30 border border-slate-700/50 p-3 rounded-xl focus:border-orange-500 outline-none text-sm mono">
<input v-model="newGroup.name" placeholder="Название (Спальня)" class="bg-black/30 border border-slate-700/50 p-3 rounded-xl focus:border-orange-500 outline-none text-sm">
<input v-model="newGroup.name" @input="handleNewGroupNameInput" placeholder="Название (Спальня)" class="bg-black/30 border border-slate-700/50 p-3 rounded-xl focus:border-orange-500 outline-none text-sm">
<input v-model="newGroup.id" @input="handleNewGroupIdInput" placeholder="ID (bedroom)" class="bg-black/30 border border-slate-700/50 p-3 rounded-xl focus:border-orange-500 outline-none text-sm mono">
<button @click="createGroup" :disabled="!newGroup.id || !newGroup.name || !newGroup.macs.length" class="accent-button disabled:opacity-30 disabled:cursor-not-allowed">СОЗДАТЬ ГРУППУ</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">