Skip to content

Commit

Permalink
make app available and add check for agginMagic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed Nov 1, 2024
1 parent 022981e commit 74de422
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "git+https://github.com/Zoziologie/biolovision2ebird.git"
},
"private": true,
"version": "2.3.6",
"version": "2.3.7",
"license": "GPL-3.0",
"type": "module",
"scripts": {
Expand Down
13 changes: 13 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1363,9 +1363,22 @@ export default {
}
},
assignMagic() {
// Stop if duration is too long
if (this.assign_duration > 12 && this.assign_duration != 24) {
alert("Duration is too long. Please choose a shorter duration.");
return;
}
if (this.assign_distance > 20) {
alert("Distance is too long. Please choose a shorter distance.");
return;
}
let sightings = this.sightings.filter((s) => s.form_id == 0);
// Stop if no sightings
if (sightings.length == 0) {
alert("There are no sightings to assign. Click on 'Reset' to start again.");
return;
}
const datetime = sightings.map((s) => new Date(s.date + "T" + s.time));
var form_id = this.count_forms + 1;
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ Vue.mixin({
},
});

new Vue({
const app = new Vue({
render: (h) => h(App),
}).$mount("#app");

window.app = app;

0 comments on commit 74de422

Please sign in to comment.