diff --git a/apps/marketplace/public/.gitkeep b/apps/marketplace/public/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/marketplace/public/android-chrome-192x192.png b/apps/marketplace/public/android-chrome-192x192.png new file mode 100644 index 000000000..a1de19e64 Binary files /dev/null and b/apps/marketplace/public/android-chrome-192x192.png differ diff --git a/apps/marketplace/public/android-chrome-512x512.png b/apps/marketplace/public/android-chrome-512x512.png new file mode 100644 index 000000000..3c5950699 Binary files /dev/null and b/apps/marketplace/public/android-chrome-512x512.png differ diff --git a/apps/marketplace/public/apple-touch-icon.png b/apps/marketplace/public/apple-touch-icon.png new file mode 100644 index 000000000..bb565a931 Binary files /dev/null and b/apps/marketplace/public/apple-touch-icon.png differ diff --git a/apps/marketplace/public/browserconfig.xml b/apps/marketplace/public/browserconfig.xml new file mode 100644 index 000000000..5cd27e3f1 --- /dev/null +++ b/apps/marketplace/public/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #603cba + + + diff --git a/apps/marketplace/public/favicon-16x16.png b/apps/marketplace/public/favicon-16x16.png new file mode 100644 index 000000000..f8efc1075 Binary files /dev/null and b/apps/marketplace/public/favicon-16x16.png differ diff --git a/apps/marketplace/public/favicon-32x32.png b/apps/marketplace/public/favicon-32x32.png new file mode 100644 index 000000000..104731737 Binary files /dev/null and b/apps/marketplace/public/favicon-32x32.png differ diff --git a/apps/marketplace/public/favicon-dark.ico b/apps/marketplace/public/favicon-dark.ico new file mode 100644 index 000000000..a8fde5618 Binary files /dev/null and b/apps/marketplace/public/favicon-dark.ico differ diff --git a/apps/marketplace/public/favicon-light.ico b/apps/marketplace/public/favicon-light.ico new file mode 100644 index 000000000..64b74e057 Binary files /dev/null and b/apps/marketplace/public/favicon-light.ico differ diff --git a/apps/marketplace/public/manifest.json b/apps/marketplace/public/manifest.json new file mode 100644 index 000000000..714fa5030 --- /dev/null +++ b/apps/marketplace/public/manifest.json @@ -0,0 +1,20 @@ +{ + "short_name": "Marketplace", + "name": "NEWM Marketplace", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#000000" +} diff --git a/apps/marketplace/public/mstile-150x150.png b/apps/marketplace/public/mstile-150x150.png new file mode 100644 index 000000000..78c5d80fa Binary files /dev/null and b/apps/marketplace/public/mstile-150x150.png differ diff --git a/apps/marketplace/public/safari-pinned-tab.svg b/apps/marketplace/public/safari-pinned-tab.svg new file mode 100644 index 000000000..08ac188e0 --- /dev/null +++ b/apps/marketplace/public/safari-pinned-tab.svg @@ -0,0 +1,81 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + diff --git a/apps/marketplace/src/app/layout.tsx b/apps/marketplace/src/app/layout.tsx index 962116957..3f057bac2 100644 --- a/apps/marketplace/src/app/layout.tsx +++ b/apps/marketplace/src/app/layout.tsx @@ -13,6 +13,7 @@ import { StyledComponentsRegistry, UnsupportedBrowserBanner, } from "@newm-web/components"; +import { Favicon } from "@newm-web/elements"; import { Footer, Header, PingEarningsInProgressWrapper } from "../components"; import store from "../store"; import Toast from "../components/Toast"; @@ -30,6 +31,7 @@ const RootLayout: FunctionComponent = ({ children }) => { NEWM Marketplace + = ({ - - - The number of Stream Tokens correlates with the - percentage of streaming royalties you can acquire. - For example, 1 Stream Token equates to{ " " } - { `${getPercentageOfTotalStreamTokens(1)}` }% of the - track's total streaming royalties. For - information on what constitutes a streaming royalty, - please refer to the{ " " } - - - stream token contract - - - . - - } - > - - - - - - + + + The number of Stream Tokens correlates with the + percentage of streaming royalties you can + acquire. For example, 1 Stream Token equates to{ " " } + { `${getPercentageOfTotalStreamTokens(1)}` }% of + the track's total streaming royalties. For + information on what constitutes a streaming + royalty, please refer to the{ " " } + + + stream token contract + + + . + + } + > + + + + + + + + + + #603cba + + + diff --git a/apps/mobile-wallet-connector/public/favicon-16x16.png b/apps/mobile-wallet-connector/public/favicon-16x16.png new file mode 100644 index 000000000..f8efc1075 Binary files /dev/null and b/apps/mobile-wallet-connector/public/favicon-16x16.png differ diff --git a/apps/mobile-wallet-connector/public/favicon-32x32.png b/apps/mobile-wallet-connector/public/favicon-32x32.png new file mode 100644 index 000000000..104731737 Binary files /dev/null and b/apps/mobile-wallet-connector/public/favicon-32x32.png differ diff --git a/apps/mobile-wallet-connector/public/favicon-dark.ico b/apps/mobile-wallet-connector/public/favicon-dark.ico new file mode 100644 index 000000000..a8fde5618 Binary files /dev/null and b/apps/mobile-wallet-connector/public/favicon-dark.ico differ diff --git a/apps/mobile-wallet-connector/public/favicon-light.ico b/apps/mobile-wallet-connector/public/favicon-light.ico new file mode 100644 index 000000000..64b74e057 Binary files /dev/null and b/apps/mobile-wallet-connector/public/favicon-light.ico differ diff --git a/apps/mobile-wallet-connector/public/manifest.json b/apps/mobile-wallet-connector/public/manifest.json new file mode 100644 index 000000000..47a55bd12 --- /dev/null +++ b/apps/mobile-wallet-connector/public/manifest.json @@ -0,0 +1,20 @@ +{ + "short_name": "Mobile Wallet Connector", + "name": "NEWM Mobile Wallet Connector", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#000000" +} diff --git a/apps/mobile-wallet-connector/public/mstile-150x150.png b/apps/mobile-wallet-connector/public/mstile-150x150.png new file mode 100644 index 000000000..78c5d80fa Binary files /dev/null and b/apps/mobile-wallet-connector/public/mstile-150x150.png differ diff --git a/apps/mobile-wallet-connector/public/safari-pinned-tab.svg b/apps/mobile-wallet-connector/public/safari-pinned-tab.svg new file mode 100644 index 000000000..08ac188e0 --- /dev/null +++ b/apps/mobile-wallet-connector/public/safari-pinned-tab.svg @@ -0,0 +1,81 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + diff --git a/apps/mobile-wallet-connector/src/app/layout.tsx b/apps/mobile-wallet-connector/src/app/layout.tsx index d07bfba02..44f2f312f 100644 --- a/apps/mobile-wallet-connector/src/app/layout.tsx +++ b/apps/mobile-wallet-connector/src/app/layout.tsx @@ -12,6 +12,7 @@ import { UnsupportedBrowserBanner, } from "@newm-web/components"; import "global.css"; +import { Favicon } from "@newm-web/elements"; import store from "../store"; import { ConnectWallet, Toast } from "../components"; @@ -31,6 +32,7 @@ const RootLayout: FunctionComponent = ({ children }) => { content="Connect your wallet to the NEWM mobile app." name="description" /> + { isLoading, } = useGetSongQuery(songId); - const { data: clientConfig, isLoading: isClientConfigLoading } = - useGetStudioClientConfigQuery(); + const { webStudioManageMarketplaceSales } = useFlags(); const hasAccess = useHasSongAccess(songId); const isSongMintedOrReleased = [ @@ -79,13 +78,8 @@ const ViewDetails: FunctionComponent = () => { MintingStatus.Released, ].includes(mintingStatus); - const isManageMarketplaceSalesEnabled = - clientConfig?.featureFlags?.manageMarketplaceSalesEnabled ?? false; - const shouldRenderMarketplaceTab = - !isClientConfigLoading && - isSongMintedOrReleased && - isManageMarketplaceSalesEnabled; + isSongMintedOrReleased && webStudioManageMarketplaceSales; const handleChange = (event: SyntheticEvent, nextTab: number) => { setTab(nextTab); diff --git a/apps/studio/src/pages/home/wallet/Wallet.tsx b/apps/studio/src/pages/home/wallet/Wallet.tsx index 2311366f0..81fb7f964 100644 --- a/apps/studio/src/pages/home/wallet/Wallet.tsx +++ b/apps/studio/src/pages/home/wallet/Wallet.tsx @@ -33,6 +33,7 @@ import { convertNewmiesToUsd, } from "@newm-web/utils"; import { EarningsInProgress } from "@newm-web/types"; +import { useFlags } from "launchdarkly-react-client-sdk"; import Portfolio from "./portfolio/Portfolio"; import Transactions from "./transactions/Transactions"; import { LegacyPortfolio, LegacyUnclaimedRoyalties } from "./legacyWallet"; @@ -40,7 +41,6 @@ import { useGetAdaUsdConversionRateQuery, useGetNewmUsdConversionRateQuery, } from "../../../modules/crypto"; -import { useGetStudioClientConfigQuery } from "../../../modules/content"; import { setIsConnectWalletModalOpen } from "../../../modules/ui"; import { useAppDispatch, useAppSelector } from "../../../common"; import { DisconnectWalletButton } from "../../../components"; @@ -89,8 +89,7 @@ const Wallet: FunctionComponent = () => { const [earningsInProgress, setEarningsInProgress] = useState(); const { wallet } = useConnectWallet(); - const { data: clientConfig, isLoading: isClientConfigLoading } = - useGetStudioClientConfigQuery(); + const { webStudioClaimWalletEarnings } = useFlags(); const { walletAddress = "" } = useAppSelector(selectWallet); const { data: earningsData, @@ -112,8 +111,6 @@ const Wallet: FunctionComponent = () => { const preConvertedUsdPrice = newmUsdConversionRate?.usdPrice ?? 0; const { earnings = [], amountCborHex = "" } = earningsData || {}; - const isClaimWalletRoyaltiesEnabled = - clientConfig?.featureFlags?.claimWalletRoyaltiesEnabled ?? false; const unclaimedEarnings = earnings?.filter((earning) => !earning.claimed) || []; const unclaimedEarningsInNewmies = @@ -189,11 +186,8 @@ const Wallet: FunctionComponent = () => { }; }, [handleSaleEndPending]); - // Don't show any content until client config has loaded - if (isClientConfigLoading) return; - // Current State of the Wallet Page - if (!isClaimWalletRoyaltiesEnabled) { + if (!webStudioClaimWalletEarnings) { return ( diff --git a/apps/tools/public/.gitkeep b/apps/tools/public/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/tools/public/android-chrome-192x192.png b/apps/tools/public/android-chrome-192x192.png new file mode 100644 index 000000000..a1de19e64 Binary files /dev/null and b/apps/tools/public/android-chrome-192x192.png differ diff --git a/apps/tools/public/android-chrome-512x512.png b/apps/tools/public/android-chrome-512x512.png new file mode 100644 index 000000000..3c5950699 Binary files /dev/null and b/apps/tools/public/android-chrome-512x512.png differ diff --git a/apps/tools/public/apple-touch-icon.png b/apps/tools/public/apple-touch-icon.png new file mode 100644 index 000000000..bb565a931 Binary files /dev/null and b/apps/tools/public/apple-touch-icon.png differ diff --git a/apps/tools/public/browserconfig.xml b/apps/tools/public/browserconfig.xml new file mode 100644 index 000000000..5cd27e3f1 --- /dev/null +++ b/apps/tools/public/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #603cba + + + diff --git a/apps/tools/public/favicon-16x16.png b/apps/tools/public/favicon-16x16.png new file mode 100644 index 000000000..f8efc1075 Binary files /dev/null and b/apps/tools/public/favicon-16x16.png differ diff --git a/apps/tools/public/favicon-32x32.png b/apps/tools/public/favicon-32x32.png new file mode 100644 index 000000000..104731737 Binary files /dev/null and b/apps/tools/public/favicon-32x32.png differ diff --git a/apps/tools/public/favicon-dark.ico b/apps/tools/public/favicon-dark.ico new file mode 100644 index 000000000..a8fde5618 Binary files /dev/null and b/apps/tools/public/favicon-dark.ico differ diff --git a/apps/tools/public/favicon-light.ico b/apps/tools/public/favicon-light.ico new file mode 100644 index 000000000..64b74e057 Binary files /dev/null and b/apps/tools/public/favicon-light.ico differ diff --git a/apps/tools/public/manifest.json b/apps/tools/public/manifest.json new file mode 100644 index 000000000..28e14b9c8 --- /dev/null +++ b/apps/tools/public/manifest.json @@ -0,0 +1,20 @@ +{ + "short_name": "Tools", + "name": "NEWM Tools", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#000000" +} diff --git a/apps/tools/public/mstile-150x150.png b/apps/tools/public/mstile-150x150.png new file mode 100644 index 000000000..78c5d80fa Binary files /dev/null and b/apps/tools/public/mstile-150x150.png differ diff --git a/apps/tools/public/safari-pinned-tab.svg b/apps/tools/public/safari-pinned-tab.svg new file mode 100644 index 000000000..08ac188e0 --- /dev/null +++ b/apps/tools/public/safari-pinned-tab.svg @@ -0,0 +1,81 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + diff --git a/apps/tools/src/app/layout.tsx b/apps/tools/src/app/layout.tsx index b25454894..4ab1911ad 100644 --- a/apps/tools/src/app/layout.tsx +++ b/apps/tools/src/app/layout.tsx @@ -10,6 +10,7 @@ import { } from "@newm-web/components"; import theme from "@newm-web/theme"; import "global.css"; +import { Favicon } from "@newm-web/elements"; interface RootLayoutProps { readonly children: ReactNode; @@ -27,6 +28,7 @@ const RootLayout: FunctionComponent = ({ children }) => { content="Elevate your NEWM music experience with these set of tools." name="description" /> + { + const { webMarketplaceLaunchBanner } = useFlags(); + + return ( +
+ {webMarketplaceLaunchBanner ? ( +

The launch banner feature is enabled!

+ ) : ( +

The launch banner feature is disabled.

+ )} +
+ ); +}; + +export default MyComponent; +``` + +Note that even though the flag name in LD is `kebab-case`, we are able to access it `camelCase` in our app. diff --git a/packages/elements/src/index.ts b/packages/elements/src/index.ts index bdf3c503a..a3eb63daa 100644 --- a/packages/elements/src/index.ts +++ b/packages/elements/src/index.ts @@ -63,3 +63,4 @@ export * from "./lib/UploadSong"; export * from "./lib/skeleton"; export { default as SideBarNavLink } from "./lib/SideBarNavLink"; export { default as SideBarHeader } from "./lib/SideBarHeader"; +export { default as Favicon } from "./lib/Favicon"; diff --git a/packages/elements/src/lib/Favicon.tsx b/packages/elements/src/lib/Favicon.tsx new file mode 100644 index 000000000..5cf9512e6 --- /dev/null +++ b/packages/elements/src/lib/Favicon.tsx @@ -0,0 +1,44 @@ +/** + * Favicon component for including standard favicon and branding images. + * NOTE: Ensure that the corresponding favicon files (e.g., favicon-dark.ico, favicon-32x32.png) + * are placed in the `public` directory of your app for proper rendering. + */ +const Favicon = () => { + return ( + <> + + + + + + + + + ); +}; + +export default Favicon;