Enforce semicolon, fix format globally

This commit is contained in:
Louis Lam
2022-04-14 00:30:32 +08:00
parent 6f72ca481f
commit 649f3106e1
50 changed files with 184 additions and 198 deletions

View File

@@ -25,7 +25,7 @@
</template>
<script>
import { Modal } from "bootstrap"
import { Modal } from "bootstrap";
export default {
props: {
@@ -46,15 +46,15 @@ export default {
modal: null,
}),
mounted() {
this.modal = new Modal(this.$refs.modal)
this.modal = new Modal(this.$refs.modal);
},
methods: {
show() {
this.modal.show()
this.modal.show();
},
yes() {
this.$emit("yes");
},
},
}
};
</script>

View File

@@ -5,7 +5,7 @@
<script lang="ts">
import { sleep } from "../util.ts"
import { sleep } from "../util.ts";
export default {
@@ -25,12 +25,12 @@ export default {
return {
output: "",
frameDuration: 30,
}
};
},
computed: {
isNum() {
return typeof this.value === "number"
return typeof this.value === "number";
},
},
@@ -45,7 +45,7 @@ export default {
} else {
for (let i = 1; i < frames; i++) {
this.output += step;
await sleep(15)
await sleep(15);
}
}
@@ -59,5 +59,5 @@ export default {
methods: {},
}
};
</script>

View File

@@ -4,12 +4,12 @@
<script>
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime"
import utc from "dayjs/plugin/utc"
import timezone from "dayjs/plugin/timezone" // dependent on utc plugin
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.extend(relativeTime)
import relativeTime from "dayjs/plugin/relativeTime";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone"; // dependent on utc plugin
dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.extend(relativeTime);
export default {
props: {
@@ -29,5 +29,5 @@ export default {
}
},
},
}
};
</script>

View File

@@ -38,7 +38,7 @@ export default {
beatMargin: 4,
move: false,
maxBeat: -1,
}
};
},
computed: {
@@ -69,12 +69,12 @@ export default {
if (start < 0) {
// Add empty placeholder
for (let i = start; i < 0; i++) {
placeholders.push(0)
placeholders.push(0);
}
start = 0;
}
return placeholders.concat(this.beatList.slice(start))
return placeholders.concat(this.beatList.slice(start));
},
wrapStyle() {
@@ -84,7 +84,7 @@ export default {
return {
padding: `${topBottom}px ${leftRight}px`,
width: "100%",
}
};
},
barStyle() {
@@ -94,12 +94,12 @@ export default {
return {
transition: "all ease-in-out 0.25s",
transform: `translateX(${width}px)`,
}
};
}
return {
transform: "translateX(0)",
}
};
},
@@ -109,7 +109,7 @@ export default {
height: this.beatHeight + "px",
margin: this.beatMargin + "px",
"--hover-scale": this.hoverScale,
}
};
},
},
@@ -120,7 +120,7 @@ export default {
setTimeout(() => {
this.move = false;
}, 300)
}, 300);
},
deep: true,
},
@@ -162,15 +162,15 @@ export default {
methods: {
resize() {
if (this.$refs.wrap) {
this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2))
this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2));
}
},
getBeatTitle(beat) {
return `${this.$root.datetime(beat.time)}` + ((beat.msg) ? ` - ${beat.msg}` : ``);
return `${this.$root.datetime(beat.time)}` + ((beat.msg) ? ` - ${beat.msg}` : "");
}
},
}
};
</script>
<style lang="scss" scoped>

View File

@@ -51,15 +51,15 @@ export default {
data() {
return {
visibility: "password",
}
};
},
computed: {
model: {
get() {
return this.modelValue
return this.modelValue;
},
set(value) {
this.$emit("update:modelValue", value)
this.$emit("update:modelValue", value);
}
}
},
@@ -74,5 +74,5 @@ export default {
this.visibility = "password";
},
}
}
};
</script>

View File

@@ -69,7 +69,6 @@
<script lang="ts">
import { Modal } from "bootstrap";
import { ucfirst } from "../util.ts";
import Confirm from "./Confirm.vue";
import NotificationFormList from "./notifications";

View File

@@ -24,7 +24,7 @@ import timezone from "dayjs/plugin/timezone";
import "chartjs-adapter-dayjs";
import { LineChart } from "vue-chart-3";
import { useToast } from "vue-toastification";
import { UP, DOWN, PENDING } from "../util.ts";
import { DOWN } from "../util.ts";
dayjs.extend(utc);
dayjs.extend(timezone);

View File

@@ -41,7 +41,7 @@ export default {
}
}
}
}
};
</script>
<style lang="scss" scoped>

View File

@@ -22,33 +22,33 @@ export default {
return Math.round(this.$root.uptimeList[key] * 10000) / 100 + "%";
}
return this.$t("notAvailableShort")
return this.$t("notAvailableShort");
},
color() {
if (this.lastHeartBeat.status === 0) {
return "danger"
return "danger";
}
if (this.lastHeartBeat.status === 1) {
return "primary"
return "primary";
}
if (this.lastHeartBeat.status === 2) {
return "warning"
return "warning";
}
return "secondary"
return "secondary";
},
lastHeartBeat() {
if (this.monitor.id in this.$root.lastHeartbeatList && this.$root.lastHeartbeatList[this.monitor.id]) {
return this.$root.lastHeartbeatList[this.monitor.id]
return this.$root.lastHeartbeatList[this.monitor.id];
}
return {
status: -1,
}
};
},
className() {
@@ -59,7 +59,7 @@ export default {
return "";
},
},
}
};
</script>
<style>

View File

@@ -28,5 +28,5 @@ export default {
this.$parent.notification.gotifyPriority = 8;
}
},
}
};
</script>

View File

@@ -63,5 +63,5 @@ export default {
components: {
HiddenInput,
},
}
};
</script>

View File

@@ -24,7 +24,7 @@ import AliyunSMS from "./AliyunSms.vue";
import DingDing from "./DingDing.vue";
import Bark from "./Bark.vue";
import SerwerSMS from "./SerwerSMS.vue";
import Stackfield from './Stackfield.vue';
import Stackfield from "./Stackfield.vue";
import WeCom from "./WeCom.vue";
import GoogleChat from "./GoogleChat.vue";
import Gorush from "./Gorush.vue";