-
Notifications
You must be signed in to change notification settings - Fork 176
Add messaging providers route #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TorstenDittmann
merged 9 commits into
feat-messaging-overview
from
feat-messaging-providers
Jan 2, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7532b8e
Update input elments to support popovers
stnguyen90 c99ea5b
Add messaging providers route
stnguyen90 16cc918
Add wizard for creating provider
stnguyen90 c8ef515
Add wizard for updating provider
stnguyen90 bb705cb
Add provider details route
stnguyen90 ae8da6a
Refactor providers table and add bulk deletion
stnguyen90 f3096df
Update src/routes/console/project-[project]/messaging/providers/updat…
TorstenDittmann 4fd44d2
Update src/routes/console/project-[project]/messaging/providers/wizar…
TorstenDittmann 9887db2
Update src/routes/console/project-[project]/messaging/providers/provi…
TorstenDittmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
112 changes: 112 additions & 0 deletions
112
src/routes/console/project-[project]/messaging/providers/+page.svelte
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
import { Button } from '$lib/elements/forms'; | ||
import { | ||
Empty, | ||
EmptySearch, | ||
SearchQuery, | ||
PaginationWithLimit, | ||
Heading, | ||
ViewSelector | ||
} from '$lib/components'; | ||
import { Container } from '$lib/layout'; | ||
import type { PageData } from './$types'; | ||
import { columns } from './store'; | ||
import Filters from '$lib/components/filters/filters.svelte'; | ||
import CreateProviderDropdown from './createProviderDropdown.svelte'; | ||
import Table from './table.svelte'; | ||
|
||
export let data: PageData; | ||
|
||
let showCreateDropdownMobile = false; | ||
let showCreateDropdownDesktop = false; | ||
let showCreateDropdownEmpty = false; | ||
</script> | ||
|
||
<Container> | ||
<div class="u-flex u-flex-vertical"> | ||
<div class="u-flex u-main-space-between"> | ||
<Heading tag="h2" size="5">Providers</Heading> | ||
<div class="is-only-mobile"> | ||
<CreateProviderDropdown bind:showCreateDropdown={showCreateDropdownMobile} /> | ||
</div> | ||
</div> | ||
<!-- TODO: fix width of search input in mobile --> | ||
<SearchQuery search={data.search} placeholder="Search provider"> | ||
<div class="u-flex u-gap-16 is-not-mobile"> | ||
<Filters query={data.query} {columns} /> | ||
<ViewSelector | ||
view={data.view} | ||
{columns} | ||
hideView | ||
allowNoColumns | ||
showColsTextMobile /> | ||
<CreateProviderDropdown bind:showCreateDropdown={showCreateDropdownDesktop} /> | ||
</div> | ||
</SearchQuery> | ||
<div class="u-flex u-gap-16 is-only-mobile u-margin-block-start-16"> | ||
<div class="u-flex-basis-50-percent"> | ||
<!-- TODO: fix width --> | ||
<ViewSelector | ||
view={data.view} | ||
{columns} | ||
hideView | ||
allowNoColumns | ||
showColsTextMobile /> | ||
</div> | ||
<div class="u-flex-basis-50-percent"> | ||
<!-- TODO: fix width --> | ||
<Filters query={data.query} {columns} /> | ||
</div> | ||
</div> | ||
</div> | ||
{#if data.providers.total} | ||
<Table {data} /> | ||
|
||
<PaginationWithLimit | ||
name="Providers" | ||
limit={data.limit} | ||
offset={data.offset} | ||
total={data.providers.total} /> | ||
{:else if data.search && data.search != 'empty'} | ||
<EmptySearch> | ||
<div class="u-text-center"> | ||
<b>Sorry, we couldn't find '{data.search}'</b> | ||
<p>There are no providers that match your search.</p> | ||
</div> | ||
<Button secondary href={`/console/project-${$page.params.project}/messaging/providers`}> | ||
Clear search | ||
</Button> | ||
</EmptySearch> | ||
{:else} | ||
<!-- TODO: Update docs links --> | ||
<Empty single target="provider"> | ||
<div class="u-text-center"> | ||
<Heading size="7" tag="h2" trimmed={false}> | ||
Create your first provider to get started. | ||
</Heading> | ||
<p class="body-text-2 u-bold u-margin-block-start-4"> | ||
Need a hand? Learn more in our documentation. | ||
</p> | ||
</div> | ||
<div class="u-flex u-flex-wrap u-gap-16 u-main-center"> | ||
<Button | ||
external | ||
href="https://appwrite.io/docs/references/cloud/client-web/providers" | ||
text | ||
event="empty_documentation" | ||
ariaLabel={`create provider`}> | ||
Documentation | ||
</Button> | ||
<CreateProviderDropdown bind:showCreateDropdown={showCreateDropdownEmpty}> | ||
<Button | ||
secondary | ||
on:click={() => (showCreateDropdownEmpty = !showCreateDropdownEmpty)} | ||
event="create_provider"> | ||
<span class="text">Create provider</span> | ||
</Button> | ||
</CreateProviderDropdown> | ||
</div> | ||
</Empty> | ||
{/if} | ||
</Container> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.