├── .editorconfig
├── .gitignore
├── config.xml
├── ionic.config.json
├── package-lock.json
├── package.json
├── resources
├── README.md
├── android
│ ├── icon
│ │ ├── drawable-hdpi-icon.png
│ │ ├── drawable-ldpi-icon.png
│ │ ├── drawable-mdpi-icon.png
│ │ ├── drawable-xhdpi-icon.png
│ │ ├── drawable-xxhdpi-icon.png
│ │ └── drawable-xxxhdpi-icon.png
│ └── splash
│ │ ├── drawable-land-hdpi-screen.png
│ │ ├── drawable-land-ldpi-screen.png
│ │ ├── drawable-land-mdpi-screen.png
│ │ ├── drawable-land-xhdpi-screen.png
│ │ ├── drawable-land-xxhdpi-screen.png
│ │ ├── drawable-land-xxxhdpi-screen.png
│ │ ├── drawable-port-hdpi-screen.png
│ │ ├── drawable-port-ldpi-screen.png
│ │ ├── drawable-port-mdpi-screen.png
│ │ ├── drawable-port-xhdpi-screen.png
│ │ ├── drawable-port-xxhdpi-screen.png
│ │ └── drawable-port-xxxhdpi-screen.png
├── icon.png
├── ios
│ ├── icon
│ │ ├── icon-1024.png
│ │ ├── icon-40.png
│ │ ├── icon-40@2x.png
│ │ ├── icon-40@3x.png
│ │ ├── icon-50.png
│ │ ├── icon-50@2x.png
│ │ ├── icon-60.png
│ │ ├── icon-60@2x.png
│ │ ├── icon-60@3x.png
│ │ ├── icon-72.png
│ │ ├── icon-72@2x.png
│ │ ├── icon-76.png
│ │ ├── icon-76@2x.png
│ │ ├── icon-83.5@2x.png
│ │ ├── icon-small.png
│ │ ├── icon-small@2x.png
│ │ ├── icon-small@3x.png
│ │ ├── icon.png
│ │ └── icon@2x.png
│ └── splash
│ │ ├── Default-568h@2x~iphone.png
│ │ ├── Default-667h.png
│ │ ├── Default-736h.png
│ │ ├── Default-Landscape-736h.png
│ │ ├── Default-Landscape@2x~ipad.png
│ │ ├── Default-Landscape@~ipadpro.png
│ │ ├── Default-Landscape~ipad.png
│ │ ├── Default-Portrait@2x~ipad.png
│ │ ├── Default-Portrait@~ipadpro.png
│ │ ├── Default-Portrait~ipad.png
│ │ ├── Default@2x~iphone.png
│ │ ├── Default@2x~universal~anyany.png
│ │ └── Default~iphone.png
└── splash.png
├── src
├── app
│ ├── app.component.ts
│ ├── app.html
│ ├── app.module.ts
│ ├── app.scss
│ └── main.ts
├── assets
│ ├── icon
│ │ └── favicon.ico
│ └── imgs
│ │ └── logo.png
├── index.html
├── manifest.json
├── pages
│ └── home
│ │ ├── home.html
│ │ ├── home.scss
│ │ └── home.ts
├── providers
│ ├── audio
│ │ └── audio.ts
│ ├── auth0
│ │ ├── auth.config.ts
│ │ └── auth.service.ts
│ ├── cloud
│ │ └── cloud.ts
│ └── store
│ │ └── store.ts
├── service-worker.js
└── theme
│ └── variables.scss
├── tsconfig.json
└── tslint.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 2
9 |
10 | # We recommend you to keep these unchanged
11 | end_of_line = lf
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [*.md]
17 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .sourcemaps/
17 | .sass-cache/
18 | .tmp/
19 | .versions/
20 | coverage/
21 | dist/
22 | node_modules/
23 | tmp/
24 | temp/
25 | hooks/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | www/
31 | $RECYCLE.BIN/
32 |
33 | .DS_Store
34 | Thumbs.db
35 | UserInterfaceState.xcuserstate
36 |
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | audio-player
4 | An awesome Ionic/Cordova app.
5 | Ionic Framework Team
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "audio-player",
3 | "app_id": "",
4 | "type": "ionic-angular",
5 | "integrations": {
6 | "cordova": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "audio-player",
3 | "version": "0.0.1",
4 | "author": "Ionic Framework",
5 | "homepage": "http://ionicframework.com/",
6 | "private": true,
7 | "scripts": {
8 | "clean": "ionic-app-scripts clean",
9 | "build": "ionic-app-scripts build",
10 | "lint": "ionic-app-scripts lint",
11 | "ionic:build": "ionic-app-scripts build",
12 | "ionic:serve": "ionic-app-scripts serve"
13 | },
14 | "dependencies": {
15 | "@angular/animations": "^5.2.11",
16 | "@angular/common": "5.2.11",
17 | "@angular/compiler": "5.2.11",
18 | "@angular/compiler-cli": "5.2.11",
19 | "@angular/core": "5.2.11",
20 | "@angular/forms": "5.2.11",
21 | "@angular/http": "5.2.11",
22 | "@angular/platform-browser": "5.2.11",
23 | "@angular/platform-browser-dynamic": "5.2.11",
24 | "@auth0/cordova": "^0.3.0",
25 | "@ionic-native/core": "4.7.0",
26 | "@ionic-native/splash-screen": "4.7.0",
27 | "@ionic-native/status-bar": "4.7.0",
28 | "@ionic/storage": "2.1.3",
29 | "@ngrx/store": "^6.0.1",
30 | "@types/auth0-js": "^8.11.2",
31 | "auth0-js": "^9.6.1",
32 | "cordova-ios": "4.5.4",
33 | "cordova-plugin-customurlscheme": "^4.3.0",
34 | "cordova-plugin-device": "^2.0.2",
35 | "cordova-plugin-ionic-keyboard": "^2.0.5",
36 | "cordova-plugin-ionic-webview": "^1.1.19",
37 | "cordova-plugin-safariviewcontroller": "^1.5.4",
38 | "cordova-plugin-splashscreen": "^5.0.2",
39 | "cordova-plugin-whitelist": "^1.3.3",
40 | "ionic-angular": "3.9.2",
41 | "ionicons": "3.0.0",
42 | "moment": "^2.22.2",
43 | "rxjs": "^6.2.1",
44 | "rxjs-compat": "^6.2.1",
45 | "sw-toolbox": "3.6.0",
46 | "zone.js": "0.8.26"
47 | },
48 | "devDependencies": {
49 | "@ionic/app-scripts": "3.1.10",
50 | "typescript": "~2.6.2"
51 | },
52 | "description": "An Ionic project",
53 | "cordova": {
54 | "plugins": {
55 | "cordova-plugin-whitelist": {},
56 | "cordova-plugin-device": {},
57 | "cordova-plugin-splashscreen": {},
58 | "cordova-plugin-ionic-webview": {},
59 | "cordova-plugin-ionic-keyboard": {},
60 | "cordova-plugin-customurlscheme": {
61 | "URL_SCHEME": "io.ionic.starter",
62 | "ANDROID_SCHEME": "io.ionic.starter",
63 | "ANDROID_HOST": "bk-tmp.auth0.com",
64 | "ANDROID_PATHPREFIX": "/cordova/io.ionic.starter/callback"
65 | },
66 | "cordova-plugin-safariviewcontroller": {}
67 | },
68 | "platforms": [
69 | "ios"
70 | ]
71 | }
72 | }
--------------------------------------------------------------------------------
/resources/README.md:
--------------------------------------------------------------------------------
1 | These are Cordova resources. You can replace icon.png and splash.png and run
2 | `ionic cordova resources` to generate custom icons and splash screens for your
3 | app. See `ionic cordova resources --help` for details.
4 |
5 | Cordova reference documentation:
6 |
7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
9 |
--------------------------------------------------------------------------------
/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/icon.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-1024.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Landscape@~ipadpro.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Portrait@~ipadpro.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~universal~anyany.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default@2x~universal~anyany.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/ios/splash/Default~iphone.png
--------------------------------------------------------------------------------
/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/resources/splash.png
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Platform } from 'ionic-angular';
3 | import { StatusBar } from '@ionic-native/status-bar';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 | import Auth0Cordova from '@auth0/cordova';
6 |
7 | import { HomePage } from '../pages/home/home';
8 | @Component({
9 | templateUrl: 'app.html'
10 | })
11 | export class MyApp {
12 | rootPage:any = HomePage;
13 |
14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
15 | platform.ready().then(() => {
16 | statusBar.styleDefault();
17 | splashScreen.hide();
18 |
19 | // Redirect back to app after authenticating
20 | (window as any).handleOpenURL = (url: string) => {
21 | Auth0Cordova.onRedirectUri(url);
22 | };
23 | });
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
3 | import { ErrorHandler, NgModule } from '@angular/core';
4 | import { HttpClientModule } from '@angular/common/http';
5 | import { StoreModule } from '@ngrx/store';
6 | import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
7 | import { SplashScreen } from '@ionic-native/splash-screen';
8 | import { StatusBar } from '@ionic-native/status-bar';
9 |
10 | import { mediaStateReducer } from '../providers/store/store';
11 | import { AudioProvider } from '../providers/audio/audio';
12 | import { CloudProvider } from '../providers/cloud/cloud';
13 |
14 | import { MyApp } from './app.component';
15 | import { HomePage } from '../pages/home/home';
16 | import { AuthService } from '../providers/auth0/auth.service';
17 | import { IonicStorageModule } from '@ionic/storage';
18 |
19 | @NgModule({
20 | declarations: [MyApp, HomePage],
21 | imports: [
22 | BrowserModule,
23 | BrowserAnimationsModule,
24 | HttpClientModule,
25 | IonicStorageModule.forRoot(),
26 | StoreModule.forRoot({
27 | appState: mediaStateReducer
28 | }),
29 | IonicModule.forRoot(MyApp)
30 | ],
31 | bootstrap: [IonicApp],
32 | entryComponents: [MyApp, HomePage],
33 | providers: [
34 | StatusBar,
35 | SplashScreen,
36 | AudioProvider,
37 | CloudProvider,
38 | AuthService,
39 | { provide: ErrorHandler, useClass: IonicErrorHandler }
40 | ]
41 | })
42 | export class AppModule {}
43 |
--------------------------------------------------------------------------------
/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 |
3 |
4 | // App Global Sass
5 | // --------------------------------------------------
6 | // Put style rules here that you want to apply globally. These
7 | // styles are for the entire app and not just one component.
8 | // Additionally, this file can be also used as an entry point
9 | // to import other Sass files to be included in the output CSS.
10 | //
11 | // Shared Sass variables, which can be used to adjust Ionic's
12 | // default Sass variables, belong in "theme/variables.scss".
13 | //
14 | // To declare rules for a specific mode, create a child rule
15 | // for the .md, .ios, or .wp mode classes. The mode class is
16 | // automatically applied to the
element in the app.
17 |
--------------------------------------------------------------------------------
/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app.module';
4 |
5 | platformBrowserDynamic().bootstrapModule(AppModule);
6 |
--------------------------------------------------------------------------------
/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/src/assets/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/auth0-blog/ionic-audio-player/323b14a82dd2489b78d626d44a372850ae7c3bac/src/assets/imgs/logo.png
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/src/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Audio Player
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Loading...
12 |
13 |
14 |
15 |
Audio Player
16 |
17 |
18 |
19 |
20 |
21 | Hello {{auth.user?.name}}
22 |
23 |
24 | {{ file.name }}
25 | SELECTED
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 | {{ state.time }}
38 | {{ state.duration }}
39 |
40 |
41 |
42 |
43 |
44 |
45 |
48 |
51 |
54 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | page-home {
2 | #app-section {
3 | #app-title {
4 | color: color($colors, 'primary');
5 | text-transform: uppercase;
6 | }
7 | ion-icon {
8 | font-size: 15rem;
9 | }
10 | }
11 | #media-controls {
12 | button {
13 | ion-icon {
14 | font-size: 2.5rem;
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/pages/home/home.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild} from '@angular/core';
2 | import {trigger, state, style, animate, transition } from '@angular/animations';
3 | import {NavController, NavParams, Navbar, Content, LoadingController} from 'ionic-angular';
4 | import {AudioProvider} from '../../providers/audio/audio';
5 | import {FormControl} from '@angular/forms';
6 | import {CANPLAY, LOADEDMETADATA, PLAYING, TIMEUPDATE, LOADSTART, RESET} from '../../providers/store/store';
7 | import {Store} from '@ngrx/store';
8 | import {CloudProvider} from '../../providers/cloud/cloud';
9 | import {AuthService} from '../../providers/auth0/auth.service';
10 | import {pluck, filter, map, distinctUntilChanged} from 'rxjs/operators';
11 |
12 | @Component({
13 | selector: 'page-home',
14 | templateUrl: 'home.html',
15 | animations: [
16 | trigger('showHide', [
17 | state(
18 | 'active',
19 | style({
20 | opacity: 1
21 | })
22 | ),
23 | state(
24 | 'inactive',
25 | style({
26 | opacity: 0
27 | })
28 | ),
29 | transition('inactive => active', animate('250ms ease-in')),
30 | transition('active => inactive', animate('250ms ease-out'))
31 | ])
32 | ]
33 | })
34 | export class HomePage {
35 | files: any = [];
36 | seekbar: FormControl = new FormControl("seekbar");
37 | state: any = {};
38 | onSeekState: boolean;
39 | currentFile: any = {};
40 | displayFooter: string = "inactive";
41 | loggedIn: Boolean;
42 | @ViewChild(Navbar) navBar: Navbar;
43 | @ViewChild(Content) content: Content;
44 |
45 | constructor(
46 | public navCtrl: NavController,
47 | public navParams: NavParams,
48 | public audioProvider: AudioProvider,
49 | public loadingCtrl: LoadingController,
50 | public cloudProvider: CloudProvider,
51 | private store: Store,
52 | public auth: AuthService
53 | ) {
54 | this.auth.isLoggedIn$.subscribe((isLoggedIn: any) => {
55 | this.loggedIn = isLoggedIn;
56 | if (isLoggedIn) {
57 | this.getDocuments();
58 | }
59 | });
60 | }
61 |
62 | login() {
63 | this.auth.login()
64 | .then(() => { console.log('Successful Login'); })
65 | .catch(error => { console.log(error); });
66 | }
67 |
68 | getDocuments() {
69 | let loader = this.presentLoading();
70 | this.cloudProvider.getFiles().subscribe(files => {
71 | this.files = files;
72 | loader.dismiss();
73 | });
74 | }
75 |
76 | presentLoading() {
77 | let loading = this.loadingCtrl.create({
78 | content: 'Loading Content. Please Wait...'
79 | });
80 | loading.present();
81 | return loading;
82 | }
83 |
84 | ionViewWillLoad() {
85 | this.store.select('appState').subscribe((value: any) => {
86 | this.state = value.media;
87 | });
88 |
89 | // Resize the Content Screen so that Ionic is aware of footer
90 | this.store
91 | .select('appState')
92 | .pipe(pluck('media', 'canplay'), filter(value => value === true))
93 | .subscribe(() => {
94 | this.displayFooter = 'active';
95 | this.content.resize();
96 | });
97 |
98 | // Updating the Seekbar based on currentTime
99 | this.store
100 | .select('appState')
101 | .pipe(
102 | pluck('media', 'timeSec'),
103 | filter(value => value !== undefined),
104 | map((value: any) => Number.parseInt(value)),
105 | distinctUntilChanged()
106 | )
107 | .subscribe((value: any) => {
108 | this.seekbar.setValue(value);
109 | });
110 | }
111 |
112 | openFile(file, index) {
113 | this.currentFile = { index, file };
114 | this.playStream(file.url);
115 | }
116 |
117 | resetState() {
118 | this.audioProvider.stop();
119 | this.store.dispatch({ type: RESET });
120 | }
121 |
122 | playStream(url) {
123 | this.resetState();
124 | this.audioProvider.playStream(url).subscribe(event => {
125 | const audioObj = event.target;
126 |
127 | switch (event.type) {
128 | case 'canplay':
129 | return this.store.dispatch({ type: CANPLAY, payload: { value: true } });
130 |
131 | case 'loadedmetadata':
132 | return this.store.dispatch({
133 | type: LOADEDMETADATA,
134 | payload: {
135 | value: true,
136 | data: {
137 | time: this.audioProvider.formatTime(
138 | audioObj.duration * 1000,
139 | 'HH:mm:ss'
140 | ),
141 | timeSec: audioObj.duration,
142 | mediaType: 'mp3'
143 | }
144 | }
145 | });
146 |
147 | case 'playing':
148 | return this.store.dispatch({ type: PLAYING, payload: { value: true } });
149 |
150 | case 'pause':
151 | return this.store.dispatch({ type: PLAYING, payload: { value: false } });
152 |
153 | case 'timeupdate':
154 | return this.store.dispatch({
155 | type: TIMEUPDATE,
156 | payload: {
157 | timeSec: audioObj.currentTime,
158 | time: this.audioProvider.formatTime(
159 | audioObj.currentTime * 1000,
160 | 'HH:mm:ss'
161 | )
162 | }
163 | });
164 |
165 | case 'loadstart':
166 | return this.store.dispatch({ type: LOADSTART, payload: { value: true } });
167 | }
168 | });
169 | }
170 |
171 | pause() {
172 | this.audioProvider.pause();
173 | }
174 |
175 | play() {
176 | this.audioProvider.play();
177 | }
178 |
179 | stop() {
180 | this.audioProvider.stop();
181 | }
182 |
183 | next() {
184 | let index = this.currentFile.index + 1;
185 | let file = this.files[index];
186 | this.openFile(file, index);
187 | }
188 |
189 | previous() {
190 | let index = this.currentFile.index - 1;
191 | let file = this.files[index];
192 | this.openFile(file, index);
193 | }
194 |
195 | isFirstPlaying() {
196 | return this.currentFile.index === 0;
197 | }
198 |
199 | isLastPlaying() {
200 | return this.currentFile.index === this.files.length - 1;
201 | }
202 |
203 | onSeekStart() {
204 | this.onSeekState = this.state.playing;
205 | if (this.onSeekState) {
206 | this.pause();
207 | }
208 | }
209 |
210 | onSeekEnd(event) {
211 | if (this.onSeekState) {
212 | this.audioProvider.seekTo(event.value);
213 | this.play();
214 | } else {
215 | this.audioProvider.seekTo(event.value);
216 | }
217 | }
218 |
219 | logout() {
220 | this.reset();
221 | this.auth.logout();
222 | }
223 |
224 | reset() {
225 | this.resetState();
226 | this.currentFile = {};
227 | this.displayFooter = "inactive";
228 | }
229 | }
230 |
--------------------------------------------------------------------------------
/src/providers/audio/audio.ts:
--------------------------------------------------------------------------------
1 | import {Injectable} from '@angular/core';
2 | import {Observable, Subject} from 'rxjs';
3 | import {takeUntil} from 'rxjs/operators';
4 | import * as moment from 'moment';
5 |
6 | @Injectable()
7 | export class AudioProvider {
8 | private stop$ = new Subject();
9 | private audioObj = new Audio();
10 |
11 | constructor() { }
12 |
13 | private streamObservable(url) {
14 | let events = [
15 | 'ended', 'error', 'play', 'playing', 'pause', 'timeupdate', 'canplay', 'loadedmetadata', 'loadstart'
16 | ];
17 |
18 | const addEvents = function(obj, events, handler) {
19 | events.forEach(event => {
20 | obj.addEventListener(event, handler);
21 | });
22 | };
23 |
24 | const removeEvents = function(obj, events, handler) {
25 | events.forEach(event => {
26 | obj.removeEventListener(event, handler);
27 | });
28 | };
29 |
30 | return Observable.create(observer => {
31 | // Play audio
32 | this.audioObj.src = url;
33 | this.audioObj.load();
34 | this.audioObj.play();
35 |
36 | // Media Events
37 | const handler = (event) => observer.next(event);
38 | addEvents(this.audioObj, events, handler);
39 |
40 | return () => {
41 | // Stop Playing
42 | this.audioObj.pause();
43 | this.audioObj.currentTime = 0;
44 |
45 | // Remove EventListeners
46 | removeEvents(this.audioObj, events, handler);
47 | };
48 | });
49 | }
50 |
51 | playStream(url) {
52 | return this.streamObservable(url).pipe(takeUntil(this.stop$));
53 | }
54 |
55 | play() {
56 | this.audioObj.play();
57 | }
58 |
59 | pause() {
60 | this.audioObj.pause();
61 | }
62 |
63 | stop() {
64 | this.stop$.next();
65 | }
66 |
67 | seekTo(seconds) {
68 | this.audioObj.currentTime = seconds;
69 | }
70 |
71 | formatTime(time, format) {
72 | return moment.utc(time).format(format);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/providers/auth0/auth.config.ts:
--------------------------------------------------------------------------------
1 | export const AUTH_CONFIG = {
2 | clientID: 'it34u22839rxciRleDUER7JKq9H3ND9B',// Needed for Auth0 (capitalization: ID)
3 | clientId: 'it34u22839rxciRleDUER7JKq9H3ND9B', // needed for Auth0Cordova (capitalization: Id)
4 | domain: 'bk-tmp.auth0.com',
5 | packageIdentifier: 'io.ionic.starter' // found on config.xml widget ID (e.g., com.auth0.ionic)
6 | };
7 |
--------------------------------------------------------------------------------
/src/providers/auth0/auth.service.ts:
--------------------------------------------------------------------------------
1 | import {Injectable, NgZone} from '@angular/core';
2 | import {Storage} from '@ionic/storage';
3 | import {Subject} from 'rxjs';
4 | // Import AUTH_CONFIG, Auth0Cordova, and auth0.js
5 | import {AUTH_CONFIG} from './auth.config';
6 | import Auth0Cordova from '@auth0/cordova';
7 | import * as auth0 from 'auth0-js';
8 | import { AlertController } from 'ionic-angular';
9 |
10 | @Injectable()
11 | export class AuthService {
12 | Auth0 = new auth0.WebAuth(AUTH_CONFIG);
13 | Client = new Auth0Cordova(AUTH_CONFIG);
14 | accessToken: string;
15 | user: any;
16 | loggedIn: boolean;
17 | loading = true;
18 | isLoggedIn$ = new Subject();
19 |
20 | constructor(public zone: NgZone, private storage: Storage, private alertCtrl: AlertController) {
21 | this.storage.get('profile').then(user => (this.user = user));
22 | this.storage.get('access_token').then(token => (this.accessToken = token));
23 | this.storage.get('expires_at').then(exp => {
24 | this.loggedIn = Date.now() < JSON.parse(exp);
25 | this.loading = false;
26 | this.isLoggedIn$.next(this.loggedIn);
27 | });
28 | }
29 |
30 | login() {
31 | return new Promise((resolve, reject) => {
32 | this.loading = true;
33 | const options = {
34 | scope: 'openid profile offline_access',
35 | };
36 | // Authorize login request with Auth0: open login page and get auth results
37 | this.Client.authorize(options, (err, authResult) => {
38 | if (err) {
39 | let alert = this.alertCtrl.create({
40 | title: 'Low battery',
41 | subTitle: JSON.stringify(err.original),
42 | buttons: ['Dismiss']
43 | });
44 | alert.present();
45 |
46 | this.loading = false;
47 | reject(err);
48 | } else {
49 | // Set access token & id token
50 | this.storage.set('id_token', authResult.idToken);
51 | this.storage.set('access_token', authResult.accessToken)
52 | .then(() => {
53 | // Set logged in
54 | this.loading = false;
55 | this.loggedIn = true;
56 | this.isLoggedIn$.next(this.loggedIn);
57 | resolve();
58 | });
59 | this.accessToken = authResult.accessToken;
60 | // Set access token expiration
61 | const expiresAt = JSON.stringify(
62 | authResult.expiresIn * 1000 + new Date().getTime()
63 | );
64 | this.storage.set('expires_at', expiresAt);
65 | // Fetch user's profile info
66 | this.Auth0.client.userInfo(this.accessToken, (err, profile) => {
67 | if (err) {
68 | throw err;
69 | }
70 | this.storage
71 | .set('profile', profile)
72 | .then(val => this.zone.run(() => (this.user = profile)));
73 | });
74 | }
75 | });
76 | });
77 | }
78 |
79 | logout() {
80 | this.storage.remove('profile');
81 | this.storage.remove('access_token');
82 | this.storage.remove('expires_at');
83 | this.storage.remove('id_token');
84 | this.accessToken = null;
85 | this.user = {};
86 | this.loggedIn = false;
87 | this.isLoggedIn$.next(this.loggedIn);
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/providers/cloud/cloud.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { of } from 'rxjs';
3 |
4 | @Injectable()
5 | export class CloudProvider {
6 | files:any = [
7 | { url: 'https://ia801504.us.archive.org/3/items/EdSheeranPerfectOfficialMusicVideoListenVid.com/Ed_Sheeran_-_Perfect_Official_Music_Video%5BListenVid.com%5D.mp3',
8 | name: 'Perfect by Ed Sheeran'
9 | },
10 | {
11 | url: 'https://ia801609.us.archive.org/16/items/nusratcollection_20170414_0953/Man%20Atkiya%20Beparwah%20De%20Naal%20Nusrat%20Fateh%20Ali%20Khan.mp3',
12 | name: 'Man Atkeya Beparwah by Nusrat Fateh Ali Khan'
13 | },
14 | { url: 'https://ia801503.us.archive.org/15/items/TheBeatlesPennyLane_201805/The%20Beatles%20-%20Penny%20Lane.mp3',
15 | name: 'Penny Lane by The Beatles'
16 | }
17 | ];
18 | getFiles() {
19 | return of(this.files);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/providers/store/store.ts:
--------------------------------------------------------------------------------
1 | import {Action} from '@ngrx/store';
2 |
3 | export interface MediaAction extends Action {
4 | type: string;
5 | payload?: any;
6 | }
7 |
8 | export const CANPLAY = 'CANPLAY';
9 | export const LOADEDMETADATA = 'LOADEDMETADATA';
10 | export const PLAYING = 'PLAYING';
11 | export const TIMEUPDATE = 'TIMEUPDATE';
12 | export const LOADSTART = 'LOADSTART';
13 | export const RESET = 'RESET';
14 |
15 | export function mediaStateReducer(state: any, action: MediaAction) {
16 | let payload = action.payload;
17 | switch (action.type) {
18 | case CANPLAY:
19 | state = Object.assign({}, state);
20 | state.media.canplay = payload.value;
21 | return state;
22 | case LOADEDMETADATA:
23 | state = Object.assign({}, state);
24 | state.media.loadedmetadata = payload.value;
25 | state.media.duration = payload.data.time;
26 | state.media.durationSec = payload.data.timeSec;
27 | state.media.mediaType = payload.data.mediaType;
28 | return state;
29 | case PLAYING:
30 | state = Object.assign({}, state);
31 | state.media.playing = payload.value;
32 | return state;
33 | case TIMEUPDATE:
34 | state = Object.assign({}, state);
35 | state.media.time = payload.time;
36 | state.media.timeSec = payload.timeSec;
37 | return state;
38 | case LOADSTART:
39 | state.media.loadstart = payload.value;
40 | return Object.assign({}, state);
41 | case RESET:
42 | state = Object.assign({}, state);
43 | state.media = {};
44 | return state;
45 | default:
46 | state = {};
47 | state.media = {};
48 | return state;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Check out https://googlechromelabs.github.io/sw-toolbox/ for
3 | * more info on how to use sw-toolbox to custom configure your service worker.
4 | */
5 |
6 |
7 | 'use strict';
8 | importScripts('./build/sw-toolbox.js');
9 |
10 | self.toolbox.options.cache = {
11 | name: 'ionic-cache'
12 | };
13 |
14 | // pre-cache our key assets
15 | self.toolbox.precache(
16 | [
17 | './build/main.js',
18 | './build/vendor.js',
19 | './build/main.css',
20 | './build/polyfills.js',
21 | 'index.html',
22 | 'manifest.json'
23 | ]
24 | );
25 |
26 | // dynamically cache any other local assets
27 | self.toolbox.router.any('/*', self.toolbox.fastest);
28 |
29 | // for any other requests go to the network, cache,
30 | // and then only use that cached resource if your user goes offline
31 | self.toolbox.router.default = self.toolbox.networkFirst;
32 |
--------------------------------------------------------------------------------
/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/theming/
3 |
4 | // Font path is used to include ionicons,
5 | // roboto, and noto sans fonts
6 | $font-path: "../assets/fonts";
7 |
8 |
9 | // The app direction is used to include
10 | // rtl styles in your app. For more info, please see:
11 | // http://ionicframework.com/docs/theming/rtl-support/
12 | $app-direction: ltr;
13 |
14 |
15 | @import "ionic.globals";
16 |
17 |
18 | // Shared Variables
19 | // --------------------------------------------------
20 | // To customize the look and feel of this app, you can override
21 | // the Sass variables found in Ionic's source scss files.
22 | // To view all the possible Ionic variables, see:
23 | // http://ionicframework.com/docs/theming/overriding-ionic-variables/
24 |
25 |
26 |
27 |
28 | // Named Color Variables
29 | // --------------------------------------------------
30 | // Named colors makes it easy to reuse colors on various components.
31 | // It's highly recommended to change the default colors
32 | // to match your app's branding. Ionic uses a Sass map of
33 | // colors so you can add, rename and remove colors as needed.
34 | // The "primary" color is the only required color in the map.
35 |
36 | $colors: (
37 | primary: #488aff,
38 | secondary: #32db64,
39 | danger: #f53d3d,
40 | light: #f4f4f4,
41 | dark: #222
42 | );
43 |
44 |
45 | // App iOS Variables
46 | // --------------------------------------------------
47 | // iOS only Sass variables can go here
48 |
49 |
50 |
51 |
52 | // App Material Design Variables
53 | // --------------------------------------------------
54 | // Material Design only Sass variables can go here
55 |
56 |
57 |
58 |
59 | // App Windows Variables
60 | // --------------------------------------------------
61 | // Windows only Sass variables can go here
62 |
63 |
64 |
65 |
66 | // App Theme
67 | // --------------------------------------------------
68 | // Ionic apps can have different themes applied, which can
69 | // then be future customized. This import comes last
70 | // so that the above variables are used and Ionic's
71 | // default are overridden.
72 |
73 | @import "ionic.theme.default";
74 |
75 |
76 | // Ionicons
77 | // --------------------------------------------------
78 | // The premium icon font for Ionic. For more info, please see:
79 | // http://ionicframework.com/docs/ionicons/
80 |
81 | @import "ionic.ionicons";
82 |
83 |
84 | // Fonts
85 | // --------------------------------------------------
86 |
87 | @import "roboto";
88 | @import "noto-sans";
89 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5"
15 | },
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules",
21 | "src/**/*.spec.ts",
22 | "src/**/__tests__/*.ts"
23 | ],
24 | "compileOnSave": false,
25 | "atom": {
26 | "rewriteTsconfig": false
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------