-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
509 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/ui/src/app/pages/Profile/components/BannerSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { CloseButton } from '@/common/components/buttons' | ||
import { LinkButtonLinkStyles } from '@/common/components/buttons/LinkButtons' | ||
import { Arrow, QuestionIcon } from '@/common/components/icons' | ||
import { RowGapBlock } from '@/common/components/page/PageContent' | ||
import { DefaultTooltip } from '@/common/components/Tooltip' | ||
import { TextInlineMedium, TextMedium } from '@/common/components/typography/Text' | ||
import { Colors } from '@/common/constants' | ||
|
||
interface Props { | ||
setShouldDismissBanner: (bool: boolean) => void | ||
} | ||
|
||
export const BannerSection = ({ setShouldDismissBanner }: Props) => { | ||
return ( | ||
<Banner gap={8}> | ||
<BannerHeader> | ||
<BannerTitle> | ||
<BannerTooltip> | ||
<QuestionIcon /> | ||
</BannerTooltip> | ||
<TextInlineMedium bold={true}>What is Joy Token?</TextInlineMedium> | ||
</BannerTitle> | ||
<CloseButton onClick={() => setShouldDismissBanner(true)} /> | ||
</BannerHeader> | ||
<TextMedium> | ||
JOY token is a native crypto asset of Joystream blockchain. It is used for platform governance, purchasing NFTs, | ||
trading creator tokens, and covering blockchain processing fees. They are listed on | ||
<CustomLinkStyle | ||
as={'a'} | ||
to={''} | ||
href="https://www.mexc.com/exchange/JOYSTREAM_USDT?_from=market" | ||
target="_blank" | ||
size={'medium'} | ||
> | ||
<TextInlineMedium>MEXC</TextInlineMedium> | ||
</CustomLinkStyle> | ||
exchange under "JOYSTREAM" ticker. | ||
</TextMedium> | ||
<TextLink href="https://www.joystream.org/token#earn" target="_blank"> | ||
<TextInlineMedium bold={true}>Learn how to earn JOY's</TextInlineMedium> <Arrow size={'24'} direction="right" /> | ||
</TextLink> | ||
</Banner> | ||
) | ||
} | ||
const Banner = styled(RowGapBlock)` | ||
padding: 16px; | ||
background-color: ${Colors.Blue[50]}; | ||
` | ||
const BannerHeader = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
` | ||
const BannerTitle = styled.h6` | ||
display: flex; | ||
column-gap: 8px; | ||
` | ||
|
||
const TextLink = styled.a` | ||
color: ${Colors.Blue[500]}; | ||
display: flex; | ||
column-gap: 8px; | ||
width: 213px; | ||
${TextInlineMedium} { | ||
margin: auto 0px; | ||
} | ||
` | ||
const BannerTooltip = styled(DefaultTooltip)` | ||
margin-top: 1px; | ||
` | ||
const CustomLinkStyle = styled(LinkButtonLinkStyles)` | ||
display: inline-flex; | ||
// margin-left: 2px; | ||
// margin-right: 2px; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
packages/ui/src/app/pages/WorkingGroups/WorkingGroup/WorkingGroup.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import { Meta, StoryContext, StoryObj } from '@storybook/react' | ||
import { FC } from 'react' | ||
|
||
import { member } from '@/mocks/data/members' | ||
import { joy } from '@/mocks/helpers' | ||
import { MocksParameters } from '@/mocks/providers' | ||
import { GetWorkersDocument, GetWorkingGroupDocument } from '@/working-groups/queries' | ||
|
||
import { WorkingGroup } from './WorkingGroup' | ||
|
||
type Args = { | ||
isLead: boolean | ||
isLoggedIn: boolean | ||
} | ||
|
||
type Story = StoryObj<FC<Args>> | ||
|
||
const WG_DATA = { | ||
id: 'membershipWorkingGroup', | ||
name: 'membership', | ||
} | ||
|
||
export default { | ||
title: 'Pages/Working Group/WorkingGroup', | ||
component: WorkingGroup, | ||
|
||
args: { | ||
isLoggedIn: true, | ||
isLead: true, | ||
}, | ||
|
||
parameters: { | ||
router: { path: '/:name', href: `/${WG_DATA.name}` }, | ||
mocks: ({ args, parameters }: StoryContext<Args>): MocksParameters => { | ||
const alice = member('alice', { | ||
roles: [ | ||
{ | ||
__typename: 'Worker', | ||
id: `${WG_DATA.id}-0`, | ||
createdAt: '2021', | ||
isLead: args.isLead, | ||
group: { | ||
__typename: 'WorkingGroup', | ||
name: WG_DATA.name, | ||
}, | ||
}, | ||
], | ||
}) | ||
return { | ||
accounts: parameters.isLoggedIn ? { active: { member: alice } } : { list: [{ member: alice }] }, | ||
|
||
// chain: undefined, | ||
|
||
queryNode: [ | ||
{ | ||
query: GetWorkingGroupDocument, | ||
data: { | ||
workingGroupByUniqueInput: { | ||
id: WG_DATA.id, | ||
name: WG_DATA.name, | ||
budget: joy(200), | ||
workers: [], | ||
leader: { membershipId: alice.id, isActive: true }, | ||
}, | ||
}, | ||
}, | ||
{ | ||
query: GetWorkersDocument, | ||
data: { | ||
workers: [ | ||
{ | ||
id: `${WG_DATA.id}-0`, | ||
group: { | ||
id: WG_DATA.id, | ||
name: WG_DATA.name, | ||
}, | ||
status: 'WorkerStatusActive', | ||
membership: alice, | ||
}, | ||
{ | ||
id: `${WG_DATA.id}-1`, | ||
group: { | ||
id: WG_DATA.id, | ||
name: WG_DATA.name, | ||
}, | ||
status: 'WorkerStatusActive', | ||
membership: member('charlie'), | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} | ||
}, | ||
}, | ||
} satisfies Meta<Args> | ||
|
||
export const Default: Story = {} |
52 changes: 52 additions & 0 deletions
52
packages/ui/src/app/pages/WorkingGroups/WorkingGroupsOpenings.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Meta, StoryContext, StoryObj } from '@storybook/react' | ||
import { FC } from 'react' | ||
|
||
import { member } from '@/mocks/data/members' | ||
import { MocksParameters } from '@/mocks/providers' | ||
|
||
import { WorkingGroupsOpenings } from './WorkingGroupsOpenings' | ||
|
||
type Args = { | ||
isLead: boolean | ||
isLoggedIn: boolean | ||
} | ||
|
||
type Story = StoryObj<FC<Args>> | ||
|
||
export default { | ||
title: 'Pages/Working Groups/Openings', | ||
component: WorkingGroupsOpenings, | ||
|
||
args: { | ||
isLoggedIn: true, | ||
isLead: true, | ||
}, | ||
|
||
parameters: { | ||
mocks: ({ args, parameters }: StoryContext<Args>): MocksParameters => { | ||
const alice = member('alice', { | ||
roles: [ | ||
{ | ||
__typename: 'Worker', | ||
id: 'string', | ||
createdAt: '2021', | ||
isLead: args.isLead, | ||
group: { | ||
__typename: 'WorkingGroup', | ||
name: 'string', | ||
}, | ||
}, | ||
], | ||
}) | ||
return { | ||
accounts: parameters.isLoggedIn ? { active: { member: alice } } : { list: [{ member: alice }] }, | ||
|
||
chain: undefined, | ||
|
||
queryNode: [], | ||
} | ||
}, | ||
}, | ||
} satisfies Meta<Args> | ||
|
||
export const Default: Story = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/ui/src/common/components/icons/symbols/SubscanSymbol.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react' | ||
|
||
export function SubscanSymbol() { | ||
return ( | ||
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg"> | ||
<g fill="currentColor"> | ||
<path | ||
d="m13.8 3.21c0.733-0.733 0.733-1.92 0-2.66-0.733-0.733-1.92-0.733-2.66 0l-10.6 10.6c-0.733 0.733-0.733 1.92 0 2.66l5.31 5.31v2.08e-4c0.733 0.733 1.92 0.733 2.66 0l9.29-9.29 2.66 2.66-9.29 9.29c-0.733 0.733-0.733 1.92 0 2.66 0.733 0.733 1.92 0.733 2.66 0l10.6-10.6c0.733-0.733 0.733-1.92 0-2.66l-5.31-5.31c-0.733-0.733-1.92-0.733-2.66 0l-9.29 9.29-2.66-2.66 9.29-9.29z" | ||
opacity=".2" | ||
/> | ||
<path d="m3.21 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" /> | ||
<path d="m8.52 5.86c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66-2.08e-4" /> | ||
<path d="m13.8 0.55c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" /> | ||
<path d="m8.52 16.5c0.733 0.733 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" /> | ||
<path d="m13.8 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" /> | ||
<path d="m19.1 5.86c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66-2.08e-4" /> | ||
<path d="m13.8 21.8c0.733 0.733 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" /> | ||
<path d="m19.1 16.5c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 2.08e-4 -0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" /> | ||
<path d="m24.5 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" /> | ||
</g> | ||
</svg> | ||
) | ||
} |
Oops, something went wrong.
fd518a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
dao – ./
dao.joystream.org
dao-git-main-joystream.vercel.app
dao-joystream.vercel.app
pioneerapp.xyz