mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: relationships from design review
This commit is contained in:
1 parent
2cc2c57b5e
commit
94ed716f89
11 files changed
+55
-26
No files matched your search
@@ -40,12 +40,15 @@ git clone https://github.com/appwrite/console.git appwrite-console
|
||||
```
|
||||
|
||||
### 2. Install dependencies with npm
|
||||
|
||||
Navigate to the Appwrite Console repository and install dependencies.
|
||||
|
||||
```bash
|
||||
cd appwrite-console && npm install
|
||||
```
|
||||
|
||||
### 3. Install and run Appwrite locally
|
||||
|
||||
When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally.
|
||||
|
||||
Follow the [install instructions](https://appwrite.io/docs/installation) in the Appwrite docs.
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
class="icon-view-boards u-opacity-50"
|
||||
aria-hidden="true"
|
||||
aria-label="columns" />
|
||||
<span class="text is-only-desktop">Columns</span>
|
||||
<span class="text">Columns</span>
|
||||
<span class="inline-tag">{selectedColumnsNumber}</span>
|
||||
</Button>
|
||||
<svelte:fragment slot="list">
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<li class="form-item">
|
||||
<script lang="ts">
|
||||
export let fullWidth = false;
|
||||
</script>
|
||||
|
||||
<li class="form-item" class:u-width-full-line={fullWidth}>
|
||||
<slot />
|
||||
</li>
|
||||
@@ -16,6 +16,7 @@
|
||||
export let readonly = false;
|
||||
export let autofocus = false;
|
||||
export let autocomplete = false;
|
||||
export let fullWidth = false;
|
||||
export let maxlength: number = null;
|
||||
export let tooltip: string = null;
|
||||
|
||||
@@ -58,7 +59,7 @@
|
||||
$: showNullCheckbox = nullable && !required;
|
||||
</script>
|
||||
|
||||
<FormItem>
|
||||
<FormItem {fullWidth}>
|
||||
<Label {required} {tooltip} {optionalText} hide={!showLabel} for={id}>
|
||||
{label}
|
||||
</Label>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { Action } from 'svelte/action';
|
||||
|
||||
export let isSticky = false;
|
||||
export let noMargin = false;
|
||||
|
||||
const hasOverflow: Action<HTMLDivElement, (value: boolean) => void> = (node, callback) => {
|
||||
const observer = new ResizeObserver((entries) => {
|
||||
@@ -22,7 +23,7 @@
|
||||
let isOverflowing = false;
|
||||
</script>
|
||||
|
||||
<div class="table-with-scroll u-margin-block-start-32" data-private>
|
||||
<div class="table-with-scroll" class:u-margin-block-start-32={!noMargin} data-private>
|
||||
<div class="table-wrapper" use:hasOverflow={(v) => (isOverflowing = v)}>
|
||||
<table class="table" class:is-sticky-scroll={isSticky && isOverflowing}>
|
||||
<slot />
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<GridHeader title="Databases" {columns} view={data.view}>
|
||||
<GridHeader
|
||||
title="Databases"
|
||||
{columns}
|
||||
view={data.view}
|
||||
hideColumns={!data.databases.total}
|
||||
hideView={!data.databases.total}>
|
||||
<Button on:click={() => (showCreate = true)} event="create_database">
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
<span class="text">Create database</span>
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<GridHeader title="Collections" {columns} view={data.view}>
|
||||
<GridHeader
|
||||
title="Collections"
|
||||
{columns}
|
||||
view={data.view}
|
||||
hideColumns={!data.collections.total}
|
||||
hideView={!data.collections.total}>
|
||||
<Button on:click={() => ($showCreate = true)} event="create_collection">
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
<span class="text">Create collection</span>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
invalidate(Dependencies.DOCUMENT);
|
||||
trackEvent(Submit.DocumentUpdate);
|
||||
addNotification({
|
||||
message: 'Document was updated!',
|
||||
message: 'Document has been updated',
|
||||
type: 'success'
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
+13
-11
@@ -3,7 +3,7 @@
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
import { Alert, Modal } from '$lib/components';
|
||||
import { Alert, Modal, Trim } from '$lib/components';
|
||||
import { Button, InputChoice } from '$lib/elements/forms';
|
||||
import {
|
||||
TableBody,
|
||||
@@ -68,17 +68,12 @@
|
||||
headerDivider={false}>
|
||||
<svelte:fragment slot="header">Delete Document</svelte:fragment>
|
||||
|
||||
<p data-private>
|
||||
Are you sure you want to delete <b
|
||||
>the document from <span data-private>{$collection.name}</span></b
|
||||
>?
|
||||
</p>
|
||||
|
||||
{#if relAttributes?.length}
|
||||
<TableScroll>
|
||||
<p class="text">This document contains the following relationships:</p>
|
||||
<TableScroll noMargin>
|
||||
<TableHeader>
|
||||
<TableCellHead width={50}>Relation</TableCellHead>
|
||||
<TableCellHead width={50}>Setting</TableCellHead>
|
||||
<TableCellHead width={70}>Relation</TableCellHead>
|
||||
<TableCellHead width={70}>Setting</TableCellHead>
|
||||
<TableCellHead width={200} />
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -91,7 +86,7 @@
|
||||
{:else}
|
||||
<span class="icon-arrow-sm-right" />
|
||||
{/if}
|
||||
<span data-private>{attr.key}</span>
|
||||
<Trim>{attr.key}</Trim>
|
||||
</span>
|
||||
</TableCell>
|
||||
<TableCellText title="Settings">
|
||||
@@ -111,7 +106,14 @@
|
||||
Delete document from <span data-private>{$collection.name}</span>
|
||||
</InputChoice>
|
||||
</div>
|
||||
{:else}
|
||||
<p data-private>
|
||||
Are you sure you want to delete <b
|
||||
>the document from <span data-private>{$collection.name}</span></b
|
||||
>?
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text on:click={() => (showDelete = false)}>Cancel</Button>
|
||||
<Button secondary submit disabled={relAttributes?.length && !checked}>Delete</Button>
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@
|
||||
trackEvent(Submit.DocumentUpdate);
|
||||
disableUpdate = true;
|
||||
addNotification({
|
||||
message: 'Document was updated!',
|
||||
message: 'Document has been updated',
|
||||
type: 'success'
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
+15
-7
@@ -66,13 +66,21 @@
|
||||
|
||||
<svelte:fragment slot="aside">
|
||||
<div class="u-flex u-flex-vertical u-gap-4">
|
||||
<ul class="u-flex-vertical u-gap-4 u-margin-block-start-4">
|
||||
<InputText
|
||||
id="id"
|
||||
label="Document ID"
|
||||
showLabel={false}
|
||||
placeholder="Document ID"
|
||||
readonly />
|
||||
<ul class="u-flex-vertical u-gap-8">
|
||||
<li class="u-flex u-gap-8">
|
||||
<InputText
|
||||
id="id"
|
||||
label="Document ID"
|
||||
showLabel={false}
|
||||
placeholder="Document ID"
|
||||
readonly
|
||||
fullWidth />
|
||||
<div class="form-item-part u-cross-child-end u-opacity-0">
|
||||
<Button text noMargin disabled>
|
||||
<span class="icon-x" aria-hidden="true" />
|
||||
</Button>
|
||||
</div>
|
||||
</li>
|
||||
{#if names?.length}
|
||||
{#each names as name, i}
|
||||
<div class="u-flex u-gap-8">
|
||||
|
||||
Reference in new issue
Block a user