-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for saving messages as draft
- Loading branch information
1 parent
99fd70b
commit c0e2cbb
Showing
16 changed files
with
566 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 0 additions & 114 deletions
114
src/routes/console/project-[project]/messaging/create.svelte
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
src/routes/console/project-[project]/messaging/message-[message]/pushPreview.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<script lang="ts"> | ||
import { CardGrid, Heading } from '$lib/components'; | ||
import { FormList, InputText, InputTextarea } from '$lib/elements/forms'; | ||
import { message } from './store'; | ||
import { Button, FormList, InputText, InputTextarea } from '$lib/elements/forms'; | ||
import PushPhone from '../pushPhone.svelte'; | ||
import type { Message } from '../store'; | ||
export let message: Message; | ||
export let onEdit: () => void = null; | ||
</script> | ||
|
||
<CardGrid> | ||
<div class="grid-1-2-col-1 u-flex-vertical u-cross-start u-gap-16"> | ||
<Heading tag="h6" size="7">Preview</Heading> | ||
<div class="u-flex u-main-center u-margin-block-start-24 u-width-full-line"> | ||
<PushPhone title={$message.data.title} body={$message.data.body} /> | ||
<PushPhone title={message.data.title} body={message.data.body} /> | ||
</div> | ||
</div> | ||
<svelte:fragment slot="aside"> | ||
<FormList> | ||
<InputText id="title" label="Title" disabled={true} bind:value={$message.data.title}> | ||
<InputText id="title" label="Title" disabled={true} bind:value={message.data.title}> | ||
</InputText> | ||
<InputTextarea | ||
id="message" | ||
label="Message" | ||
disabled={true} | ||
bind:value={$message.data.body}> | ||
bind:value={message.data.body}> | ||
</InputTextarea> | ||
<div class="u-flex u-main-end"> | ||
<Button secondary disabled={onEdit == null} on:click={onEdit}>Edit message</Button> | ||
</div> | ||
</FormList> | ||
</svelte:fragment> | ||
|
||
<svelte:fragment slot="actions"> | ||
<!-- TODO: Add support for editing draft messages --> | ||
<!-- <Button disabled={$message.status !== 'draft'} on:click={() => console.log('click')} | ||
>Edit message</Button> --> | ||
</svelte:fragment> | ||
</CardGrid> |
Oops, something went wrong.