Skip to content

Commit 18b22b2

Browse files
committed
feat: update copywriting
1 parent 6f437bf commit 18b22b2

File tree

11 files changed

+12
-271
lines changed

11 files changed

+12
-271
lines changed

apps/desktop/layer/renderer/src/modules/power/my-wallet-section/index.tsx

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import { useMutation } from "@tanstack/react-query"
1212
import { Trans, useTranslation } from "react-i18next"
1313

1414
import { useServerConfigs } from "~/atoms/server-configs"
15-
import { CopyButton } from "~/components/ui/button/CopyButton"
1615
import { apiClient } from "~/lib/api-fetch"
17-
import { getBlockchainExplorerUrl } from "~/lib/utils"
1816
import { SettingSectionTitle } from "~/modules/settings/section"
1917
import { ActivityPoints } from "~/modules/wallet/activity-points"
2018
import { Balance } from "~/modules/wallet/balance"
@@ -60,38 +58,6 @@ export const MyWalletSection = ({ className }: { className?: string }) => {
6058
}
6159
return (
6260
<div className={cn(className)}>
63-
<div className="text-sm">
64-
<i className="i-mgc-power text-accent mr-0.5 size-3.5 translate-y-px align-text-top" />
65-
<Trans
66-
i18nKey="wallet.power.description2"
67-
ns="settings"
68-
values={{ blockchainName: "VSL" }}
69-
components={{
70-
Link: (
71-
<a
72-
className="underline"
73-
target="_blank"
74-
href={`${getBlockchainExplorerUrl()}/token/0xE06Af68F0c9e819513a6CD083EF6848E76C28CD8`}
75-
rel="noreferrer noopener"
76-
/>
77-
),
78-
}}
79-
/>
80-
</div>
81-
<SettingSectionTitle margin="compact" title={t("wallet.address.title")} />
82-
<div className="group flex items-center gap-2 text-sm">
83-
<a
84-
href={`${getBlockchainExplorerUrl()}/address/${myWallet.address}`}
85-
target="_blank"
86-
className="underline"
87-
>
88-
{myWallet.address}
89-
</a>
90-
<CopyButton
91-
value={myWallet.address!}
92-
className="p-1 opacity-0 duration-200 group-hover:opacity-100 [&_i]:size-2.5"
93-
/>
94-
</div>
9561
<SettingSectionTitle title={t("wallet.balance.title")} margin="compact" />
9662
<div className="mb-2 flex items-center justify-between">
9763
<div>

apps/desktop/layer/renderer/src/modules/power/ranking/index.tsx

Lines changed: 0 additions & 146 deletions
This file was deleted.

apps/desktop/layer/renderer/src/modules/power/transaction-section/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { TransactionTypes } from "@follow/models/types"
44
import { useState } from "react"
55
import { useTranslation } from "react-i18next"
66

7-
import { useServerConfigs } from "~/atoms/server-configs"
87
import { useWhoami } from "~/atoms/user"
98
import { getBlockchainExplorerUrl } from "~/lib/utils"
109
import { SettingSectionTitle } from "~/modules/settings/section"
@@ -27,18 +26,11 @@ export const TransactionsSection: Component = ({ className }) => {
2726
type: type === "all" ? undefined : (type as (typeof TransactionTypes)[number]),
2827
})
2928

30-
const serverConfigs = useServerConfigs()
31-
3229
if (!myWallet) return null
3330

