* fix: emits use ev instead of e

* fix: errors use err instead of e

* fix: replace use of data where possible

* fix: events use evt instead of e

* fix: use strict equals

* fix: use emoji instead of e

* fix: vue lints
This commit is contained in:
Johann150
2022-05-26 15:53:09 +02:00
committed by GitHub
parent 9c80403072
commit 3dae18b93c
69 changed files with 255 additions and 257 deletions

View File

@@ -52,16 +52,16 @@ export default defineComponent({
const promise = new Promise((ok) => {
const canvas = this.hpml.canvases[this.block.canvasId];
canvas.toBlob(blob => {
const data = new FormData();
data.append('file', blob);
data.append('i', this.$i.token);
const formData = new FormData();
formData.append('file', blob);
formData.append('i', this.$i.token);
if (this.$store.state.uploadFolder) {
data.append('folderId', this.$store.state.uploadFolder);
formData.append('folderId', this.$store.state.uploadFolder);
}
fetch(apiUrl + '/drive/files/create', {
method: 'POST',
body: data
body: formData,
})
.then(response => response.json())
.then(f => {

View File

@@ -38,8 +38,8 @@ export default defineComponent({
let ast;
try {
ast = parse(props.page.script);
} catch (e) {
console.error(e);
} catch (err) {
console.error(err);
/*os.alert({
type: 'error',
text: 'Syntax error :('
@@ -48,11 +48,11 @@ export default defineComponent({
}
hpml.aiscript.exec(ast).then(() => {
hpml.eval();
}).catch(e => {
console.error(e);
}).catch(err => {
console.error(err);
/*os.alert({
type: 'error',
text: e
text: err
});*/
});
} else {