{ if (!id && (visibility === Visibility.Public || visibility === Visibility.SchoolRestricted)) modalWarnNotifications.showModal(); else await updateArticle(); }} >

{#if canChangeGroup} {#await $zeus.query( { groups: [{}, { id: true, name: true, uid: true, pictureFile: true, pictureFileDark: true }] }, )} {:then { groups: options }} {/await} {:else} {group.name} {/if}

{HELP_VISIBILITY_DYNAMIC([group, ...group.children])[visibility]}

{#await $zeus.query( { eventsOfGroup: [{ groupUid: group.uid }, { edges: { node: _articleQuery.event } }] }, )} Évènement {:then { eventsOfGroup: { edges } }} n.node)} bind:event groupUid={$page.params.group} > {/await} Publier plus tard
{#if serverError} Impossible de sauvegarder les modifications :
{serverError}
{/if}
{#if id === ''} Poster {:else if confirmingDelete}

Es-tu sûr·e ?

{ confirmingDelete = false; }}>Annuler { toasts.success( `Post ${title.slice(0, 20)}${title.length >= 20 ? '…' : ''} supprimé`, '', { lifetime: 5000, showLifetime: true, data: { id: data.article.id, confirm: true, gotoOnCancel: `${afterGoTo(data.article)}/edit/`.replaceAll('//', '/'), }, labels: { action: 'Annuler', close: 'OK', }, async action({ data, id }) { data.confirm = false; await toasts.remove(id); await goto(data.gotoOnCancel); }, async closed({ data: { id, confirm } }) { if (confirm) { await $zeus.mutate({ deleteArticlePicture: [{ id }, true], deleteArticle: [{ id }, true], }); } }, }, ); confirmingDelete = false; await goto('/'); }} danger>Oui { visibility = Visibility.Private; confirmingDelete = false; }}>Rendre privé {:else} Enregistrer {#if data.article.id} { confirmingDelete = true; }}>Supprimer {/if} {/if}