This commit is contained in:
1 parent
2542f6dcb6
commit
daaaebc5a8
3 files changed
+8
-7
No files matched your search
@@ -60,7 +60,7 @@ const emailValid = computed(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.value.
|
|||||||
|
|
||||||
const requiredAnswered = computed(() => {
|
const requiredAnswered = computed(() => {
|
||||||
if (!activePaper.value) return false
|
if (!activePaper.value) return false
|
||||||
return activePaper.value.questions.every((q) => {
|
return (activePaper.value.questions ?? []).every((q) => {
|
||||||
if (q.informationQuestion || q.optional) return true
|
if (q.informationQuestion || q.optional) return true
|
||||||
const value = answers.value[q.id]
|
const value = answers.value[q.id]
|
||||||
if (Array.isArray(value)) return value.length > 0
|
if (Array.isArray(value)) return value.length > 0
|
||||||
@@ -81,7 +81,7 @@ function defaultAnswer(q: SkinSiteReviewPublicQuestion): string | string[] {
|
|||||||
function openPaper(paper: SkinSiteReviewPublicPaper) {
|
function openPaper(paper: SkinSiteReviewPublicPaper) {
|
||||||
activePaper.value = paper
|
activePaper.value = paper
|
||||||
answers.value = {}
|
answers.value = {}
|
||||||
for (const q of paper.questions) answers.value[q.id] = defaultAnswer(q)
|
for (const q of paper.questions ?? []) answers.value[q.id] = defaultAnswer(q)
|
||||||
email.value = ''
|
email.value = ''
|
||||||
inviteCode.value = ''
|
inviteCode.value = ''
|
||||||
receipt.value = null
|
receipt.value = null
|
||||||
@@ -119,7 +119,7 @@ async function submitApplication() {
|
|||||||
submitting.value = true
|
submitting.value = true
|
||||||
try {
|
try {
|
||||||
const payloadAnswers: Record<string, unknown> = {}
|
const payloadAnswers: Record<string, unknown> = {}
|
||||||
for (const q of activePaper.value.questions) {
|
for (const q of activePaper.value.questions ?? []) {
|
||||||
if (q.informationQuestion) continue
|
if (q.informationQuestion) continue
|
||||||
payloadAnswers[q.id] = answers.value[q.id] ?? ''
|
payloadAnswers[q.id] = answers.value[q.id] ?? ''
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ onMounted(loadCatalog)
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="question in activePaper.questions"
|
v-for="question in activePaper.questions ?? []"
|
||||||
:key="question.id"
|
:key="question.id"
|
||||||
class="flex flex-col gap-2 rounded-xl border border-solid border-surface-5 bg-bg-raised p-3"
|
class="flex flex-col gap-2 rounded-xl border border-solid border-surface-5 bg-bg-raised p-3"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -174,6 +174,7 @@
|
|||||||
"terracotta:default",
|
"terracotta:default",
|
||||||
"multiplayer:default",
|
"multiplayer:default",
|
||||||
"servers:default",
|
"servers:default",
|
||||||
"planet-minecraft:default"
|
"planet-minecraft:default",
|
||||||
|
"fonts:default"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
"script-src": "'self' 'unsafe-eval' 'wasm-unsafe-eval'",
|
"script-src": "'self' 'unsafe-eval' 'wasm-unsafe-eval'",
|
||||||
"worker-src": "'self' blob:",
|
"worker-src": "'self' blob:",
|
||||||
|
|
||||||
"frame-src": "https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self' http://axolotl-skin.localhost axolotl-skin://localhost https://skin.starlight.cool",
|
"frame-src": "https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self' http://axolotl-skin.localhost axolotl-skin://localhost https://skin.starlight.cool https://map.starlight.cool",
|
||||||
"media-src": "'self' data: https://*.githubusercontent.com"
|
"media-src": "'self' data: https://*.githubusercontent.com"
|
||||||
},
|
},
|
||||||
"csp": {
|
"csp": {
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost http://textures.minecraft.net blob: data:",
|
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost http://textures.minecraft.net blob: data:",
|
||||||
"style-src": "'unsafe-inline' 'self'",
|
"style-src": "'unsafe-inline' 'self'",
|
||||||
"script-src": "'self' 'unsafe-eval' 'wasm-unsafe-eval'",
|
"script-src": "'self' 'unsafe-eval' 'wasm-unsafe-eval'",
|
||||||
"frame-src": "https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self' axolotl-skin://localhost http://axolotl-skin.localhost https://skin.starlight.cool",
|
"frame-src": "https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self' axolotl-skin://localhost http://axolotl-skin.localhost https://skin.starlight.cool https://map.starlight.cool",
|
||||||
"media-src": "'self' data: https://*.githubusercontent.com"
|
"media-src": "'self' data: https://*.githubusercontent.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user