Browse Source

Merge 'master' into 'dev'

* Release v3.0.0

* Changelog and version bump

---------

Co-authored-by: Artem <Artem Slugin>
Co-authored-by: WRadoslaw <r.wyszynski00@gmail.com>
Co-authored-by: drillprop <drylbartosz@gmail.com>
attemka 1 year ago
parent
commit
6213b6e984

+ 60 - 0
CHANGELOG.md

@@ -5,6 +5,66 @@ 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/),
 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).
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 
+## [3.3.0] - 2023-05-23
+
+### Added
+
+ - New NFT marketplace page
+ - New homepage with videos feed
+
+### Changed
+
+ - Improved notifications fetch query 
+
+### Fixed
+
+ - Fixed incorrect comments display
+ - Fixed tiles status in studio
+ - Fixed bug with modal windows blocking the scroll
+ - Minor bugfixes
+
+## [3.2.0] - 2023-04-21
+
+### Changed
+
+- NFT section rework
+- YPP sign-up buttons changed according to Google guidelines
+- Channels section removed from navigation
+- New & noteworthy pages were removed
+- Metadata update for supported wallets only
+
+### Fixed
+
+- Fixed bug with channel payouts
+- Fixed parsing of asset URL
+- Fixed YPP opt-in for memberships with multiple channels
+
+## [3.1.0] - 2023-04-14
+
+### Added
+
+- New content focus modal
+- Channel's balance is now displayed publicly
+
+### Changed
+
+- YPP TnCs were updated
+
+### Fixed
+
+- Fixed carousel styling for mobile screens
+- Various markup fixes
+
+## [3.0.0] - 2023-04-12
+
+### Added
+
+- Channel payouts were introduced
+
+### Changed
+
+- Atlas now supports Ephesus runtime upgrade
+
 ## [2.1.0] - 2023-04-07
 ## [2.1.0] - 2023-04-07
 
 
 ### Changed
 ### Changed

+ 1 - 1
packages/atlas-meta-server/.env

@@ -1,5 +1,5 @@
 # This file is committed. Do not store secrets here
 # This file is committed. Do not store secrets here
 
 
-APP_URL=https://play.joystream.org
+APP_URL=https://gleev.xyz
 # ORION_URL is used only for generating queries code, in runtime, Orion URL is fetched from index.html
 # ORION_URL is used only for generating queries code, in runtime, Orion URL is fetched from index.html
 ORION_URL=https://orion.joystream.org/graphql
 ORION_URL=https://orion.joystream.org/graphql

+ 1 - 2
packages/atlas-meta-server/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@joystream/atlas-meta-server",
   "name": "@joystream/atlas-meta-server",
-  "version": "1.2.1",
+  "version": "1.3.0",
   "description": "Node server for pre rendering html meta tags",
   "description": "Node server for pre rendering html meta tags",
   "license": "GPL-3.0",
   "license": "GPL-3.0",
   "scripts": {
   "scripts": {
@@ -9,7 +9,6 @@
     "graphql": "rimraf src/api/__generated__ && graphql-codegen --config codegen.config.yml -r dotenv/config"
     "graphql": "rimraf src/api/__generated__ && graphql-codegen --config codegen.config.yml -r dotenv/config"
   },
   },
   "dependencies": {
   "dependencies": {
-    "bn.js": "^5.2.1",
     "cross-fetch": "^3.1.5",
     "cross-fetch": "^3.1.5",
     "date-fns": "^2.29.3",
     "date-fns": "^2.29.3",
     "dotenv": "^16.0.3",
     "dotenv": "^16.0.3",

File diff suppressed because it is too large
+ 7661 - 34225
packages/atlas-meta-server/src/api/__generated__/sdk.ts


+ 4 - 4
packages/atlas-meta-server/src/api/index.ts

@@ -18,12 +18,12 @@ export class OrionClient {
   }
   }
 
 
   async getVideo(id: string) {
   async getVideo(id: string) {
-    const { videoByUniqueInput } = await this.sdk.GetVideo({ id })
-    return videoByUniqueInput
+    const { videoById } = await this.sdk.GetVideo({ id })
+    return videoById
   }
   }
 
 
   async getChannel(id: string) {
   async getChannel(id: string) {
-    const { channelByUniqueInput } = await this.sdk.GetChannel({ id })
-    return channelByUniqueInput
+    const { channelById } = await this.sdk.GetChannel({ id })
+    return channelById
   }
   }
 }
 }

+ 5 - 14
packages/atlas-meta-server/src/api/queries.graphql

