fix: 设备改名按钮同行显示,字段名修正为 device_alias

This commit is contained in:
tian 2026-07-24 19:49:30 +08:00
parent f92491ebf1
commit 820f72cdb3
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@
{{if .Device.Online}}<span class="pill ok">在线</span>{{else}}<span class="pill bad">离线</span>{{end}}
</div>
<div class="info-list">
<div><span>设备名称</span><strong>{{displayDeviceName .Device .ConfigStatus}}</strong><span class="btn-icon ghost" style="margin-left:4px;font-size:11px;cursor:pointer" onclick="editDeviceName(this,'{{.Device.DeviceID}}')"></span></div>
<div><span>设备名称</span><strong style="display:inline">{{displayDeviceName .Device .ConfigStatus}}</strong><span class="btn-icon ghost" style="margin-left:4px;font-size:11px;cursor:pointer;vertical-align:middle" onclick="editDeviceName(this,'{{.Device.DeviceID}}')"></span></div>
<div><span>设备 ID</span><strong class="mono">{{.Device.DeviceID}}</strong></div>
<div><span>管理地址</span><strong class="mono">{{.Device.IP}}:{{.Device.AgentPort}}</strong></div>
<div><span>视频端口</span><strong class="mono">{{.Device.MediaPort}}</strong></div>
@ -266,7 +266,7 @@ function editDeviceName(el, deviceID) {
form.action = '/devices/' + deviceID + '/alias';
form.style.display = 'none';
var inp = document.createElement('input');
inp.name = 'alias';
inp.name = 'device_alias';
inp.value = name;
form.appendChild(inp);
document.body.appendChild(form);

Binary file not shown.