fix bugs and add the rest

main^2
Midnight 3 years ago
parent 7e18aa3003
commit 68b3dd7c38

@ -42,6 +42,7 @@
console.log(value.example); console.log(value.example);
}); });
} catch(msg) { } catch(msg) {
commissions = [];
error = "The selected preset link failed to load. It may be from an old version of the commission picker. It has been replaced with the default preset below." error = "The selected preset link failed to load. It may be from an old version of the commission picker. It has been replaced with the default preset below."
} }
} }
@ -56,10 +57,10 @@
let lastAnswer = commission.answers[commission.answers.length - 1]; let lastAnswer = commission.answers[commission.answers.length - 1];
let example = ""; let example = "";
commission.example = ""; commission.example = "";
let type = types.filter(value => { let typeFound = types.filter(value => {
return value['name'] == commission.type; return value['name'] == commission.type;
}); });
type = type[0]; let type = typeFound[0];
let count = 0; let count = 0;
commission.questions.forEach(value => { commission.questions.forEach(value => {
@ -215,7 +216,8 @@
{#each [...commissions].reverse() as commission} {#each [...commissions].reverse() as commission}
<section class="flex gap-5"> <section class="flex gap-5">
<div class="w-3/5 bg-slate-800 rounded-lg shadow-lg p-5 flex flex-col gap-5"> <div class="w-3/5">
<div class="bg-slate-800 rounded-lg shadow-lg p-5 flex flex-col gap-5">
<div class="flex justify-between"> <div class="flex justify-between">
<h3 class="text-xl font-bold flex gap-5">{commission.name}<p class="bg-green-500 py-1 text-sm px-5 rounded-lg">${commission.price}</p></h3> <h3 class="text-xl font-bold flex gap-5">{commission.name}<p class="bg-green-500 py-1 text-sm px-5 rounded-lg">${commission.price}</p></h3>
<span> <span>
@ -245,6 +247,7 @@
{/each} {/each}
</form> </form>
</div> </div>
</div>
<div class="w-2/5"> <div class="w-2/5">
{#if commission.example != ""} {#if commission.example != ""}

@ -152,6 +152,230 @@
] ]
} }
] ]
},
{
"name": "Halfbody",
"examples_from": "Detail level",
"examples": [
{
"name": "basic",
"url": "/commissions/halfbodybasic.jpg"
},
{
"name": "sketchy",
"url": "/commissions/halfbodysketchy.jpg"
},
{
"name": "ultralineart",
"url": "/commissions/halfbodyultralineart.jpg"
},
{
"name": "basiclineless",
"url": "/commissions/halfbodybasiclineless.jpg"
}
],
"questions": [
{
"name": "Detail level",
"options": [
{
"name": "Sketchy",
"example": "sketchy",
"price": 18
},
{
"name": "Basic",
"example": "basic",
"price": 23
},
{
"name": "Basic Lineless",
"price": 23
},
{
"name": "Cell Shaded",
"price": 28
},
{
"name": "Ultra Lineart",
"example": "ultralineart",
"price": 40
}
]
},
{
"name": "Fur",
"options": [
{
"name": "1-3 fur colors",
"example": "3fur",
"price": 0
},
{
"name": "4-5 fur colors",
"example": "4fur",
"price": 10
},
{
"name": "6+ fur colors",
"example": "4fur",
"price": 15
}
]
}
]
},
{
"name": "Fullbody",
"examples_from": "Detail level",
"examples": [
{
"name": "basic",
"url": "/commissions/fullbodybasic.jpg"
},
{
"name": "ultralineart",
"url": "/commissions/fullbodyultralineart.jpg"
},
{
"name": "basiclineless",
"url": "/commissions/fullbodybasiclineless.jpg"
}
],
"questions": [
{
"name": "Detail level",
"options": [
{
"name": "Sketchy",
"price": 23
},
{
"name": "Basic",
"example": "basic",
"price": 28
},
{
"name": "Basic Lineless",
"example": "basiclineless",
"price": 28
},
{
"name": "Cell Shaded",
"price": 33
},
{
"name": "Ultra Lineart",
"example": "ultralineart",
"price": 45
}
]
},
{
"name": "Fur",
"options": [
{
"name": "1-3 fur colors",
"example": "3fur",
"price": 0
},
{
"name": "4-5 fur colors",
"example": "4fur",
"price": 15
},
{
"name": "6+ fur colors",
"example": "4fur",
"price": 20
}
]
}
]
},
{
"name": "Reference sheet",
"examples_from": "Views",
"examples": [
{
"name": "2views",
"url": "/commissions/refsheet2.jpg"
},
{
"name": "3views",
"url": "/commissions/refsheet1.jpg"
}
],
"questions": [
{
"name": "Views",
"options": [
{
"name": "Front + Back",
"example": "2views",
"price": 40
},
{
"name": "Front + Side + Back",
"example": "3views",
"price": 50
}
]
},
{
"name": "Fur",
"options": [
{
"name": "1-3 fur colors",
"example": "3fur",
"price": 0
},
{
"name": "4-5 fur colors",
"example": "4fur",
"price": 20
},
{
"name": "6+ fur colors",
"example": "4fur",
"price": 25
}
]
},
{
"name": "Additions",
"options": [
{
"name": "Custom Design",
"price": 20
},
{
"name": "Extra Headshot",
"price": 15
},
{
"name": "Paws",
"price": 10
},
{
"name": "Maw",
"price": 5
},
{
"name": "Standalone outfit",
"price": 10
},
{
"name": "Full alt. version",
"price": 20
},
{
"name": "Chibi alt. version",
"price": 10
}
]
}
]
} }
] ]
}, },

Loading…
Cancel
Save