Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2752",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@315d6c5",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bd82d9a",
"@appwrite.io/pink-legacy": "^1.0.3",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export enum Submit {
BucketUpdateSize = 'submit_bucket_update_size',
BucketUpdateCompression = 'submit_bucket_update_compression',
BucketUpdateExtensions = 'submit_bucket_update_extensions',
BucketUpdateTransformations = 'submit_bucket_update_transformations',
FileCreate = 'submit_file_create',
FileDelete = 'submit_file_delete',
FileUpdatePermissions = 'submit_file_update_permissions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
try {
await sdk
.forProject(page.params.region, page.params.project)
.migrations.createCsvMigration({
.migrations.createCSVImport({
bucketId: file.bucketId,
fileId: file.$id,
resourceId: `${page.params.database}:${page.params.table}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { Fieldset, Layout, Icon, Input, Tag } from '@appwrite.io/pink-svelte';
import { IconGithub, IconPencil } from '@appwrite.io/pink-icons-svelte';
import { onMount } from 'svelte';
import { ID, Runtime } from '@appwrite.io/console';
import { ID, Runtime, Type } from '@appwrite.io/console';
import { CustomId } from '$lib/components';
import { getIconFromRuntime } from '$lib/stores/runtimes';
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
Expand Down Expand Up @@ -134,7 +134,8 @@
repository: data.repository.name,
owner: data.repository.owner,
rootDirectory: rootDir || '.',
version: latestTag ?? '1.0.0',
type: Type.Tag,
reference: latestTag ?? '1.0.0',
activate: true
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { writable } from 'svelte/store';
import ProductionBranch from '$lib/components/git/productionBranchFieldset.svelte';
import Configuration from './configuration.svelte';
import { ID, Runtime, type Models } from '@appwrite.io/console';
import { ID, Runtime, Type, type Models } from '@appwrite.io/console';
import {
ConnectBehaviour,
NewRepository,
Expand Down Expand Up @@ -179,7 +179,8 @@
repository: data.template.providerRepositoryId || undefined,
owner: data.template.providerOwner || undefined,
rootDirectory: rt?.providerRootDirectory || undefined,
version: data.template.providerVersion || undefined,
type: Type.Tag,
reference: data.template.providerVersion || undefined,
activate: true
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { IconGithub, IconPencil } from '@appwrite.io/pink-icons-svelte';
import { onMount } from 'svelte';
import Domain from '../domain.svelte';
import { Adapter, BuildRuntime, Framework, ID } from '@appwrite.io/console';
import { Adapter, BuildRuntime, Framework, ID, Type } from '@appwrite.io/console';
import { CustomId } from '$lib/components';
import { getFrameworkIcon } from '$lib/stores/sites';
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
Expand Down Expand Up @@ -172,7 +172,8 @@
repository: data.repository.name,
owner: data.repository.owner,
rootDirectory: rootDir || '.',
version: latestTag ?? '1.0.0',
type: Type.Tag,
reference: latestTag ?? '1.0.0',
activate: true
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import Details from '../../details.svelte';
import Configuration from './configuration.svelte';
import Aside from '../../aside.svelte';
import { Adapter, BuildRuntime, Framework, ID, type Models } from '@appwrite.io/console';
import { Adapter, BuildRuntime, Framework, ID, Type, type Models } from '@appwrite.io/console';
import {
ConnectBehaviour,
NewRepository,
Expand Down Expand Up @@ -159,7 +159,8 @@
repository: data.template.providerRepositoryId,
owner: data.template.providerOwner,
rootDirectory: framework.providerRootDirectory,
version: data.template.providerVersion,
type: Type.Tag,
reference: data.template.providerVersion,
activate: true
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
allowedFileExtensions: values.allowedFileExtensions,
compression: values.compression,
encryption: values.encryption,
antivirus: values.antivirus
antivirus: values.antivirus,
transformations: values.transformations
});

await invalidate(Dependencies.BUCKET);
Expand Down Expand Up @@ -101,7 +102,8 @@
$permissions: permissions,
encryption,
antivirus,
compression
compression,
transformations
} = data.bucket;

const compressionOptions = [
Expand Down Expand Up @@ -214,6 +216,18 @@
}
);
}

function updateTransformations() {
updateBucket(
data.bucket,
{
transformations
},
{
trackEventName: Submit.BucketUpdateTransformations
}
);
}
</script>

<Container>
Expand Down Expand Up @@ -365,6 +379,28 @@
</CardGrid>
</Form>

<Form onSubmit={updateTransformations}>
<CardGrid>
<svelte:fragment slot="title">Image transformations</svelte:fragment>
<svelte:fragment slot="aside">
<Selector.Switch
label="Image transformations"
id="transformations"
bind:checked={transformations}
description="Enabling this option allows image manipulation through the API, including resizing, cropping, and format conversion." />
</svelte:fragment>

<svelte:fragment slot="actions">
<Button
disabled={transformations === data.bucket.transformations ||
($readOnly && !GRACE_PERIOD_OVERRIDE)}
submit>
Update
</Button>
</svelte:fragment>
</CardGrid>
</Form>

<UpdateMaxFileSize currentPlan={data.currentPlan} bucket={data.bucket} />

<Form onSubmit={updateAllowedExtensions}>
Expand Down