Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
topics: $message.topics,
users: $message.users,
targets: $message.targets,
description: $message.description,
status: MessageStatuses.DRAFT,
scheduledAt: $message.scheduledAt
};
Expand Down
1 change: 0 additions & 1 deletion src/routes/console/project-[project]/messaging/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const showCreate = writable(false);

export const columns = writable<Column[]>([
{ id: '$id', title: 'Message ID', type: 'string', show: true, width: 140 },
{ id: 'description', title: 'Description', type: 'string', show: true, width: 140 },
{ id: 'message', title: 'Message', type: 'string', show: false, filter: false, width: 140 },
{ id: 'providerType', title: 'Type', type: 'string', show: true, width: 100 },
{ id: 'status', title: 'Status', type: 'string', show: true, width: 120 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const dispatch = createEventDispatcher();

let name: string, description: string, id: string, error: string;
let name: string, id: string, error: string;
let showCustomId = false;

const create = async () => {
Expand All @@ -27,12 +27,10 @@
},
{
name,
description: description || undefined,
topicId: id ?? ID.unique()
}
);
name = '';
description = '';
showCreate = false;
showCustomId = false;
addNotification({
Expand Down Expand Up @@ -64,12 +62,6 @@
autofocus={true}
required
bind:value={name} />
<InputText
id="description"
label="Description"
placeholder="Enter description"
bind:value={description}>
</InputText>
{#if !showCustomId}
<div>
<Pill button on:click={() => (showCustomId = !showCustomId)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const showCreate = writable(false);
export const columns = writable<Column[]>([
{ id: '$id', title: 'Topic ID', type: 'string', show: true, width: 140 },
{ id: 'name', title: 'Name', type: 'string', show: true, width: 140 },
{ id: 'description', title: 'Description', type: 'string', show: true, width: 140 },
{ id: 'total', title: 'Subscribers', type: 'integer', show: true, width: 140 },
{ id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 140 }
]);
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
import { Container } from '$lib/layout';
import DangerZone from './dangerZone.svelte';
import Details from './details.svelte';
import UpdateDescription from './updateDescription.svelte';
import UpdateName from './updateName.svelte';
</script>

<Container>
<Details />
<UpdateName />
<UpdateDescription />
<DangerZone />
</Container>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
createEmailMessage({
topics: $messageParams[ProviderTypes.Email]?.topics || [],
targets: $messageParams[ProviderTypes.Email]?.targets || [],
description: $messageParams[ProviderTypes.Email]?.description || 'Test message',
status: MessageStatuses.PROCESSING,
messageId: ID.unique(),
// TODO: properly handle the test email address
Expand Down Expand Up @@ -126,13 +125,6 @@
Enable the HTML mode if your message contains HTML tags.
</svelte:fragment>
</InputSwitch>
<InputText
id="description"
label="Description"
placeholder="Enter description"
tooltip="Provide a summary of the message. Users won't see this description."
bind:value={$messageParams[$providerType]['description']}>
</InputText>
{#if $operation === 'create'}
{#if !showCustomId}
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
createPushMessage({
topics: $messageParams[ProviderTypes.Push]?.topics || [],
targets: $messageParams[ProviderTypes.Push]?.targets || [],
description: $messageParams[ProviderTypes.Push]?.description || 'Test push',
status: MessageStatuses.PROCESSING,
messageId: ID.unique(),
// TODO: properly handle the test email address
Expand Down Expand Up @@ -224,13 +223,6 @@
</Button>
</div>
</form>
<InputText
id="description"
label="Description"
placeholder="Enter description"
tooltip="Provide a summary of the message. Users won't see this description."
bind:value={$messageParams[$providerType]['description']}>
</InputText>
{#if $operation === 'create'}
{#if !showCustomId}
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@
MessageStatuses,
operation
} from './store';
import {
Button,
FormList,
InputEmail,
InputRadio,
InputText,
InputTextarea
} from '$lib/elements/forms';
import { Button, FormList, InputEmail, InputRadio, InputTextarea } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import { CustomId, Modal } from '$lib/components';
import { user } from '$lib/stores/user';
Expand All @@ -51,7 +44,6 @@
createSMSMessage({
topics: $messageParams[ProviderTypes.Email]?.topics || [],
targets: $messageParams[ProviderTypes.Email]?.targets || [],
description: $messageParams[ProviderTypes.Email]?.description || 'Test message',
status: MessageStatuses.PROCESSING,
messageId: ID.unique(),
// TODO: properly handle the test email address
Expand Down Expand Up @@ -115,13 +107,6 @@
</svelte:fragment>
</Modal>
</div>
<InputText
id="description"
label="Description"
placeholder="Enter description"
tooltip="Provide a summary of the message. Users won't see this description."
bind:value={$messageParams[$providerType]['description']}>
</InputText>
{#if $operation === 'create'}
{#if !showCustomId}
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Models } from '@appwrite.io/console';
import { ProviderTypes } from '../providerType.svelte';
import { writable } from 'svelte/store';
import { ProviderTypes } from '../providerType.svelte';

export enum MessageStatuses {
DRAFT = 'draft',
Expand All @@ -15,7 +15,6 @@ export type MessageParams = {
topics: string[];
users: string[];
targets: string[];
description: string;
status: MessageStatuses;
scheduledAt?: string;
};
Expand Down