1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-01-28 03:57:32 +02:00

Format JSON file before download

This commit is contained in:
Adam Stachowicz 2021-09-11 10:50:56 +02:00
parent 2ed8f12dc0
commit c387fb264e

View File

@ -383,7 +383,7 @@ export default {
notificationList: this.$root.notificationList,
monitorList: monitorList,
}
exportData = JSON.stringify(exportData);
exportData = JSON.stringify(exportData, null, 4);
let downloadItem = document.createElement("a");
downloadItem.setAttribute("href", "data:application/json;charset=utf-8," + encodeURI(exportData));
downloadItem.setAttribute("download", fileName);