Skip to content

Commit 27c6ddc

Browse files
authored
[Release] Hotfix 2.24.0 => 2.24.1 (patch) (#11297)
1 parent aceec2b commit 27c6ddc

File tree

38 files changed

+265
-332
lines changed

38 files changed

+265
-332
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"yarn": ">=999.0.0",
99
"npm": ">=999.0.0"
1010
},
11-
"version": "2.24.0",
11+
"version": "2.24.1",
1212
"private": true,
1313
"license": "AGPL-3.0-or-later",
1414
"scripts": {
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"additional_post_box__encrypted_post_pre": "This tweet is encrypted with #mask_io (@realMaskNetwork). 📪🔑\n\n🎭 🎭🎭 Tired of plaintext? Try to send encrypted messages to your friends. Install {{encrypted}} to send your first encrypted tweet."
2+
"additional_post_box__encrypted_post_pre": "This tweet is encrypted with #mask_io (@realMaskNetwork). 📪🔑\n\n🎭 🎭🎭 Tired of plaintext? Try to send encrypted messages to your friends. Install {{- encrypted}} to send your first encrypted tweet."
33
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"additional_post_box__encrypted_post_pre": "이 트윗은 이미 #mask_io (@realMaskNetwork)로 암호화되었습니다. 📪🔑\n🎭 🎭🎭 {{encrypted}} 설치하여 친구에게 암호화 트윗을 보내 보세요!"
2+
"additional_post_box__encrypted_post_pre": "이 트윗은 이미 #mask_io (@realMaskNetwork)로 암호화되었습니다. 📪🔑\n🎭 🎭🎭 {{- encrypted}} 설치하여 친구에게 암호화 트윗을 보내 보세요!"
33
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"additional_post_box__encrypted_post_pre": "此推特使用 #mask_io (@realMaskNetwork) 加密。 📪🔑\n\n🎭 🎭🎭 厌烦了纯文本?尝试向你的朋友发送加密消息。安装 {{encrypted}} 以发送你第一个加密推文。"
2+
"additional_post_box__encrypted_post_pre": "此推特使用 #mask_io (@realMaskNetwork) 加密。 📪🔑\n\n🎭 🎭🎭 厌烦了纯文本?尝试向你的朋友发送加密消息。安装 {{- encrypted}} 以发送你第一个加密推文。"
33
}

Diff for: packages/mask/content-script/site-adaptors/twitter.com/utils/postBox.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function getEditorContent() {
99
}
1010

1111
export function isCompose() {
12-
return globalThis.location.pathname.includes('compose')
12+
return globalThis.location.pathname === '/compose/tweet'
1313
}
1414

