Skip to content

Commit

Permalink
NFT UI
Browse files Browse the repository at this point in the history
1aerostorm committed Sep 11, 2023
1 parent cc3352d commit 88996ab
Showing 18 changed files with 1,172 additions and 41 deletions.
12 changes: 10 additions & 2 deletions app/ResolveRoute.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
export const routeRegex = {
UserProfile1: /^\/(@[\w\.\d-]+)\/?$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(transfers|assets|create-asset|invites|curation-rewards|author-rewards|donates-from|donates-to|filled-orders|permissions|created|password|witness|settings)\/??(?:&?[^=&]*=[^=&]*)*$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(transfers|assets|create-asset|invites|curation-rewards|author-rewards|donates-from|donates-to|nft|nft-collections|filled-orders|permissions|created|password|witness|settings)\/??(?:&?[^=&]*=[^=&]*)*$/,
UserProfile3: /^\/(@[\w\.\d-]+)\/[\w\.\d-]+/,
UserAssetEndPoints: /^\/(@[\w\.\d-]+)\/assets\/([\w\d.-]+)\/(update|transfer)$/,
UserEndPoints: /^(transfers|assets|create-asset|invites|curation-rewards|author-rewards|donates-from|donates-to|filled-orders|permissions|created|password|witness|settings)$/,
UserEndPoints: /^(transfers|assets|create-asset|invites|curation-rewards|author-rewards|donates-from|donates-to|nft|nft-collections|filled-orders|permissions|created|password|witness|settings)$/,
WorkerSort: /^\/workers\/([\w\d\-]+)\/?($|\?)/,
WorkerSearchByAuthor: /^\/workers\/([\w\d\-]+)\/(\@[\w\d.-]+)\/?($|\?)/,
WorkerRequest: /^\/workers\/([\w\d\-]+)\/(\@[\w\d.-]+)\/([\w\d-]+)\/?($|\?)/,
MarketPair: /^\/market\/([\w\d\.]+)\/([\w\d.]+)\/?($|\?)/,
ConvertPair: /^\/convert\/([\w\d\.]+)\/([\w\d.]+)\/?($|\?)/,
NFTMarket: /^\/nft-market\/([\w\d\.]+)\/?($|\?)/,
UserJson: /^\/(@[\w\.\d-]+)(\.json)$/,
UserNameJson: /^.*(?=(\.json))/
};
@@ -89,5 +90,12 @@ export default function resolveRoute(path)
if (match) {
return {page: 'ConvertAssetsPage', params: match.slice(1)}
}
if (path === '/nft-market') {
return {page: 'NFTMarketPage'}
}
match = path.match(routeRegex.NFTMarket);
if (match) {
return {page: 'NFTMarketPage', params: match.slice(1)}
}
return {page: 'NotFound'};
}
2 changes: 2 additions & 0 deletions app/RootRoute.js
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ export default {
cb(null, [require('@pages/UserProfile')]);
} else if (route.page === 'ConvertAssetsPage') {
cb(null, [require('@pages/ConvertAssetsPage')]);
} else if (route.page === 'NFTMarketPage') {
cb(null, [require('@pages/NFTMarketPage')]);
} else if (route.page === 'Market') {
cb(null, [require('@pages/MarketLoader')]);
} else if (route.page === 'Rating') {
2 changes: 2 additions & 0 deletions app/components/all.scss
Original file line number Diff line number Diff line change
@@ -67,6 +67,8 @@
@import "./modules/Powerdown.scss";
@import "./modules/QuickBuy.scss";
@import "./modules/Modals";
@import "./modules/nft/CreateNFTCollection";
@import "./modules/nft/IssueNFTToken";

// pages
@import "./pages/Exchanges";
20 changes: 11 additions & 9 deletions app/components/modules/Header.jsx
Original file line number Diff line number Diff line change
@@ -91,23 +91,25 @@ class Header extends React.Component {
const name = acct_meta ? normalizeProfile(acct_meta.toJS()).name : null;
const user_title = name ? `${name} (@${user_name})` : user_name;
page_title = user_title;
if(route.params[1] === "curation-rewards"){
if (route.params[1] === "curation-rewards"){
page_title = tt('header_jsx.curation_rewards_by') + " " + user_title;
}
if(route.params[1] === "author-rewards"){
} else if (route.params[1] === "author-rewards"){
page_title = tt('header_jsx.author_rewards_by') + " " + user_title;
}
if(route.params[1] === "donates-from"){
} else if (route.params[1] === "donates-from"){
page_title = tt('header_jsx.donates_from') + " " + user_title;
}
if(route.params[1] === "donates-to"){
} else if (route.params[1] === "donates-to"){
page_title = tt('header_jsx.donates_to') + " " + user_title;
}
if(route.params[1] === "recent-replies"){
} else if (route.params[1] === "recent-replies"){
page_title = tt('header_jsx.replies_to') + " " + user_title;
} else if (route.params[1] === "nft"){
page_title = tt('header_jsx.nft_tokens') + " " + user_title
} else if (route.params[1] === "nft-collections"){
page_title = tt('header_jsx.nft_collections') + " " + user_title
}
} else if (route.page === 'ConvertAssetsPage') {
page_title = tt('g.convert_assets')
} else if (route.page === `NFTMarketPage`){
page_title = tt('header_jsx.nft_market')
} else {
page_name = ''; //page_title = route.page.replace( /([a-z])([A-Z])/g, '$1 $2' ).toLowerCase();
}
Loading

0 comments on commit 88996ab

Please sign in to comment.