mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat(messaging): add details on how to setup a provider
This commit is contained in:
2 files changed
+49
-2
No files matched your search
@@ -22,6 +22,7 @@ type ProvidersMap = {
|
||||
classIcon?: string;
|
||||
title: string;
|
||||
description: string;
|
||||
needAHand?: string[];
|
||||
configure: {
|
||||
label: string;
|
||||
name: string;
|
||||
@@ -56,6 +57,11 @@ export const providers: ProvidersMap = {
|
||||
imageIcon: 'firebase',
|
||||
title: 'FCM',
|
||||
description: 'Firebase Cloud Messaging',
|
||||
needAHand: [
|
||||
'Create a <b><a class="link" href="https://firebase.google.com" target="_blank" rel="noopener noreferrer">Firebase</a></b> project.',
|
||||
'Head to <b>Firebase dashboard -> Settings -> Project settings -> Cloud Messaging.</b>',
|
||||
"If FCM is disabled, click the three-dots menu and open the link. On the following page, click 'Enable' (it might take a few minutes for the action to complete)."
|
||||
],
|
||||
configure: [
|
||||
{
|
||||
label: 'Service account JSON (.json file)',
|
||||
@@ -355,6 +361,10 @@ export const providers: ProvidersMap = {
|
||||
imageIcon: 'twilio',
|
||||
title: 'Twilio',
|
||||
description: '',
|
||||
needAHand: [
|
||||
'Create an account in <b><a class="link" href="https://console.twilio.com/" target="_blank" rel="noopener noreferrer">Twilio</a></b>.',
|
||||
'Head to <b>Twilio console -> Get a Twilio phone number.</b>'
|
||||
],
|
||||
configure: [
|
||||
{
|
||||
label: 'Account SID',
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
import { Table, TableBody, TableCell, TableRowButton, TableRowLink } from '$lib/elements/table';
|
||||
import { newMemberModal } from '$lib/stores/organization';
|
||||
import CreateMember from '$routes/console/organization-[organization]/createMember.svelte';
|
||||
import Collapsible from '$lib/components/collapsible.svelte';
|
||||
import CollapsibleItem from '$lib/components/collapsibleItem.svelte';
|
||||
import Provider from '../../provider.svelte';
|
||||
import { MessagingProviderType } from '@appwrite.io/console';
|
||||
import ProviderTypeComponent from '$routes/console/project-[project]/messaging/providerType.svelte';
|
||||
|
||||
let files: Record<string, FileList> = {};
|
||||
const inputs = providers[$providerType].providers[$provider].configure;
|
||||
@@ -159,11 +164,43 @@
|
||||
<div class="need-a-hand u-flex-vertical u-gap-8">
|
||||
<p class="body-text-2 u-bold u-margin-block-start-48">Need a hand?</p>
|
||||
|
||||
{#if providers[$providerType].providers[$provider].needAHand}
|
||||
{@const needAHand = providers[$providerType].providers[$provider].needAHand}
|
||||
<div class="box u-padding-inline-8 u-padding-0 u-border-width-0">
|
||||
<Collapsible>
|
||||
<CollapsibleItem withIndentation>
|
||||
<svelte:fragment slot="beforetitle">
|
||||
<div class="u-flex u-cross-center u-gap-16">
|
||||
<div class="avatar is-size-small">
|
||||
<span
|
||||
class="icon-info"
|
||||
style:--p-text-size="1.25rem"
|
||||
aria-hidden="true" />
|
||||
</div>
|
||||
<span class="body-text-2 u-small u-bold"
|
||||
>How to enable <Provider provider={$provider} noIcon />
|
||||
{#if $providerType == MessagingProviderType.Push}notifications{:else}<ProviderTypeComponent
|
||||
type={$providerType}
|
||||
noIcon />{/if} service?</span>
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
<div class="u-flex-vertical u-gap-16">
|
||||
{#each needAHand as p}
|
||||
<p>
|
||||
{@html p}
|
||||
</p>
|
||||
{/each}
|
||||
</div>
|
||||
</CollapsibleItem>
|
||||
</Collapsible>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<Table noMargin noStyles>
|
||||
<TableBody>
|
||||
<TableRowLink href={`https://appwrite.io/docs/messaging/${$provider}`}>
|
||||
<TableCell>
|
||||
<div class="u-flex u-cross-center u-main-space-between u-padding-block-8">
|
||||
<div class="u-flex u-cross-center u-main-space-between u-padding-8">
|
||||
<div class="u-flex u-cross-center u-gap-16">
|
||||
<div class="avatar is-size-small">
|
||||
<span
|
||||
@@ -179,7 +216,7 @@
|
||||
</TableRowLink>
|
||||
<TableRowButton on:click={() => ($newMemberModal = true)}>
|
||||
<TableCell>
|
||||
<div class="u-flex u-cross-center u-main-space-between u-padding-block-8">
|
||||
<div class="u-flex u-cross-center u-main-space-between u-padding-8">
|
||||
<div class="u-flex u-cross-center u-gap-16">
|
||||
<div class="avatar is-size-small">
|
||||
<span
|
||||
|
||||
Reference in new issue
Block a user