1515
export function hasFocus(x: LiveSelector<HTMLElement, true>) {

Diff for: packages/mask/content-script/site-adaptors/twitter.com/utils/selector.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ export function searchRetweetAvatarSelector() {
309309
}
310310

311311
export function searchReplyToolbarSelector() {
312-
return querySelector<E>('div[data-testid="primaryColumn"] div[data-testid="toolBar"]').querySelector<E>(
313-
'[role="presentation"]:has(> div[data-testid="geoButton"])',
312+
return querySelector<E>(
313+
'div[data-testid="primaryColumn"] div[data-testid="toolBar"] [role="presentation"]:has(> div[data-testid="geoButton"])',
314314
)
315315
}
316316

Diff for: packages/mask/popups/components/ConnectedWallet/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ export const ConnectedWallet = memo(function ConnectedWallet() {
140140
MaskMessages.events.ownProofChanged.sendToAll()
141141
showSnackbar(t.popups_wallet_disconnect_success())
142142
} catch {
143-
showSnackbar(t.popups_wallet_disconnect_failed())
143+
showSnackbar(t.popups_wallet_disconnect_failed(), {
144+
variant: 'error',
145+
})
144146
}
145147
},
146148
[currentPersona],

Diff for: packages/mask/popups/pages/Personas/Home/UI.tsx

+3-26
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
import { Icons } from '@masknet/icons'
22
import { PopupHomeTabType, useParamTab } from '@masknet/shared'
3-
import {
4-
LockStatus,
5-
PopupModalRoutes,
6-
PopupRoutes,
7-
currentMaskWalletLockStatusSettings,
8-
type EnhanceableSite,
9-
type ProfileAccount,
10-
} from '@masknet/shared-base'
3+
import { PopupModalRoutes, PopupRoutes, type EnhanceableSite, type ProfileAccount } from '@masknet/shared-base'
114
import { MaskTabList, makeStyles } from '@masknet/theme'
125
import { TabContext, TabPanel } from '@mui/lab'
136
import { Box, Tab, Typography, useTheme } from '@mui/material'
14-
import { memo, useCallback } from 'react'
7+
import { memo } from 'react'
158
import { useNavigate } from 'react-router-dom'
16-
import urlcat from 'urlcat'
179
import { useMaskSharedTrans } from '../../../../shared-ui/index.js'
1810
import { ConnectedWallet } from '../../../components/ConnectedWallet/index.js'
1911
import { PersonaAvatar } from '../../../components/PersonaAvatar/index.js'
@@ -199,7 +191,6 @@ export const PersonaHomeUI = memo<PersonaHomeUIProps>(
199191
onAccountClick,
200192
bindingWallets,
201193
hasProofs,
202-
hasPaymentPassword,
203194
}) => {
204195
const theme = useTheme()
205196
const t = useMaskSharedTrans()
@@ -209,20 +200,6 @@ export const PersonaHomeUI = memo<PersonaHomeUIProps>(
209200

210201
const [currentTab, onChange] = useParamTab<PopupHomeTabType>(PopupHomeTabType.SocialAccounts)
211202

212-
const onChangeTab = useCallback(
213-
(event: object, value: PopupHomeTabType) => {
214-
if (
215-
currentMaskWalletLockStatusSettings.value === LockStatus.LOCKED &&
216-
value === PopupHomeTabType.ConnectedWallets &&
217-
hasPaymentPassword
218-
) {
219-
navigate(urlcat(PopupRoutes.Wallet, { from: PopupRoutes.Personas, goBack: true, popup: true }))
220-
return
221-
}
222-
onChange(event, value)
223-
},
224-
[hasPaymentPassword],
225-
)
226203
return (
227204
<div className={classes.container}>
228205
{!isEmpty ?
@@ -263,7 +240,7 @@ export const PersonaHomeUI = memo<PersonaHomeUIProps>(
263240
</Box>
264241

265242
<MaskTabList
266-
onChange={onChangeTab}
243+
onChange={onChange}
267244
aria-label="persona-tabs"
268245
classes={{ root: classes.tabs, grouped: classes.groupedButton }}>
269246
<Tab label={t.popups_social_account()} value={PopupHomeTabType.SocialAccounts} />

Diff for: packages/mask/shared-ui/locales/en-US.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103
"persona_load_failed": "Load failed",
104104
"additional_post_box__encrypted_post_pre": "Decrypt this post with #mask_io! $t(promote) {{- encrypted}}",
105105
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "$t(promote_red_packet) Follow @{{account}} for Web3 updates and insights. \n\n🧧🧧🧧 Try sending Lucky Drop to your friends with Mask.io. \n\n{{- encrypted}}",
106-
"additional_post_box__encrypted_post_pre_red_packet": "$t(promote_red_packet) \n\n🧧🧧🧧 Try sending Lucky Drop to your friends with Mask.io. \n\n{{encrypted}}",
107-
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{encrypted}}",
108-
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{encrypted}}",
106+
"additional_post_box__encrypted_post_pre_red_packet": "$t(promote_red_packet) \n\n🧧🧧🧧 Try sending Lucky Drop to your friends with Mask.io. \n\n{{- encrypted}}",
107+
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{- encrypted}}",
108+
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{- encrypted}}",
109109
"additional_post_box__steganography_post_pre": "This image is encrypted with #mask_io. \n{{random}}\n\nInstall Mask.io to send your first encrypted tweet.",
110110
"auto_paste_failed_dialog_title": "Paste manually",
111111
"auto_paste_failed_dialog_content": "Please copy the following text and image (if there is any) and publish it.",

Diff for: packages/mask/shared-ui/locales/ja-JP.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@
101101
"application_display_tab_plug_app-unlisted-placeholder": "設定のアイコンをクリックして、アプリボードに表示します。",
102102
"application_settings_tab_plug_app-unlisted-placeholder": "アプリのアイコンをクリックして、アプリボードに表示します。",
103103
"persona_load_failed": "読み込み失敗",
104-
"additional_post_box__encrypted_post_pre": "#mask_io で復号しましょう! {{encrypted}}",
105-
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "こんにちは、#mask_io @{{account}} でラッキードロップを獲得しましょう。 \n\n$t(promote_red_packet)\n {{encrypted}}",
106-
"additional_post_box__encrypted_post_pre_red_packet": "こんにちは、#mask_io @{{account}} でラッキードロップを獲得しましょう。 \n\n$t(promote_red_packet)\n {{encrypted}}",
107-
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{encrypted}}",
108-
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{encrypted}}",
104+
"additional_post_box__encrypted_post_pre": "#mask_io で復号しましょう! {{- encrypted}}",
105+
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "こんにちは、#mask_io @{{account}} でラッキードロップを獲得しましょう。 \n\n$t(promote_red_packet)\n {{- encrypted}}",
106+
"additional_post_box__encrypted_post_pre_red_packet": "こんにちは、#mask_io @{{account}} でラッキードロップを獲得しましょう。 \n\n$t(promote_red_packet)\n {{- encrypted}}",
107+
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{- encrypted}}",
108+
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{- encrypted}}",
109109
"additional_post_box__steganography_post_pre": "この投稿は #mask_io によって暗号化されています。 📪🔑 mask.io をインストールして復号しましょう! ([I:b]) {{random}}",
110110
"auto_paste_failed_dialog_title": "手動でペーストする",
111111
"auto_paste_failed_dialog_content": "以下の文字列と画像(存在すれば)をコピーし、公開しましょう。",

