Address layout comments

This commit is contained in:
SpectralFlame 2022-05-31 08:44:49 -05:00
parent d044b2ed52
commit b0ec6eb303
5 changed files with 25 additions and 7 deletions

View File

@ -403,6 +403,7 @@ body.t-s9 {
.o-primary-btn--dimension-reset { .o-primary-btn--dimension-reset {
display: flex; display: flex;
width: 25rem;
height: 6rem; height: 6rem;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -23,6 +23,11 @@ export default {
required: true required: true
}, },
}, },
data() {
return {
width: 0,
};
},
computed: { computed: {
rateText() { rateText() {
return this.tier < 8 return this.tier < 8
@ -31,12 +36,17 @@ export default {
}, },
}, },
methods: { methods: {
update() {
// Needs to be reactive or else rows that don't have changing values (eg. the highest dimension and any higher
// locked ones) won't change layout when the window size changes
this.width = window.innerWidth;
},
adjustableTextStyle() { adjustableTextStyle() {
return { return {
display: "flex", display: "flex",
"text-align": "left", "text-align": "left",
width: "100%", width: "100%",
"flex-direction": window.innerWidth < 1450 ? "column" : "row", "flex-direction": this.width < 1450 ? "column" : "row",
"justify-content": "space-between", "justify-content": "space-between",
"align-items": "center", "align-items": "center",
}; };

View File

@ -40,7 +40,7 @@ export default {
return this.buyUntil10 ? format(this.until10Cost) : format(this.singleCost); return this.buyUntil10 ? format(this.until10Cost) : format(this.singleCost);
}, },
amountDisplay() { amountDisplay() {
return this.tier < 8 ? format(this.amount, 2, 0) : formatInt(this.amount); return this.tier < 8 ? format(this.amount, 2) : formatInt(this.amount);
}, },
continuumString() { continuumString() {
return formatFloat(this.continuumValue, 2); return formatFloat(this.continuumValue, 2);
@ -58,8 +58,8 @@ export default {
}, },
buttonPrefix() { buttonPrefix() {
if (this.isCapped) return "Shattered by Enslaved"; if (this.isCapped) return "Shattered by Enslaved";
if (this.isContinuumActive) return "Continuum:"; if (this.isContinuumActive) return "Continuum: ";
return `Buy ${this.howManyCanBuy}`; return `Buy ${this.howManyCanBuy}, `;
}, },
buttonValue() { buttonValue() {
if (this.isCapped) return ""; if (this.isCapped) return "";
@ -149,7 +149,7 @@ export default {
> >
<div <div
v-tooltip="boughtTooltip" v-tooltip="boughtTooltip"
class="button-content" class="button-content l-modern-buy-ad-text"
:class="tutorialClass()" :class="tutorialClass()"
> >
<div> <div>
@ -176,3 +176,10 @@ export default {
</div> </div>
</div> </div>
</template> </template>
<style scoped>
.l-modern-buy-ad-text {
display: flex;
flex-direction: column;
}
</style>

View File

@ -58,7 +58,7 @@ export default {
return `Reach ${formatPostBreak(InfinityDimension(this.tier).amRequirement)} AM`; return `Reach ${formatPostBreak(InfinityDimension(this.tier).amRequirement)} AM`;
}, },
hasLongText() { hasLongText() {
return this.costDisplay.length > 20; return this.costDisplay.length > 15;
}, },
capTooltip() { capTooltip() {
if (this.enslavedRunning) return `Enslaved prevents the purchase of more than ${format(10)} Infinity Dimensions`; if (this.enslavedRunning) return `Enslaved prevents the purchase of more than ${format(10)} Infinity Dimensions`;

View File

@ -65,7 +65,7 @@ export default {
return this.isCapped ? "Capped" : `${this.showCostTitle ? "Cost: " : ""}${format(this.cost, 2)} EP`; return this.isCapped ? "Capped" : `${this.showCostTitle ? "Cost: " : ""}${format(this.cost, 2)} EP`;
}, },
hasLongText() { hasLongText() {
return this.buttonContents.length > 20; return this.buttonContents.length > 15;
}, },
showCostTitle() { showCostTitle() {
return this.cost.exponent < 1e6; return this.cost.exponent < 1e6;