From e5f88210da7c77a2ab4e9cfa4ebadda8b3bea10a Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 24 Mar 2025 17:28:09 +0530 Subject: [PATCH 1/2] fix: time difference. --- .../components/git/deploymentCreatedBy.svelte | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/components/git/deploymentCreatedBy.svelte b/src/lib/components/git/deploymentCreatedBy.svelte index 49f4a6574..1c88fdaf2 100644 --- a/src/lib/components/git/deploymentCreatedBy.svelte +++ b/src/lib/components/git/deploymentCreatedBy.svelte @@ -2,24 +2,23 @@ import Link from '$lib/elements/link.svelte'; import { capitalize } from '$lib/helpers/string'; import type { Models } from '@appwrite.io/console'; - import { Tooltip } from '@appwrite.io/pink-svelte'; - import { timeFromNow, toLocaleDateTime } from '$lib/helpers/date'; + import { timeFromNow } from '$lib/helpers/date'; import DualTimeView from '$lib/components/dualTimeView.svelte'; export let deployment: Models.Deployment;

+ + {deployment.providerCommitAuthor + ? capitalize(timeFromNow(deployment.$updatedAt)) + : timeFromNow(deployment.$updatedAt)} + + {#if deployment.providerCommitAuthor} - - - {capitalize(timeFromNow(deployment.$updatedAt))} - - {toLocaleDateTime(deployment.$updatedAt)} - - by {deployment.providerCommitAuthor} - {:else} - + by + + {deployment.providerCommitAuthor} + {/if}

From e441d5803debf83d54f49571aad2f3198f8af194 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Mon, 24 Mar 2025 13:58:12 +0100 Subject: [PATCH 2/2] Use new Pink2 wizard --- .../(console)/apply-credit/+page.svelte | 277 ++++++++---------- 1 file changed, 115 insertions(+), 162 deletions(-) diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 32a59c2b3..b5c817e39 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -11,13 +11,8 @@ import { BillingPlan, Dependencies } from '$lib/constants'; import { Button, Form, InputSelect, InputTags, InputText } from '$lib/elements/forms'; import { toLocaleDate } from '$lib/helpers/date'; - import { - WizardSecondaryContainer, - WizardSecondaryContent, - WizardSecondaryFooter - } from '$lib/layout'; + import { Wizard } from '$lib/layout'; import { type PaymentList } from '$lib/sdk/billing'; - import { app } from '$lib/stores/app'; import { addNotification } from '$lib/stores/notifications'; import { organizationList, type Organization } from '$lib/stores/organization'; import { sdk } from '$lib/stores/sdk'; @@ -212,130 +207,126 @@ Apply credits - Appwrite - - Apply credits - - -
- -
- - {#if $organizationList?.total && !onlyNewOrgs && canSelectOrg} - + + + +
+ + {#if $organizationList?.total && !onlyNewOrgs && canSelectOrg} + + {/if} + {#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)} + {#if selectedOrgId === newOrgId} + + bind:value={name} /> {/if} + + + + + Invited members will have access to all services and payment + data within your organization + + + + {/if} + +
+ {#if (selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)) || (!data?.couponData?.code && selectedOrgId)} +
+ {#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)} - {#if selectedOrgId === newOrgId} - - {/if} - - - - - Invited members will have access to all services and - payment data within your organization - - - + {/if} + + {#if !data?.couponData?.code && selectedOrgId} + + + + + + + {/if} +
- {#if (selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)) || (!data?.couponData?.code && selectedOrgId)} -
- - {#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)} - + {/if} + + + + + {#if selectedOrg?.$id && selectedOrg?.billingPlan !== BillingPlan.FREE && selectedOrg?.billingPlan !== BillingPlan.GITHUB_EDUCATION} +
+ {#if couponData?.code && couponData?.status === 'active'} + +

+ Credits will automatically be applied to your next invoice on {toLocaleDate(selectedOrg?.billingNextInvoiceDate)}. +

+ {:else} +

Add a coupon code to apply credits to your organization.

+ {/if} +
+ {:else if selectedOrgId} +
+ + {#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)} +
+

{campaign?.cta}

+

+ {#if couponData?.code && couponData?.status === 'active' && campaign?.claimed} + {campaign?.claimed} + {:else if campaign?.unclaimed} + {campaign?.unclaimed} {/if} -

- {#if !data?.couponData?.code && selectedOrgId} - - - - - - - {/if} -
- -
+

+ {/if} -
- -
- - {#if selectedOrg?.$id && selectedOrg?.billingPlan !== BillingPlan.FREE && selectedOrg?.billingPlan !== BillingPlan.GITHUB_EDUCATION} -
- {#if couponData?.code && couponData?.status === 'active'} - -

- Credits will automatically be applied to your next invoice on {toLocaleDate(selectedOrg?.billingNextInvoiceDate)}. -

- {:else} -

Add a coupon code to apply credits to your organization.

- {/if} -
- {:else if selectedOrgId} -
- - {#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)} -
-

{campaign?.cta}

-

- {#if couponData?.code && couponData?.status === 'active' && campaign?.claimed} - {campaign?.claimed} - {:else if campaign?.unclaimed} - {campaign?.unclaimed} - {/if} -

-
- {/if} -
-
- {/if} -
- - - + + + {/if} + +