Diff for: packages/mask/shared-ui/locales/ko-KR.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@
9191
"application_display_tab_plug_app-unlisted-placeholder": "설정 아이콘을 클릭하여 앱 보드에 나열합니다.",
9292
"application_settings_tab_plug_app-unlisted-placeholder": "애프리케이션 아이콘을 클릭하여 앱 보드에 나열합니다.",
9393
"persona_load_failed": "로딩 실패",
94-
"additional_post_box__encrypted_post_pre": "#mask_io로 이 게시물을 해독하기. {{encrypted}}",
95-
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "#mask_io로 행운 드랍을 수령해 보세요. @{{account}} \n\n$t(promote_red_packet)\n {{encrypted}}",
96-
"additional_post_box__encrypted_post_pre_red_packet": "#mask_io {{encrypted}} 덧붙이고 레드 패킷을 수령하세요.",
97-
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{encrypted}}",
98-
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{encrypted}}",
94+
"additional_post_box__encrypted_post_pre": "#mask_io로 이 게시물을 해독하기. {{- encrypted}}",
95+
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "#mask_io로 행운 드랍을 수령해 보세요. @{{account}} \n\n$t(promote_red_packet)\n {{- encrypted}}",
96+
"additional_post_box__encrypted_post_pre_red_packet": "#mask_io {{- encrypted}} 덧붙이고 레드 패킷을 수령하세요.",
97+
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{- encrypted}}",
98+
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{- encrypted}}",
9999
"additional_post_box__steganography_post_pre": "암호화된 이미지입니다. 📪🔑 mask.io 설치하고 해독하세요. {{random}}",
100100
"auto_paste_failed_dialog_title": "수동으로 붙여넣기",
101101
"auto_paste_failed_dialog_content": "아래의 문자와 이미지(있으면)를 복사하고 공유하세요",

