mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
format: run prettier on changed files
This commit is contained in:
@@ -179,7 +179,10 @@ export const resourcesToMigrationForm = (resources: MigrationResource[]): Migrat
|
||||
formData.users.root = true;
|
||||
}
|
||||
if (
|
||||
includesAll(resources, [MigrationResources.Team, MigrationResources.Membership] as MigrationResource[])
|
||||
includesAll(resources, [
|
||||
MigrationResources.Team,
|
||||
MigrationResources.Membership
|
||||
] as MigrationResource[])
|
||||
) {
|
||||
formData.users.teams = true;
|
||||
}
|
||||
@@ -195,7 +198,12 @@ export const resourcesToMigrationForm = (resources: MigrationResource[]): Migrat
|
||||
) {
|
||||
formData.databases.rows = true;
|
||||
}
|
||||
if (includesAll(resources, [MigrationResources.Bucket, MigrationResources.File] as MigrationResource[])) {
|
||||
if (
|
||||
includesAll(resources, [
|
||||
MigrationResources.Bucket,
|
||||
MigrationResources.File
|
||||
] as MigrationResource[])
|
||||
) {
|
||||
formData.storage.root = true;
|
||||
}
|
||||
if (resources.includes(MigrationResources.Function)) {
|
||||
|
||||
@@ -97,7 +97,10 @@
|
||||
|
||||
const shouldRenderGroup = (groupKey: string): boolean => {
|
||||
if (groupKey === 'storage') {
|
||||
return resources.includes(MigrationResources.Bucket) && resources.includes(MigrationResources.File);
|
||||
return (
|
||||
resources.includes(MigrationResources.Bucket) &&
|
||||
resources.includes(MigrationResources.File)
|
||||
);
|
||||
}
|
||||
|
||||
if (groupKey === 'functions') {
|
||||
|
||||
+6
-1
@@ -13,7 +13,12 @@ import {
|
||||
toSupportiveIndex
|
||||
} from './terminology';
|
||||
|
||||
import type { Models, OrderBy, TablesDBIndexType, DocumentsDBIndexType } from '@appwrite.io/console';
|
||||
import type {
|
||||
Models,
|
||||
OrderBy,
|
||||
TablesDBIndexType,
|
||||
DocumentsDBIndexType
|
||||
} from '@appwrite.io/console';
|
||||
|
||||
export type DatabaseSdkResult = {
|
||||
create: (
|
||||
|
||||
+10
-2
@@ -91,7 +91,11 @@
|
||||
// and the field already is not spatial type
|
||||
$effect(() => {
|
||||
const firstField = entity.fields.find((field) => field.key === fieldList.at(0)?.value);
|
||||
if (selectedType === DatabasesIndexType.Spatial && firstField && !isSpatialType(firstField)) {
|
||||
if (
|
||||
selectedType === DatabasesIndexType.Spatial &&
|
||||
firstField &&
|
||||
!isSpatialType(firstField)
|
||||
) {
|
||||
fieldList = [{ value: '', order: null, length: null }];
|
||||
}
|
||||
});
|
||||
@@ -153,7 +157,11 @@
|
||||
export async function create() {
|
||||
const fieldType = terminology.field.lower.singular;
|
||||
|
||||
if (!key || !selectedType || (selectedType !== DatabasesIndexType.Spatial && addFieldDisabled)) {
|
||||
if (
|
||||
!key ||
|
||||
!selectedType ||
|
||||
(selectedType !== DatabasesIndexType.Spatial && addFieldDisabled)
|
||||
) {
|
||||
addNotification({
|
||||
type: 'error',
|
||||
message: `Selected ${fieldType} key or type invalid`
|
||||
|
||||
+35
-37
@@ -983,30 +983,28 @@
|
||||
{row.$id}
|
||||
</Id>
|
||||
|
||||
<Popover let:show let:hide portal padding="none">
|
||||
<button
|
||||
on:mouseenter={show}
|
||||
on:mouseleave={hide}>
|
||||
<Button.Button
|
||||
size="xs"
|
||||
icon
|
||||
variant="secondary"
|
||||
on:click={() => {
|
||||
hide();
|
||||
previouslyFocusedElement =
|
||||
document.activeElement;
|
||||
$databaseRowSheetOptions.autoFocus = false;
|
||||
onSelectSheetOption(
|
||||
'update',
|
||||
null,
|
||||
null,
|
||||
'row',
|
||||
row
|
||||
);
|
||||
}}>
|
||||
<Icon icon={IconArrowExpand} size="s" />
|
||||
</Button.Button>
|
||||
</button>
|
||||
<Popover let:show let:hide portal padding="none">
|
||||
<button on:mouseenter={show} on:mouseleave={hide}>
|
||||
<Button.Button
|
||||
size="xs"
|
||||
icon
|
||||
variant="secondary"
|
||||
on:click={() => {
|
||||
hide();
|
||||
previouslyFocusedElement =
|
||||
document.activeElement;
|
||||
$databaseRowSheetOptions.autoFocus = false;
|
||||
onSelectSheetOption(
|
||||
'update',
|
||||
null,
|
||||
null,
|
||||
'row',
|
||||
row
|
||||
);
|
||||
}}>
|
||||
<Icon icon={IconArrowExpand} size="s" />
|
||||
</Button.Button>
|
||||
</button>
|
||||
|
||||
<svelte:fragment slot="tooltip">
|
||||
<Layout.Stack
|
||||
@@ -1018,20 +1016,20 @@
|
||||
style="padding: var(--gap-XS, 6px) var(--gap-S, 8px);">
|
||||
Expand row
|
||||
|
||||
<Layout.Stack
|
||||
inline
|
||||
gap="xxxs"
|
||||
direction="row"
|
||||
alignItems="center"
|
||||
alignContent="center">
|
||||
<Keyboard key="⌘" />
|
||||
<Keyboard key={'Enter'} autoWidth />
|
||||
</Layout.Stack>
|
||||
<Layout.Stack
|
||||
inline
|
||||
gap="xxxs"
|
||||
direction="row"
|
||||
alignItems="center"
|
||||
alignContent="center">
|
||||
<Keyboard key="⌘" />
|
||||
<Keyboard key={'Enter'} autoWidth />
|
||||
</Layout.Stack>
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
</Layout.Stack>
|
||||
</Spreadsheet.Cell>
|
||||
</Layout.Stack>
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
</Layout.Stack>
|
||||
</Spreadsheet.Cell>
|
||||
{:else}
|
||||
<Spreadsheet.Cell {root} {isEditable} column={columnId}>
|
||||
{#if columnId === '$createdAt' || columnId === '$updatedAt'}
|
||||
|
||||
Reference in New Issue
Block a user