diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index efb347fd2..ab33a8f37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,8 +17,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 @@ -54,8 +54,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 @@ -90,8 +90,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 diff --git a/package.json b/package.json index 8a2056de8..428927dc5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "1.4.6", + "@appwrite.io/console": "1.4.7", "@appwrite.io/pink": "0.25.0", "@appwrite.io/pink-icons": "0.25.0", "@popperjs/core": "^2.11.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 399c26707..a31a13a9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: 1.4.6 - version: 1.4.6 + specifier: 1.4.7 + version: 1.4.7 '@appwrite.io/pink': specifier: 0.25.0 version: 0.25.0 @@ -95,7 +95,7 @@ importers: version: 6.6.3 '@testing-library/svelte': specifier: ^5.2.4 - version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0) + version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0)) '@testing-library/user-event': specifier: ^14.5.2 version: 14.5.2(@testing-library/dom@10.4.0) @@ -199,8 +199,8 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@1.4.6': - resolution: {integrity: sha512-oGA5gkecpy9E/fKJkaGn26JP9mgknc2Vn8hS6xhRBhmUPg8Vqlz0vgPpx1EQbPB2C5HWIf4yToSicOH31XGx6Q==} + '@appwrite.io/console@1.4.7': + resolution: {integrity: sha512-5zx+c5nWRm/UJNxgtOi4vj1pYW+wusfnOX2hqEGDLLuNZRc1rViYRefNuezosp5SPtjClCIYn9TGuFlz/XLwhw==} '@appwrite.io/pink-icons@0.25.0': resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==} @@ -3834,7 +3834,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@1.4.6': {} + '@appwrite.io/console@1.4.7': {} '@appwrite.io/pink-icons@0.25.0': {} @@ -5075,7 +5075,7 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0)': + '@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0))': dependencies: '@testing-library/dom': 10.4.0 svelte: 4.2.19 diff --git a/src/lib/components/billing/planComparisonBox.svelte b/src/lib/components/billing/planComparisonBox.svelte index c48dabfc3..6d11df4fd 100644 --- a/src/lib/components/billing/planComparisonBox.svelte +++ b/src/lib/components/billing/planComparisonBox.svelte @@ -1,7 +1,7 @@ -{#if $organization?.billingPlan !== BillingPlan.FREE && invoiceList.total > 0} - - Payment history -

- Transaction history for this organization. Download invoices for more details about your - payments. -

- - {#if invoiceList.total > 0} - - - Due Date - Status - Amount Due - - - - {#each invoiceList?.invoices as invoice, i} - {@const status = invoice.status} - - - {toLocaleDate(invoice.dueAt)} - - - {#if invoice?.lastError} - - (showFailedError = true)} - button> - {status === 'requires_authentication' - ? 'failed' - : status} - - -
  • - The scheduled payment has failed. - - . -
  • -
    -
    - {:else} + + Payment history + +

    + Transaction history for this organization. Download invoices for more details about your + payments. +

    + + {#if invoiceList.total > 0} + + + Due Date + Status + Amount Due + + + + {#each invoiceList?.invoices as invoice, i} + {@const status = invoice.status} + + + {toLocaleDate(invoice.dueAt)} + + + {#if invoice?.lastError} + + warning={status === 'pending'} + on:click={() => (showFailedError = true)} + button> {status === 'requires_authentication' ? 'failed' : status} - {/if} - - - {formatCurrency(invoice.grossAmount)} - - - - - - (showDropdown[i] = !showDropdown[i])} - event="view_invoice"> - View invoice - - { - showDropdown[i] = !showDropdown[i]; - }} - event="download_invoice"> - Download PDF - - {#if status === 'overdue' || status === 'failed'} - + The scheduled payment has failed. + + . + - - - {/each} - - -
    -

    Total results: {invoiceList?.total ?? 0}

    - -
    - {:else} - -

    - You have no payment history. After you receive your first invoice, you'll - see it here. -

    -
    - {/if} -
    -
    -{/if} + {:else} + + {status === 'requires_authentication' ? 'failed' : status} + + {/if} +
    + + {formatCurrency(invoice.grossAmount)} + + + + + + (showDropdown[i] = !showDropdown[i])} + event="view_invoice"> + View invoice + + { + showDropdown[i] = !showDropdown[i]; + }} + event="download_invoice"> + Download PDF + + {#if status === 'overdue' || status === 'failed'} + { + retryPayment(invoice); + showDropdown[i] = !showDropdown[i]; + trackEvent(`click_retry_payment`, { + from: 'button', + source: 'billing_invoice_menu' + }); + }}> + Retry payment + + {/if} + + + +
    + {/each} +
    +
    +
    +

    Total results: {invoiceList.total}

    + +
    + + + + + {:else} + +

    + You have no payment history. After you receive your first invoice, you'll see it + here. +

    +
    + {/if} +
    +
    + + + + + + + + diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index 8adad4999..d34d486ed 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -304,7 +304,7 @@ tier={BillingPlan.FREE} class="u-margin-block-start-24" members={data?.members?.total ?? 0} /> - {:else if billingPlan === BillingPlan.PRO && $organization.billingPlan === BillingPlan.SCALE} + {:else if billingPlan === BillingPlan.PRO && $organization.billingPlan === BillingPlan.SCALE && collaborators?.length > 0} {@const extraMembers = collaborators?.length ?? 0} @@ -339,7 +339,7 @@ id="couponId" /> {/if} - {#if isDowngrade} + {#if isDowngrade && billingPlan === BillingPlan.FREE} Backups Size Status - Policy + Policy diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte index 1af15500b..600c3fbb8 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte @@ -92,7 +92,9 @@ ); return collections; } else { - const collections = await sdk.forProject.databases.listCollections(databaseId); + const collections = await sdk.forProject.databases.listCollections(databaseId, [ + Query.limit(100) + ]); return collections; } } diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte index bdce4159b..43454a461 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte @@ -1,43 +1,37 @@ File Upload a file to add it to your bucket. - {#if isCloud} - {@const size = humanFileSize(sizeToBytes(service, 'MB', 1000))} - {@const plan = tierToPlan($organization?.billingPlan)} + {#if isCloud && fileError === 'File size exceeds the limit'} + {@const size = humanFileSize($bucket.maximumFileSize ?? sizeToBytes(service, 'MB', 1000))}

    - The {plan.name} plan has a maximum upload file size limit of {Math.floor( - parseInt(size.value) - )}{size.unit}. - {#if $organization?.billingPlan === BillingPlan.FREE} - Upgrade to allow files of a larger size. - {/if} + The maximum file upload size for this bucket is {parseInt(size.value)}{size.unit}. + You can adjust it in your + bucket settings.

    - - {#if $organization?.billingPlan === BillingPlan.FREE} -
    - -
    - {/if} -
    {/if} @@ -47,6 +41,7 @@ required bind:files={$createFile.files} allowedFileExtensions={$bucket.allowedFileExtensions} + bind:error={fileError} maxSize={isCloud ? $bucket.maximumFileSize : ($bucket.maximumFileSize ?? sizeToBytes(service, 'MB', 1000))} />