@@ -1,15 +1,6 @@
 fragment DataObjectFields on StorageDataObject {
 fragment DataObjectFields on StorageDataObject {
   id
   id
-  storageBag {
-    distributionBuckets {
-      distributing
-      operators {
-        metadata {
-          nodeEndpoint
-        }
-      }
-    }
-  }
+  resolvedUrls
 }
 }
 
 
 fragment BasicChannelFields on Channel {
 fragment BasicChannelFields on Channel {
@@ -50,8 +41,8 @@ query TestQuery {
   }
   }
 }
 }
 
 
-query GetChannel($id: ID!) {
-  channelByUniqueInput(where: { id: $id }) {
+query GetChannel($id: String!) {
+  channelById(id: $id) {
     ...BasicChannelFields
     ...BasicChannelFields
     avatarPhoto {
     avatarPhoto {
       ...DataObjectFields
       ...DataObjectFields
@@ -59,8 +50,8 @@ query GetChannel($id: ID!) {
   }
   }
 }
 }
 
 
-query GetVideo($id: ID!) {
-  videoByUniqueInput(where: { id: $id }) {
+query GetVideo($id: String!) {
+  videoById(id: $id) {
     ...BasicVideoFields
     ...BasicVideoFields
     thumbnailPhoto {
     thumbnailPhoto {
       ...DataObjectFields
       ...DataObjectFields

+ 1 - 16
packages/atlas-meta-server/src/utils.ts

@@ -1,31 +1,16 @@
-import BN from 'bn.js'
 import fetch from 'cross-fetch'
 import fetch from 'cross-fetch'
 import parseHtml, { HTMLElement } from 'node-html-parser'
 import parseHtml, { HTMLElement } from 'node-html-parser'
 
 
 import { DataObjectFieldsFragment } from './api/__generated__/sdk'
 import { DataObjectFieldsFragment } from './api/__generated__/sdk'
 import { AppData, MetaTags } from './types'
 import { AppData, MetaTags } from './types'
 
 
-const DISTRIBUTOR_ASSET_PATH = 'api/v1/assets'
-
 export const joinUrlFragments = (...fragments: string[]) => {
 export const joinUrlFragments = (...fragments: string[]) => {
   const strippedFragments = fragments.map((f) => f.replace(/^\/|\/$/, ''))
   const strippedFragments = fragments.map((f) => f.replace(/^\/|\/$/, ''))
   return strippedFragments.join('/')
   return strippedFragments.join('/')
 }
 }
 
 
 export const generateAssetUrl = (asset: DataObjectFieldsFragment) => {
 export const generateAssetUrl = (asset: DataObjectFieldsFragment) => {
-  const workingBuckets = asset.storageBag.distributionBuckets.filter((bucket) => bucket.distributing)
-  const distributorsEndpoints = workingBuckets.reduce((acc, bucket) => {
-    const endpoints = bucket.operators
-      .filter((operator) => !!operator.metadata?.nodeEndpoint)
-      .map((operator) => operator.metadata?.nodeEndpoint) as string[]
-    return [...acc, ...endpoints]
-  }, [] as string[])
-
-  const assetIdBn = new BN(asset.id)
-  const endpointsCountBn = new BN(distributorsEndpoints.length)
-  const distributorIndex = assetIdBn.mod(endpointsCountBn).toNumber()
-  const endpoint = distributorsEndpoints[distributorIndex]
-  return joinUrlFragments(endpoint, DISTRIBUTOR_ASSET_PATH, asset.id)
+  return asset.resolvedUrls[0]
 }
 }
 
 
 export const getEnvVariable = (varName: string, required?: boolean) => {
 export const getEnvVariable = (varName: string, required?: boolean) => {

+ 1 - 1
packages/atlas/package.json

@@ -1,7 +1,7 @@
 {
 {
   "name": "@joystream/atlas",
   "name": "@joystream/atlas",
   "description": "UI for consuming Joystream - a user governed video platform",
   "description": "UI for consuming Joystream - a user governed video platform",
-  "version": "2.1.0",
+  "version": "3.3.0",
   "license": "GPL-3.0",
   "license": "GPL-3.0",
   "scripts": {
   "scripts": {
     "start": "vite",
     "start": "vite",

+ 0 - 1
yarn.lock

@@ -4022,7 +4022,6 @@ __metadata:
     "@graphql-codegen/typescript-graphql-request": ^4.5.8
     "@graphql-codegen/typescript-graphql-request": ^4.5.8
     "@graphql-codegen/typescript-operations": ^2.5.10
     "@graphql-codegen/typescript-operations": ^2.5.10
     "@types/express": ^4.17.14
     "@types/express": ^4.17.14
-    bn.js: ^5.2.1
     cross-fetch: ^3.1.5
     cross-fetch: ^3.1.5
     date-fns: ^2.29.3
     date-fns: ^2.29.3
     dotenv: ^16.0.3
     dotenv: ^16.0.3

Some files were not shown because too many files changed in this diff