Skip to content

Commit

Permalink
[@dhealthdapps/frontend] fix(screens): add legal json for related scr…
Browse files Browse the repository at this point in the history
…eens
  • Loading branch information
kravchenkodhealth authored and evias committed Jan 12, 2023
1 parent 970f979 commit d888ee6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/dapp-frontend-vue/resources/i18n/en/Legal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"legal": {
"terms-and-conditions": {
"title": "WEBSITE TERMS AND CONDITIONS",
"main_text": "Welcome to elevate.dhealth.com (hereinafter referred to as the “Website”, “We,” “Us,” or “Our”), owned and operated by dHealth Foundation (hereinafter referred to as “the Foundation”) with its registered office located at Dammstrasse 16, 6300 Zug Switzerland. The Website is offered to You conditioned on Your acceptance without modification of the Terms, Conditions, and notices contained herein (the \"Terms\"). "
}
}
}
2 changes: 2 additions & 0 deletions runtime/dapp-frontend-vue/resources/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import loginTranslations from "./en/LoginScreen.json";
import dashboardTranslations from "./en/Dashboard.json";
import settingsTranslations from "./en/Settings.json";
import activitiesTranslations from "./en/Activities.json";
import legalTranslations from "./en/Legal.json";

// bundle all .JSON together
export default {
Expand All @@ -24,4 +25,5 @@ export default {
...dashboardTranslations,
...settingsTranslations,
...activitiesTranslations,
...legalTranslations,
};
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ export default class LegalDisclaimer extends MetaView {
};
}

get legalData() {
const currentKey = this.$route.name?.split(".")[1];
const currentLegalItem = this.$t(`legal.${currentKey}`);
if (currentKey && currentLegalItem) {
return currentLegalItem;
}

return this.$t("legal.terms-and-conditions");
}

/**
* This computed returns configuration according to current legal page
*
Expand Down

0 comments on commit d888ee6

Please sign in to comment.