Skip to content

Commit

Permalink
fix: Fix Hubs Explorer Access URL - MEED-7526 - Meeds-io/meeds#2421
Browse files Browse the repository at this point in the history
This change will allow to access Hubs explorer via uri /hubs.
  • Loading branch information
boubaker committed Sep 24, 2024
1 parent eacb383 commit 10f343e
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ public class RequestDispatcherFilter extends HttpFilter {
"/whitepaper",
"/about-us",
"/legals",
"/tour");
"/tour",
"/hubs");

protected static final List<String> STATIC_PATHS_FR = Arrays.asList("/pourquoi-meeds",
"/livre-blanc",
"/qui-sommes-nous",
"/mentions-legales",
"/visite-guidee");
"/visite-guidee",
"/rejoindre-hubs");

protected static final List<String> STATIC_PATHS =
Stream.concat(STATIC_PATHS_EN.stream(), STATIC_PATHS_FR.stream())
Expand All @@ -85,6 +87,7 @@ public class RequestDispatcherFilter extends HttpFilter {
"/buy",
"/mint",
"/farm",
"/hubs",
"/tokenomics");

protected static final List<String> DAPP_PATHS_FR_UNCOM = Arrays.asList("/place-de-marche",
Expand All @@ -93,7 +96,8 @@ public class RequestDispatcherFilter extends HttpFilter {
"/portefeuille",
"/rejoindre-dao",
"/accueil",
"/acheter");
"/acheter",
"/rejoindre-hubs");

