Skip to content

Commit

Permalink
Merge pull request #309 from dappforce/feat/update-meta
Browse files Browse the repository at this point in the history
Update meta + add Grill config
  • Loading branch information
teodorus-nathaniel authored Mar 5, 2024
2 parents a20f90e + 0b23f2e commit 219480a
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
push: true
build-args: |
GH_GA_ID=G-TP1XEFNHQD
GH_APP_KIND=polkaverse
GH_APP_KIND=grill
GH_HCAPTCHA_SITE_KEY=${{ secrets.PROD_HCAPTCHA_SITE_KEY }}
GH_AMP_ID=2eeca0e8a0163c89e3f023c971e426a6
GH_OFFCHAIN_SIGNER_URL=https://signer.subsocial.network
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/feature-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
push: true
build-args: |
GH_GA_ID=fake
GH_APP_KIND=polkaverse
GH_APP_KIND=grill
GH_HCAPTCHA_SITE_KEY=3beeddac-2dce-41cc-8e18-338118426c38
GH_AMP_ID=71bf5a46800fedba5e9a01243b988164
GH_OFFCHAIN_SIGNER_URL=https://signer.subsocial.network
Expand Down
42 changes: 9 additions & 33 deletions dev.env
Original file line number Diff line number Diff line change
@@ -1,42 +1,18 @@
# Logger level
NEXT_PUBLIC_LOG_LEVEL=debug

# App kind: 'polkaverse' | 'staging'
NEXT_PUBLIC_APP_KIND=polkaverse
# App kind: 'grill' | 'polkaverse' | 'staging'
NEXT_PUBLIC_APP_KIND=grill

# Connection kind:
# 'local' - For development in localhost infrastructure (local Substrate, IPFS, etc.)
# 'dev' - For development in betanet/mainnet infrastructure.
# 'staging' - For development in staging infrastructure.
# 'main' - If running this web app on a production server.
NEXT_PUBLIC_CONNECTION_KIND=staging

SELLER_CLIENT_ID=''
SELLER_CLIENT_TOKEN_SIGNER=''

# Id for Google Analytics
# NEXT_PUBLIC_GA_ID=

# NEXT_PUBLIC_ENABLE_MAINTENANCE_PAGE=true
# NEXT_PUBLIC_MAINTENANCE_TEXT=''

# NEXT_PUBLIC_SUBSTRATE_URL=
# NEXT_PUBLIC_SUBSTRATE_RPC_URL=
# NEXT_PUBLIC_OFFCHAIN_URL=
# NEXT_PUBLIC_OFFCHAIN_WS=
# NEXT_PUBLIC_GRAPHQL_URL=
# NEXT_PUBLIC_IPFS_NODE_URL=

# UI settings overwrite
# NEXT_PUBLIC_ENABLE_SEARCH=true
# NEXT_PUBLIC_ENABLE_FEED=true
# NEXT_PUBLIC_ENABLE_NOTIFICATIONS=true
# NEXT_PUBLIC_ENABLE_ACTIVITY=true
# NEXT_PUBLIC_ENABLE_SESSION_KEY=true
# NEXT_PUBLIC_ENABLE_EMAIL_SETTINGS=true
# NEXT_PUBLIC_ENABLE_FAUCET=true
# NEXT_PUBLIC_ENABLE_DOWNVOTES=true
# NEXT_PUBLIC_ENABLE_GRAPHQL=true
# NEXT_PUBLIC_ENABLE_CONTRIBUTION_PAGE=true
# NEXT_PUBLIC_ENABLE_ONCHAIN_ACTIVITIES=true
# NEXT_PUBLIC_ENABLE_SQUID_DATA_SOURCE=true
NEXT_PUBLIC_CONNECTION_KIND=main
NEXT_PUBLIC_GA_ID=
SERVER_MNEMONIC=
NEXT_PUBLIC_DATAHUB_QUERY_URL=
NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=
DATAHUB_QUEUE_URL
DATAHUB_QUEUE_TOKEN=
4 changes: 2 additions & 2 deletions localhost.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Logger level
LOG_LEVEL=debug

# App kind: 'polkaverse' | 'subsocial'
APP_KIND=subsocial
# App kind: 'grill' | 'polkaverse'
APP_KIND=grill

