Skip to content

Commit

Permalink
Release v4.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
attemka authored Nov 8, 2023
2 parents 2d433f0 + 9ef3948 commit ab2c138
Show file tree
Hide file tree
Showing 81 changed files with 2,210 additions and 326 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.13.0] - 2023-11-08

### Added

- new Referrals page

### Changed

- YPP channel carousel is now showing most paid channels
- Removed YPP signup quota check

### Fixed

- Fixed password suggestion being shown in the wrong places
- Fixed issue with channel asset upload
- Fixed NFT button being available for unauthorized users
- Fixed incorrect block number in payments table
- Fixed avatars on NFT carousel

## [4.12.0] - 2023-11-01

### Changed
Expand Down
6 changes: 4 additions & 2 deletions packages/atlas/atlas.config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
general:
appName: Gleev # Application name - used in the copy throughout the app, in index.html, open graph meta tags, etc. Don't use env variables here
appName: Atlas # Application name - used in the copy throughout the app, in index.html, open graph meta tags, etc. Don't use env variables here
appDescription: 'The streaming platform empowering viewers, creators, and builders. Built on and operated by the Joystream blockchain and DAO.' # Application description - used in index.html meta tags
appTagline: 'The streaming platform empowering viewers, creators, and builders. Built on and operated by the Joystream blockchain and DAO.'
appId: '$VITE_APP_ID' # App ID for Apps as first-class citizens
Expand Down Expand Up @@ -38,7 +38,6 @@ joystream:
features:
ypp:
yppDelayThreshold: 300 # When the YPP sync backlog exceeds the threshold, Atlas will consider the YPP sync delayed.
dailySignupQuota: 1000 # Daily quota for YPP signups. Leave null for unlimited quota.
landingPageOgTitle: null # Open graph title for YPP landing page - used in open graph meta tags in HTML
landingPageOgDescription: null # Open graph description for YPP landing page - used in open graph meta tags in HTML
landingPageOgImgPath: null # Path to the open graph image for the YPP landing page - if not set, the default image will be used
Expand Down Expand Up @@ -264,6 +263,9 @@ features:
statusPollingInterval: 20000 # Interval for polling NFT status on VideoView in ms
notifications:
pollingInterval: 10000 # Interval for polling notifications in ms
referrals:
referrerBonusPercent: 5 # How much referrer would get from the invitee reward
signupBonusPercent: 5 # How much invitee would get from the referral link signup
members:
avatarServiceUrl: '$VITE_AVATAR_SERVICE_URL' # URL for avatar service - used to upload member's avatar
hcaptchaSiteKey: '$VITE_HCAPTCHA_SITE_KEY' # Site key for hCaptcha - used to verify users are not bots when creating memberships - depends on hCaptcha being enabled in the faucet
Expand Down
4 changes: 2 additions & 2 deletions packages/atlas/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@joystream/atlas",
"description": "UI for consuming Joystream - a user governed video platform",
"version": "4.12.0",
"version": "4.13.0",
"license": "GPL-3.0",
"scripts": {
"start": "vite",
"dev": "vite",
"dev": "vite --host",
"build": "vite build",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build -o dist-storybook",
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/src/.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ VITE_HCAPTCHA_SITE_KEY=41cae189-7676-4f6b-aa56-635be26d3ceb

# YPP configuration
VITE_GOOGLE_CONSOLE_CLIENT_ID=246331758613-rc1psegmsr9l4e33nqu8rre3gno5dsca.apps.googleusercontent.com
VITE_YOUTUBE_SYNC_API_URL=https://50.19.175.219.nip.io
VITE_YOUTUBE_SYNC_API_URL=https://35.156.81.207.nip.io
VITE_YOUTUBE_COLLABORATOR_MEMBER_ID=18

# Analytics tools
Expand Down
47 changes: 16 additions & 31 deletions packages/atlas/src/api/hooks/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import {
UnfollowChannelMutation,
useFollowChannelMutation,
useGetChannelNftCollectorsQuery,
useGetChannelsPaymentEventsQuery,
useGetDiscoverChannelsQuery,
useGetExtendedBasicChannelsQuery,
useGetExtendedFullChannelsQuery,
useGetMostPaidChannelsQuery,
useGetTop10ChannelsQuery,
useUnfollowChannelMutation,
} from '@/api/queries/__generated__/channels.generated'
Expand Down Expand Up @@ -84,40 +84,25 @@ export const useBasicChannels = (
}
}

type PayeeChannel = {
export type PayeeChannel = {
id: string
title?: string | null
cumulativeRewardPaid: BN
avatarPhoto?: { resolvedUrls: string[] } | null
}
export type YPPPaidChannels = { channel: PayeeChannel; amount: BN }
export const useRecentlyPaidChannels = (): { channels: YPPPaidChannels[] | undefined; loading: boolean } => {
const { data, loading } = useGetChannelsPaymentEventsQuery({ variables: { limit: 2000 } })

const channels = useMemo<YPPPaidChannels[] | undefined>(() => {
type PaymentMap = Map<string, YPPPaidChannels>
const paymentMap = data?.events.reduce<PaymentMap>((channels, { data }) => {
if (data.__typename !== 'ChannelPaymentMadeEventData' || !data.payeeChannel) return channels

const exisitng = channels.get(data.payeeChannel.id)
const channel = exisitng?.channel ?? data.payeeChannel
const amount = new BN(data.amount).add(exisitng?.amount ?? BN_ZERO)

channels.set(data.payeeChannel.id, { channel, amount })

return channels
}, new Map())

return (
paymentMap &&
Array.from(paymentMap.values())
.sort((a, b) => {
if (a.amount.gt(b.amount)) return -1
if (a.amount.lt(b.amount)) return 1
return 0
})
.slice(0, 50)
)
}, [data])
export const useMostPaidChannels = (): { channels: PayeeChannel[] | undefined; loading: boolean } => {
const { data, loading } = useGetMostPaidChannelsQuery()

const channels = useMemo<PayeeChannel[] | undefined>(
() =>
data?.channels.map(({ id, title, cumulativeRewardPaid, avatarPhoto }) => ({
id,
title: title ?? undefined,
cumulativeRewardPaid: cumulativeRewardPaid ? new BN(cumulativeRewardPaid) : BN_ZERO,
avatarPhoto: avatarPhoto ?? undefined,
})),
[data]
)

return { channels, loading }
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ab2c138

Please sign in to comment.