diff --git a/apps/renderer/src/modules/power/my-wallet-section/claim-daily-reward.tsx b/apps/renderer/src/modules/power/my-wallet-section/claim-daily-reward.tsx index 9754e1731..5572acf41 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/claim-daily-reward.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/claim-daily-reward.tsx @@ -4,10 +4,9 @@ import { Trans, useTranslation } from "react-i18next" import { Button } from "~/components/ui/button" import { Tooltip, TooltipContent } from "~/components/ui/tooltip" import { DAILY_CLAIM_AMOUNT } from "~/constants" -import { Level } from "~/modules/wallet/level" import { useClaimCheck, useClaimWalletDailyRewardMutation } from "~/queries/wallet" -export const ClaimDailyReward = ({ level }: { level: number }) => { +export const ClaimDailyReward = () => { const mutation = useClaimWalletDailyRewardMutation() const { t } = useTranslation("settings") @@ -24,7 +23,6 @@ export const ClaimDailyReward = ({ level }: { level: number }) => { disabled={!canClaim} > {canClaim ? t("wallet.claim.button.claim") : t("wallet.claim.button.claimed")} - diff --git a/apps/renderer/src/modules/power/my-wallet-section/index.tsx b/apps/renderer/src/modules/power/my-wallet-section/index.tsx index 7df00a168..0bca24371 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/index.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/index.tsx @@ -9,6 +9,7 @@ import { DAILY_CLAIM_AMOUNT } from "~/constants" import { apiClient } from "~/lib/api-fetch" import { cn } from "~/lib/utils" import { SettingSectionTitle } from "~/modules/settings/section" +import { ActivityPoints } from "~/modules/wallet/activity-points" import { Balance } from "~/modules/wallet/balance" import { Level } from "~/modules/wallet/level" import { useWallet, wallet as walletActions } from "~/queries/wallet" @@ -82,50 +83,79 @@ export const MyWalletSection = () => { className="p-1 opacity-0 duration-200 group-hover:opacity-100 [&_i]:size-2.5" /> - - -
-
- - {BigInt(myWallet.dailyPowerToken || 0n) + BigInt(myWallet.cashablePowerToken || 0n)} - - +
+
+
+ + {BigInt(myWallet.powerToken || 0n)} + + +
+ + +
+ + {t("wallet.balance.withdrawable")} + + + {myWallet.cashablePowerToken} + +
+
+ + +

{t("wallet.balance.withdrawableTooltip")}

+
+
+
-
- - -
- - {t("wallet.balance.withdrawable")} - - - - {myWallet.cashablePowerToken} - + +
+ All active users on Follow are eligible for daily power rewards, which can be used for + purchases and tipping on Follow. +
+
+ Based on your level and past activities, you can receive a{" "} + + {BigInt(myWallet.todayDailyPower || 0n)} + {" "} + reward today.{" "} + + Learn more. + +
+
+
+
+ +
- - - -

{t("wallet.balance.withdrawableTooltip")}

-
-
- + + {BigInt(myWallet.todayDailyPower || 0n)} +
+ +
) diff --git a/apps/renderer/src/modules/power/ranking/index.tsx b/apps/renderer/src/modules/power/ranking/index.tsx index 9ed7b52d3..7371b7c33 100644 --- a/apps/renderer/src/modules/power/ranking/index.tsx +++ b/apps/renderer/src/modules/power/ranking/index.tsx @@ -74,8 +74,7 @@ export const PowerRanking: Component = ({ className }) => {
- - {row.powerToken} + {row.powerToken}
diff --git a/apps/renderer/src/modules/settings/section.tsx b/apps/renderer/src/modules/settings/section.tsx index 0d05bd494..55d815952 100644 --- a/apps/renderer/src/modules/settings/section.tsx +++ b/apps/renderer/src/modules/settings/section.tsx @@ -10,14 +10,14 @@ import { cn } from "~/lib/utils" import { SettingActionItem, SettingDescription, SettingSwitch } from "./control" export const SettingSectionTitle: FC<{ - title: string + title: string | ReactNode margin?: "compact" | "normal" }> = ({ title, margin }) => (
{title} diff --git a/apps/renderer/src/modules/wallet/activity-points.tsx b/apps/renderer/src/modules/wallet/activity-points.tsx new file mode 100644 index 000000000..92d3a9a8e --- /dev/null +++ b/apps/renderer/src/modules/wallet/activity-points.tsx @@ -0,0 +1,11 @@ +import { cn } from "~/lib/utils" + +export const ActivityPoints = ({ points, className }: { points: number; className?: string }) => { + return ( +
+ + {points} + x{Math.floor(points / 10)} +
+ ) +} diff --git a/apps/renderer/src/modules/wallet/balance.tsx b/apps/renderer/src/modules/wallet/balance.tsx index 42d548955..5885c0615 100644 --- a/apps/renderer/src/modules/wallet/balance.tsx +++ b/apps/renderer/src/modules/wallet/balance.tsx @@ -25,13 +25,9 @@ export const Balance = ({ const formattedFull = format(n, { digits: 18, trailingZeros: true }) const Content = ( -
- {formatted}{" "} - {withSuffix && ( - - Power - - )} +
+ {withSuffix && } + {formatted}
) diff --git a/apps/renderer/src/modules/wallet/tip-modal.tsx b/apps/renderer/src/modules/wallet/tip-modal.tsx index 7c713e9db..16afe8d64 100644 --- a/apps/renderer/src/modules/wallet/tip-modal.tsx +++ b/apps/renderer/src/modules/wallet/tip-modal.tsx @@ -93,7 +93,7 @@ const TipModalContent_: FC<{

{t("tip_modal.tip_sent")}

- + {amountBigInt} {" "} {t("tip_modal.tip_amount_sent")} diff --git a/icons/mgc/fire_cute_fi.svg b/icons/mgc/fire_cute_fi.svg new file mode 100644 index 000000000..d308f16f3 --- /dev/null +++ b/icons/mgc/fire_cute_fi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/mgc/right_cute_li.svg b/icons/mgc/right_cute_li.svg new file mode 100644 index 000000000..f8e75d74c --- /dev/null +++ b/icons/mgc/right_cute_li.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/locales/settings/en.json b/locales/settings/en.json index 9742c0d2f..20e566070 100644 --- a/locales/settings/en.json +++ b/locales/settings/en.json @@ -218,7 +218,8 @@ "titles.profile": "Profile", "titles.shortcuts": "Shortcuts", "wallet.address.title": "Your Address", - "wallet.balance.level": "Your Level", + "wallet.balance.activePoints": "Active Points", + "wallet.balance.dailyReward": "Your Daily Reward", "wallet.balance.title": "Your Balance", "wallet.balance.withdrawable": "Withdrawable", "wallet.balance.withdrawableTooltip": "Withdrawable Power includes both the tips you've received and the Power you've recharged.", diff --git a/packages/shared/src/hono.ts b/packages/shared/src/hono.ts index 95093f6d9..ed140315e 100644 --- a/packages/shared/src/hono.ts +++ b/packages/shared/src/hono.ts @@ -4320,8 +4320,8 @@ declare const levels: drizzle_orm_pg_core.PgTableWithColumns<{ baseColumn: never; generated: undefined; }, {}, {}>; - preActivePoints: drizzle_orm_pg_core.PgColumn<{ - name: "pre_active_points"; + prevActivityPoints: drizzle_orm_pg_core.PgColumn<{ + name: "prev_activity_points"; tableName: "levels"; dataType: "number"; columnType: "PgInteger"; @@ -4336,8 +4336,8 @@ declare const levels: drizzle_orm_pg_core.PgTableWithColumns<{ baseColumn: never; generated: undefined; }, {}, {}>; - activePoints: drizzle_orm_pg_core.PgColumn<{ - name: "active_points"; + activityPoints: drizzle_orm_pg_core.PgColumn<{ + name: "activity_points"; tableName: "levels"; dataType: "number"; columnType: "PgInteger"; @@ -4407,8 +4407,8 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ address: zod.ZodString; rank: zod.ZodNullable; level: zod.ZodNullable; - preActivePoints: zod.ZodNullable; - activePoints: zod.ZodNullable; + prevActivityPoints: zod.ZodNullable; + activityPoints: zod.ZodNullable; statusUpdatedAt: zod.ZodNullable; powerToken: zod.ZodString; userId: zod.ZodString; @@ -4418,8 +4418,8 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ powerToken: string; rank: number | null; level: number | null; - preActivePoints: number | null; - activePoints: number | null; + prevActivityPoints: number | null; + activityPoints: number | null; statusUpdatedAt: string | null; }, { userId: string; @@ -4427,8 +4427,8 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ powerToken: string; rank: number | null; level: number | null; - preActivePoints: number | null; - activePoints: number | null; + prevActivityPoints: number | null; + activityPoints: number | null; statusUpdatedAt: string | null; }>; declare const levelsRelations: drizzle_orm.Relations<"levels", { @@ -5040,19 +5040,6 @@ declare const _routes: hono_hono_base.HonoBase