Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(settings): restore subscription tier svg animation (#3551)

dev-rb38d7ecf0caac
diff --git a/js/app/packages/app/component/paywall/PaywallComponentLegacy.tsx b/js/app/packages/app/component/paywall/PaywallComponentLegacy.tsx
index e4f4e941b7..c66cdc8d69 100644
--- a/js/app/packages/app/component/paywall/PaywallComponentLegacy.tsx
+++ b/js/app/packages/app/component/paywall/PaywallComponentLegacy.tsx
@@ -171,7 +171,6 @@ const PaywallComponentLegacy = (props: PaywallProps) => {
</div>
<SubscriptionTier
class="w-7 shrink-0"
- total={3}
tier={
selectedTier() === plan.tier ? plan.tier : undefined
}
diff --git a/js/app/packages/app/component/paywall/PaywallComponentNew.tsx b/js/app/packages/app/component/paywall/PaywallComponentNew.tsx
index 0b7626c0eb..204e0129eb 100644
--- a/js/app/packages/app/component/paywall/PaywallComponentNew.tsx
+++ b/js/app/packages/app/component/paywall/PaywallComponentNew.tsx
@@ -132,7 +132,6 @@ const PaywallComponentNew = (props: PaywallProps) => {
</div>
<SubscriptionTier
class="w-7 shrink-0"
- total={1}
tier={plan.tier === 'premium' ? 'premium' : undefined}
/>
</div>
diff --git a/js/app/packages/app/component/paywall/PaywallTeamOwnerView.tsx b/js/app/packages/app/component/paywall/PaywallTeamOwnerView.tsx
index e008723bda..eab1976bfc 100644
--- a/js/app/packages/app/component/paywall/PaywallTeamOwnerView.tsx
+++ b/js/app/packages/app/component/paywall/PaywallTeamOwnerView.tsx
@@ -33,7 +33,7 @@ const PaywallTeamOwnerView = (props: PaywallTeamOwnerViewProps) => {
<div class="font-semibold text-ink text-base sm:text-lg">
{props.team.name}
</div>
- <SubscriptionTier class="w-7 shrink-0" total={1} tier="premium" />
+ <SubscriptionTier class="w-7 shrink-0" tier="premium" />
</div>
<div class="flex items-baseline gap-0.5">
<span class="text-3xl font-bold text-ink">${totalPrice()}</span>
diff --git a/js/app/packages/app/component/paywall/SubscriptionTier.tsx b/js/app/packages/app/component/paywall/SubscriptionTier.tsx
index 69799b6461..97353d096e 100644
--- a/js/app/packages/app/component/paywall/SubscriptionTier.tsx
+++ b/js/app/packages/app/component/paywall/SubscriptionTier.tsx
@@ -1,23 +1,62 @@
-import { LogoProgress } from '@ui';
import type { PaidPlanTier } from './plans';
interface SubscriptionTierProps {
tier?: PaidPlanTier;
- total: number;
class?: string;
}
-const TIER_TO_LEVEL: Record<PaidPlanTier, number> = {
- haiku: 1,
- sonnet: 2,
- opus: 3,
- premium: 1,
-};
-
const SubscriptionTier = (props: SubscriptionTierProps) => {
- const level = () => (props.tier ? TIER_TO_LEVEL[props.tier] : 0);
+ const active1 = () => props.tier === 'opus';
+ const active2 = () => props.tier === 'opus' || props.tier === 'sonnet';
+ const active3 = () => !!props.tier;
+
return (
- <LogoProgress level={level()} total={props.total} class={props.class} />
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 24 16"
+ class={props.class}
+ display="block"
+ >
+ <path
+ d="m15.578 0.043946-2.2441 0.87891v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l1.041 0.98242 7.0859 6.6973 2.2402-0.87891v-6.6758c0-0.2568-0.10497-0.50153-0.29297-0.67773z"
+ fill="var(--b4)"
+ />
+ <path
+ d="m6.25 0.041992-2.2422 0.88086v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l1.0391 0.98242 7.084 6.6973 2.2441-0.87891v-6.6758c0-0.2568-0.10302-0.50153-0.29102-0.67773l-1.043-0.98438-7.082-6.6973z"
+ fill="var(--b4)"
+ />
+ <path
+ d="m2.252 5.083-2.2422 0.87891v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l2.793 2.6406 2.2441-0.87891v-6.6758c0-0.2568-0.10302-0.50153-0.29102-0.67773z"
+ fill="var(--b4)"
+ />
+
+ <path
+ d="m15.578 0.043946-2.2441 0.87891v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l1.041 0.98242 7.0859 6.6973 2.2402-0.87891v-6.6758c0-0.2568-0.10497-0.50153-0.29297-0.67773z"
+ style={{
+ transform: `translateY(${active1() ? 0 : 16}px)`,
+ transition: 'transform 0.3s ease 0.2s',
+ fill: 'var(--a0)',
+ }}
+ />
+ <path
+ d="m6.25 0.041992-2.2422 0.88086v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l1.0391 0.98242 7.084 6.6973 2.2441-0.87891v-6.6758c0-0.2568-0.10302-0.50153-0.29102-0.67773l-1.043-0.98438-7.082-6.6973z"
+ style={{
+ transform: `translateY(${active2() ? 0 : 16}px)`,
+ transition: 'transform 0.3s ease 0.1s',
+ fill: 'var(--a0)',
+ }}
+ />
+ <path
+ d="m2.252 5.083-2.2422 0.87891v6.6758c0 0.2568 0.10697 0.50329 0.29297 0.67969l2.793 2.6406 2.2441-0.87891v-6.6758c0-0.2568-0.10302-0.50153-0.29102-0.67773z"
+ style={{
+ transform: `translateY(${active3() ? 0 : 16}px)`,
+ transition: 'transform 0.3s ease 0s',
+ fill: 'var(--a0)',
+ }}
+ />
+
+ {/*<path fill="var(--b0)" d="m5.3398 9.2617v5.8164l-2.2441 0.87891-2.793-2.6387c-0.186-0.1764-0.29296-0.42289-0.29297-0.67969v3.3613h23.99l-0.0059-0.91992-2.2402 0.87891-7.0859-6.6973v5.8184l-2.2441 0.87891z"/>*/}
+ </svg>
);
};