mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
7 files changed
+27
-18
No files matched your search
@@ -38,6 +38,12 @@
|
||||
}
|
||||
return { name, icon };
|
||||
};
|
||||
|
||||
function filterPlatforms(platforms: { name: string; icon: string }[]) {
|
||||
return platforms.filter(
|
||||
(value, index, self) => index === self.findIndex((t) => t.name === value.name)
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
@@ -65,15 +71,14 @@
|
||||
<svelte:fragment slot="title">
|
||||
{project.name}
|
||||
</svelte:fragment>
|
||||
{@const platformList = project.platforms.map((platform) => platform.type)}
|
||||
{@const platforms = Array.from(new Set(platformList))}
|
||||
{@const platforms = filterPlatforms(
|
||||
project.platforms.map((platform) => getPlatformInfo(platform.type))
|
||||
)}
|
||||
{#each platforms as platform, i}
|
||||
{#if i < 3}
|
||||
<Pill>
|
||||
<span
|
||||
class={`icon-${getPlatformInfo(platform).icon}`}
|
||||
aria-hidden="true" />
|
||||
{getPlatformInfo(platform).name}
|
||||
<span class={`icon-${platform.icon}`} aria-hidden="true" />
|
||||
{platform.name}
|
||||
</Pill>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
@@ -27,9 +27,12 @@
|
||||
import { Dependencies } from '$lib/constants';
|
||||
|
||||
$: if (prefs) {
|
||||
console.log(prefs);
|
||||
if (JSON.stringify(prefs) !== JSON.stringify(Object.entries($user.prefs))) {
|
||||
if (prefs[prefs.length - 1][0] && prefs[prefs.length - 1][1]) {
|
||||
if (!!prefs[prefs.length - 1][0] && !!prefs[prefs.length - 1][1]) {
|
||||
arePrefsDisabled = false;
|
||||
} else {
|
||||
arePrefsDisabled = true;
|
||||
}
|
||||
} else {
|
||||
arePrefsDisabled = true;
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
Set the events that will trigger your function. Maximum 100 events allowed.
|
||||
</svelte:fragment>
|
||||
|
||||
<span class="u-sep-block-end">EVENT</span>
|
||||
|
||||
{#if $createFunction?.events?.length}
|
||||
<TableList>
|
||||
{#each $createFunction.events as event}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
Set the events that will trigger your function. Maximum 100 events allowed.
|
||||
</svelte:fragment>
|
||||
|
||||
<span class="u-sep-block-end">EVENT</span>
|
||||
{#if $createWebhook?.events?.length}
|
||||
<TableList>
|
||||
{#each $createWebhook.events as event}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<Container>
|
||||
<SearchQuery search={data.search} placeholder="Search by filename">
|
||||
<Button on:click={() => (showCreate = true)}>
|
||||
<span class="icon-plus" aria-hidden="true" /> <span class="text">Add File</span>
|
||||
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create file</span>
|
||||
</Button>
|
||||
</SearchQuery>
|
||||
{#if data.files.total}
|
||||
@@ -187,20 +187,21 @@
|
||||
</div>
|
||||
<Button
|
||||
secondary
|
||||
href={`/console/project-${$page.params.project}/storage/bucket-${$page.params.bucket}`}
|
||||
>Clear Search</Button>
|
||||
href={`/console/project-${$page.params.project}/storage/bucket-${$page.params.bucket}`}>
|
||||
Clear Search
|
||||
</Button>
|
||||
</EmptySearch>
|
||||
{:else}
|
||||
<Empty single on:click={() => (showCreate = true)}>
|
||||
<div class="u-text-center">
|
||||
<p class="text u-line-height-1-5">Upload some files to get started</p>
|
||||
<p class="text u-line-height-1-5">Create a files to get started</p>
|
||||
<p class="text u-line-height-1-5">Need a hand? Check out our documentation.</p>
|
||||
</div>
|
||||
<div class="u-flex u-gap-16">
|
||||
<Button external href="https://appwrite.io/docs/storage#createFile" text>
|
||||
Documentation
|
||||
</Button>
|
||||
<Button secondary on:click={() => (showCreate = true)}>Add file</Button>
|
||||
<Button secondary on:click={() => (showCreate = true)}>Create file</Button>
|
||||
</div>
|
||||
</Empty>
|
||||
{/if}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</script>
|
||||
|
||||
<Modal size="big" {error} bind:show={showCreate} on:submit={create}>
|
||||
<svelte:fragment slot="header">Upload File</svelte:fragment>
|
||||
<svelte:fragment slot="header">Create File</svelte:fragment>
|
||||
<FormList>
|
||||
<div>
|
||||
<InputFile bind:files />
|
||||
@@ -74,6 +74,6 @@
|
||||
</FormList>
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (showCreate = false)}>Cancel</Button>
|
||||
<Button submit>Upload</Button>
|
||||
<Button submit>Create</Button>
|
||||
</svelte:fragment>
|
||||
</Modal>
|
||||
@@ -404,8 +404,11 @@
|
||||
selected={extensions.includes(ext)}
|
||||
button
|
||||
on:click={() => {
|
||||
if (!extensions.includes(ext))
|
||||
if (!extensions.includes(ext)) {
|
||||
extensions = [...extensions, ext];
|
||||
} else {
|
||||
extensions = extensions.filter((e) => e !== ext);
|
||||
}
|
||||
}}>
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
{ext}
|
||||
|
||||
Reference in new issue
Block a user