Merge branch 'storage' of github.com:appwrite/appwrite-console-poc into databases

This commit is contained in:
Arman committed 2022-07-20 13:43:56 +02:00
commit 260b3ba416
8 files changed
+90 -62

No files matched your search

+14 -14
View File
@@ -9,8 +9,8 @@
"version": "0.0.1",
"dependencies": {
"@aw-labs/appwrite-console": "^1.0.0-0",
"@aw-labs/icons": "0.0.0-30",
"@aw-labs/ui": "0.0.0-30",
"@aw-labs/icons": "0.0.0-31",
"@aw-labs/ui": "0.0.0-31",
"echarts": "^5.3.3"
},
"devDependencies": {
@@ -69,14 +69,14 @@
}
},
"node_modules/@aw-labs/icons": {
"version": "0.0.0-30",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-30.tgz",
"integrity": "sha512-ociHJtANbGw/NiyMS3V5+W8E8ZaJBjPjDXM+cJ5qwH9/QQQGyWuwipoWZJcamNM1jzfpHj41huMqG+q882WYsg=="
"version": "0.0.0-31",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-31.tgz",
"integrity": "sha512-xYRxLGeY/D1gYo0S5POJmlQ5+bu6iV+uTnMZ5+TDZB3ZuIjpcQYf/tX5AiXd2s1ShE1PTnb6F4QedHKQ3IhWXA=="
},
"node_modules/@aw-labs/ui": {
"version": "0.0.0-30",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-30.tgz",
"integrity": "sha512-jaLUvoXCFluNtRua9U1ZegTPtDAS/tswN7Ux/GD+1kviDls8JU1HwDOH4Zb6nk7xqCe7JyrbBzA3+bqruBB0PQ==",
"version": "0.0.0-31",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-31.tgz",
"integrity": "sha512-nG2qcMZNNP/6bDq7s4NNVz8TzIN2KcXDaGuF7ahURtdx/liDRynv3ZoUBVykBkJRYzFPnyrhPBrLwGJ/jy9OuA==",
"dependencies": {
"@aw-labs/icons": "*"
}
@@ -7508,14 +7508,14 @@
}
},
"@aw-labs/icons": {
"version": "0.0.0-30",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-30.tgz",
"integrity": "sha512-ociHJtANbGw/NiyMS3V5+W8E8ZaJBjPjDXM+cJ5qwH9/QQQGyWuwipoWZJcamNM1jzfpHj41huMqG+q882WYsg=="
"version": "0.0.0-31",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-31.tgz",
"integrity": "sha512-xYRxLGeY/D1gYo0S5POJmlQ5+bu6iV+uTnMZ5+TDZB3ZuIjpcQYf/tX5AiXd2s1ShE1PTnb6F4QedHKQ3IhWXA=="
},
"@aw-labs/ui": {
"version": "0.0.0-30",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-30.tgz",
"integrity": "sha512-jaLUvoXCFluNtRua9U1ZegTPtDAS/tswN7Ux/GD+1kviDls8JU1HwDOH4Zb6nk7xqCe7JyrbBzA3+bqruBB0PQ==",
"version": "0.0.0-31",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-31.tgz",
"integrity": "sha512-nG2qcMZNNP/6bDq7s4NNVz8TzIN2KcXDaGuF7ahURtdx/liDRynv3ZoUBVykBkJRYzFPnyrhPBrLwGJ/jy9OuA==",
"requires": {
"@aw-labs/icons": "*"
}
+2 -2
View File
@@ -19,8 +19,8 @@
},
"dependencies": {
"@aw-labs/appwrite-console": "^1.0.0-0",
"@aw-labs/icons": "0.0.0-30",
"@aw-labs/ui": "0.0.0-30",
"@aw-labs/icons": "0.0.0-31",
"@aw-labs/ui": "0.0.0-31",
"echarts": "^5.3.3"
},
"devDependencies": {
+1 -1
View File
@@ -20,7 +20,7 @@
<svelte:window on:click={onBlur} />
<div class="drop-wrapper" bind:this={parentElement}>
<div class="drop-wrapper" class:is-open={show} bind:this={parentElement}>
<slot />
{#if show}
<div
+1 -10
View File
@@ -14,7 +14,7 @@
</script>
{#if $uploader?.isOpen}
<section class="upload-box">
<section class="upload-box is-float">
<header class="upload-box-header">
<h4 class="upload-box-title">
<span class="text">Uploading files</span>
@@ -97,12 +97,3 @@
</div>
</section>
{/if}
<style>
section.upload-box {
position: fixed;
bottom: 0;
right: 0;
margin: 0 1rem 1rem 0;
}
</style>
+1 -1
View File
@@ -37,7 +37,7 @@
on:input={valueChange}
bind:this={element} />
<span class="icon-search" aria-hidden="true" />
{#if isWithEndButton}
{#if isWithEndButton && value}
<button
class="x-button"
aria-label="Clear search"
@@ -3,15 +3,7 @@
import { sdkForProject } from '$lib/stores/sdk';
import { Pill } from '$lib/elements';
import { Button } from '$lib/elements/forms';
import {
Empty,
Pagination,
Avatar,
Search,
DropList,
DropListItem,
DropListLink
} from '$lib/components';
import { Empty, Pagination, Avatar, Search, DropList, DropListItem } from '$lib/components';
import Create from './_create.svelte';
import Delete from './_deleteFile.svelte';
import {
@@ -32,6 +24,7 @@
import type { Models } from '@aw-labs/appwrite-console';
import { uploader } from '$lib/stores/uploader';
import { addNotification } from '$lib/stores/notifications';
import { goto } from '$app/navigation';
let search = '';
let showCreate = false;
@@ -157,10 +150,14 @@
<span class="icon-dots-horizontal" aria-hidden="true" />
</button>
<svelte:fragment slot="list">
<DropListLink
<DropListItem
icon="pencil"
href={`${base}/console/${project}/storage/bucket/${bucket}/file/${file.$id}`}
>Update</DropListLink>
on:click={(e) => {
e.preventDefault();
goto(
`${base}/console/${project}/storage/bucket/${bucket}/file/${file.$id}`
);
}}>Update</DropListItem>
<DropListItem
icon="trash"
on:click={(e) => {
@@ -336,19 +336,53 @@
and <b> Antivirus scanning.</b>
</p>
<svelte:fragment slot="aside">
<ul>
<InputSwitch label="Encryption" id="encryption" bind:value={encryption} />
<ul class="form-list">
<li class="form-item">
<label class="choice-item" for="encryption">
<div class="input-text-wrapper">
<input
label="Encryption"
id="encryption"
type="checkbox"
class="switch"
role="switch"
bind:checked={encryption} />
</div>
<div class="choice-item-content">
<div class="choice-item-title">Encryption</div>
<li>
This parameter allows you to configure whether or not the files inside the
bucket will be encrypted. We don't encrypt files bigger than 20MB.
<div class="choice-item-paragraph">
This parameter allows you to configure whether or not the files
inside the bucket will be encrypted. We don't encrypt files
bigger than 20MB.
</div>
</div>
</label>
</li>
<InputSwitch label="Antivirus" id="antivirus" bind:value={antivirus} />
<li class="form-item">
<label class="choice-item" for="antivirus">
<div class="input-text-wrapper">
<input
label="Antivirus"
id="antivirus"
type="checkbox"
class="switch"
role="switch"
bind:checked={antivirus} />
</div>
<div class="choice-item-content">
<div class="choice-item-title">Antivirus</div>
<li>
This parameter allows you to configure whether or not the files inside the
bucket should be scanned by the Appwrite Antivirus scanner.
<div class="choice-item-paragraph">
This parameter allows you to configure whether or not the files
inside the bucket should be scanned by the Appwrite Antivirus
scanner.
</div>
</div>
</label>
</li>
<li />
</ul>
</svelte:fragment>
@@ -35,7 +35,11 @@
</div>
{#if $bucketList?.total}
<div class="grid-box common-section" style="--grid-gap:2rem; --grid-item-size:25rem;">
<li
class="grid-box common-section"
style={`--grid-gap:2rem; --grid-item-size:${
$bucketList.total > 3 ? '22rem' : '25rem'
};`}>
{#each $bucketList.buckets as bucket}
<Bucket href={`${base}/console/${project}/storage/bucket/${bucket.$id}`}>
<svelte:fragment slot="eyebrow">XX Files</svelte:fragment>
@@ -92,7 +96,7 @@
</div>
</article>
{/if}
</div>
</li>
<div class="u-flex u-margin-block-start-32 u-main-space-between">
<p class="text">Total results: {$bucketList.total}</p>
@@ -116,17 +120,19 @@
</div>
{:else}
<Empty dashed centered>
<div class="u-flex u-flex-vertical u-cross-center">
<div class="common-section">
<Button secondary round on:click={() => (showCreate = true)}>
<i class="icon-plus" />
</Button>
</div>
<div class="common-section">
<p>Add your first bucket to get started</p>
</div>
<div class="common-section">
<Button secondary href="#">Documentation</Button>
<div class="bucket">
<div class="u-flex u-flex-vertical u-cross-center">
<div class="common-section">
<Button secondary round on:click={() => (showCreate = true)}>
<i class="icon-plus" />
</Button>
</div>
<div class="common-section">
<p>Add your first bucket to get started</p>
</div>
<div class="common-section">
<Button secondary href="#">Documentation</Button>
</div>
</div>
</div>
</Empty>