updated allocationText()

This commit is contained in:
tim
2025-02-23 10:12:59 -04:00
parent 2397ebfe45
commit 956d79c3dc
6 changed files with 15 additions and 7 deletions

View File

@@ -75,13 +75,14 @@ builderDefaults(props.builder, {
rungs: 1,
skew: 0,
color: defaultColor,
buy: true,
})
const times = ref([])
const weights = ref([])
const amountSymbol = computed(()=>props.order.amountIsTokenA ? co.selectedSymbol.base.s : co.selectedSymbol.quote.s )
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(w, w*props.order.amount, amountSymbol.value)))
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(props.order.buy, w, w*props.order.amount, amountSymbol.value)))
const endTimes = computed(()=>{
if (props.builder.rungs === 1)

View File

@@ -124,6 +124,7 @@ builderDefaults(props.builder, {
skew: 0,
breakout: false,
color: defaultColor,
buy: true,
})
@@ -348,7 +349,7 @@ function setWeights(ws) {
const amountSymbol = computed(()=>props.order.amountIsTokenA ? co.selectedSymbol.base.s : co.selectedSymbol.quote.s )
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(w, w*props.order.amount, amountSymbol.value)))
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(props.order.buy, w, w*props.order.amount, amountSymbol.value)))
const stdWidth = computed(()=>[0, co.meanRange, 0, co.meanRange])

View File

@@ -74,6 +74,7 @@ builderDefaults(props.builder, {
skew: 0,
breakout: false,
color: defaultColor,
buy: true,
})
function buildTranches() {
@@ -195,7 +196,7 @@ function setPrices(ps) {prices.value = ps}
function setWeights(ws) { weights.value = ws }
const amountSymbol = computed(()=>props.order.amountIsTokenA ? co.selectedSymbol.base.s : co.selectedSymbol.quote.s )
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(w, w*props.order.amount, amountSymbol.value)))
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(props.order.buy, w, w*props.order.amount, amountSymbol.value)))
const color = computed(()=>props.builder.color ? props.builder.color : defaultColor)
const stdWidth = computed(()=>co.meanRange)
const description = computed(()=>{

View File

@@ -334,6 +334,7 @@ function makeModel(index) {
textLocation: above ? 'above' : 'below',
breakout: props.builder.breakout,
extraText: null,
buy,
}
setModelValue(result, values.value[index])
return result