feat: authoritative plugin fields

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-01-24 23:02:02 +11:00
parent 3775e21dc7
commit abfe452996
7 changed files with 35 additions and 23 deletions

View File

@@ -16,8 +16,12 @@ function askDeleteDevice() {
// -----------------------------------------------------------------------------
function askDelDevDTInline(mac) {
// Check MAC
mac = getMac()
// only try getting mac from URL if not supplied - used in inline buttons on in the my devices listing pages
if(isEmpty(mac))
{
mac = getMac()
}
showModalWarning(
getString("DevDetail_button_Delete"),
@@ -54,13 +58,17 @@ function deleteDevice() {
// -----------------------------------------------------------------------------
function deleteDeviceByMac(mac) {
// Check MAC
mac = getMac()
// only try getting mac from URL if not supplied - used in inline buttons on in teh my devices listing pages
if(isEmpty(mac))
{
mac = getMac()
}
const apiBase = getApiBase();
const apiToken = getSetting("API_TOKEN");
const url = `${apiBase}/device/${mac}/delete`;
$.ajax({
url,
method: "DELETE",