# Connection kind:
# 'local' - For development in localhost infrastructure (local Substrate, IPFS, etc.)
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require('dotenv').config()
const nextConfig = {
target: 'server',
images: {
domains: ['app.subsocial.network', 'polkaverse.com', 'localhost', 'ipfs.io'],
domains: ['app.subsocial.network', 'polkaverse.com', 'localhost', 'ipfs.io', 'grillapp.net'],
},
webpack: (config, { isServer }) => {
// This code for webpack 4
Expand Down
Binary file added public/images/grill-default-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/auth/signIn/SignInModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function SignInDesc() {
const isMobile = useIsMobileWidthOrDevice()
if (isMobile) {
if (hasInjectedWallet()) {
return <>To use Polkaverse, you need to connect your wallet</>
return <>To use {config.appName}, you need to connect your wallet</>
}
return (
<>To use PolkaVerse, you need a wallet to manage your account. We recommend Nova Wallet.</>
Expand Down
7 changes: 4 additions & 3 deletions src/components/leaderboard/ProgressModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import html2canvas from 'html2canvas'
import { useEffect, useState } from 'react'
import { ReactNode } from 'react-markdown'
import CustomModal from 'src/components/utils/CustomModal'
import config from 'src/config'
import { resolveIpfsUrl } from 'src/ipfs'
import { useFetchProfileSpace, useSelectProfile } from 'src/rtk/app/hooks'
import { useFetchUserPrevReward } from 'src/rtk/features/activeStaking/hooks'
Expand Down Expand Up @@ -273,7 +274,7 @@ function ProgressPanel({
})
}

const shareOnPolkaverse = () => {
const shareOnPlatform = () => {
const total = parseToBigInt(data?.earned.staker) + parseToBigInt(data?.earned.creator)
const { isZero, value } = formatSUB(total.toString())
const title = `I earned ${isZero ? '' : `${value} `}SUB ${
Expand Down Expand Up @@ -387,10 +388,10 @@ function ProgressPanel({
type='default'
ghost
size='large'
onClick={() => shareOnPolkaverse()}
onClick={() => shareOnPlatform()}
loading={loading}
>
Share on Polkaverse
Share on {config.appName}
</Button>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/leaderboard/common/LeaderboardTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Tabs } from 'antd'
import router from 'next/router'
import { useMyAddress } from 'src/components/auth/MyAccountsContext'
import CustomLink from 'src/components/referral/CustomLink'
import config from 'src/config'
import { useSendEvent } from 'src/providers/AnalyticContext'
import { useFetchTotalStake } from 'src/rtk/features/creators/totalStakeHooks'
import { getAmountRange } from 'src/utils/analytics'
Expand Down Expand Up @@ -65,7 +66,7 @@ export default function LeaderboardTabs({
<Tabs.TabPane
tab={
<CustomLink href='/stats' shallow passHref>
<a style={{ color: 'inherit' }}>Polkaverse Stats</a>
<a style={{ color: 'inherit' }}>{config.appName} Stats</a>
</CustomLink>
}
key='stats'
Expand Down
7 changes: 4 additions & 3 deletions src/components/posts/view-post/PostPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,19 @@ const InnerPostPage: NextPage<PostDetailsProps> = props => {
let metaTitle = title
const defaultMetaTitle = config.metaTags.title

// should forceTitle only when its using the space/owner name, to not include double Polkaverse name
// should forceTitle only when its using the space/owner name, to not include double app name
let forceTitle = false
if (!metaTitle) {
const owner = initialPostData.owner
const ownerName = owner?.content?.name.trim()
const ownerHandle = owner?.struct.handle?.trim()
const spaceName = initialPostData.space?.content?.name?.trim()
const onApp = `on ${config.appName}`
if (ownerName) {
metaTitle = `${ownerName} ` + (ownerHandle ? `@${ownerHandle} ` : '') + 'on Polkaverse'
metaTitle = `${ownerName} ` + (ownerHandle ? `@${ownerHandle} ` : '') + onApp
forceTitle = true
} else if (spaceName) {
metaTitle = `${spaceName} on Polkaverse`
metaTitle = `${spaceName} ${onApp}`
forceTitle = true
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/spaces/ViewSpacePage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FC } from 'react'
import config from 'src/config'
import { DEFAULT_PAGE_SIZE } from 'src/config/ListData.config'
import { getActivityCounts, getPostActivities } from 'src/graphql/apis'
import { initializeApollo } from 'src/graphql/client'
Expand Down Expand Up @@ -51,7 +52,7 @@ const InnerViewSpacePage: FC<Props> = props => {
<PageContent
meta={{
title,
desc: `Latest news and updates from ${name} on Polkaverse.`,
desc: `Latest news and updates from ${name} on ${config.appName}`,
image: customImage || image,
canonical: spaceUrl(spaceData.struct),
}}
Expand Down
91 changes: 91 additions & 0 deletions src/config/app/grill/featuredCreators.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
export default [
// Subsocial
'1',
// Bill's Polkadot Digest
'1354',
// The Kusamarian
'4809',
// Filippo W3F
'10124',
// Subsocial UXer's diary
'6163',
// Zeitgeist
'4306',
// Bifrost
'1013',
// Astar Network
'10802',
// Astar Network dApp Staking updates
'11132',
// Astar | Portuguese
'6917',
// Pitcoin
'6283',
// Polkadot Arena (Italian)
'7218',
// Dotsama Bulgaria
'10652',
// CryptoZilla
'11581',
// Polkadot Insider
'11157',
// Goku
'6953',
// Astar Korea
'11991',
// Beef's Travel Blog
'11220',
// Polkadot Arena
'7218',
// Dotcast
'10132',
// Cappex
'4855',
// Tony the trader
'12434',
// PolkaWarriors
'1573',
// Polkadotters
'10533',
// olehmell
'3',
// Jonas W3F (Parity)
'12616',

// HattyHats
'12658',
// Investigator515
'12667',
// Meet the Artist
'12689',
// Edmond22
'12705',
// Mango Juice
'12700',
// Community Highlights
'1244',
// WagMedia
'12332',
// WagMedia Weekly Newsletter
'6111',

// Yugocean
'12743',
// PVM
'12744',
// Crypto Wealth
'12704',
// Evergenius
'12735',
// alberdioni8406
'12733',
// Reiniscouple
'12784',

// dappforce.polka
'12814',
// jam10o
'9599',
// Makoto Takahiro
'12816',
]
36 changes: 36 additions & 0 deletions src/config/app/grill/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { AppConfig } from '../../types'
import featuredCreators from './featuredCreators'

const index: AppConfig = {
// App settings
appName: 'Grill',
appLogo: '/grill.svg',
mobileAppLogo: '/grill.svg',
appBaseUrl: 'https://grillapp.net',
themeName: undefined,
metaTags: {
siteName: 'Grill',
title: 'Grill.so: Monetize Every Like, Comment, Post | Web3 Social',
desc: 'Revolutionary Web3 social finance platform where bloggers and their followers earn together. Blockchain, NFT, and crypto content.',
defaultImage: '/grill-default-cover.png',
},
subnetId: undefined,
canonicalUrl: 'https://grillapp.net',
// app specific features
resolvedDomain: 'sub',
// Reserved spaces
lastReservedSpaceId: '1000',
claimedSpaceIds: ['1', '2', '3', '4', '5'],
recommendedSpaceIds: featuredCreators,
suggestedTlds: ['sub', 'polka'],
mutedAccounts: {
'3tPAVaHYAFRfUVpNP1DAq4E3BxTPanzkGN4uukn3b4ZAefkj': [
'3qz2AHix42fKyfdhenuVou9wCefVcGSMCQo9YzQDHqFyU2RF',
],
'3qz2AHix42fKyfdhenuVou9wCefVcGSMCQo9YzQDHqFyU2RF': [
'3tPAVaHYAFRfUVpNP1DAq4E3BxTPanzkGN4uukn3b4ZAefkj',
],
},
}

export default index
2 changes: 2 additions & 0 deletions src/config/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { appKind, appOverrides } from '../env'
import grill from './grill'
import polkaverse from './polkaverse'
import staging from './staging'

const apps = {
grill,
polkaverse,
staging,
}
Expand Down

0 comments on commit 219480a

Please sign in to comment.