[automated] Apply ESLint and Prettier fixes

This commit is contained in:
GitHub Action
2025-12-11 09:14:47 +00:00
parent a693f40064
commit fc336bd9b5

View File

@@ -7,7 +7,9 @@
>
<div class="flex flex-col gap-6 p-8">
<div class="flex flex-row items-center gap-2">
<span class="font-inter text-base font-bold leading-normal text-base-foreground">
<span
class="font-inter text-base font-bold leading-normal text-base-foreground"
>
{{ tier.name }}
</span>
<div
@@ -18,10 +20,14 @@
</div>
</div>
<div class="flex flex-row items-baseline gap-2">
<span class="font-inter text-[32px] font-semibold leading-normal text-base-foreground">
<span
class="font-inter text-[32px] font-semibold leading-normal text-base-foreground"
>
${{ tier.price }}
</span>
<span class="font-inter text-base font-normal leading-normal text-base-foreground">
<span
class="font-inter text-base font-normal leading-normal text-base-foreground"
>
{{ t('subscription.usdPerMonth') }}
</span>
</div>
@@ -29,12 +35,16 @@
<div class="flex flex-col gap-4 px-8 pb-0 flex-1">
<div class="flex flex-row items-center justify-between">
<span class="font-inter text-sm font-normal leading-normal text-muted-foreground">
<span
class="font-inter text-sm font-normal leading-normal text-muted-foreground"
>
{{ t('subscription.monthlyCreditsLabel') }}
</span>
<div class="flex flex-row items-center gap-1">
<i class="icon-[lucide--component] text-amber-400 text-sm" />
<span class="font-inter text-sm font-bold leading-normal text-base-foreground">
<span
class="font-inter text-sm font-bold leading-normal text-base-foreground"
>
{{ tier.credits }}
</span>
</div>
@@ -44,7 +54,9 @@
<span class="text-sm font-normal text-muted-foreground">
{{ t('subscription.maxDurationLabel') }}
</span>
<span class="font-inter text-sm font-bold leading-normal text-base-foreground">
<span
class="font-inter text-sm font-bold leading-normal text-base-foreground"
>
{{ tier.maxDuration }}
</span>
</div>
@@ -78,13 +90,17 @@
{{ t('subscription.videoEstimateLabel') }}
</span>
<div class="flex flex-row items-center gap-2 opacity-50">
<i class="pi pi-question-circle text-xs text-muted-foreground" />
<i
class="pi pi-question-circle text-xs text-muted-foreground"
/>
<span class="text-sm font-normal text-muted-foreground">
{{ t('subscription.videoEstimateHelp') }}
</span>
</div>
</div>
<span class="font-inter text-sm font-bold leading-normal text-base-foreground">
<span
class="font-inter text-sm font-bold leading-normal text-base-foreground"
>
{{ tier.videoEstimate }}
</span>
</div>
@@ -201,12 +217,17 @@ const isCurrentPlan = (tierKey: TierKey): boolean =>
const getButtonLabel = (tier: PricingTierConfig): string => {
if (isCurrentPlan(tier.key)) return t('subscription.currentPlan')
if (!isActiveSubscription.value) return t('subscription.subscribeTo', { plan: tier.name })
if (!isActiveSubscription.value)
return t('subscription.subscribeTo', { plan: tier.name })
return t('subscription.changeTo', { plan: tier.name })
}
const getButtonSeverity = (tier: PricingTierConfig): 'primary' | 'secondary' =>
isCurrentPlan(tier.key) ? 'secondary' : tier.key === 'creator' ? 'primary' : 'secondary'
isCurrentPlan(tier.key)
? 'secondary'
: tier.key === 'creator'
? 'primary'
: 'secondary'
const initiateCheckout = async (tierKey: TierKey) => {
const authHeader = await getAuthHeader()
@@ -231,7 +252,8 @@ const initiateCheckout = async (tierKey: TierKey) => {
// If JSON parsing fails, try to get text response or use HTTP status
try {
const errorText = await response.text()
errorMessage = errorText || `HTTP ${response.status} ${response.statusText}`
errorMessage =
errorText || `HTTP ${response.status} ${response.statusText}`
} catch {
errorMessage = `HTTP ${response.status} ${response.statusText}`
}
@@ -247,8 +269,7 @@ const initiateCheckout = async (tierKey: TierKey) => {
return await response.json()
}
const handleSubscribe = wrapWithErrorHandlingAsync(
async (tierKey: TierKey) => {
const handleSubscribe = wrapWithErrorHandlingAsync(async (tierKey: TierKey) => {
if (!isCloud || isLoading.value || isCurrentPlan(tierKey)) return
isLoading.value = true
@@ -267,7 +288,5 @@ const handleSubscribe = wrapWithErrorHandlingAsync(
isLoading.value = false
loadingTier.value = null
}
},
reportError
)
}, reportError)
</script>