Skip to content

Commit

Permalink
Remove not used package without build code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tran Ngoc Anh committed May 24, 2019
1 parent 16ef53a commit 392b23e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 38 deletions.
13 changes: 13 additions & 0 deletions lib/helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import config from "./config";
import store from "./store";
import FileSaver from "file-saver";
import swal from "sweetalert";

export default {
watchScoketMsgs(evData, sendTarget) { },
exportFileSaver(_jsonData) {
let blob = new Blob([JSON.stringify(_jsonData, "")], {
type: "application/json;charset=utf-8"
});
FileSaver.saveAs(blob, "your-ir-code.json");
swal("Good job!", "Your file was downloaded! Please note that the device_code field only accepts positive numbers. The .json extension is not required.", "success", {
button: "Oki!"
});
},
sendBroadlinkLearnCmd(_ip) {
store.state.socket.send(JSON.stringify({
id: store.state.socketId++,
Expand Down
11 changes: 2 additions & 9 deletions src/pages/climate/climate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import FileSaver from "file-saver";
import {
config,
swal,
helper
} from "../../../lib";
export default {
Expand Down Expand Up @@ -115,13 +113,8 @@ export default {
}
});

var blob = new Blob([JSON.stringify(jsonData, "")], {
type: "application/json;charset=utf-8"
});
FileSaver.saveAs(blob, "your-ir-code.json");
swal("Good job!", "Your file was downloaded! Please note that the device_code field only accepts positive numbers. The .json extension is not required.", "success", {
button: "Oki!"
});
// export file
helper.exportFileSaver(jsonData);
},
setupComponent() {
this.$validator.validateAll().then((result) => {
Expand Down
12 changes: 2 additions & 10 deletions src/pages/fan/fan.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import FileSaver from "file-saver";
import {
config,
swal,
helper
} from "../../../lib";
export default {
Expand Down Expand Up @@ -87,14 +85,8 @@ export default {
}
});

var blob = new Blob([JSON.stringify(jsonData, "")], {
type: "application/json;charset=utf-8"
});

FileSaver.saveAs(blob, "your-ir-code.json");
swal("Good job!", "Your file was downloaded! Please note that the device_code field only accepts positive numbers. The .json extension is not required.", "success", {
button: "Oki!"
});
// export file
helper.exportFileSaver(jsonData);
},
setupComponent() {
this.$validator.validateAll().then((result) => {
Expand Down
12 changes: 2 additions & 10 deletions src/pages/media/media.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import FileSaver from "file-saver";
import {
config,
swal,
helper
} from "../../../lib";
export default {
Expand Down Expand Up @@ -87,14 +85,8 @@ export default {
}
});

var blob = new Blob([JSON.stringify(jsonData, "")], {
type: "application/json;charset=utf-8"
});

FileSaver.saveAs(blob, "your-ir-code.json");
swal("Good job!", "Your file was downloaded! Please note that the device_code field only accepts positive numbers. The .json extension is not required.", "success", {
button: "Oki!"
});
// export file
helper.exportFileSaver(jsonData);
},
setupComponent() {
this.$validator.validateAll().then((result) => {
Expand Down
11 changes: 2 additions & 9 deletions src/pages/other/other.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import FileSaver from "file-saver";
import {
config,
swal,
helper
} from "../../../lib";
export default {
Expand Down Expand Up @@ -65,13 +63,8 @@ export default {
this.irData.map(m => {
if (m.name) jsonData[m.name] = m.irCode;
});
var blob = new Blob([JSON.stringify(jsonData, "")], {
type: "application/json;charset=utf-8"
});
FileSaver.saveAs(blob, "your-ir-code.json");
swal("Good job!", "Your file was downloaded! Please note that the device_code field only accepts positive numbers. The .json extension is not required.", "success", {
button: "Oki!"
});
// export file
helper.exportFileSaver(jsonData);
},
sendLearnCommand(_index) {
console.log("Command was send..", _index);
Expand Down

0 comments on commit 392b23e

Please sign in to comment.