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
14 changes: 8 additions & 6 deletions src/routes/console/project-[project]/messaging/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
SearchQuery,
ViewSelector
} from '$lib/components';
import { Filters, hasPageQueries } from '$lib/components/filters';
import { Button } from '$lib/elements/forms';
import {
TableBody,
Expand All @@ -27,12 +28,11 @@
import { toLocaleDateTime } from '$lib/helpers/date';
import { Container } from '$lib/layout';
import type { PageData } from './$types';
import { columns, showCreate } from './store';
import MessageStatusPill from './messageStatusPill.svelte';
import CreateMessageDropdown from './createMessageDropdown.svelte';
import ProviderType, { ProviderTypes } from './providerType.svelte';
import { Filters, hasPageQueries } from '$lib/components/filters';
import FailedModal from './failedModal.svelte';
import MessageStatusPill from './messageStatusPill.svelte';
import ProviderType, { ProviderTypes } from './providerType.svelte';
import { columns, showCreate } from './store';

export let data: PageData;
let selected: string[] = [];
Expand All @@ -55,7 +55,9 @@
</div>
</div>
<!-- TODO: fix width of search input in mobile -->
<SearchQuery search={data.search} placeholder="Search by channel, topic, provider, or ID">
<SearchQuery
search={data.search}
placeholder="Search by message ID, description, type, or status">
<div class="u-flex u-gap-16 is-not-mobile">
<!-- TODO: make this not database-specific -->
<Filters query={data.query} {columns} />
Expand Down Expand Up @@ -98,7 +100,7 @@
{/each}
</TableHeader>
<TableBody>
{#each data.messages.messages as message}
{#each data.messages.messages as message (message.$id)}
<TableRowLink
href={`${base}/console/project-${project}/messaging/message-${message.$id}`}>
<TableCellCheck bind:selectedIds={selected} id={message.$id} />
Expand Down
2 changes: 1 addition & 1 deletion src/routes/console/project-[project]/messaging/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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, 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 },
{ id: 'scheduledAt', title: 'Scheduled at', type: 'datetime', show: true, width: 120 },
Expand Down