Skip to content

Commit

Permalink
fix: Temporary fix for Sentient Anomalies (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricSihaoLin authored May 6, 2020
1 parent 4de10bb commit b5d51f4
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 53 deletions.
4 changes: 1 addition & 3 deletions src/components/panels/EventsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
<b-badge v-for="item in reward.countedItems" :key="`${item}-${makeid()}`" variant="success">
{{ item }}
</b-badge>
<b-badge v-if="reward.credits" variant="info">
{{ reward.credits }}{{ $t('currency.credAbbr') }}
</b-badge>
<b-badge v-if="reward.credits" variant="info"> {{ reward.credits }}{{ $t('currency.credAbbr') }} </b-badge>
</div>
<div class="text-center d-inline" v-for="step in event.interimSteps" :key="`rsi-${step.length}-${makeid()}`">
<b-badge v-for="item in step.reward.items" :key="`rsi-${item}-${makeid()}`" variant="success">
Expand Down
52 changes: 13 additions & 39 deletions src/components/panels/SentientOutpostsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
<b-tooltip target="para_tooltip" placement="top" class="text-center">
{{ $t('sentientoutpost.warn') }}
</b-tooltip>
<i id="time_tooltip" class="fa-xs fas fa-question-circle"></i>
<b-tooltip target="time_tooltip" placement="top" class="text-center">
{{ $t('sentientoutpost.tooltip1') }}
{{ $t('sentientoutpost.tooltip2') }}
</b-tooltip>
</span>
<TimeBadge :starttime="curr.activation" :endtime="curr.expiry" :interval="1000" />
<TimeBadge :starttime="sentientOutposts.activation" :endtime="sentientOutposts.expiry" :interval="1000" />
</b-list-group-item>
<b-list-group-item class="list-group-item-borderbottom p-2" v-if="!sentientOutposts.active">
<span class="pull-left">
<i class="far fa-eye-slash faIcon" v-b-tooltip :title="this.$t('sentientoutpost.none')"></i>
<b>{{ $t('sentientoutpost.prediction') }}</b>
<b>{{ $t('sentientoutpost.none') }}</b>
</span>
<TimeBadge :starttime="predNext.activation" :endtime="predNext.expiry" :interval="1000" />
</b-list-group-item>
</b-list-group>
</HubPanelWrap>
Expand All @@ -29,51 +33,20 @@ import TimeBadge from '@/components/TimeBadge.vue';
import HubPanelWrap from '@/components/HubPanelWrap';
import HubImg from '@/components/HubImg.vue';
import moment from 'moment';
import sentient from '@/assets/img/factions/sentient.svg';
export default {
name: 'SentientOutpostsPanel',
props: ['sentientOutposts'],
watch: {
mission: function () {
this.active = new Date().getTime();
},
},
computed: {
headertext() {
return this.$t('sentientoutpost.header');
},
curr() {
const defStart = new Date(this.$props.sentientOutposts.activation).getTime();
const defEnd = new Date(this.$props.sentientOutposts.expiry).getTime();
const predStart = new Date(this.$props.sentientOutposts.previous.activation).getTime();
const predEnd = new Date(this.$props.sentientOutposts.previous.expiry).getTime();
if (defStart < predStart) {
return {
activation: moment(defStart).toISOString(),
expiry: moment(defEnd).toISOString(),
};
} else {
return {
activation: moment(predStart).toISOString(),
expiry: moment(predEnd).toISOString(),
};
}
},
predNext() {
const defStart = new Date(this.$props.sentientOutposts.activation).getTime();
const defEnd = new Date(this.$props.sentientOutposts.expiry).getTime();
const predStart = new Date(this.$props.sentientOutposts.previous.activation).getTime();
const predEnd = new Date(this.$props.sentientOutposts.previous.expiry).getTime();
if (defStart > predStart) {
return {
activation: moment(defStart).toISOString(),
expiry: moment(defEnd).toISOString(),
};
} else {
return {
activation: moment(predStart).toISOString(),
expiry: moment(predEnd).toISOString(),
};
}
},
},
data() {
return {
Expand All @@ -85,6 +58,7 @@ export default {
width: '25px',
height: '25px',
},
mission: this.$props.sentientOutposts.mission.node,
};
},
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "Dieser Teil befindet sich aufgrund des aktuellen Updates in der aktiven Entwicklung.",
"tooltip2": "Geschätzter Zyklus beträgt 30 Minuten aktive Zeit und 3 Stunden inaktive Zeit.",
"tooltip2": "Geschätzter Zyklus beträgt 30 Minuten aktive Zeit.",
"header": "Anomalien (Beta)",
"outpostsL": "Außenposten",
"none": "Keine aktuellen Anomalien",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "Este componente está desarrollándose por una actualización reciente.",
"tooltip2": "El ciclo estimado es de 30 minutos de tiempo activo y 3 horas de tiempo inactivo.",
"tooltip2": "El ciclo estimado es de 30 minutos de tiempo activo",
"header": "Anomalías (beta)",
"outpostsL": "Avanzada",
"none": "No hay anomalías actualmente",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "이 부분은 최근 업데이트 때문에 개발 중에 있습니다.",
"tooltip2": "예상 주기는 30분의 활성화 시간과 3시간의 비활성화 시간입니다.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "이상 현상 (베타)",
"outpostsL": "전초기지",
"none": "현재 이상 현상 없음",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"sentientoutpost": {
"tooltip1": "This component is in active development because of the recent update.",
"tooltip2": "Estimated cycle is 30 minutes of active time and 3 hours of inactive time.",
"tooltip2": "Estimated cycle is 30 minutes of active time on each node.",
"header": "Anomalies (Beta)",
"outpostsL": "Outposts",
"none": "No Current Anomalies",
Expand Down

1 comment on commit b5d51f4

@vercel
Copy link

@vercel vercel bot commented on b5d51f4 May 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.