mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
WIP messaging
This commit is contained in:
1 parent
ff6eddc6d4
commit
23e9f1ae3d
3 files changed
+16
-2
No files matched your search
@@ -153,6 +153,8 @@ export enum Click {
|
||||
KeyCreateClick = 'click_key_create',
|
||||
MenuDropDownClick = 'click_menu_dropdown',
|
||||
ModalCloseClick = 'click_close_modal',
|
||||
MessagingScheduleClick = 'click_messaging_schedule',
|
||||
MessagingTopicCreateClick = 'click_messaging_topic_create',
|
||||
PlatformCreateClick = 'click_platform_create',
|
||||
OrganizationClickCreate = 'click_create_organization',
|
||||
OrganizationClickUpgrade = 'click_organization_upgrade',
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import ScheduleModal from './scheduleModal.svelte';
|
||||
import CancelModal from './cancelModal.svelte';
|
||||
import { Typography } from '@appwrite.io/pink-svelte';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let message: Models.Message & { data: Record<string, string> };
|
||||
export let topics: Models.Topic[];
|
||||
@@ -49,7 +50,12 @@
|
||||
<svelte:fragment slot="actions">
|
||||
{#if message.status === 'draft'}
|
||||
<div class="u-flex u-gap-16">
|
||||
<Button text on:click={() => (showSchedule = true)}>Schedule</Button>
|
||||
<Button
|
||||
text
|
||||
on:click={() => {
|
||||
showSchedule = true;
|
||||
trackEvent(Click.MessagingScheduleClick);
|
||||
}}>Schedule</Button>
|
||||
<Button secondary on:click={() => (showSend = true)}>Send message</Button>
|
||||
</div>
|
||||
{:else if message.status === 'scheduled'}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
import { Icon, Layout } from '@appwrite.io/pink-svelte';
|
||||
import { View } from '$lib/helpers/load';
|
||||
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -59,7 +60,12 @@
|
||||
<Filters query={data.query} {columns} analyticsSource="messaging_topics_filter" />
|
||||
<ViewSelector view={View.Table} {columns} hideView allowNoColumns showColsTextMobile />
|
||||
{#if $canWriteTopics}
|
||||
<Button on:click={() => ($showCreate = true)} event="create_topic">
|
||||
<Button
|
||||
on:click={() => {
|
||||
$showCreate = true;
|
||||
trackEvent(Click.MessagingTopicCreateClick);
|
||||
}}
|
||||
event="create_topic">
|
||||
<Icon icon={IconPlus} slot="start" size="s" />
|
||||
Create topic
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user