mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2025-02-16 23:50:17 +00:00
Vuefy and cleanup InfinityPointsHeader/
This commit is contained in:
parent
3f72973e69
commit
fa1290b9b1
@ -1,5 +1,3 @@
|
||||
import "./infinity/infinity-points-header.js";
|
||||
|
||||
import "./eternity/eternity-points-header.js";
|
||||
import "./eternity/time-studies/time-studies-tab.js";
|
||||
import "./eternity/upgrades/eternity-upgrades-tab.js";
|
||||
|
@ -1,20 +0,0 @@
|
||||
Vue.component("infinity-points-header", {
|
||||
data() {
|
||||
return {
|
||||
infinityPoints: new Decimal(0),
|
||||
isVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.infinityPoints.copyFrom(Currency.infinityPoints);
|
||||
this.isVisible = PlayerProgress.infinityUnlocked();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div v-show="isVisible" class="c-infinity-tab__header">
|
||||
You have
|
||||
<span class="c-infinity-tab__infinity-points">{{ format(infinityPoints, 2, 0) }}</span>
|
||||
{{ pluralize("Infinity Point", infinityPoints) }}.
|
||||
</div>`
|
||||
});
|
@ -3,6 +3,7 @@ import "./old-ui-tab-bar.js";
|
||||
import "./header/game-header.js";
|
||||
import NewsTicker from "@/components/NewsTicker";
|
||||
import FooterLinks from "@/components/FooterLinks";
|
||||
import InfinityPointsHeader from "@/components/InfinityPointsHeader";
|
||||
|
||||
Vue.component("old-ui", {
|
||||
components: {
|
||||
@ -10,7 +11,8 @@ Vue.component("old-ui", {
|
||||
template: `<button class="o-tab-btn o-big-crunch-btn" onclick="bigCrunchResetRequest()">Big Crunch</button>`
|
||||
},
|
||||
NewsTicker,
|
||||
FooterLinks
|
||||
FooterLinks,
|
||||
InfinityPointsHeader
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -219,7 +219,7 @@ GameDatabase.tabs = [
|
||||
key: "infinity",
|
||||
name: "Infinity",
|
||||
UIClass: "o-tab-btn--infinity",
|
||||
before: "infinity-points-header",
|
||||
before: "InfinityPointsHeader",
|
||||
id: 6,
|
||||
condition: () => PlayerProgress.infinityUnlocked(),
|
||||
hidable: true,
|
||||
|
32
src/components/InfinityPointsHeader.vue
Normal file
32
src/components/InfinityPointsHeader.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "InfinityPointsHeader",
|
||||
data() {
|
||||
return {
|
||||
infinityPoints: new Decimal(0),
|
||||
isVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.infinityPoints.copyFrom(Currency.infinityPoints);
|
||||
this.isVisible = PlayerProgress.infinityUnlocked();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-show="isVisible"
|
||||
class="c-infinity-tab__header"
|
||||
>
|
||||
You have
|
||||
<span class="c-infinity-tab__infinity-points">{{ format(infinityPoints, 2, 0) }}</span>
|
||||
{{ pluralize("Infinity Point", infinityPoints) }}.
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user