Merge pull request #2092 from appwrite/fix-apns-provider-key

This commit is contained in:
Darshan
2025-07-08 18:56:17 +05:30
committed by GitHub
2 changed files with 9 additions and 20 deletions
@@ -24,8 +24,7 @@
APNSProviderParams
} from './store';
import TooltipPopover from './tooltipPopover.svelte';
import { Icon, Tooltip, Upload, Layout, Typography } from '@appwrite.io/pink-svelte';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
import { Upload, Layout, Typography } from '@appwrite.io/pink-svelte';
import { InvalidFileType, removeFile } from '$lib/helpers/files';
import { addNotification } from '$lib/stores/notifications';
@@ -122,25 +121,15 @@
{:else if input.type === 'file'}
<Upload.Dropzone
on:invalid={handleInvalid}
extensions={['json']}
extensions={input.allowedFileExtensions}
bind:files={files[input.name]}
maxSize={10000000}
required={!input.optional}>
<Layout.Stack alignItems="center" gap="s">
<Layout.Stack alignItems="center" gap="s">
<Layout.Stack alignItems="center" justifyContent="center" direction="row" gap="s">
<Typography.Text variant="l-500">
Drag and drop service account JSON here or click to upload
</Typography.Text>
<Tooltip>
<Layout.Stack alignItems="center" justifyContent="center" inline>
<Icon icon={IconInfo} size="s" />
</Layout.Stack>
<svelte:fragment slot="tooltip">Only .json files allowed</svelte:fragment>
</Tooltip>
</Layout.Stack>
<Typography.Caption variant="400">Max file size 10MB</Typography.Caption>
</Layout.Stack>
<Layout.Stack alignItems="center" justifyContent="center" direction="row" gap="xxs">
<Typography.Text variant="l-500">
Drag and drop your {input.label} here or click to upload
</Typography.Text>
<TooltipPopover {popover} {popoverProps} tooltip={input.tooltip} />
</Layout.Stack>
</Upload.Dropzone>
{#if files[input.name]?.length}
@@ -85,7 +85,7 @@ export const providers: ProvidersMap = {
],
configure: [
{
label: 'Service account JSON (.json file)',
label: 'service account JSON (.json file)',
name: 'serviceAccountJSON',
type: 'file',
allowedFileExtensions: ['json'],
@@ -164,7 +164,7 @@ export const providers: ProvidersMap = {
}
},
{
label: 'Auth key (.p8 file)',
label: 'auth key (.p8 file)',
name: 'authKey',
type: 'file',
allowedFileExtensions: ['p8'],