mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Add spinner for database maintenance
This commit is contained in:
parent
b4c658165d
commit
31be9a66bc
|
@ -416,6 +416,11 @@ ipcMain.on("request-clear-chat-connected", () => {
|
|||
chat.webContents.send("action-clear-reception-status");
|
||||
});
|
||||
|
||||
ipcMain.on("request-update-dbclean-spinner", () => {
|
||||
//Turn off dbclean spinner
|
||||
win.webContents.send("action-update-dbclean-spinner");
|
||||
});
|
||||
|
||||
// UPDATE TNC CONNECTION
|
||||
ipcMain.on("request-update-tnc-ip", (event, data) => {
|
||||
win.webContents.send("action-update-tnc-ip", data);
|
||||
|
|
|
@ -2913,4 +2913,5 @@ async function dbClean() {
|
|||
itemCount +
|
||||
" items removed from database. It's recommended you now restart the GUI."
|
||||
);
|
||||
ipcRenderer.send("request-update-dbclean-spinner");
|
||||
}
|
||||
|
|
|
@ -1657,6 +1657,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
// btnCleanDB button clicked
|
||||
document.getElementById("btnCleanDB").addEventListener("click", () => {
|
||||
document.getElementById("divCleanDBSpinner").classList.remove("invisible");
|
||||
ipcRenderer.send("request-clean-db");
|
||||
});
|
||||
|
||||
|
@ -1855,6 +1856,10 @@ function connectedStation(data) {
|
|||
prefix + data.dxcallsign;
|
||||
}
|
||||
|
||||
//Called by chat to turn off db clean spinner
|
||||
ipcRenderer.on("action-update-dbclean-spinner",() =>{
|
||||
document.getElementById("divCleanDBSpinner").classList.add("invisible");
|
||||
});
|
||||
//Listen for events caused by tnc 'tnc-message' rx
|
||||
ipcRenderer.on("action-update-reception-status", (event, arg) => {
|
||||
var data = arg["data"][0];
|
||||
|
|
|
@ -3830,7 +3830,8 @@
|
|||
type="button"
|
||||
>
|
||||
Clean
|
||||
</button>
|
||||
</button>
|
||||
<div class="spinner-border text-warning invisible" role="status" id="divCleanDBSpinner"></div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="center">
|
||||
|
|
Loading…
Reference in a new issue