diff --git a/frontend/app/src/bounties/BountyDescription.tsx b/frontend/app/src/bounties/BountyDescription.tsx index 90ab72e51..df1f48e01 100644 --- a/frontend/app/src/bounties/BountyDescription.tsx +++ b/frontend/app/src/bounties/BountyDescription.tsx @@ -2,6 +2,10 @@ import { EuiText } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { isString } from 'lodash'; +import { OrganizationText, OrganizationWrap } from 'people/utils/style'; +import { Link } from 'react-router-dom'; +import { useStores } from 'store'; +import { Organization } from 'store/main'; import { colors } from '../config/colors'; import { LanguageObject } from '../people/utils/languageLabelStyle'; import NameTag from '../people/utils/NameTag'; @@ -26,12 +30,13 @@ const BountyDescriptionContainer = styled.div` min-width: 519px; max-width: 519px; padding-left: 17px; + padding-right: 17px; `; const Header = styled.div` display: flex; flex-direction: row; - align-item: center; + justify-content: space-between; height: 32px; margin-top: 16px; .NameContainer { @@ -43,7 +48,7 @@ const Header = styled.div` const Description = styled.div` display: flex; flex-direction: row; - align-item: center; + align-items: center; justify-content: space-between; .DescriptionContainer { display: flex; @@ -93,19 +98,40 @@ const CodingLabels = styled.div` margin-right: 4px; .LanguageText { font-size: 13px; - fontweight: 500; + font-weight: 500; text-align: center; font-family: 'Barlow'; line-height: 16px; } `; + +const Img = styled.div<{ + readonly src: string; +}>` + background-image: url('${(p: any) => p.src}'); + background-position: center; + background-size: cover; + width: 20px; + height: 20px; + border-radius: 50%; +`; + const BountyDescription = (props: BountiesDescriptionProps) => { const color = colors['light']; const [dataValue, setDataValue] = useState([]); const [replitLink, setReplitLink] = useState(''); const [descriptionImage, setDescriptionImage] = useState(''); + const [org, setOrg] = useState(undefined); + const { main } = useStores(); + + const fetchOrg = async () => { + if (!props.org_uuid) return; + const org = await main.getUserOrganizationByUuid(props.org_uuid); + setOrg(org); + } useEffect(() => { + fetchOrg() if (props.description) { const found = props?.description.match(/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/); setReplitLink( @@ -148,6 +174,25 @@ const BountyDescription = (props: BountiesDescriptionProps) => { org_uuid={props.uuid} /> + {props.org_uuid && props.name && ( + + + + {props.name} + {'github_ticket'} + + + )}
{ person, onPanelClick, widget, - created, - org_uuid, - name + created } = props; const color = colors['light']; @@ -137,13 +133,6 @@ const Bounties = (props: BountiesProps) => { const { ui } = useStores(); return ( <> - {org_uuid && name && ( - - - {name} - - - )} {!!assignee?.owner_pubkey && !!assignee?.owner_alias ? ( ` `; const PaidBounty = (props: PaidBountiesProps) => { const color = colors['light']; - const { org_uuid, name } = props; return ( <> - {org_uuid && name && ( - - - {name} - - - )} ` min-height: 160px; max-height: auto; width: 1100px; - box-shadow: 0px 1px 6px ${(p: any) => p?.color && p?.color.black100}; border: none; `; @@ -49,7 +48,6 @@ function WantedView(props: WantedViews2Props) { show = true, paid = false } = props; - const titleString = one_sentence_summary || title || ''; const isMobile = useIsMobile(); const { ui, main } = useStores(); diff --git a/frontend/app/src/people/widgetViews/WidgetSwitchViewer.tsx b/frontend/app/src/people/widgetViews/WidgetSwitchViewer.tsx index 25ce34221..35190d87e 100644 --- a/frontend/app/src/people/widgetViews/WidgetSwitchViewer.tsx +++ b/frontend/app/src/people/widgetViews/WidgetSwitchViewer.tsx @@ -180,7 +180,7 @@ function WidgetSwitchViewer(props: any) { padding: 0, overflow: 'hidden', background: 'transparent', - minHeight: body.org_uuid ? '185px' : !isMobile ? '160px' : '', + minHeight: !isMobile ? '160px' : '', maxHeight: 'auto', boxShadow: 'none' }} diff --git a/frontend/app/src/people/widgetViews/wantedViews/MobileView.tsx b/frontend/app/src/people/widgetViews/wantedViews/MobileView.tsx index 2bdbebec6..eb42194da 100644 --- a/frontend/app/src/people/widgetViews/wantedViews/MobileView.tsx +++ b/frontend/app/src/people/widgetViews/wantedViews/MobileView.tsx @@ -50,7 +50,11 @@ function MobileView(props: any) { const color = colors['light']; return ( -
+
{paid && (