mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-11 22:16:55 +00:00
fix up some things
This commit is contained in:
@@ -13,4 +13,4 @@ jobs:
|
||||
with:
|
||||
username: 'YouHaveTrouble'
|
||||
reponame: 'DiscipleOfLand'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -56,6 +56,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.eorzeaTime = new EorzeaTime();
|
||||
setInterval(() => {
|
||||
this.eorzeaTime = new EorzeaTime();
|
||||
}, 500);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<article class="node">
|
||||
<article class="node" :class="{active: gatheringNode.isActive(eorzeaTime)}">
|
||||
<div class="timer">
|
||||
{{
|
||||
gatheringNode.isActive(eorzeaTime) ? 'Active' : prettyTimer(gatheringNode.getSecondsToNextActiveTime(eorzeaTime))
|
||||
@@ -73,6 +73,13 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@keyframes pulsing {
|
||||
0% {background-color: rgba(255,255,255, 0.05);}
|
||||
50% {background-color: rgba(255,255,255, 0.075);}
|
||||
100% {background-color: rgba(255,255,255, 0.05);}
|
||||
}
|
||||
|
||||
.node {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -84,6 +91,10 @@ export default defineComponent({
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
|
||||
&.active {
|
||||
animation: infinite pulsing 6s;
|
||||
}
|
||||
|
||||
.timer {
|
||||
min-width: 7rem;
|
||||
font-size: 2rem;
|
||||
|
||||
@@ -42,6 +42,11 @@ export default defineComponent(
|
||||
this.displayNodes = this.nodes;
|
||||
}
|
||||
},
|
||||
displayNodes: {
|
||||
handler() {
|
||||
this.sortListByTime();
|
||||
}
|
||||
},
|
||||
eorzeaTime: {
|
||||
immediate: true,
|
||||
handler(newValue, oldValue) {
|
||||
@@ -64,8 +69,9 @@ export default defineComponent(
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.displayNodes = this.nodes;
|
||||
this.sortListByTime();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -3,23 +3,12 @@ export default class Item {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly level: number;
|
||||
readonly scripType: ScripType | null;
|
||||
|
||||
constructor(id: string, data: {[key: string]: number | string | undefined}) {
|
||||
this.id = id;
|
||||
this.name = data?.name as string;
|
||||
this.level = data?.level as number;
|
||||
const scripType: string | undefined = data?.scripType as string;
|
||||
if (scripType != undefined) {
|
||||
this.scripType = typeof data?.scripType === "string" ? scripType.toUpperCase() as ScripType : null;
|
||||
} else {
|
||||
this.scripType = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum ScripType {
|
||||
WHITE = 'white',
|
||||
PURPLE = 'purple',
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export default class Node {
|
||||
this.times = times;
|
||||
this.items = items;
|
||||
this.nearestAetheryte = nearestAetheryte;
|
||||
items.sort((a, b) => b.level - a.level);
|
||||
}
|
||||
|
||||
isActive(eorzeaTime: EorzeaTime): boolean {
|
||||
|
||||
Reference in New Issue
Block a user