Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export function isTrackingAllowed() {
}

export enum Submit {
DownloadDPA = 'submit_download_dpa',
Error = 'submit_error',
AccountCreate = 'submit_account_create',
AccountLogin = 'submit_account_login',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import { onMount } from 'svelte';
import Delete from './deleteOrganization.svelte';
import Delete from './deleteOrganizationModal.svelte';
import DownloadDPA from './downloadDPA.svelte';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';

export let data;
Expand Down Expand Up @@ -63,6 +64,8 @@
</CardGrid>
</Form>

<DownloadDPA />

<CardGrid danger>
<div>
<Heading tag="h6" size="7">Delete organization</Heading>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<script lang="ts">
import { Box, CardGrid, Heading } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { sdk } from '$lib/stores/sdk';
import { Submit, trackEvent } from '$lib/actions/analytics';

async function downloadPdf() {
trackEvent(Submit.DownloadDPA);

const today = new Date().toISOString();
const prefs = await sdk.forConsole.account.getPrefs();
const newPrefs = { ...prefs, DPA: today };
sdk.forConsole.account.updatePrefs(newPrefs);

const baseUrl = window.location.origin;
const response = await fetch(`${baseUrl}/Appwrite_DPA.pdf`);
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = 'Appwrite_DPA.pdf';
link.click();
}
</script>

<CardGrid>
<div>
<Heading tag="h6" size="7">Download DPA document</Heading>
</div>
<p class="text">
After downloading, have the DPA signed by your organization's compliance authority, such as your CEO or Compliance Manager, and submit it to [email protected].
Comment thread
TorstenDittmann marked this conversation as resolved.
Outdated
</p>
<svelte:fragment slot="aside">
<Box>
<h6>
<b>Data Processing Agreement (DPA) document</b>
</h6>
<p class="text u-margin-block-start-8">
The DPA is a legal document that describes the roles and responsibilities of Appwrite and the organization when personal data is processed. Learn more about the DPA.
Comment thread
TorstenDittmann marked this conversation as resolved.
Outdated
</p>
<Button
secondary
class="u-margin-block-start-16"
on:click={downloadPdf}
event="download_dpa">
<span class="icon-download" aria-hidden="true" />
<span class="text">Download</span>
</Button>
</Box>
</svelte:fragment>
</CardGrid>
Binary file added static/Appwrite_DPA.pdf
Binary file not shown.