|
1 |
| -import type { lazy } from "@tutao/tutanota-utils" |
2 |
| -import { downcast, typedEntries } from "@tutao/tutanota-utils" |
| 1 | +import { downcast, lazy, typedEntries } from "@tutao/tutanota-utils" |
3 | 2 | import type { TranslationKeyType } from "./TranslationKey"
|
4 | 3 | import { getWhitelabelCustomizations, WhitelabelCustomizations } from "./WhitelabelCustomizations"
|
5 | 4 | import { assertMainOrNodeBoot } from "../api/common/Env"
|
@@ -194,34 +193,69 @@ export const languageNative: ReadonlyArray<{
|
194 | 193 | }
|
195 | 194 | })
|
196 | 195 |
|
197 |
| -export const enum InfoLink { |
198 |
| - HomePage = "https://tuta.com", |
199 |
| - About = "https://tuta.com/imprint", |
| 196 | +// Modifiable so `app.js` can initialize it to the website urls in the domain config |
| 197 | +export let InfoLinks = { |
| 198 | + HomePage: "https://tuta.com", |
| 199 | + About: `https://tuta.com/imprint`, |
200 | 200 | //terms
|
201 |
| - Terms = "https://tuta.com/terms", |
202 |
| - Privacy = "https://tuta.com/privacy-policy", |
203 |
| - GiftCardsTerms = "https://tuta.com/giftCardsTerms", |
| 201 | + Terms: `https://tuta.com/terms`, |
| 202 | + Privacy: `https://tuta.com/privacy-policy`, |
| 203 | + GiftCardsTerms: `https://tuta.com/giftCardsTerms`, |
204 | 204 | //faq
|
205 |
| - RecoverCode = "https://tuta.com/faq#reset", |
206 |
| - SecondFactor = "https://tuta.com/faq#2fa", |
207 |
| - SpamRules = "https://tuta.com/faq#spam", |
208 |
| - DomainInfo = "https://tuta.com/faq#custom-domain", |
209 |
| - Whitelabel = "https://tuta.com/faq#whitelabel", |
210 |
| - ReferralLink = "https://tuta.com/faq#refer-a-friend", |
211 |
| - Webview = "https://tuta.com/faq#webview", |
212 |
| - Phishing = "https://tuta.com/faq#phishing", |
213 |
| - MailAuth = "https://tuta.com/faq#mail-auth", |
214 |
| - RunInBackground = "https://tuta.com/faq#tray-desktop", |
215 |
| - LoadImages = "https://tuta.com/faq#load-images", |
216 |
| - Usage = "https://tuta.com/faq#usage", |
217 |
| - Download = "https://tuta.com/#download", |
218 |
| - SharedMailboxes = "https://tuta.com/support/#shared-mailboxes", |
219 |
| - InactiveAccounts = "https://tuta.com/faq/#inactive-accounts", |
220 |
| - AppStorePaymentChange = "https://tuta.com/support/#appstore-payment-change", |
221 |
| - AppStorePayment = "https://tuta.com/support/#appstore-payments", |
222 |
| - AppStoreDowngrade = "https://tuta.com/support/#appstore-subscription-downgrade", |
223 |
| - PasswordGenerator = "https://tuta.com/faq#passphrase-generator", |
224 |
| - HomePageFreeSignup = "https://tuta.com/free-email", |
| 205 | + RecoverCode: `https://tuta.com/faq#reset`, |
| 206 | + SecondFactor: `https://tuta.com/faq#2fa`, |
| 207 | + SpamRules: `https://tuta.com/faq#spam`, |
| 208 | + DomainInfo: `https://tuta.com/faq#custom-domain`, |
| 209 | + Whitelabel: `https://tuta.com/faq#whitelabel`, |
| 210 | + ReferralLink: `https://tuta.com/faq#refer-a-friend`, |
| 211 | + Webview: `https://tuta.com/faq#webview`, |
| 212 | + Phishing: `https://tuta.com/faq#phishing`, |
| 213 | + MailAuth: `https://tuta.com/faq#mail-auth`, |
| 214 | + RunInBackground: `https://tuta.com/faq#tray-desktop`, |
| 215 | + LoadImages: `https://tuta.com/faq#load-images`, |
| 216 | + Usage: `https://tuta.com/faq#usage`, |
| 217 | + Download: `https://tuta.com/#download`, |
| 218 | + SharedMailboxes: `https://tuta.com/support/#shared-mailboxes`, |
| 219 | + InactiveAccounts: `https://tuta.com/faq/#inactive-accounts`, |
| 220 | + AppStorePaymentChange: `https://tuta.com/support/#appstore-payment-change`, |
| 221 | + AppStorePayment: `https://tuta.com/support/#appstore-payments`, |
| 222 | + AppStoreDowngrade: `https://tuta.com/support/#appstore-subscription-downgrade`, |
| 223 | + PasswordGenerator: `https://tuta.com/faq#passphrase-generator`, |
| 224 | + HomePageFreeSignup: `https://tuta.com/free-email`, |
| 225 | +} |
| 226 | +export type InfoLink = (typeof InfoLinks)[keyof typeof InfoLinks] |
| 227 | + |
| 228 | +// Updates the website links in `InfoLinks` to use `websiteUrl` as the root |
| 229 | +export function setInfoLinks(websiteUrl: string) { |
| 230 | + InfoLinks = { |
| 231 | + HomePage: websiteUrl, |
| 232 | + About: `${websiteUrl}/imprint`, |
| 233 | + //terms |
| 234 | + Terms: `${websiteUrl}/terms`, |
| 235 | + Privacy: `${websiteUrl}/privacy-policy`, |
| 236 | + GiftCardsTerms: `${websiteUrl}/giftCardsTerms`, |
| 237 | + //faq |
| 238 | + RecoverCode: `${websiteUrl}/faq#reset`, |
| 239 | + SecondFactor: `${websiteUrl}/faq#2fa`, |
| 240 | + SpamRules: `${websiteUrl}/faq#spam`, |
| 241 | + DomainInfo: `${websiteUrl}/faq#custom-domain`, |
| 242 | + Whitelabel: `${websiteUrl}/faq#whitelabel`, |
| 243 | + ReferralLink: `${websiteUrl}/faq#refer-a-friend`, |
| 244 | + Webview: `${websiteUrl}/faq#webview`, |
| 245 | + Phishing: `${websiteUrl}/faq#phishing`, |
| 246 | + MailAuth: `${websiteUrl}/faq#mail-auth`, |
| 247 | + RunInBackground: `${websiteUrl}/faq#tray-desktop`, |
| 248 | + LoadImages: `${websiteUrl}/faq#load-images`, |
| 249 | + Usage: `${websiteUrl}/faq#usage`, |
| 250 | + Download: `${websiteUrl}/#download`, |
| 251 | + SharedMailboxes: `${websiteUrl}/support/#shared-mailboxes`, |
| 252 | + InactiveAccounts: `${websiteUrl}/faq/#inactive-accounts`, |
| 253 | + AppStorePaymentChange: `${websiteUrl}/support/#appstore-payment-change`, |
| 254 | + AppStorePayment: `${websiteUrl}/support/#appstore-payments`, |
| 255 | + AppStoreDowngrade: `${websiteUrl}/support/#appstore-subscription-downgrade`, |
| 256 | + PasswordGenerator: `${websiteUrl}/faq#passphrase-generator`, |
| 257 | + HomePageFreeSignup: `${websiteUrl}/free-email`, |
| 258 | + } |
225 | 259 | }
|
226 | 260 |
|
227 | 261 | /**
|
|
0 commit comments