@@ -13,6 +13,7 @@ import { Icon } from "@cocalc/frontend/components";
1313import AIAvatar from "@cocalc/frontend/components/ai-avatar" ;
1414import { cloudFilesystemsEnabled } from "@cocalc/frontend/compute" ;
1515import { labels } from "@cocalc/frontend/i18n" ;
16+ import { KUCALC_COCALC_COM } from "@cocalc/util/db-schema/site-defaults" ;
1617import { COLORS } from "@cocalc/util/theme" ;
1718import {
1819 VALID_PREFERENCES_SUB_TYPES ,
@@ -83,6 +84,10 @@ const MESSAGES = defineMessages({
8384 id : "account.settings.overview.payg" ,
8485 defaultMessage : "Configure pay-as-you-go usage and billing." ,
8586 } ,
87+ upgrades : {
88+ id : "account.settings.overview.upgrades" ,
89+ defaultMessage : "Manage your legacy quota upgrades." ,
90+ } ,
8691 purchases : {
8792 id : "account.settings.overview.purchases" ,
8893 defaultMessage : "View purchase history and receipts." ,
@@ -91,6 +96,10 @@ const MESSAGES = defineMessages({
9196 id : "account.settings.overview.payments" ,
9297 defaultMessage : "Manage payment methods and transaction history." ,
9398 } ,
99+ paymentMethods : {
100+ id : "account.settings.overview.payment_methods" ,
101+ defaultMessage : "Manage your saved payment methods or add new ones." ,
102+ } ,
94103 statements : {
95104 id : "account.settings.overview.statements" ,
96105 defaultMessage : "View detailed billing statements and invoices." ,
@@ -133,6 +142,7 @@ const FLEX_PROPS = {
133142export function SettingsOverview ( ) {
134143 const intl = useIntl ( ) ;
135144 const is_commercial = useTypedRedux ( "customize" , "is_commercial" ) ;
145+ const kucalc = useTypedRedux ( "customize" , "kucalc" ) ;
136146
137147 function handleNavigate ( path : NavigatePath ) {
138148 // Use the same navigation pattern as the account page
@@ -297,6 +307,18 @@ export function SettingsOverview() {
297307 description = { intl . formatMessage ( MESSAGES . payg ) }
298308 />
299309 </ Card >
310+ { kucalc === KUCALC_COCALC_COM && (
311+ < Card
312+ { ...CARD_PROPS }
313+ onClick = { ( ) => handleNavigate ( "settings/upgrades" ) }
314+ >
315+ < Card . Meta
316+ avatar = { < Icon name = "arrow-circle-up" /> }
317+ title = { intl . formatMessage ( labels . upgrades ) }
318+ description = { intl . formatMessage ( MESSAGES . upgrades ) }
319+ />
320+ </ Card >
321+ ) }
300322 < Card
301323 { ...CARD_PROPS }
302324 onClick = { ( ) => handleNavigate ( "settings/purchases" ) }
@@ -317,6 +339,16 @@ export function SettingsOverview() {
317339 description = { intl . formatMessage ( MESSAGES . payments ) }
318340 />
319341 </ Card >
342+ < Card
343+ { ...CARD_PROPS }
344+ onClick = { ( ) => handleNavigate ( "settings/payment-methods" ) }
345+ >
346+ < Card . Meta
347+ avatar = { < Icon name = "credit-card" /> }
348+ title = { intl . formatMessage ( labels . payment_methods ) }
349+ description = { intl . formatMessage ( MESSAGES . paymentMethods ) }
350+ />
351+ </ Card >
320352 < Card
321353 { ...CARD_PROPS }
322354 onClick = { ( ) => handleNavigate ( "settings/statements" ) }
0 commit comments