protected static final List<String> DAPP_PATHS_FR_COMM = Arrays.asList("/mint",
"/farm",
Expand Down Expand Up @@ -147,11 +151,11 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
response.setHeader("Location", "/");
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
return;
} else if (servletPath.equals("/home") || servletPath.equals("/hubs")) {
} else if (servletPath.equals("/home")) {
response.setHeader("Location", "/");
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
return;
} else if (servletPath.equals("/fr/accueil") || servletPath.equals("/fr/rejoindre-hubs")) {
} else if (servletPath.equals("/fr/accueil")) {
response.setHeader("Location", "/fr");
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
return;
Expand Down
15 changes: 15 additions & 0 deletions deeds-dapp-webapp/src/main/webapp/WEB-INF/metadata/hubs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<title>#{metadata.home.pageTitle}</title>
<meta name="description" content="#{metadata.home.pageDescription}">
<link rel="canonical" href="https://www.meeds.io${servletPath}">
<meta property="og:locale" content="${lang}">
<link rel="alternate" href="https://www.meeds.io/fr/rejoindre-hubs" hreflang="fr"/>
<link rel="alternate" href="https://www.meeds.io/hubs" hreflang="en"/>
<link rel="alternate" href="https://www.meeds.io/dapp/fr/rejoindre-hubs" hreflang="fr"/>
<link rel="alternate" href="https://www.meeds.io/dapp/hubs" hreflang="en"/>
<meta property="og:image:secure_url" content="https://www.meeds.io/static/images/white_thumbnail.png"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:image:alt" content="#{metadata.home.imageAlt}"/>
<meta property="og:image:type" content="image/png"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:title" content="#{metadata.home.twitterTitle}"/>
5 changes: 5 additions & 0 deletions deeds-dapp-webapp/src/main/webapp/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<lastmod>2023-11-08</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://www.meeds.io/hubs</loc>
<lastmod>2024-09-24</lastmod>
<priority>0.90</priority>
</url>
<url>
<loc>https://www.meeds.io/tour</loc>
<lastmod>2023-04-17</lastmod>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
class="font-size-normal font-weight-black text-uppercase mb-3">
{{ $t('workMetaverse.title') }}</span>
<a
:href="homeUrl"
:href="hubsUrl"
:class="textColor"
class="no-decoration mt-2">
{{ $t('joinHubs') }}
Expand Down Expand Up @@ -202,7 +202,7 @@ export default {
tenantsURL: state => state.tenantsURL,
mintUrl: state => state.mintUrl,
whitepaperURL: state => state.whitepaperURL,
homeUrl: state => state.homeUrl,
hubsUrl: state => state.hubsUrl,
whyMeedsUrl: state => state.whyMeedsUrl,
dark: state => state.dark,
staticPage: state => state.staticPage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div v-if="staticPage || buypage">
<v-btn
id="tbHubs-button"
:href="homeUrl"
:href="hubsUrl"
class="px-4 font-weight-black letter-spacing-normal"
color="primary"
outlined>
Expand Down Expand Up @@ -84,7 +84,7 @@ export default {
whiteThemeColor: state => state.whiteThemeColor,
parentLocation: state => state.parentLocation,
staticPage: state => state.staticPage,
homeUrl: state => state.homeUrl,
hubsUrl: state => state.hubsUrl,
isMobile: state => state.isMobile,
buyMeedsLink: state => state.buyMeedsLink,
page: state => state.page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const Buy = { template: '<deeds-buy-hubs />' };
const StaticPageContent = { template: '<deeds-static-page-content />' };

export default {
'/': Hubs,
'/hubs': Hubs,
'/rejoindre-hubs': Hubs,
'/about-us': StaticPageContent,
'/why-meeds': StaticPageContent,
'/legals': StaticPageContent,
Expand Down
7 changes: 5 additions & 2 deletions deeds-dapp-webapp/src/main/webapp/vue-app/dapp/main-dapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ const pageUriPerLanguages = {
'owners',
'tenants',
'why-meeds',
'buy'
'buy',
'hubs'
],
uriPrefix: '',
},
Expand All @@ -307,7 +308,8 @@ const pageUriPerLanguages = {
'proprietaires',
'locataires',
'pourquoi-meeds',
'acheter'
'acheter',
'rejoindre-hubs'
],
uriPrefix: 'fr/',
},
Expand Down Expand Up @@ -511,6 +513,7 @@ const store = new Vuex.Store({
tenantsURL: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[9]}`,
whyMeedsUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[10]}`,
buyUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[11]}`,
hubsUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].pages[12]}`,
farmURL: null,
formLink: 'https://s7afi1uwdjh.typeform.com/to/FkNcXC0p',
buyMeedsLink: 'https://app.paraswap.io/#/0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE-0x8503a7b00b4b52692cc6c14e5b96f142e30547b7/0/SELL?network=ethereum',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const store = new Vuex.Store({
tenantsURL: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[9]}`,
whyMeedsUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[10]}`,
buyUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].uriPrefix}${pageUriPerLanguages[language].pages[11]}`,
hubsUrl: `${window.parentAppLocation}/${pageUriPerLanguages[language].pages[12]}`,
farmURL: null,
},
mutations: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="d-flex justify-center justify-md-start mb-12 mb-md-0">
<v-btn
id="hExplore-button"
:href="homeUrl"
:href="hubsUrl"
height="60px"
class="primary px-8"
depressed
Expand Down Expand Up @@ -206,7 +206,7 @@
<div class="d-flex justify-center">
<v-btn
id="hContributor-button"
:href="homeUrl"
:href="hubsUrl"
height="60px"
class="px-8 my-6 primary"
dark
Expand Down Expand Up @@ -339,7 +339,7 @@ export default {
tourURL: state => state.tourURL,
whitepaperURL: state => state.whitepaperURL,
buyUrl: state => state.buyUrl,
homeUrl: state => state.homeUrl,
hubsUrl: state => state.hubsUrl,
}),
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</v-btn>
<v-btn
id="tExplore-button"
:href="homeUrl"
:href="hubsUrl"
height="60px"
class="px-8 mx-5 mt-7"
color="primary"
Expand Down Expand Up @@ -285,7 +285,7 @@ export default {
perksVideoLink: state => state.perksVideoLink,
teamworkVideoLink: state => state.teamworkVideoLink,
buyUrl: state => state.buyUrl,
homeUrl: state => state.homeUrl,
hubsUrl: state => state.hubsUrl,
dark: state => state.dark,
isSmallScreen() {
return this.$vuetify.breakpoint.mdAndDown;
Expand Down

0 comments on commit 10f343e

Please sign in to comment.