From eee9e11d736acb444d010ed93ffaa07cc7574e72 Mon Sep 17 00:00:00 2001 From: sajald77 Date: Mon, 30 Oct 2023 23:02:09 -0400 Subject: [PATCH] fix: update styling and other improvements --- .../projectDashboard/ProjectDashboard.tsx | 8 +++---- .../components/ExportNostrKeysModal.tsx | 2 +- .../sections/ProjectNostrSettings.tsx | 4 ---- .../components/NpubDisplay.tsx | 21 +++++++++++-------- .../sections/CreatorSocial.tsx | 9 +++++--- src/translations/English.json | 5 +++-- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/pages/projectDashboard/ProjectDashboard.tsx b/src/pages/projectDashboard/ProjectDashboard.tsx index cf76d9e6f..b1202dc82 100644 --- a/src/pages/projectDashboard/ProjectDashboard.tsx +++ b/src/pages/projectDashboard/ProjectDashboard.tsx @@ -37,14 +37,14 @@ export const projectSections: Record = { label: 'Connect wallet', path: 'dashboardWallet', }, - settings: { - label: 'Project settings', - path: 'dashboardSettings', - }, nostr: { label: 'Nostr settings', path: 'dashboardNostr', }, + settings: { + label: 'Project settings', + path: 'dashboardSettings', + }, } const sections = { ...projectSections } diff --git a/src/pages/projectDashboard/components/ExportNostrKeysModal.tsx b/src/pages/projectDashboard/components/ExportNostrKeysModal.tsx index 3d617b778..ec4fdee3e 100644 --- a/src/pages/projectDashboard/components/ExportNostrKeysModal.tsx +++ b/src/pages/projectDashboard/components/ExportNostrKeysModal.tsx @@ -31,7 +31,7 @@ export const ExportNostrKeysModal = ({ const { loading, data } = useProjectNostrKeysQuery({ variables: { where: { id: projectId } }, - skip: !projectId, + skip: !projectId || !isOpen, }) const projectNostrKeys = data?.projectGet?.keys.nostrKeys diff --git a/src/pages/projectDashboard/sections/ProjectNostrSettings.tsx b/src/pages/projectDashboard/sections/ProjectNostrSettings.tsx index 1ae6cd9fa..d85fdbc95 100644 --- a/src/pages/projectDashboard/sections/ProjectNostrSettings.tsx +++ b/src/pages/projectDashboard/sections/ProjectNostrSettings.tsx @@ -89,10 +89,6 @@ export const ProjectNostrSettings = () => { borderRadius={'8px'} alignItems="flex-start" > - {t( 'Warning: Before exporting your private keys, make sure to read the following message.', diff --git a/src/pages/projectView/projectMainBody/components/NpubDisplay.tsx b/src/pages/projectView/projectMainBody/components/NpubDisplay.tsx index 223c64939..f00db7078 100644 --- a/src/pages/projectView/projectMainBody/components/NpubDisplay.tsx +++ b/src/pages/projectView/projectMainBody/components/NpubDisplay.tsx @@ -8,9 +8,10 @@ import { copyTextToClipboard } from '../../../../utils' interface NpubDisplayProps extends ButtonProps { npub: string + iconOnly?: boolean } -export const NpubDisplay = ({ npub, ...rest }: NpubDisplayProps) => { +export const NpubDisplay = ({ npub, iconOnly, ...rest }: NpubDisplayProps) => { const { t } = useTranslation() const [copy, setCopy] = useState(false) @@ -53,14 +54,16 @@ export const NpubDisplay = ({ npub, ...rest }: NpubDisplayProps) => { color={'neutral.600'} /> } - - {`${text}`} - + {!iconOnly && ( + + {`${text}`} + + )} diff --git a/src/pages/projectView/projectMainBody/sections/CreatorSocial.tsx b/src/pages/projectView/projectMainBody/sections/CreatorSocial.tsx index 4161fc076..c6ee6173a 100644 --- a/src/pages/projectView/projectMainBody/sections/CreatorSocial.tsx +++ b/src/pages/projectView/projectMainBody/sections/CreatorSocial.tsx @@ -9,7 +9,10 @@ import { useExternalAccountsButtons } from '../../../../hooks/useExternalAccount import { NpubDisplay } from '../components/NpubDisplay' export const CreatorSocial = () => { - const isMd = useBreakpointValue({ base: false, md: true }, { ssr: false }) + const isMd = useBreakpointValue( + { base: true, sm: false, md: false, lg: true, xl: false }, + { ssr: false }, + ) const { project } = useProjectContext() const user = project?.owners[0]?.user @@ -55,7 +58,7 @@ export const CreatorSocial = () => { } if (key === 'nostr') { - return + return } return ( @@ -73,7 +76,7 @@ export const CreatorSocial = () => { py={1} > {icon} - {isMd ? ( + {!isMd ? ( {username} diff --git a/src/translations/English.json b/src/translations/English.json index 930794908..5ae6dfed4 100644 --- a/src/translations/English.json +++ b/src/translations/English.json @@ -733,6 +733,7 @@ "Handle the key with a lot of care. Anyone holding the private key can post on the project's behalf. If you leak your private key, the project risks being compromised, and there is nothing Geyser can do to prevent it.": "Handle the key with a lot of care. Anyone holding the private key can post on the project's behalf. If you leak your private key, the project risks being compromised, and there is nothing Geyser can do to prevent it.", "The Relays": "The Relays", "These are the relays that we publish to.": "These are the relays that we publish to.", - "Copy Lightning Address / Nostr identifier (NIP-05)'":"Copy Lightning Address / Nostr identifier (NIP-05)" - + "Copy Lightning Address / Nostr identifier (NIP-05)":"Copy Lightning Address / Nostr identifier (NIP-05)", + "Share":"Share", + "followers":"followers" }