Add clear logs, use more menu dialog

This commit is contained in:
advplyr 2025-04-20 10:32:52 -05:00
parent 2000534e37
commit 74758c7762
5 changed files with 71 additions and 15 deletions

View file

@ -301,4 +301,7 @@ class DbManager {
}
return logs
}
fun removeAllLogs() {
Paper.book("log").destroy()
}
}

View file

@ -58,4 +58,10 @@ class AbsLogger : Plugin() {
val absLogs = DeviceManager.dbManager.getAllLogs()
call.resolve(JSObject(jacksonMapper.writeValueAsString(AbsLogList(absLogs))))
}
@PluginMethod
fun clearLogs(call: PluginCall) {
DeviceManager.dbManager.removeAllLogs()
call.resolve()
}
}