Diff for: packages/mask/shared-ui/locales/zh-CN.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@
101101
"application_display_tab_plug_app-unlisted-placeholder": "点击设置图标进入设置页面,在应用面板上设置显示应用。",
102102
"application_settings_tab_plug_app-unlisted-placeholder": "点击应用图标将会在应用列表中显示。",
103103
"persona_load_failed": "加载失败",
104-
"additional_post_box__encrypted_post_pre": "安装 #mask_io 解密此贴文 ! {{encrypted}}",
105-
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "使用 #mask_io 来领取这个红包!@{{account}} \n\n$t(promote_red_packet)\n {{encrypted}}",
106-
"additional_post_box__encrypted_post_pre_red_packet": "使用 #mask_io 来认领这个红包!@{{encrypted}}",
107-
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{encrypted}}",
108-
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{encrypted}}",
104+
"additional_post_box__encrypted_post_pre": "安装 #mask_io 解密此贴文 ! {{- encrypted}}",
105+
"additional_post_box__encrypted_post_pre_red_packet_sns_official_account": "使用 #mask_io 来领取这个红包!@{{account}} \n\n$t(promote_red_packet)\n {{- encrypted}}",
106+
"additional_post_box__encrypted_post_pre_red_packet": "使用 #mask_io 来认领这个红包!{{- encrypted}}",
107+
"additional_post_box__encrypted_post_pre_file_service_sns_official_account": "$t(promote_file_service)\n {{- encrypted}}",
108+
"additional_post_box__encrypted_post_pre_file_service": "$t(promote_file_service) {{- encrypted}}",
109109
"additional_post_box__steganography_post_pre": "此图片使用#mask_io加密。📪🔑 安装mask.io解密它。 {{random}}",
110110
"auto_paste_failed_dialog_title": "手动粘贴",
111111
"auto_paste_failed_dialog_content": "请复制下面的文本和图片(如果有的话)再进行发布。",

Diff for: packages/mask/shared-ui/locales/zh-TW.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"redirect_alert": "如果你的瀏覽器沒有跳轉, <terms>請點擊此處</terms>.",
1919
"add_nft_contract_search_hint": "檢索NFT合約名稱或地址",
2020
"applications": "應用",
21-
"additional_post_box__encrypted_post_pre": "使用 #mask_io 解密這篇貼文! {{encrypted}}",
22-
"additional_post_box__encrypted_post_pre_red_packet": "用 #mask_io 開啟紅包 {{encrypted}}",
21+
"additional_post_box__encrypted_post_pre": "使用 #mask_io 解密這篇貼文! {{- encrypted}}",
22+
"additional_post_box__encrypted_post_pre_red_packet": "用 #mask_io 開啟紅包 {{- encrypted}}",
2323
"additional_post_box__steganography_post_pre": "這張圖片是使用 #mask_io 加密。 📪🔑 安裝 mask.io 解密。 {{random}}",
2424
"auto_paste_failed_dialog_title": "手動貼上",
2525
"auto_paste_failed_dialog_content": "請複製下方文章或圖片 (如果有的話) 然後發佈它",

Diff for: packages/plugins/FriendTech/src/SiteAdaptor/index.tsx

-21
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import { Icons } from '@masknet/icons'
22
import type { Plugin } from '@masknet/plugin-infra'
3-
import { PluginTransFieldRender } from '@masknet/plugin-infra/content-script'
4-
import { ApplicationEntry } from '@masknet/shared'
53
import { PluginID } from '@masknet/shared-base'
6-
import { Telemetry } from '@masknet/web3-telemetry'
7-
import { EventID, EventType } from '@masknet/web3-telemetry/types'
84
import { Trans } from 'react-i18next'
95
import { base } from '../base.js'
106
import { FriendTechInjection } from './FriendTechInjection.js'
11-
import { openDialog } from './emitter.js'
127
import { FriendTechNameWidget } from './FriendTechNameWidget.js'
138

