mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Database events
This commit is contained in:
@@ -140,6 +140,10 @@ export function isTrackingAllowed() {
|
||||
|
||||
export enum Click {
|
||||
BreadcrumbClick = 'click_breadcrumb',
|
||||
DatabaseAttributeDelete = 'click_attribute_delete',
|
||||
DatabaseIndexDelete = 'click_index_delete',
|
||||
DatabaseColletionDelete = 'click_collection_delete',
|
||||
DatabaseDatabaseDelete = 'click_database_delete',
|
||||
FilterApplyClick = 'click_apply_filter',
|
||||
KeyCreateClick = 'click_key_create',
|
||||
MenuDropDownClick = 'click_menu_dropdown',
|
||||
|
||||
+2
@@ -35,6 +35,7 @@
|
||||
IconTrash
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
const databaseId = $page.params.database;
|
||||
@@ -179,6 +180,7 @@
|
||||
selectedAttribute = attribute;
|
||||
showDelete = true;
|
||||
showDropdown[index] = false;
|
||||
trackEvent(Click.DatabaseAttributeDelete);
|
||||
}}>
|
||||
Delete
|
||||
</ActionMenu.Item.Button>
|
||||
|
||||
+2
@@ -31,6 +31,7 @@
|
||||
IconTrash
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
let showDropdown = [];
|
||||
let selectedIndex: Models.Index = null;
|
||||
@@ -128,6 +129,7 @@
|
||||
on:click={() => {
|
||||
selectedIndex = index;
|
||||
showDelete = true;
|
||||
trackEvent(Click.DatabaseIndexDelete);
|
||||
}}>Delete</ActionMenu.Item.Button>
|
||||
</ActionMenu.Root>
|
||||
</Popover>
|
||||
|
||||
+7
-1
@@ -4,6 +4,7 @@
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { collection } from '../store';
|
||||
import Delete from './deleteCollection.svelte';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
let showDelete = false;
|
||||
</script>
|
||||
@@ -22,7 +23,12 @@
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
<Button secondary on:click={() => (showDelete = true)}>Delete</Button>
|
||||
<Button
|
||||
secondary
|
||||
on:click={() => {
|
||||
trackEvent(Click.DatabaseColletionDelete);
|
||||
showDelete = true;
|
||||
}}>Delete</Button>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
|
||||
|
||||
+7
-2
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { Click, Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { BoxAvatar, Card, CardGrid } from '$lib/components';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Button, Form, Helper, InputText } from '$lib/elements/forms';
|
||||
@@ -113,7 +113,12 @@
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
<Button secondary on:click={() => (showDelete = true)}>Delete</Button>
|
||||
<Button
|
||||
secondary
|
||||
on:click={() => {
|
||||
showDelete = true;
|
||||
trackEvent(Click.DatabaseDatabaseDelete);
|
||||
}}>Delete</Button>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
</Container>
|
||||
|
||||
Reference in New Issue
Block a user