Skip to content

Commit

Permalink
fixed favorites export
Browse files Browse the repository at this point in the history
  • Loading branch information
bocchilorenzo committed May 13, 2023
1 parent 331f99c commit cd45591
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extensions/dnslookup/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ client.onmessage = async function (e) {
break;
case "writeJson":
try {
fs.writeFileSync(path.resolve(data.filePath[0]), data.content);
fs.writeFileSync(path.resolve(data.filePath), data.content);

client.send(
JSON.stringify({
Expand Down
7 changes: 4 additions & 3 deletions xradio-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export default {
} else {
this.toggleSnack("Favorites saved");
}
console.log(event)
});
Neutralino.events.on("loadedJson", (event) => {
if (event.detail == "Error") {
Expand Down Expand Up @@ -191,7 +192,7 @@ export default {
}
},
async exportFavorites() {
let entries = await Neutralino.os.showSaveDialog(
let entry = await Neutralino.os.showSaveDialog(
"Save favorites to",
{
defaultPath: "favorites.json",
Expand All @@ -201,9 +202,9 @@ export default {
],
}
);
if (entries.length > 0) {
if (entry != "") {
let data = {
filePath: entries,
filePath: entry,
content: JSON.stringify(this.favorites),
};
await Neutralino.extensions.dispatch(
Expand Down

0 comments on commit cd45591

Please sign in to comment.