mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: some fixes from Steven review
This commit is contained in:
+4
-6
@@ -51,12 +51,9 @@
|
||||
|
||||
// Constants
|
||||
const databaseId = $page.params.database;
|
||||
const oneWay = [
|
||||
const relationshipType = [
|
||||
{ value: 'oneToOne', label: 'One to one' },
|
||||
{ value: 'oneToMany', label: 'One to many' }
|
||||
];
|
||||
const twoWay = [
|
||||
...oneWay,
|
||||
{ value: 'oneToMany', label: 'One to many' },
|
||||
{ value: 'manyToOne', label: 'Many to one' },
|
||||
{ value: 'manyToMany', label: 'Many to many' }
|
||||
];
|
||||
@@ -154,6 +151,7 @@
|
||||
placeholder="Enter Key"
|
||||
bind:value={data.key}
|
||||
autofocus
|
||||
disabled={editing}
|
||||
required />
|
||||
|
||||
<div class="u-flex u-gap-4 u-margin-block-start-8 u-small">
|
||||
@@ -192,7 +190,7 @@
|
||||
bind:value={data.relationType}
|
||||
required
|
||||
placeholder="Select a relation"
|
||||
options={data?.twoWay ? twoWay : oneWay}
|
||||
options={relationshipType}
|
||||
disabled={editing} />
|
||||
|
||||
<div class="box">
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
const limit = 10;
|
||||
let offset = 0;
|
||||
|
||||
$: args = $teamPrefs?.displayNames?.[selectedRelationship.relatedCollection];
|
||||
$: args = $teamPrefs?.displayNames?.[selectedRelationship?.relatedCollection];
|
||||
|
||||
$: if (!show) {
|
||||
data = null;
|
||||
@@ -32,7 +32,7 @@
|
||||
<Button secondary disabled={!!offset} on:click={() => offset - limit}>Prev</Button>
|
||||
<Button
|
||||
secondary
|
||||
disabled={selectedRelationship?.relationships?.length < offset}
|
||||
disabled={data?.[selectedRelationship.key]?.length < offset}
|
||||
on:click={() => offset + limit}>Next</Button>
|
||||
</svelte:fragment>
|
||||
</Modal>
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@
|
||||
[$collection.$id]: displayNames
|
||||
}
|
||||
};
|
||||
teamPrefs.updatePrefs($organization.$id, pref);
|
||||
invalidate(Dependencies.TEAM);
|
||||
await teamPrefs.updatePrefs($organization.$id, pref);
|
||||
await invalidate(Dependencies.TEAM);
|
||||
addNotification({
|
||||
message: 'Display names has been updated',
|
||||
type: 'success'
|
||||
|
||||
Reference in New Issue
Block a user