3431
return (
3532
<div className="relative flex min-w-0 grow flex-col">
3633
<SettingSectionTitle title={t("wallet.transactions.title")} />
37-
<p className="mb-4 text-sm">
38-
{t("wallet.transactions.description", {
39-
percentage: Number.parseInt(serverConfigs?.TAX_POINT || "0") / 100,
40-
})}
41-
</p>
4234
<Tabs value={type} onValueChange={(val) => setType(val)}>
4335
<TabsList className="relative border-b-transparent">
4436
{tabs.map((tab) => (

apps/desktop/layer/renderer/src/modules/user/ProfileButton.electron.tsx

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ import { useAchievementModal } from "~/modules/achievement/hooks"
2828
import { usePresentUserProfileModal } from "~/modules/profile/hooks"
2929
import { useSettingModal } from "~/modules/settings/modal/use-setting-modal-hack"
3030
import { signOut, useSession } from "~/queries/auth"
31-
import { useWallet } from "~/queries/wallet"
3231

3332
import { useActivationModal } from "../activation"
3433
import { COMMAND_ID } from "../command/commands/id"
3534
import { useCommandShortcuts } from "../command/hooks/use-command-binding"
36-
import { ActivityPoints } from "../wallet/activity-points"
37-
import { Level } from "../wallet/level"
3835
import type { LoginProps } from "./LoginButton"
3936
import { LoginButton } from "./LoginButton"
40-
import { PowerButton } from "./ProfileButton.shared"
4137
import { UserAvatar } from "./UserAvatar"
4238

4339
const rsshubLogo = new URL(rsshubLogoUrl, import.meta.url).href
@@ -59,9 +55,6 @@ export const ProfileButton: FC<ProfileButtonProps> = memo((props) => {
5955
const navigate = useNavigate()
6056

6157
const role = useUserRole()
62-
const wallet = useWallet()
63-
const { isLoading: isLoadingWallet } = wallet
64-
const myWallet = wallet.data?.[0]
6558
const presentActivationModal = useActivationModal()
6659
const zenModeSetting = useIsZenMode()
6760
const setZenMode = useSetZenMode()
@@ -106,25 +99,6 @@ export const ProfileButton: FC<ProfileButtonProps> = memo((props) => {
10699
</div>
107100
</DropdownMenuLabel>
108101

109-
{!isInMASReview && (
110-
<DropdownMenuItem
111-
highlightColor="gray"
112-
onClick={() => {
113-
navigate("/power")
114-
}}
115-
>
116-
<div className="flex w-full items-center justify-between gap-6 px-1.5 font-semibold">
117-
<PowerButton isLoading={isLoadingWallet} myWallet={myWallet} />
118-
<Level level={myWallet?.level?.level || 0} isLoading={isLoadingWallet} />
119-
<ActivityPoints
120-
className="text-sm"
121-
points={myWallet?.level?.prevActivityPoints || 0}
122-
isLoading={isLoadingWallet}
123-
/>
124-
</div>
125-
</DropdownMenuItem>
126-
)}
127-
128102
<DropdownMenuSeparator />
129103

130104
<DropdownMenuItem
@@ -151,6 +125,18 @@ export const ProfileButton: FC<ProfileButtonProps> = memo((props) => {
151125
{t("user_button.achievement")}
152126
</DropdownMenuItem>
153127

128+
{!isInMASReview && (
129+
<DropdownMenuItem
130+
className="pl-3"
131+
onClick={() => {
132+
navigate("/power")
133+
}}
134+
icon={<i className="i-mgc-power-outline" />}
135+
>
136+
{t("user_button.power")}
137+
</DropdownMenuItem>
138+
)}
139+
154140
<DropdownMenuSeparator />
155141

156142
{!zenModeSetting && (

apps/desktop/layer/renderer/src/modules/user/ProfileButton.mobile.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ import rsshubLogoUrl from "~/assets/rsshub-icon.png?url"
1111
import { useUserRole, useWhoami } from "~/atoms/user"
1212
import { UrlBuilder } from "~/lib/url-builder"
1313
import { signOut } from "~/queries/auth"
14-
import { useWallet } from "~/queries/wallet"
1514

1615
import { useAchievementModal } from "../achievement/hooks"
1716
import { useActivationModal } from "../activation"
1817
import { usePresentUserProfileModal } from "../profile/hooks"
1918
import { useSettingModal } from "../settings/modal/use-setting-modal-hack"
20-
import { ActivityPoints } from "../wallet/activity-points"
21-
import { Level } from "../wallet/level"
2219
import type { ProfileButtonProps } from "./ProfileButton.electron"
23-
import { PowerButton } from "./ProfileButton.shared"
2420
import { UserAvatar } from "./UserAvatar"
2521

2622
export const ProfileButton: FC<ProfileButtonProps> = () => {
@@ -31,9 +27,6 @@ export const ProfileButton: FC<ProfileButtonProps> = () => {
3127
const { t } = useTranslation()
3228

3329
const role = useUserRole()
34-
const wallet = useWallet()
35-
const { isLoading: isLoadingWallet } = wallet
36-
const myWallet = wallet.data?.[0]
3730
const presentActivationModal = useActivationModal()
3831
const settingModalPresent = useSettingModal()
3932
return (
@@ -57,19 +50,6 @@ export const ProfileButton: FC<ProfileButtonProps> = () => {
5750
</div>
5851
</div>
5952

60-
<Link
61-
to="/power"
62-
className="mx-auto flex w-[300px] items-center justify-between font-semibold"
63-
>
64-
<PowerButton isLoading={isLoadingWallet} myWallet={myWallet} />
65-
<Level level={myWallet?.level?.level || 0} isLoading={isLoadingWallet} />
66-
<ActivityPoints
67-
className="text-sm"
68-
points={myWallet?.level?.prevActivityPoints || 0}
69-
isLoading={isLoadingWallet}
70-
/>
71-
</Link>
72-
7353
<Divider className="!bg-border h-px" />
7454

7555
<div className="mx-auto w-full max-w-[350px]">

apps/desktop/layer/renderer/src/modules/user/ProfileButton.shared.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/desktop/layer/renderer/src/pages/(main)/(layer)/(subview)/power/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next"
44

55
import { useSubViewTitle } from "~/modules/app-layout/subview/hooks"
66
import { MyWalletSection } from "~/modules/power/my-wallet-section"
7-
import { PowerRanking } from "~/modules/power/ranking"
87
import { TransactionsSection } from "~/modules/power/transaction-section"
98

109
export function Component() {
@@ -25,9 +24,6 @@ export function Component() {
2524
</div>
2625
<MyWalletSection />
2726

28-
<Divider className="my-8" />
29-
<PowerRanking />
30-
3127
<Divider className="my-8" />
3228
<AutoResizeHeight>
3329
<TransactionsSection />

0 commit comments

Comments
 (0)