Skip to content

Commit c7b0a8a

Browse files
committed
feat: add banner guidelines popup
1 parent ba01c30 commit c7b0a8a

File tree

1 file changed

+68
-1
lines changed
  • apps/frontend/src/pages/app/extensions

1 file changed

+68
-1
lines changed

apps/frontend/src/pages/app/extensions/[id].vue

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
@change="handleBannerUpload"
166166
/>
167167
<ElementsButton
168-
@click="bannerInput?.click()"
168+
@click="modalOpen.uploadBanner = true"
169169
:disabled="uploading"
170170
>
171171
<div class="flex items-center gap-1.5">
@@ -337,6 +337,71 @@
337337
</div>
338338
</div>
339339

340+
<ElementsModal
341+
:is-open="modalOpen.uploadBanner"
342+
:closable="true"
343+
title="Banner guidelines"
344+
@close="modalOpen.uploadBanner = false"
345+
>
346+
<template #default>
347+
<div class="space-y-4">
348+
<ElementsInlinecard>
349+
If your extension fails to meet the quality guidelines for banners,
350+
we may replace the banner or unlist/reject your extension.
351+
</ElementsInlinecard>
352+
<div class="space-y-2">
353+
<li class="ms-4">
354+
<p>
355+
<b>AI-generated graphics are not allowed.</b> Avoid using any
356+
AI-generated content in your extension graphics.
357+
</p>
358+
</li>
359+
<li class="ms-4">
360+
<p>
361+
<b>No plain screenshots.</b> Plain screenshots often add
362+
additional confusion to buyers and worsen the overal experience.
363+
Add screenshots to the extension's description instead.
364+
</p>
365+
</li>
366+
<li class="ms-4">
367+
<p>
368+
<b>Anything is better than nothing.</b> Whether you use
369+
Microsoft Paint, Canva or Photoshop, just try to make a quick
370+
simple banner. Extensions with higher quality banners tend to
371+
get more attention.
372+
</p>
373+
</li>
374+
<li class="ms-4">
375+
<p>
376+
Follow our
377+
<NuxtLink to="/legal/terms" class="text-link"
378+
>Terms of Service</NuxtLink
379+
>
380+
and
381+
<NuxtLink to="/legal/conduct" class="text-link"
382+
>Code of Conduct</NuxtLink
383+
>.
384+
</p>
385+
</li>
386+
</div>
387+
</div>
388+
</template>
389+
390+
<template #footer>
391+
<ElementsButton
392+
label="Cancel"
393+
class="w-full md:w-auto"
394+
@click="modalOpen.uploadBanner = false"
395+
/>
396+
<ElementsButton
397+
label="Accept and upload"
398+
class="flex w-full flex-col items-center md:w-auto"
399+
:disabled="loading"
400+
@click="bannerInput?.click()"
401+
/>
402+
</template>
403+
</ElementsModal>
404+
340405
<ElementsModal
341406
v-if="user?.admin"
342407
:is-open="modalOpen.adminReject"
@@ -447,6 +512,7 @@ const modalOpen = ref({
447512
adminReject: false,
448513
platforms: false,
449514
delete: false,
515+
uploadBanner: false,
450516
})
451517
const form = ref<{
452518
identifier: string
@@ -551,6 +617,7 @@ const handleBannerUpload = async (event: Event) => {
551617
const file = (event.target as HTMLInputElement).files?.[0]
552618
if (!file) return
553619
620+
modalOpen.value.uploadBanner = false
554621
uploading.value = true
555622
556623
try {

0 commit comments

Comments
 (0)