149
const site: Plugin.SiteAdaptor.Definition = {
@@ -23,22 +18,6 @@ const site: Plugin.SiteAdaptor.Definition = {
2318
const iconFilterColor = 'rgba(1, 186, 250, 0.20)'
2419
return {
2520
ApplicationEntryID: base.ID,
26-
RenderEntryComponent(EntryComponentProps) {
27-
return (
28-
<ApplicationEntry
29-
title={<PluginTransFieldRender field={name} pluginID={base.ID} />}
30-
{...EntryComponentProps}
31-
icon={icon}
32-
iconFilterColor={iconFilterColor}
33-
onClick={() => {
34-
EntryComponentProps.onClick ? EntryComponentProps.onClick?.(openDialog) : openDialog()
35-
Telemetry.captureEvent(EventType.Access, EventID.EntryAppFileOpen)
36-
}}
37-
/>
38-
)
39-
},
40-
appBoardSortingDefaultPriority: 1,
41-
marketListSortingPriority: 3,
4221
icon,
4322
category: 'dapp',
4423
description: <Trans ns={PluginID.FriendTech} i18nKey="description" />,

Diff for: packages/plugins/Gitcoin/src/SiteAdaptor/index.tsx

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { Trans } from 'react-i18next'
22
import { Icons } from '@masknet/icons'
3-
import { type Plugin, usePluginWrapper } from '@masknet/plugin-infra/content-script'
4-
import { PluginID } from '@masknet/shared-base'
3+
import { type Plugin, usePluginWrapper, usePostInfoDetails } from '@masknet/plugin-infra/content-script'
4+
import { PluginID, parseURLs } from '@masknet/shared-base'
55
import { MaskLightTheme } from '@masknet/theme'
66
import { ThemeProvider } from '@mui/material'
77
import { base } from '../base.js'
88
import { PLUGIN_META_KEY, PLUGIN_NAME } from '../constants.js'
99
import { PreviewCard } from './PreviewCard.js'
1010
import { Modals } from './modals/index.js'
11+
import { extractTextFromTypedMessage } from '@masknet/typed-message'
12+
import { useMemo } from 'react'
1113

1214
const isGitcoin = (x: string): boolean => /^https:\/\/gitcoin.co\/grants\/\d+/.test(x)
1315

@@ -27,7 +29,26 @@ const site: Plugin.SiteAdaptor.Definition = {
2729
GlobalInjection() {
2830
return <Modals />
2931
},
32+
DecryptedInspector(props) {
33+
const link = useMemo(() => {
34+
const x = extractTextFromTypedMessage(props.message)
35+
if (x.isNone()) return null
36+
return parseURLs(x.value).find(isGitcoin)
37+
}, [props.message])
38+
const id = link?.match(/\d+/)?.[0]
39+
if (!id) return null
40+
return <Renderer id={id} />
41+
},
3042
CompositionDialogMetadataBadgeRender: new Map([[PLUGIN_META_KEY, () => PLUGIN_NAME]]),
43+
PostInspector() {
44+
const links = usePostInfoDetails.mentionedLinks()
45+
46+
const link = links.find(isGitcoin)
47+
const id = link?.match(/\d+/)?.[0]
48+
49+
if (!id) return null
50+
return <Renderer id={id} />
51+
},
3152
ApplicationEntries: [
3253
{
3354
hiddenInList: true,

Diff for: packages/plugins/Gitcoin/src/base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export const base: Plugin.Shared.Definition = {
1919
host_permissions: ['https://gitcoin.co/'],
2020
},
2121
inMinimalModeByDefault: true,
22-
contribution: {},
22+
contribution: { postContent: new Set([/https:\/\/gitcoin.co\/grants\/\d+/]) },
2323
i18n: languages,
2424
}

0 commit comments

Comments
 (0)