Skip to content

Commit

Permalink
chore(app): change all file-endings to lf
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasGassmann committed Feb 14, 2019
1 parent 05a8dab commit faa3321
Show file tree
Hide file tree
Showing 35 changed files with 1,839 additions and 1,838 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"trailingComma": "none",
"singleQuote": true,
"semi": false,
"htmlWhitespaceSensitivity": "ignore"
"htmlWhitespaceSensitivity": "ignore",
"endOfLine": "lf"
}
186 changes: 93 additions & 93 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,93 +1,93 @@
import { Component, ViewChild } from '@angular/core'
import { Deeplinks } from '@ionic-native/deeplinks'
import { SplashScreen } from '@ionic-native/splash-screen'
import { StatusBar } from '@ionic-native/status-bar'
import { TranslateService } from '@ngx-translate/core'
import { Platform, Nav } from 'ionic-angular'

import { TabsPage } from '../pages/tabs/tabs'

import { configureScope } from '@sentry/browser'
import { AppVersion } from '@ionic-native/app-version'
import { SchemeRoutingProvider } from '../providers/scheme-routing/scheme-routing'
import { handleErrorSentry, ErrorCategory } from '../providers/sentry-error-handler/sentry-error-handler'

@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav)
nav: Nav

rootPage: any = TabsPage

constructor(
private platform: Platform,
private statusBar: StatusBar,
private splashScreen: SplashScreen,
private translate: TranslateService,
private deeplinks: Deeplinks,
private appVersion: AppVersion,
private schemeRoutingProvider: SchemeRoutingProvider
) {
this.translate.setDefaultLang('en')
this.platform
.ready()
.then(() => {
if (platform.is('cordova')) {
this.statusBar.styleLightContent()
this.statusBar.backgroundColorByHexString('#00e8cc')
this.splashScreen.hide()
configureScope(scope => {
scope.addEventProcessor(async event => {
event.release = await this.appVersion.getVersionNumber()
return event
})
})
} else {
configureScope(scope => {
scope.addEventProcessor(async event => {
event.release = 'browser'
return event
})
})
}

this.translate.setDefaultLang('en')

const supportedLanguages = ['en', 'de', 'zh-cn']
const language = this.translate.getBrowserLang()

if (language) {
const lowerCaseLanguage = language.toLowerCase()
supportedLanguages.forEach(supportedLanguage => {
if (supportedLanguage.startsWith(lowerCaseLanguage)) {
this.translate.use(supportedLanguage)
}
})
}
})
.catch(err => console.log(err))
}

async ngAfterViewInit() {
await this.platform.ready()
this.deeplinks
.route({
'/': null
})
.subscribe(
match => {
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
console.log('Successfully matched route', JSON.stringify(match))
this.schemeRoutingProvider.handleNewSyncRequest(this.nav, match.$link.url).catch(handleErrorSentry(ErrorCategory.SCHEME_ROUTING))
},
nomatch => {
// nomatch.$link - the full link data
console.error("Got a deeplink that didn't match", JSON.stringify(nomatch))
}
)
}
}
import { Component, ViewChild } from '@angular/core'
import { Deeplinks } from '@ionic-native/deeplinks'
import { SplashScreen } from '@ionic-native/splash-screen'
import { StatusBar } from '@ionic-native/status-bar'
import { TranslateService } from '@ngx-translate/core'
import { Platform, Nav } from 'ionic-angular'

import { TabsPage } from '../pages/tabs/tabs'

import { configureScope } from '@sentry/browser'
import { AppVersion } from '@ionic-native/app-version'
import { SchemeRoutingProvider } from '../providers/scheme-routing/scheme-routing'
import { handleErrorSentry, ErrorCategory } from '../providers/sentry-error-handler/sentry-error-handler'

@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav)
nav: Nav

rootPage: any = TabsPage

constructor(
private platform: Platform,
private statusBar: StatusBar,
private splashScreen: SplashScreen,
private translate: TranslateService,
private deeplinks: Deeplinks,
private appVersion: AppVersion,
private schemeRoutingProvider: SchemeRoutingProvider
) {
this.translate.setDefaultLang('en')
this.platform
.ready()
.then(() => {
if (platform.is('cordova')) {
this.statusBar.styleLightContent()
this.statusBar.backgroundColorByHexString('#00e8cc')
this.splashScreen.hide()
configureScope(scope => {
scope.addEventProcessor(async event => {
event.release = await this.appVersion.getVersionNumber()
return event
})
})
} else {
configureScope(scope => {
scope.addEventProcessor(async event => {
event.release = 'browser'
return event
})
})
}

this.translate.setDefaultLang('en')

const supportedLanguages = ['en', 'de', 'zh-cn']
const language = this.translate.getBrowserLang()

if (language) {
const lowerCaseLanguage = language.toLowerCase()
supportedLanguages.forEach(supportedLanguage => {
if (supportedLanguage.startsWith(lowerCaseLanguage)) {
this.translate.use(supportedLanguage)
}
})
}
})
.catch(err => console.log(err))
}

async ngAfterViewInit() {
await this.platform.ready()
this.deeplinks
.route({
'/': null
})
.subscribe(
match => {
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
console.log('Successfully matched route', JSON.stringify(match))
this.schemeRoutingProvider.handleNewSyncRequest(this.nav, match.$link.url).catch(handleErrorSentry(ErrorCategory.SCHEME_ROUTING))
},
nomatch => {
// nomatch.$link - the full link data
console.error("Got a deeplink that didn't match", JSON.stringify(nomatch))
}
)
}
}
Loading

0 comments on commit faa3321

Please sign in to comment.