From a99aa059c9f6daf3dcd1d5727b0ac9122160388e Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 2 Oct 2023 12:57:25 +0800 Subject: [PATCH 1/3] Add the contribute button to the left menu --- .../web/components/templates/SettingsMenu.tsx | 82 ++++++++++++------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/packages/web/components/templates/SettingsMenu.tsx b/packages/web/components/templates/SettingsMenu.tsx index 48cb8a772..7789f960a 100644 --- a/packages/web/components/templates/SettingsMenu.tsx +++ b/packages/web/components/templates/SettingsMenu.tsx @@ -42,6 +42,42 @@ const StyledLink = styled(SpanBox, { whiteSpace: 'nowrap', }) +type ExternalLinkProps = { + title: string + destination: string +} + +function ExternalLink(props: ExternalLinkProps): JSX.Element { + return ( + a': { + backgroundColor: 'transparent', + textDecoration: 'none', + }, + }} + title={props.title} + > + + + {props.title} + + + + + ) +} + export function SettingsMenu(): JSX.Element { const section1 = [ { name: 'Account', destination: '/settings/account' }, @@ -112,7 +148,14 @@ export function SettingsMenu(): JSX.Element { style="link" onClick={(event) => { if (window.Intercom) { - window.Intercom('show') + try { + window.Intercom('show') + } catch (error) { + console.log(error) + alert('error opening system feedback') + } + } else { + alert('error opening system feedback') } event.preventDefault() }} @@ -120,35 +163,14 @@ export function SettingsMenu(): JSX.Element { Feedback - a': { - backgroundColor: 'transparent', - textDecoration: 'none', - }, - }} - > - - - Documentation - - - - + + {/* This spacer pushes library content to the right of From c9aea5248e5cce2c3d5cef9928fbe904d7555ea7 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 2 Oct 2023 13:07:51 +0800 Subject: [PATCH 2/3] Make the feeds UI a bit more consistent with the rest of settings --- packages/web/pages/settings/feeds/add.tsx | 68 ++++++++++++----------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/packages/web/pages/settings/feeds/add.tsx b/packages/web/pages/settings/feeds/add.tsx index d1832952a..31c216b62 100644 --- a/packages/web/pages/settings/feeds/add.tsx +++ b/packages/web/pages/settings/feeds/add.tsx @@ -2,7 +2,6 @@ import { styled } from '@stitches/react' import { useRouter } from 'next/router' import { useCallback, useState } from 'react' import { Button } from '../../../components/elements/Button' -import { FormInput } from '../../../components/elements/FormElements' import { Box, HStack, @@ -20,7 +19,25 @@ import { formatMessage } from '../../../locales/en/messages' const Header = styled(Box, { color: '$utilityTextDefault', fontSize: 'x-large', - margin: '20px', +}) + +const FormInput = styled('input', { + border: '1px solid $textNonessential', + width: '100%', + bg: 'transparent', + fontSize: '16px', + fontFamily: 'inter', + fontWeight: 'normal', + lineHeight: '1.35', + borderRadius: '5px', + textIndent: '8px', + marginBottom: '2px', + height: '38px', + color: '$grayTextContrast', + '&:focus': { + border: '1px solid transparent', + outline: '2px solid $omnivoreCtaYellow', + }, }) export default function AddRssFeed(): JSX.Element { @@ -67,21 +84,21 @@ export default function AddRssFeed(): JSX.Element {
Add new Feed
@@ -96,35 +113,17 @@ export default function AddRssFeed(): JSX.Element { setErrorMessage(undefined) setFeedUrl(e.target.value) }} - css={{ - border: '1px solid $textNonessential', - borderRadius: '8px', - width: '80%', - bg: 'transparent', - fontSize: '16px', - textIndent: '8px', - my: '20px', - height: '38px', - color: '$grayTextContrast', - '&:focus': { - outline: 'none', - boxShadow: '0px 0px 2px 2px rgba(255, 234, 159, 0.56)', - }, - }} /> {errorMessage && ( {errorMessage} )} - + - +
From ef8a75f68173a534a7b66163bc25590f50ebf20a Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 2 Oct 2023 13:13:02 +0800 Subject: [PATCH 3/3] Set the tab index on the RSS forms view --- packages/web/pages/settings/feeds/add.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/web/pages/settings/feeds/add.tsx b/packages/web/pages/settings/feeds/add.tsx index 31c216b62..768fedd0a 100644 --- a/packages/web/pages/settings/feeds/add.tsx +++ b/packages/web/pages/settings/feeds/add.tsx @@ -107,6 +107,8 @@ export default function AddRssFeed(): JSX.Element { { @@ -132,6 +134,7 @@ export default function AddRssFeed(): JSX.Element { Back