Prettier Pug
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
soraefir
2023-07-19 13:59:52 +02:00
parent 0e27042c8c
commit 0c64215dd1
16 changed files with 350 additions and 162 deletions

View File

@ -27,7 +27,7 @@ Date.prototype.toJSONLocal = (function () {
function toEncoded(string) {
const codeUnits = Uint16Array.from(
{ length: string.length },
(element, index) => string.charCodeAt(index),
(element, index) => string.charCodeAt(index)
);
const charCodes = new Uint8Array(codeUnits.buffer);
@ -41,7 +41,7 @@ function toEncoded(string) {
function toDecoded(string) {
let binary = window.atob(string);
const bytes = Uint8Array.from({ length: binary.length }, (element, index) =>
binary.charCodeAt(index),
binary.charCodeAt(index)
);
const charCodes = new Uint16Array(bytes.buffer);
@ -62,7 +62,7 @@ const query_flight = (q) =>
const is_restauration_type = (e) =>
["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"].indexOf(
e.type,
e.type
) != -1;
const is_attraction_type = (e) =>
@ -244,7 +244,7 @@ const app = new Vue({
if (!this.journey_data.main[this.journey_step_data.section].dateRange)
return "?";
var date = new Date(
this.journey_data.main[this.journey_step_data.section].dateRange[0],
this.journey_data.main[this.journey_step_data.section].dateRange[0]
);
date.setDate(date.getDate() + this.journey_step_data.day - 1);
return this.format_date(date);
@ -289,10 +289,9 @@ const app = new Vue({
if (this.journey_data.main.length == 0) return "";
try {
return `${this.format_date(
this.journey_data.main[0].dateRange[0],
this.journey_data.main[0].dateRange[0]
)} - ${this.format_date(
this.journey_data.main[this.journey_data.main.length - 1]
.dateRange[1],
this.journey_data.main[this.journey_data.main.length - 1].dateRange[1]
)}`;
} catch {
return "?";
@ -405,7 +404,7 @@ const app = new Vue({
},
filter_selected: function (list, step) {
return list.filter((e) =>
step ? e.step == this.journey_step_data.day : e.step >= 0,
step ? e.step == this.journey_step_data.day : e.step >= 0
);
},
filter_unselected: function (list) {
@ -457,7 +456,7 @@ const app = new Vue({
this.querying.hotel = true;
this.search_nominatim(
q,
(r) => r.type == "hotel" || r.type == "hostel",
(r) => r.type == "hotel" || r.type == "hostel"
).then((r) => {
this.querying.hotel = false;
});