mirror of https://github.com/ghostfolio/ghostfolio
Thomas
4 years ago
committed by
GitHub
19 changed files with 100 additions and 129 deletions
@ -1,6 +1,6 @@ |
|||
export const environment = { |
|||
lastPublish: '{BUILD_TIMESTAMP}', |
|||
production: true, |
|||
stripePublicKey: '{STRIPE_PUBLIC_KEY}', |
|||
stripePublicKey: '', |
|||
version: `v${require('../../../../package.json').version}` |
|||
}; |
|||
|
@ -1,16 +1,33 @@ |
|||
import { enableProdMode } from '@angular/core'; |
|||
import { LOCALE_ID } from '@angular/core'; |
|||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; |
|||
import { InfoItem } from '@ghostfolio/common/interfaces'; |
|||
import { permissions } from '@ghostfolio/common/permissions'; |
|||
|
|||
import { AppModule } from './app/app.module'; |
|||
import { environment } from './environments/environment'; |
|||
|
|||
if (environment.production) { |
|||
enableProdMode(); |
|||
} |
|||
(async () => { |
|||
const response = await fetch('/api/info'); |
|||
const info: InfoItem = await response.json(); |
|||
|
|||
platformBrowserDynamic() |
|||
.bootstrapModule(AppModule, { |
|||
providers: [{ provide: LOCALE_ID, useValue: 'de-CH' }] |
|||
}) |
|||
.catch((err) => console.error(err)); |
|||
if (window.localStorage.getItem('utm_source') === 'trusted-web-activity') { |
|||
info.globalPermissions = info.globalPermissions.filter( |
|||
(permission) => permission !== permissions.enableSubscription |
|||
); |
|||
} |
|||
|
|||
(window as any).info = info; |
|||
|
|||
environment.stripePublicKey = info.stripePublicKey; |
|||
|
|||
if (environment.production) { |
|||
enableProdMode(); |
|||
} |
|||
|
|||
platformBrowserDynamic() |
|||
.bootstrapModule(AppModule, { |
|||
providers: [{ provide: LOCALE_ID, useValue: 'de-CH' }] |
|||
}) |
|||
.catch((err) => console.error(err)); |
|||
})(); |
|||
|
Loading…
Reference in new issue