From b8addc830dc841ed013ee14dadd3d01a6f107b78 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Thu, 22 Feb 2024 16:02:04 +0100 Subject: [PATCH 01/10] remove unnecessary error message --- src/components/edit-form/edit-form.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/edit-form/edit-form.tsx b/src/components/edit-form/edit-form.tsx index ff3c2307..8697db47 100644 --- a/src/components/edit-form/edit-form.tsx +++ b/src/components/edit-form/edit-form.tsx @@ -42,8 +42,6 @@ const useEditStore = create((set) => ({ onChallengeVerification: alertChallengeVerificationFailed, onError: (error: Error) => { console.error(error); - let errorMessage = error.message; - alert(errorMessage); }, }; return nextState; From 0c415fa94d5c83bb7c0a66b76f15347347c0c477 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Thu, 22 Feb 2024 16:35:09 +0100 Subject: [PATCH 02/10] fix(embed): twitter embed width would glitch --- src/components/post/embed/embed.module.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/post/embed/embed.module.css b/src/components/post/embed/embed.module.css index a7d6fc65..6d751585 100644 --- a/src/components/post/embed/embed.module.css +++ b/src/components/post/embed/embed.module.css @@ -59,7 +59,6 @@ } .xEmbed { - width: 400px !important; height: 580px !important; } From 26ac541e927281080872c1c48d7eeb260a385305 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 23 Feb 2024 16:45:04 +0100 Subject: [PATCH 03/10] Update notifications.yml --- .github/workflows/notifications.yml | 112 ++++++++++++++-------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/.github/workflows/notifications.yml b/.github/workflows/notifications.yml index e8603387..d390b403 100644 --- a/.github/workflows/notifications.yml +++ b/.github/workflows/notifications.yml @@ -1,19 +1,19 @@ -# # send notifications to telegram group on commits, releases, issues -# name: notifications +# send notifications to telegram group on commits, releases, issues +name: notifications -# on: -# pull_request: -# branches: -# - master -# push: -# branches: -# - master -# release: -# types: [published] -# issues: -# types: [opened] +on: + pull_request: + branches: + - master + # push: + # branches: + # - master + release: + types: [published] + issues: + types: [opened] -# jobs: +jobs: # push: # if: ${{ github.event_name == 'push' }} # runs-on: ubuntu-latest @@ -44,50 +44,50 @@ # format: html # message_file: message.txt -# release: -# if: ${{ github.event_name == 'release' }} -# runs-on: ubuntu-latest -# steps: -# # - name: debug -# # env: -# # DEBUG: ${{ toJSON(github) }} -# # run: echo "$DEBUG" + release: + if: ${{ github.event_name == 'release' }} + runs-on: ubuntu-latest + steps: + # - name: debug + # env: + # DEBUG: ${{ toJSON(github) }} + # run: echo "$DEBUG" -# # write message to file -# - run: echo "${{ github.event.repository.name }} ${{ github.event.release.name }}" >> message.txt -# - run: echo "" >> message.txt -# - run: echo "${{ github.event.release.body }}" >> message.txt -# - run: echo "${{ github.event.release.html_url }}" >> message.txt + # write message to file + - run: echo "${{ github.event.repository.name }} ${{ github.event.release.name }}" >> message.txt + - run: echo "" >> message.txt + - run: echo "${{ github.event.release.body }}" >> message.txt + - run: echo "${{ github.event.release.html_url }}" >> message.txt -# # send message, @plebbit telegram chat id is -1001665335693 -# - name: "telegram notification" -# uses: appleboy/telegram-action@master -# with: -# to: -1001665335693 -# token: ${{ secrets.TELEGRAM_TOKEN }} -# format: html -# message_file: message.txt + # send message, @plebbit telegram chat id is -1001665335693 + - name: "telegram notification" + uses: appleboy/telegram-action@master + with: + to: -1001665335693 + token: ${{ secrets.TELEGRAM_TOKEN }} + format: html + message_file: message.txt -# issue: -# if: ${{ github.event_name == 'issues' }} -# runs-on: ubuntu-latest -# steps: -# # - name: debug -# # env: -# # DEBUG: ${{ toJSON(github) }} -# # run: echo "$DEBUG" + issue: + if: ${{ github.event_name == 'issues' }} + runs-on: ubuntu-latest + steps: + # - name: debug + # env: + # DEBUG: ${{ toJSON(github) }} + # run: echo "$DEBUG" -# # write message to file -# - run: echo "${{ github.event.issue.title }}" >> message.txt -# - run: echo "" >> message.txt -# - run: echo "by ${{ github.event.issue.user.login }}" >> message.txt -# - run: echo "${{ github.event.issue.html_url }}" >> message.txt + # write message to file + - run: echo "${{ github.event.issue.title }}" >> message.txt + - run: echo "" >> message.txt + - run: echo "by ${{ github.event.issue.user.login }}" >> message.txt + - run: echo "${{ github.event.issue.html_url }}" >> message.txt -# # send message, @plebbit telegram chat id is -1001665335693 -# - name: "telegram notification" -# uses: appleboy/telegram-action@master -# with: -# to: -1001665335693 -# token: ${{ secrets.TELEGRAM_TOKEN }} -# format: html -# message_file: message.txt + # send message, @plebbit telegram chat id is -1001665335693 + - name: "telegram notification" + uses: appleboy/telegram-action@master + with: + to: -1001665335693 + token: ${{ secrets.TELEGRAM_TOKEN }} + format: html + message_file: message.txt From 6fdecce49730c9ca59a277aa8974f0721b557b2b Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 23 Feb 2024 17:20:11 +0100 Subject: [PATCH 04/10] fix(subplebbit settings): read only description needed word wrap --- .../subplebbit-settings/subplebbit-settings.module.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css index 28c007f7..15529b0d 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css @@ -62,6 +62,7 @@ .readOnlyDescription { font-size: 14px; font-family: verdana, arial, helvetica, sans-serif; + word-wrap: break-word; white-space: pre-wrap; } From 682e778545b919bada879a9f04bf4d680d7d3ea3 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 23 Feb 2024 21:14:43 +0100 Subject: [PATCH 05/10] style(settings): improve ens setting UI --- .../address-settings.module.css | 13 ++++------ .../address-settings/address-settings.tsx | 26 +++++++++---------- src/views/settings/settings.tsx | 2 +- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/views/settings/address-settings/address-settings.module.css b/src/views/settings/address-settings/address-settings.module.css index cbc49742..b75d21c8 100644 --- a/src/views/settings/address-settings/address-settings.module.css +++ b/src/views/settings/address-settings/address-settings.module.css @@ -38,18 +38,15 @@ width: 80vw; } -.infoButton { - padding: 0px 4px 0px 4px; - font-size: 11px; - position: relative; - bottom: 2px; - margin-bottom: -2px; -} - .copyAddressSetting { padding-bottom: 10px; } .copyAddressSetting button { margin-left: 0; +} + +.cryptoAddressInfo { + padding: 5px 20px 5px 0; + word-break: break-word; } \ No newline at end of file diff --git a/src/views/settings/address-settings/address-settings.tsx b/src/views/settings/address-settings/address-settings.tsx index 2b07fd44..7d0744d7 100644 --- a/src/views/settings/address-settings/address-settings.tsx +++ b/src/views/settings/address-settings/address-settings.tsx @@ -65,12 +65,6 @@ const AddressSettings = () => { })); }, [resolvedAddress, account?.signer?.address, t]); - const cryptoAddressInfo = () => { - alert( - 'Change your account address to an ENS name you own: in your ENS name page on ens.domains, click on "Records", "Edit Records", "Add record", add "plebbit-author-address" as record name, add your full address as value (you can copy it from your account data) and save.', - ); - }; - const saveCryptoAddress = async () => { if (!cryptoState.cryptoAddress || !cryptoState.cryptoAddress.includes('.')) { alert(t('enter_crypto_address')); @@ -129,16 +123,11 @@ const AddressSettings = () => { } }, [savedCryptoAddress]); + const [showCryptoAddressInfo, setShowCryptoAddressInfo] = useState(false); + return (
-
- plebbit-author-address -
- {t('crypto_address')} -
{ value={cryptoState.cryptoAddress} onChange={(e) => setCryptoState((prevState) => ({ ...prevState, cryptoAddress: e.target.value }))} /> + + {showCryptoAddressInfo && ( +
+ + https://app.ens.domains/ + + {` > address.eth > records > edit records > add record > record name: "plebbit-author-address" > record value: ${account?.signer?.address} > save`} +
+ )} {savedCryptoAddress && {t('saved')}}
diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index 63100174..17578f4d 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -233,7 +233,7 @@ const Settings = () => {
- {t('address')} + {t('crypto_address')} From c31b7eb52fee9aad04d2f6666b071b40031eb502 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 23 Feb 2024 21:18:31 +0100 Subject: [PATCH 06/10] fix(reply form): couldn't reply from inbox page because subplebbit address wasn't defined --- src/components/reply-form/reply-form.tsx | 4 ++-- src/components/reply/reply.tsx | 2 +- src/views/post-page/post-page.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index 31ccba0d..4c9db834 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -10,6 +10,7 @@ type ReplyFormProps = { cid: string; isReplyingToReply?: boolean; hideReplyForm?: () => void; + subplebbitAddress: string; }; export const FormattingHelpTable = () => { @@ -80,11 +81,10 @@ export const FormattingHelpTable = () => { ); }; -const ReplyForm = ({ cid, isReplyingToReply, hideReplyForm }: ReplyFormProps) => { +const ReplyForm = ({ cid, isReplyingToReply, hideReplyForm, subplebbitAddress }: ReplyFormProps) => { const { t } = useTranslation(); const [showOptions, setShowOptions] = useState(false); const [showFormattingHelp, setShowFormattingHelp] = useState(false); - const subplebbitAddress = useParams().subplebbitAddress as string; const { setContent, resetContent, replyIndex, publishReply } = useReply({ cid, subplebbitAddress }); const mdContainerClass = isReplyingToReply ? `${styles.mdContainer} ${styles.mdContainerReplying}` : styles.mdContainer; diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index d34fcc7e..064951e8 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -414,7 +414,7 @@ const Reply = ({ cidOfReplyWithContext, depth = 0, isSingleComment, isSingleRepl showReplyForm={showReplyForm} spoiler={spoiler} /> - {isReplying && } + {isReplying && } {!isSingleReply && replies.map((reply, index) => { return ( diff --git a/src/views/post-page/post-page.tsx b/src/views/post-page/post-page.tsx index 9385c45f..2940954a 100644 --- a/src/views/post-page/post-page.tsx +++ b/src/views/post-page/post-page.tsx @@ -61,7 +61,7 @@ const Post = ({ post }: { post: Comment }) => {
- {!isSingleComment && } + {!isSingleComment && } {loadingString && loadingString}
{isSingleComment && ( From 1bd1d0f0f5c8f76f19ce1d7d07e05a1fcaa41c29 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 23 Feb 2024 21:20:01 +0100 Subject: [PATCH 07/10] fix eslint --- src/components/reply-form/reply-form.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index 4c9db834..07ae697b 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -1,6 +1,5 @@ import { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useParams } from 'react-router-dom'; import styles from './reply-form.module.css'; import { isValidURL } from '../../lib/utils/url-utils'; import useReply from '../../hooks/use-reply'; From 07b9c993d0d3a706974154b4e0af3bdfaaf4407f Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 24 Feb 2024 15:58:23 +0100 Subject: [PATCH 08/10] rename variable --- .../post/comment-tools/share-menu/share-menu.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/post/comment-tools/share-menu/share-menu.tsx b/src/components/post/comment-tools/share-menu/share-menu.tsx index 2aa27a13..2b5572c8 100644 --- a/src/components/post/comment-tools/share-menu/share-menu.tsx +++ b/src/components/post/comment-tools/share-menu/share-menu.tsx @@ -11,23 +11,23 @@ type ShareMenuProps = { const ShareButton = ({ cid, subplebbitAddress }: ShareMenuProps) => { const { t } = useTranslation(); - const [hasShared, setHasShared] = useState(false); + const [hasCopied, sethasCopied] = useState(false); useEffect(() => { - if (hasShared) { - setTimeout(() => setHasShared(false), 2000); + if (hasCopied) { + setTimeout(() => sethasCopied(false), 2000); } - }, [hasShared]); + }, [hasCopied]); return (
{ - setHasShared(true); + sethasCopied(true); copyShareLinkToClipboard(subplebbitAddress, cid); }} > - {hasShared ? t('link_copied') : t('copy_link')} + {hasCopied ? t('link_copied') : t('copy_link')}
); }; From 4b902871b92043920e3cff64536d88af53cb4ad2 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 24 Feb 2024 17:30:14 +0100 Subject: [PATCH 09/10] feat(settings): add profile avatar setting --- .../comment-tools/share-menu/share-menu.tsx | 6 +- .../avatar-settings.module.css | 55 +++++ .../avatar-settings/avatar-settings.tsx | 192 ++++++++++++++++++ src/views/settings/avatar-settings/index.ts | 1 + src/views/settings/settings.module.css | 20 -- src/views/settings/settings.tsx | 15 +- 6 files changed, 253 insertions(+), 36 deletions(-) create mode 100644 src/views/settings/avatar-settings/avatar-settings.module.css create mode 100644 src/views/settings/avatar-settings/avatar-settings.tsx create mode 100644 src/views/settings/avatar-settings/index.ts diff --git a/src/components/post/comment-tools/share-menu/share-menu.tsx b/src/components/post/comment-tools/share-menu/share-menu.tsx index 2b5572c8..dccafdfc 100644 --- a/src/components/post/comment-tools/share-menu/share-menu.tsx +++ b/src/components/post/comment-tools/share-menu/share-menu.tsx @@ -11,11 +11,11 @@ type ShareMenuProps = { const ShareButton = ({ cid, subplebbitAddress }: ShareMenuProps) => { const { t } = useTranslation(); - const [hasCopied, sethasCopied] = useState(false); + const [hasCopied, setHasCopied] = useState(false); useEffect(() => { if (hasCopied) { - setTimeout(() => sethasCopied(false), 2000); + setTimeout(() => setHasCopied(false), 2000); } }, [hasCopied]); @@ -23,7 +23,7 @@ const ShareButton = ({ cid, subplebbitAddress }: ShareMenuProps) => {
{ - sethasCopied(true); + setHasCopied(true); copyShareLinkToClipboard(subplebbitAddress, cid); }} > diff --git a/src/views/settings/avatar-settings/avatar-settings.module.css b/src/views/settings/avatar-settings/avatar-settings.module.css new file mode 100644 index 00000000..92991963 --- /dev/null +++ b/src/views/settings/avatar-settings/avatar-settings.module.css @@ -0,0 +1,55 @@ +.avatar { + width: 70px; + height: 70px; + border: 1px solid var(--border-text); +} + +.avatar img { + width: 70px; + height: 70px; +} + +.emptyAvatar { + display: flex; + justify-content: center; + align-items: center; + text-align: center; + height: 100%; + cursor: pointer; +} + +.avatarSettingsForm { + padding-top: 10px; +} + +.avatarSettingsForm input { + margin-bottom: 10px; + width: 200px; + padding: 2px; + box-shadow: var(--box-shadow-input); +} + +.avatarSettingInput input { + display: block; +} + +.settingTitle { + font-style: italic; + text-transform: lowercase; +} + +.copyMessage { + padding-bottom: 10px; +} + +.pasteSignature span { + display: block; +} + +.pasteSignature button { + margin-left: 5px; +} + +.state { + padding-top: 10px; +} \ No newline at end of file diff --git a/src/views/settings/avatar-settings/avatar-settings.tsx b/src/views/settings/avatar-settings/avatar-settings.tsx new file mode 100644 index 00000000..393ff3ba --- /dev/null +++ b/src/views/settings/avatar-settings/avatar-settings.tsx @@ -0,0 +1,192 @@ +import { useEffect, useMemo, useState } from 'react'; +import { setAccount, useAccount, useAuthorAvatar } from '@plebbit/plebbit-react-hooks'; +import { useTranslation } from 'react-i18next'; +import styles from './avatar-settings.module.css'; + +interface AvatarSettingsProps { + areSettingsShown?: boolean; + avatar?: any; + showSettings?: () => void; +} + +const AvatarPreview = ({ avatar, showSettings, areSettingsShown }: AvatarSettingsProps) => { + const { t } = useTranslation(); + const account = useAccount(); + let author = useMemo(() => ({ ...account?.author, avatar }), [account, avatar]); + + const { imageUrl, state, error } = useAuthorAvatar({ author }); + + // if avatar already set, and user hasn't typed anything yet, preview already set author + if (account?.author?.avatar && !avatar?.chainTicker && !avatar?.address && !avatar?.id && !avatar?.signature) { + author = account.author; + } + + // not enough data to preview yet + if (!author?.avatar?.address && !author?.avatar?.signature) { + return; + } + + const stateText = state !== 'succeeded' ? `${state}...` : undefined; + + return ( + <> +
+ {imageUrl && state !== 'initializing' ? ( + avatar + ) : ( + + {areSettingsShown ? '–' + t('hide') : '+' + t('add')} + + )} +
+
+ {stateText} {error?.message} +
+ + ); +}; + +const AvatarSettings = () => { + const [showSettings, setShowSettings] = useState(false); + + const account = useAccount(); + + const authorAddress = account?.author?.address; + const [chainTicker, setChainTicker] = useState(account?.author?.avatar?.chainTicker); + const [tokenAddress, setTokenAddress] = useState(account?.author?.avatar?.address); + const [tokenId, setTokenId] = useState(account?.author?.avatar?.id); + const [timestamp, setTimestamp] = useState(account?.author?.avatar?.timestamp); + const [signature, setSignature] = useState(account?.author?.avatar?.signature?.signature); + + const getNftMessageToSign = (authorAddress: string, timestamp: number, tokenAddress: string, tokenId: string) => { + let messageToSign: any = {}; + // the property names must be in this order for the signature to match + // insert props one at a time otherwise babel/webpack will reorder + messageToSign.domainSeparator = 'plebbit-author-avatar'; + messageToSign.authorAddress = authorAddress; + messageToSign.timestamp = timestamp; + messageToSign.tokenAddress = tokenAddress; + messageToSign.tokenId = String(tokenId); // must be a type string, not number + // use plain JSON so the user can read what he's signing + messageToSign = JSON.stringify(messageToSign); + return messageToSign; + }; + + const [hasCopied, setHasCopied] = useState(false); + useEffect(() => { + if (hasCopied) { + setTimeout(() => setHasCopied(false), 2000); + } + }, [hasCopied]); + + const copyMessageToSign = () => { + if (!chainTicker) { + return alert('missing chain ticker'); + } + if (!tokenAddress) { + return alert('missing token address'); + } + if (!tokenId) { + return alert('missing token id'); + } + const newTimestamp = Math.floor(Date.now() / 1000); + const messageToSign = getNftMessageToSign(authorAddress, newTimestamp, tokenAddress, tokenId); + // update timestamp every time the user gets a new message to sign + setTimestamp(newTimestamp); + navigator.clipboard.writeText(messageToSign); + setHasCopied(true); + }; + + // how to resolve and verify NFT signatures https://github.com/plebbit/plebbit-js/blob/master/docs/nft.md + const avatar = { + chainTicker: chainTicker?.toLowerCase() || account?.author?.avatar?.chainTicker, + timestamp, + address: tokenAddress || account?.author?.avatar?.address, + id: tokenId || account?.author?.avatar?.id, + signature: { + signature: signature || account?.author?.avatar?.signature?.signature, + type: 'eip191', + }, + }; + + const save = () => { + if (!chainTicker) { + return alert('missing chain ticker'); + } + if (!tokenAddress) { + return alert('missing token address'); + } + if (!tokenId) { + return alert('missing token id'); + } + if (!signature) { + return alert('missing signature'); + } + setAccount({ ...account, author: { ...account?.author, avatar } }); + alert(`saved`); + }; + + return ( +
+ setShowSettings(!showSettings)} areSettingsShown={showSettings} /> + {showSettings && ( +
+
+ chain ticker + setChainTicker(e.target.value)} + /> +
+
+ token address + setTokenAddress(e.target.value)} + /> +
+
+ token id + setTokenId(e.target.value)} + /> +
+
+ message to sign +
+
+ paste signature + setSignature(e.target.value)} + /> + +
+
+ )} +
+ ); +}; + +export default AvatarSettings; diff --git a/src/views/settings/avatar-settings/index.ts b/src/views/settings/avatar-settings/index.ts new file mode 100644 index 00000000..5e1715cd --- /dev/null +++ b/src/views/settings/avatar-settings/index.ts @@ -0,0 +1 @@ +export { default } from './avatar-settings'; diff --git a/src/views/settings/settings.module.css b/src/views/settings/settings.module.css index 2f41691d..b8d4d04c 100644 --- a/src/views/settings/settings.module.css +++ b/src/views/settings/settings.module.css @@ -75,26 +75,6 @@ text-decoration: underline; } -.avatar { - width: 70px; - height: 70px; - border: 1px solid var(--border-text); -} - -.avatar img { - width: 70px; - height: 70px; -} - -.emptyAvatar { - display: flex; - justify-content: center; - align-items: center; - text-align: center; - height: 100%; - cursor: pointer; -} - .usernameInput input { width: 200px; padding: 2px; diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index 17578f4d..c38dbf33 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -1,9 +1,10 @@ import { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import { setAccount, useAccount, useAuthorAvatar } from '@plebbit/plebbit-react-hooks'; +import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import styles from './settings.module.css'; import AccountSettings from './account-settings'; import AddressSettings from './address-settings'; +import AvatarSettings from './avatar-settings'; import useTheme from '../../hooks/use-theme'; import packageJson from '../../../package.json'; import _ from 'lodash'; @@ -106,18 +107,6 @@ const ThemeSettings = () => { ); }; -const AvatarSettings = () => { - const { t } = useTranslation(); - const account = useAccount(); - const { imageUrl } = useAuthorAvatar({ author: account?.author }); - - return ( -
-
{imageUrl ? avatar : +{t('add')}}
-
- ); -}; - const DisplayNameSetting = () => { const { t } = useTranslation(); const account = useAccount(); From 1001d7da417726f0f1c432a25624481330a01035 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 24 Feb 2024 18:39:34 +0100 Subject: [PATCH 10/10] style(settings): use primary color and underline for links --- .../settings/address-settings/address-settings.module.css | 8 ++++++++ src/views/settings/address-settings/address-settings.tsx | 2 +- .../settings/avatar-settings/avatar-settings.module.css | 8 ++++++++ src/views/settings/avatar-settings/avatar-settings.tsx | 5 ++++- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/views/settings/address-settings/address-settings.module.css b/src/views/settings/address-settings/address-settings.module.css index b75d21c8..12aebf79 100644 --- a/src/views/settings/address-settings/address-settings.module.css +++ b/src/views/settings/address-settings/address-settings.module.css @@ -49,4 +49,12 @@ .cryptoAddressInfo { padding: 5px 20px 5px 0; word-break: break-word; +} + +.cryptoAddressInfo a { + color: var(--text-primary); +} + +.cryptoAddressInfo a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/views/settings/address-settings/address-settings.tsx b/src/views/settings/address-settings/address-settings.tsx index 7d0744d7..a08d9683 100644 --- a/src/views/settings/address-settings/address-settings.tsx +++ b/src/views/settings/address-settings/address-settings.tsx @@ -144,7 +144,7 @@ const AddressSettings = () => { {showCryptoAddressInfo && (
- https://app.ens.domains/ + app.ens.domains {` > address.eth > records > edit records > add record > record name: "plebbit-author-address" > record value: ${account?.signer?.address} > save`}
diff --git a/src/views/settings/avatar-settings/avatar-settings.module.css b/src/views/settings/avatar-settings/avatar-settings.module.css index 92991963..cf018486 100644 --- a/src/views/settings/avatar-settings/avatar-settings.module.css +++ b/src/views/settings/avatar-settings/avatar-settings.module.css @@ -52,4 +52,12 @@ .state { padding-top: 10px; +} + +.copyMessage a { + color: var(--text-primary); +} + +.copyMessage a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/views/settings/avatar-settings/avatar-settings.tsx b/src/views/settings/avatar-settings/avatar-settings.tsx index 393ff3ba..de99d812 100644 --- a/src/views/settings/avatar-settings/avatar-settings.tsx +++ b/src/views/settings/avatar-settings/avatar-settings.tsx @@ -168,7 +168,10 @@ const AvatarSettings = () => { />
- message to sign + message to sign on{' '} + + etherscan +
paste signature