diff --git a/package.json b/package.json index b0888707f6..2ad1c61176 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matters-web", - "version": "4.8.0", + "version": "4.8.1", "description": "codebase of Matters' website", "sideEffects": false, "author": "Matters ", diff --git a/src/common/enums/externalLinks.ts b/src/common/enums/externalLinks.ts index 4a82e7d790..5e42f1832b 100644 --- a/src/common/enums/externalLinks.ts +++ b/src/common/enums/externalLinks.ts @@ -75,4 +75,11 @@ export const GUIDE_LINKS = { 'https://matters.news/zh-Hans/@hi176/338013-%E5%8A%9F%E8%83%BD%E6%8C%87%E5%8D%97-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8-%E5%85%A7%E5%AE%B9%E8%A8%82%E9%96%B1-%E4%BE%86%E8%BF%BD%E8%B9%A4%E4%BD%A0%E5%96%9C%E6%84%9B%E7%9A%84-matters-%E4%BD%9C%E8%80%85-bafyreidb42pruxqy75tybjarp6kebmf7quyn3etd6mtv7fopwve6a7mjaa', en: 'https://matters.news/en/@hi176/338013-%E5%8A%9F%E8%83%BD%E6%8C%87%E5%8D%97-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8-%E5%85%A7%E5%AE%B9%E8%A8%82%E9%96%B1-%E4%BE%86%E8%BF%BD%E8%B9%A4%E4%BD%A0%E5%96%9C%E6%84%9B%E7%9A%84-matters-%E4%BD%9C%E8%80%85-bafyreidb42pruxqy75tybjarp6kebmf7quyn3etd6mtv7fopwve6a7mjaa', }, + mobilePayment: { + zh_hant: + 'https://matters.news/@hi176/343938-%E6%8C%87%E5%8D%97-%E5%A6%82%E4%BD%95%E5%9C%A8%E6%89%8B%E6%A9%9F%E4%B8%8A%E9%80%A3%E6%8E%A5%E9%8C%A2%E5%8C%85%E4%B8%A6%E4%BD%BF%E7%94%A8-usdt-%E6%94%AF%E6%8C%81%E5%8A%9F%E8%83%BD-bafyreifil6hcprdl5g4vtui5sy3gvimbkphib5xcziddixptmy4dckmtiu', + zh_hans: + 'https://matters.news/zh_Hans/@hi176/343938-%E6%8C%87%E5%8D%97-%E5%A6%82%E4%BD%95%E5%9C%A8%E6%89%8B%E6%A9%9F%E4%B8%8A%E9%80%A3%E6%8E%A5%E9%8C%A2%E5%8C%85%E4%B8%A6%E4%BD%BF%E7%94%A8-usdt-%E6%94%AF%E6%8C%81%E5%8A%9F%E8%83%BD-bafyreifil6hcprdl5g4vtui5sy3gvimbkphib5xcziddixptmy4dckmtiu', + en: 'https://matters.news/en/@hi176/343938-%E6%8C%87%E5%8D%97-%E5%A6%82%E4%BD%95%E5%9C%A8%E6%89%8B%E6%A9%9F%E4%B8%8A%E9%80%A3%E6%8E%A5%E9%8C%A2%E5%8C%85%E4%B8%A6%E4%BD%BF%E7%94%A8-usdt-%E6%94%AF%E6%8C%81%E5%8A%9F%E8%83%BD-bafyreifil6hcprdl5g4vtui5sy3gvimbkphib5xcziddixptmy4dckmtiu', + }, } diff --git a/src/components/Forms/PaymentForm/PayTo/SetAmount/index.tsx b/src/components/Forms/PaymentForm/PayTo/SetAmount/index.tsx index b44da53205..2b94c96b65 100644 --- a/src/components/Forms/PaymentForm/PayTo/SetAmount/index.tsx +++ b/src/components/Forms/PaymentForm/PayTo/SetAmount/index.tsx @@ -380,8 +380,8 @@ const SetAmount: React.FC = ({ }} > diff --git a/src/components/Forms/WalletAuthForm/Select.tsx b/src/components/Forms/WalletAuthForm/Select.tsx index 8c58f3ac02..2a3b2773c0 100644 --- a/src/components/Forms/WalletAuthForm/Select.tsx +++ b/src/components/Forms/WalletAuthForm/Select.tsx @@ -7,13 +7,16 @@ import { IconMetaMask24, IconSpinner16, IconWalletConnect24, + LanguageContext, Layout, Spacer, TextIcon, Translate, + useResponsive, ViewerContext, } from '~/components' +import { GUIDE_LINKS } from '~/common/enums' import { analytics } from '~/common/utils' import styles from './styles.css' @@ -57,6 +60,49 @@ const Desc = { }, } +const Hint = () => { + const { lang } = useContext(LanguageContext) + const isSmallUp = useResponsive('sm-up') + + if (isSmallUp) { + return ( +

+ + + + + +

+ ) + } + + return ( +

+ + + + + +

+ ) +} + const Select: React.FC = ({ type, purpose, @@ -67,7 +113,6 @@ const Select: React.FC = ({ const viewer = useContext(ViewerContext) const formId = 'wallet-auth-select-form' - const fieldMsgId = 'wall-auth-select-msg' const isInPage = purpose === 'page' const isConnect = type === 'connect' @@ -191,15 +236,16 @@ const Select: React.FC = ({ /> - {errorMessage && ( + {!errorMessage && (
- - - + + +
+ )} + + {errorMessage && ( +
+

{errorMessage}

)} diff --git a/src/components/Forms/WalletAuthForm/styles.css b/src/components/Forms/WalletAuthForm/styles.css index c234ef96e3..5e0ec9cdc9 100644 --- a/src/components/Forms/WalletAuthForm/styles.css +++ b/src/components/Forms/WalletAuthForm/styles.css @@ -1,5 +1,12 @@ .msg { - margin: 0 var(--spacing-base) var(--spacing-loose); + margin: var(--spacing-x-tight) 0 var(--spacing-base) var(--spacing-base); + font-size: var(--font-size-xs); + line-height: 1rem; + color: var(--color-grey); + + &.error { + color: var(--color-red); + } } .emphasize { diff --git a/src/components/Layout/SideFooter/index.tsx b/src/components/Layout/SideFooter/index.tsx index 130b52377f..0f4123ac5a 100644 --- a/src/components/Layout/SideFooter/index.tsx +++ b/src/components/Layout/SideFooter/index.tsx @@ -1,24 +1,16 @@ import Link from 'next/link' +import { useContext } from 'react' -import { LanguageSwitch, Translate } from '~/components' +import { LanguageContext, LanguageSwitch, Translate } from '~/components' -import { PATHS } from '~/common/enums' -import { toPath } from '~/common/utils' +import { GUIDE_LINKS, PATHS } from '~/common/enums' import styles from './styles.css' const SideFooter = () => { + const { lang } = useContext(LanguageContext) const year = new Date().getFullYear() - const downloadAppLink = toPath({ - page: 'articleDetail', - article: { - slug: 'guidance-如何让你的matters之旅更便捷', - mediaHash: 'bafyreiayiuxi4qc2a7qpgjp3fe42wmaoppqykckcvtq4hiukl5pgs3dn2m', - author: { userName: '1ampa55ag3' }, - }, - }) - return (