-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release] Hotfix 2.21.3 => 2.21.4 (patch) (#10162)
* chore: bump version 2.21.4 * chore: patches/@walletconnect__socket-transport (#10165) * chore: patches/@walletconnect__socket-transport * chore: update lock file * chore: resume Connector * chore: resumeConnector * refactor: improve wc connection (#10168) * refactor: improve wc connection * refactor: destroy connection * refactor: disable v2 * chore: debug * refactor: remove connector * chore: patch wc * refactor: improve stability * refactor: improve connection debugger * fix: lint errors * feat: switch logo plugin (#10178) * feat: switch logo plugin * chore: update lock file * feat: plugin storage * fix: bugfix * refactor: code style * fix: switch logo plugin (#10184) * refactor: code stlye * refactor: code stlye * fix: async * feat: application settings dialog * fix: use legacy settings * fix: typo * fix: type errors --------- Co-authored-by: lelenei <[email protected]> * fix: logo color (#10186) * fix: change twitter logo (#10189) * fix: copywriting (#10187) * fix: adjust ui (#10190) * fix: show switch logo in guidestep (#10191) * fix: icon border (#10193) * fix: copywriting (#10197) * fix: open switch logo (#10201) * fix: add new line to share text (#10203) --------- Co-authored-by: lelenei <[email protected]> Co-authored-by: lelenei <[email protected]>
- Loading branch information
1 parent
9cb401b
commit 2a027e4
Showing
60 changed files
with
935 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"yarn": ">=999.0.0", | ||
"npm": ">=999.0.0" | ||
}, | ||
"version": "2.21.3", | ||
"version": "2.21.4", | ||
"private": true, | ||
"license": "AGPL-3.0-or-later", | ||
"scripts": { | ||
|
@@ -153,7 +153,8 @@ | |
"[email protected]": "patches/[email protected]", | ||
"@chainsafe/[email protected]": "patches/@[email protected]", | ||
"@protobufjs/[email protected]": "patches/@[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
"[email protected]": "patches/[email protected]", | ||
"@walletconnect/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
packages/mask/src/components/shared/ApplicationSettingsDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { MaskTabList, makeStyles, useTabs } from '@masknet/theme' | ||
import { TabContext, TabPanel } from '@mui/lab' | ||
import { DialogContent, Tab } from '@mui/material' | ||
import { memo, useEffect } from 'react' | ||
import { ApplicationSettingPluginList } from './ApplicationSettingPluginList.js' | ||
import { ApplicationSettingPluginSwitch } from './ApplicationSettingPluginSwitch.js' | ||
import { ApplicationSettingTabs } from './ApplicationBoardDialog.js' | ||
import type { PluginID } from '@masknet/shared-base' | ||
import { InjectedDialog } from '@masknet/shared' | ||
import { useI18N } from '../../utils/index.js' | ||
import { useRemoteControlledDialog } from '@masknet/shared-base-ui' | ||
import { WalletMessages } from '@masknet/plugin-wallet' | ||
|
||
interface ApplicationBoardSettingsProps { | ||
focusPluginID?: PluginID | ||
tab?: ApplicationSettingTabs | ||
} | ||
|
||
const useStyles = makeStyles()((theme) => { | ||
return { | ||
content: { | ||
padding: theme.spacing(1.5, 2, '6px'), | ||
height: 'auto', | ||
overflow: 'hidden scroll', | ||
'&::-webkit-scrollbar': { | ||
display: 'none', | ||
}, | ||
}, | ||
} | ||
}) | ||
|
||
export const ApplicationBoardSettingsDialog = memo<ApplicationBoardSettingsProps>( | ||
({ focusPluginID, tab = ApplicationSettingTabs.pluginSwitch }) => { | ||
const { t } = useI18N() | ||
const { classes } = useStyles() | ||
const [currentTab, onChange, tabs, setTab] = useTabs( | ||
ApplicationSettingTabs.pluginList, | ||
ApplicationSettingTabs.pluginSwitch, | ||
) | ||
|
||
const { open, closeDialog } = useRemoteControlledDialog( | ||
WalletMessages.events.applicationSettingsDialogUpdated, | ||
(evt) => { | ||
if (!evt.open) return | ||
setTab(ApplicationSettingTabs.pluginSwitch) | ||
}, | ||
) | ||
|
||
useEffect(() => setTab(tab), [tab]) | ||
return ( | ||
<TabContext value={currentTab}> | ||
<InjectedDialog | ||
open={open} | ||
maxWidth="sm" | ||
onClose={closeDialog} | ||
titleTabs={ | ||
<MaskTabList variant="base" onChange={onChange} aria-label="ApplicationBoard"> | ||
<Tab label={t('application_settings_tab_app_list')} value={tabs.pluginList} /> | ||
<Tab label={t('application_settings_tab_plug_in_switch')} value={tabs.pluginSwitch} /> | ||
</MaskTabList> | ||
} | ||
title={t('application_settings')}> | ||
<DialogContent className={classes.content}> | ||
<TabPanel value={tabs.pluginList} style={{ padding: 0 }}> | ||
<ApplicationSettingPluginList /> | ||
</TabPanel> | ||
<TabPanel value={tabs.pluginSwitch} style={{ padding: 0 }}> | ||
<ApplicationSettingPluginSwitch focusPluginID={focusPluginID} /> | ||
</TabPanel> | ||
</DialogContent> | ||
</InjectedDialog> | ||
</TabContext> | ||
) | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/mask/src/social-network-adaptor/twitter.com/injection/SwitchLogo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { SwitchLogoButton } from '@masknet/plugin-switch-logo' | ||
import { MutationObserverWatcher, type LiveSelector } from '@dimensiondev/holoflows-kit' | ||
import { querySelector } from '../utils/selector.js' | ||
import { attachReactTreeWithContainer } from '../../../utils/shadow-root/renderInShadowRoot.js' | ||
import { startWatch } from '../../../utils/watcher.js' | ||
import { useLastRecognizedIdentity } from '../../../components/DataSource/useActivatedUI.js' | ||
import { switchLogoSettings } from '../../../../shared/legacy-settings/settings.js' | ||
|
||
const logoSelector: () => LiveSelector<HTMLElement, true> = () => { | ||
return querySelector<HTMLElement>('h1[role="heading"] a > div > svg').closest(1) | ||
} | ||
|
||
export function injectSwitchLogoButton(signal: AbortSignal) { | ||
const watcher = new MutationObserverWatcher(logoSelector()) | ||
startWatch(watcher, signal) | ||
attachReactTreeWithContainer(watcher.firstDOMProxy.afterShadow, { untilVisible: true, signal }).render( | ||
<InjectSwitchLogoButton />, | ||
) | ||
} | ||
|
||
function InjectSwitchLogoButton() { | ||
const identity = useLastRecognizedIdentity() | ||
return <SwitchLogoButton identity={identity} switchLogoSettings={switchLogoSettings} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.