Skip to content
Snippets Groups Projects
Commit 96429086 authored by Tim Steinmüller's avatar Tim Steinmüller
Browse files

Setup donation and purchase in navigation

parent b0ec7eeb
Branches
No related merge requests found
Pipeline #138144 passed with warnings with stages
in 3 minutes and 44 seconds
......@@ -2,7 +2,7 @@
"key": "default-navigation",
"de": {
"header": {
"slogan": "Willkommen auf »frag.jetzt« ! Du fragst. KI antwortet.",
"slogan": "Willkommen auf »frag.jetzt« ! Du fragst. KI antwortet.",
"myAccount": "Mein Konto",
"myStars": "Meine Bonus-Sterne",
"aiConsent": "KI-Datenschutz",
......@@ -28,7 +28,10 @@
"app": "Orte",
"home": "Startseite",
"myRooms": "Meine Räume",
"admin": "Administration"
"admin": "Administration",
"pricing": "Tarife",
"donation": "Spende",
"purchase": "KI-Kontingent"
},
"options": {
"about": "Über frag.jetzt",
......@@ -46,7 +49,7 @@
},
"en": {
"header": {
"slogan": "Welcome to »frag.jetzt« ! You ask. AI answers.",
"slogan": "Welcome to »frag.jetzt« ! You ask. AI answers.",
"myAccount": "My account",
"myStars": "My bonus stars",
"aiConsent": "AI privacy",
......@@ -72,7 +75,10 @@
"app": "Places",
"home": "Homepage",
"myRooms": "My rooms",
"admin": "Administration"
"admin": "Administration",
"pricing": "Pricing",
"donation": "Donation",
"purchase": "AI Quota"
},
"options": {
"about": "About frag.jetzt",
......@@ -90,7 +96,7 @@
},
"fr": {
"header": {
"slogan": "Bienvenue sur « frag.jetzt » ! Tu poses des questions. L'IA répond.",
"slogan": "Bienvenue sur « frag.jetzt » ! Tu poses des questions. L'IA répond.",
"myAccount": "Mon compte",
"myStars": "Mes étoiles bonus",
"aiConsent": "Confidentialité de l'IA",
......@@ -116,7 +122,10 @@
"app": "Lieux",
"home": "Page d'accueil",
"myRooms": "Mes salles",
"admin": "Administration"
"admin": "Administration",
"pricing": "Tarification",
"donation": "Don",
"purchase": "Contingent d'IA"
},
"options": {
"about": "À propos de frag.jetzt",
......
......@@ -183,6 +183,7 @@ export const getDefaultNavigation = (
// NAVIGATION
const isHome = router.url.startsWith('/home');
const isUser = router.url.startsWith('/user');
// app navigation
const navSection: M3NavigationSection = {
id: 'main',
kind: 'navigation',
......@@ -235,6 +236,37 @@ export const getDefaultNavigation = (
},
});
}
// app navigation
const isPurchse = router.url.startsWith('/purchase');
const isDonation = router.url.startsWith('/donation');
const pricingSection: M3NavigationSection = {
id: 'pricing',
kind: 'navigation',
title: i18n.navigation.pricing,
entries: [
{
id: 'donation',
title: i18n.navigation.donation,
icon: 'volunteer_activism',
onClick: () => {
// router.navigate(['/donation']);
return true;
},
activated: isDonation,
},
user &&
!user.isGuest && {
id: 'purchase',
title: i18n.navigation.purchase,
icon: 'payments',
onClick: () => {
// router.navigate(['/purchase']);
return true;
},
activated: isPurchse,
},
].filter(Boolean),
};
// OPTIONS
const optionSection: M3NavigationOptionSection = {
id: 'about',
......@@ -336,7 +368,7 @@ export const getDefaultNavigation = (
};
return {
title: i18n.navigation.title,
sections: [navSection, optionSection],
sections: [navSection, pricingSection, optionSection],
};
}),
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment