robert2206 преди 8 години
ревизия
cc45bb6bfa
променени са 75 файла, в които са добавени 622 реда и са изтрити 0 реда
  1. 17 0
      .editorconfig
  2. 34 0
      .gitignore
  3. 39 0
      config.xml
  4. 6 0
      ionic.config.json
  5. 35 0
      package.json
  6. BIN
      resources/android/icon/drawable-hdpi-icon.png
  7. BIN
      resources/android/icon/drawable-ldpi-icon.png
  8. BIN
      resources/android/icon/drawable-mdpi-icon.png
  9. BIN
      resources/android/icon/drawable-xhdpi-icon.png
  10. BIN
      resources/android/icon/drawable-xxhdpi-icon.png
  11. BIN
      resources/android/icon/drawable-xxxhdpi-icon.png
  12. BIN
      resources/android/splash/drawable-land-hdpi-screen.png
  13. BIN
      resources/android/splash/drawable-land-ldpi-screen.png
  14. BIN
      resources/android/splash/drawable-land-mdpi-screen.png
  15. BIN
      resources/android/splash/drawable-land-xhdpi-screen.png
  16. BIN
      resources/android/splash/drawable-land-xxhdpi-screen.png
  17. BIN
      resources/android/splash/drawable-land-xxxhdpi-screen.png
  18. BIN
      resources/android/splash/drawable-port-hdpi-screen.png
  19. BIN
      resources/android/splash/drawable-port-ldpi-screen.png
  20. BIN
      resources/android/splash/drawable-port-mdpi-screen.png
  21. BIN
      resources/android/splash/drawable-port-xhdpi-screen.png
  22. BIN
      resources/android/splash/drawable-port-xxhdpi-screen.png
  23. BIN
      resources/android/splash/drawable-port-xxxhdpi-screen.png
  24. BIN
      resources/icon.png
  25. BIN
      resources/ios/icon/icon-40.png
  26. BIN
      resources/ios/icon/icon-40@2x.png
  27. BIN
      resources/ios/icon/icon-50.png
  28. BIN
      resources/ios/icon/icon-50@2x.png
  29. BIN
      resources/ios/icon/icon-60.png
  30. BIN
      resources/ios/icon/icon-60@2x.png
  31. BIN
      resources/ios/icon/icon-60@3x.png
  32. BIN
      resources/ios/icon/icon-72.png
  33. BIN
      resources/ios/icon/icon-72@2x.png
  34. BIN
      resources/ios/icon/icon-76.png
  35. BIN
      resources/ios/icon/icon-76@2x.png
  36. BIN
      resources/ios/icon/icon-small.png
  37. BIN
      resources/ios/icon/icon-small@2x.png
  38. BIN
      resources/ios/icon/icon-small@3x.png
  39. BIN
      resources/ios/icon/icon.png
  40. BIN
      resources/ios/icon/icon@2x.png
  41. BIN
      resources/ios/splash/Default-568h@2x~iphone.png
  42. BIN
      resources/ios/splash/Default-667h.png
  43. BIN
      resources/ios/splash/Default-736h.png
  44. BIN
      resources/ios/splash/Default-Landscape-736h.png
  45. BIN
      resources/ios/splash/Default-Landscape@2x~ipad.png
  46. BIN
      resources/ios/splash/Default-Landscape~ipad.png
  47. BIN
      resources/ios/splash/Default-Portrait@2x~ipad.png
  48. BIN
      resources/ios/splash/Default-Portrait~ipad.png
  49. BIN
      resources/ios/splash/Default@2x~iphone.png
  50. BIN
      resources/ios/splash/Default~iphone.png
  51. BIN
      resources/splash.png
  52. 43 0
      src/app/app.component.ts
  53. 19 0
      src/app/app.html
  54. 29 0
      src/app/app.module.ts
  55. 5 0
      src/app/main.dev.ts
  56. 7 0
      src/app/main.prod.ts
  57. BIN
      src/assets/icon/favicon.ico
  58. BIN
      src/assets/images/logo.png
  59. 13 0
      src/assets/manifest.json
  60. 11 0
      src/assets/service-worker.js
  61. 41 0
      src/index.html
  62. 20 0
      src/pages/login/login.html
  63. 25 0
      src/pages/login/login.scss
  64. 35 0
      src/pages/login/login.ts
  65. 18 0
      src/pages/page1/page1.html
  66. 3 0
      src/pages/page1/page1.scss
  67. 15 0
      src/pages/page1/page1.ts
  68. 23 0
      src/pages/page2/page2.html
  69. 3 0
      src/pages/page2/page2.scss
  70. 38 0
      src/pages/page2/page2.ts
  71. 45 0
      src/providers/token-auth.ts
  72. 12 0
      src/theme/global.scss
  73. 53 0
      src/theme/variables.scss
  74. 22 0
      tsconfig.json
  75. 11 0
      tslint.json

+ 17 - 0
.editorconfig

@@ -0,0 +1,17 @@
+# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false

+ 34 - 0
.gitignore

@@ -0,0 +1,34 @@
+# Specifies intentionally untracked files to ignore when using Git
+# http://git-scm.com/docs/gitignore
+
+*~
+*.sw[mnpcod]
+*.log
+*.tmp
+*.tmp.*
+log.txt
+*.sublime-project
+*.sublime-workspace
+.vscode/
+npm-debug.log*
+
+.idea/
+.sass-cache/
+.tmp/
+.versions/
+coverage/
+dist/
+node_modules/
+tmp/
+temp/
+hooks/
+platforms/
+plugins/
+plugins/android.json
+plugins/ios.json
+www/
+$RECYCLE.BIN/
+
+.DS_Store
+Thumbs.db
+UserInterfaceState.xcuserstate

+ 39 - 0
config.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<widget id="com.ionicframework.odoomobile870888" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+  <name>odoo_mobile</name>
+  <description>An awesome Ionic/Cordova app.</description>
+  <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
+  <content src="index.html"/>
+  <access origin="*"/>
+  <allow-intent href="http://*/*"/>
+  <allow-intent href="https://*/*"/>
+  <allow-intent href="tel:*"/>
+  <allow-intent href="sms:*"/>
+  <allow-intent href="mailto:*"/>
+  <allow-intent href="geo:*"/>
+  <platform name="android">
+    <allow-intent href="market:*"/>
+  </platform>
+  <platform name="ios">
+    <allow-intent href="itms:*"/>
+    <allow-intent href="itms-apps:*"/>
+  </platform>
+  <preference name="webviewbounce" value="false"/>
+  <preference name="UIWebViewBounce" value="false"/>
+  <preference name="DisallowOverscroll" value="true"/>
+  <preference name="android-minSdkVersion" value="16"/>
+  <preference name="BackupWebStorage" value="none"/>
+  <preference name="SplashScreenDelay" value="0"/>
+  <preference name="FadeSplashScreen" value="false"/>
+  <preference name="FadeSplashScreenDuration" value="0"/>
+  <preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/>
+  <feature name="StatusBar">
+    <param name="ios-package" onload="true" value="CDVStatusBar"/>
+  </feature>
+  <plugin name="cordova-plugin-device" spec="~1.1.3"/>
+  <plugin name="cordova-plugin-console" spec="~1.0.4"/>
+  <plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>
+  <plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
+  <plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
+  <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
+</widget>

+ 6 - 0
ionic.config.json

@@ -0,0 +1,6 @@
+{
+  "name": "odoo_mobile",
+  "app_id": "",
+  "v2": true,
+  "typescript": true
+}

+ 35 - 0
package.json

@@ -0,0 +1,35 @@
+{
+  "name": "ionic-hello-world",
+  "author": "Ionic Framework",
+  "homepage": "http://ionicframework.com/",
+  "private": true,
+  "scripts": {
+    "build": "ionic-app-scripts build",
+    "watch": "ionic-app-scripts watch",
+    "serve:before": "watch",
+    "emulate:before": "build",
+    "deploy:before": "build",
+    "build:before": "build",
+    "run:before": "build"
+  },
+  "dependencies": {
+    "ionic-angular": "^2.0.0-rc.0",
+    "ionicons": "^3.0.0",
+    "@ionic/storage": "^1.0.3",
+    "ionic-native": "^2.0.3"
+  },
+  "devDependencies": {
+    "@ionic/app-scripts": "^0.0.23",
+    "typescript": "^2.0.3"
+  },
+  "description": "odoo_mobile: An Ionic project",
+  "cordovaPlugins": [
+    "cordova-plugin-device",
+    "cordova-plugin-console",
+    "cordova-plugin-whitelist",
+    "cordova-plugin-splashscreen",
+    "cordova-plugin-statusbar",
+    "ionic-plugin-keyboard"
+  ],
+  "cordovaPlatforms": []
+}

BIN
resources/android/icon/drawable-hdpi-icon.png


BIN
resources/android/icon/drawable-ldpi-icon.png


BIN
resources/android/icon/drawable-mdpi-icon.png


BIN
resources/android/icon/drawable-xhdpi-icon.png


BIN
resources/android/icon/drawable-xxhdpi-icon.png


BIN
resources/android/icon/drawable-xxxhdpi-icon.png


BIN
resources/android/splash/drawable-land-hdpi-screen.png


BIN
resources/android/splash/drawable-land-ldpi-screen.png


BIN
resources/android/splash/drawable-land-mdpi-screen.png


BIN
resources/android/splash/drawable-land-xhdpi-screen.png


BIN
resources/android/splash/drawable-land-xxhdpi-screen.png


BIN
resources/android/splash/drawable-land-xxxhdpi-screen.png


BIN
resources/android/splash/drawable-port-hdpi-screen.png


BIN
resources/android/splash/drawable-port-ldpi-screen.png


BIN
resources/android/splash/drawable-port-mdpi-screen.png


BIN
resources/android/splash/drawable-port-xhdpi-screen.png


BIN
resources/android/splash/drawable-port-xxhdpi-screen.png


BIN
resources/android/splash/drawable-port-xxxhdpi-screen.png


BIN
resources/icon.png


BIN
resources/ios/icon/icon-40.png


BIN
resources/ios/icon/icon-40@2x.png


BIN
resources/ios/icon/icon-50.png


BIN
resources/ios/icon/icon-50@2x.png


BIN
resources/ios/icon/icon-60.png


BIN
resources/ios/icon/icon-60@2x.png


BIN
resources/ios/icon/icon-60@3x.png


BIN
resources/ios/icon/icon-72.png


BIN
resources/ios/icon/icon-72@2x.png


BIN
resources/ios/icon/icon-76.png


BIN
resources/ios/icon/icon-76@2x.png


BIN
resources/ios/icon/icon-small.png


BIN
resources/ios/icon/icon-small@2x.png


BIN
resources/ios/icon/icon-small@3x.png


BIN
resources/ios/icon/icon.png


BIN
resources/ios/icon/icon@2x.png


BIN
resources/ios/splash/Default-568h@2x~iphone.png


BIN
resources/ios/splash/Default-667h.png


BIN
resources/ios/splash/Default-736h.png


BIN
resources/ios/splash/Default-Landscape-736h.png


BIN
resources/ios/splash/Default-Landscape@2x~ipad.png


BIN
resources/ios/splash/Default-Landscape~ipad.png


BIN
resources/ios/splash/Default-Portrait@2x~ipad.png


BIN
resources/ios/splash/Default-Portrait~ipad.png


BIN
resources/ios/splash/Default@2x~iphone.png


BIN
resources/ios/splash/Default~iphone.png


BIN
resources/splash.png


+ 43 - 0
src/app/app.component.ts

@@ -0,0 +1,43 @@
+import { Component, ViewChild } from '@angular/core';
+import { Nav, Platform } from 'ionic-angular';
+import { StatusBar } from 'ionic-native';
+
+import { Login } from '../pages/login/login';
+import { Page1 } from '../pages/page1/page1';
+import { Page2 } from '../pages/page2/page2';
+
+@Component({
+  templateUrl: 'app.html'
+})
+export class MyApp {
+  @ViewChild(Nav) nav: Nav;
+
+  rootPage: any = Login;
+
+  pages: Array<{title: string, component: any}>;
+
+  constructor(public platform: Platform) {
+    this.initializeApp();
+
+    // used for an example of ngFor and navigation
+    this.pages = [
+      { title: 'Page One', component: Page1 },
+      { title: 'Page Two', component: Page2 }
+    ];
+
+  }
+
+  initializeApp() {
+    this.platform.ready().then(() => {
+      // Okay, so the platform is ready and our plugins are available.
+      // Here you can do any higher level native things you might need.
+      StatusBar.styleDefault();
+    });
+  }
+
+  openPage(page) {
+    // Reset the content nav to have just this page
+    // we wouldn't want the back button to show in this scenario
+    this.nav.setRoot(page.component);
+  }
+}

+ 19 - 0
src/app/app.html

@@ -0,0 +1,19 @@
+<ion-menu [content]="content">
+  <ion-header>
+    <ion-toolbar color="eiru">
+      <ion-title>Menu</ion-title>
+    </ion-toolbar>
+  </ion-header>
+
+  <ion-content>
+    <ion-list>
+      <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
+        {{p.title}}
+      </button>
+    </ion-list>
+  </ion-content>
+
+</ion-menu>
+
+<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
+<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>

+ 29 - 0
src/app/app.module.ts

@@ -0,0 +1,29 @@
+import { NgModule } from '@angular/core';
+import { IonicApp, IonicModule } from 'ionic-angular';
+import { MyApp } from './app.component';
+import { Login } from '../pages/login/login'
+import { TokenAuth } from '../providers/token-auth';
+import { Page1 } from '../pages/page1/page1';
+import { Page2 } from '../pages/page2/page2';
+
+@NgModule({
+  declarations: [
+    MyApp,
+    Login,
+    Page1,
+    Page2
+  ],
+  imports: [
+    IonicModule.forRoot(MyApp)
+  ],
+  bootstrap: [IonicApp],
+  entryComponents: [
+    MyApp,
+    Login,
+    TokenAuth,
+    Page1,
+    Page2
+  ],
+  providers: []
+})
+export class AppModule {}

+ 5 - 0
src/app/main.dev.ts

@@ -0,0 +1,5 @@
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app.module';
+
+platformBrowserDynamic().bootstrapModule(AppModule);

+ 7 - 0
src/app/main.prod.ts

@@ -0,0 +1,7 @@
+import { platformBrowser } from '@angular/platform-browser';
+import { enableProdMode } from '@angular/core';
+
+import { AppModuleNgFactory } from './app.module.ngfactory';
+
+enableProdMode();
+platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

BIN
src/assets/icon/favicon.ico


BIN
src/assets/images/logo.png


+ 13 - 0
src/assets/manifest.json

@@ -0,0 +1,13 @@
+{
+  "name": "Ionic",
+  "short_name": "Ionic",
+  "start_url": "index.html",
+  "display": "standalone",
+  "icons": [{
+    "src": "assets/imgs/logo.png",
+    "sizes": "512x512",
+    "type": "image/png"
+  }],
+  "background_color": "#4e8ef7",
+  "theme_color": "#4e8ef7"
+}

+ 11 - 0
src/assets/service-worker.js

@@ -0,0 +1,11 @@
+self.addEventListener('activate', function (event) {
+
+});
+
+self.addEventListener('fetch', function (event) {
+
+});
+
+self.addEventListener('push', function (event) {
+
+});

+ 41 - 0
src/index.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr">
+<head>
+  <meta charset="UTF-8">
+  <title>Ionic App</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+  <meta name="format-detection" content="telephone=no">
+  <meta name="msapplication-tap-highlight" content="no">
+
+  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
+  <link rel="manifest" href="assets/manifest.json">
+  <meta name="theme-color" content="#4e8ef7">
+
+  <!-- un-comment this code to enable service worker
+  <script>
+    if ('serviceWorker' in navigator) {
+      navigator.serviceWorker.register('assets/service-worker.js')
+        .then(() => console.log('service worker installed'))
+        .catch(err => console.log('Error', err));
+    }
+  </script>-->
+
+  <link href="build/main.css" rel="stylesheet">
+
+</head>
+<body>
+
+  <!-- Ionic's root component and where the app will load -->
+  <ion-app></ion-app>
+
+  <!-- cordova.js required for cordova apps -->
+  <script src="cordova.js"></script>
+
+  <!-- The polyfills js is generated during the build process -->
+  <script src="build/polyfills.js"></script>
+
+  <!-- The bundle js is generated during the build process -->
+  <script src="build/main.js"></script>
+
+</body>
+</html>

+ 20 - 0
src/pages/login/login.html

@@ -0,0 +1,20 @@
+<ion-content padding>
+    <img src="./assets/images/logo.png" />
+
+    <ion-list>
+        <ion-item>
+            <ion-icon name="desktop" item-left></ion-icon>
+            <ion-input type="text" placeholder="URL del servidor" [(ngModel)]="url" clearInput></ion-input>
+        </ion-item>
+        <ion-item>
+            <ion-icon name="person" item-left></ion-icon>
+            <ion-input type="text" placeholder="Usuario o email" [(ngModel)]="username" clearInput></ion-input>
+        </ion-item>
+        <ion-item>
+            <ion-icon name="unlock" item-left></ion-icon>
+            <ion-input type="text" placeholder="Contraseña" [(ngModel)]="password" clearInput></ion-input>
+        </ion-item>
+    </ion-list>
+
+    <button ion-button block color="primary" (click)="signin()" clearInput [disabled]="!url || !username || !password">Entrar</button>
+</ion-content>

+ 25 - 0
src/pages/login/login.scss

@@ -0,0 +1,25 @@
+page-login {
+    ion-content {
+        background: #3f50b4 !important;
+    }
+
+    img {
+        display: block;
+        width: 80pt;
+        margin: 50px auto;
+        filter: brightness(0) invert(1);
+    }
+
+    ion-item {
+        border-radius: 2px !important;
+        margin-bottom: 2px !important;
+    }
+
+    .item-inner {
+        margin-left: 5px !important;
+    }
+
+    .item-icon {
+        color: #d3d3d3 !important;
+    }
+}

+ 35 - 0
src/pages/login/login.ts

@@ -0,0 +1,35 @@
+import { Component } from '@angular/core';
+import { NavController } from 'ionic-angular';
+import { TokenAuth } from '../../providers/token-auth';
+
+@Component({
+  selector: 'page-login',
+  templateUrl: 'login.html'
+})
+
+export class Login {
+
+    url: string;
+    username: string;
+    password: string;
+
+    constructor(public navCtrl: NavController) {}
+
+    ionViewDidLoad() {
+        console.log('Hello Login Page');
+    }
+
+    // Check if introduced url is valid
+    checkUrl(): boolean {
+        return this.url.includes('.');
+    }
+
+    // Signin odoo
+    signin(): void {
+        if (!this.checkUrl()) {
+            return;
+        }
+
+        console.log(this.url);
+    }
+}

+ 18 - 0
src/pages/page1/page1.html

@@ -0,0 +1,18 @@
+<ion-header>
+  <ion-navbar color="eiru">
+    <button ion-button menuToggle>
+      <ion-icon name="menu"></ion-icon>
+    </button>
+    <ion-title>Page One</ion-title>
+  </ion-navbar>
+</ion-header>
+
+<ion-content padding>
+  <h3>Ionic Menu Starter</h3>
+
+  <p>
+    If you get lost, the <a href="http://ionicframework.com/docs/v2">docs</a> will show you the way.
+  </p>
+
+  <button ion-button primary menuToggle>Toggle Menu</button>
+</ion-content>

+ 3 - 0
src/pages/page1/page1.scss

@@ -0,0 +1,3 @@
+page-page1 {
+
+}

+ 15 - 0
src/pages/page1/page1.ts

@@ -0,0 +1,15 @@
+import { Component } from '@angular/core';
+
+import { NavController } from 'ionic-angular';
+
+@Component({
+  selector: 'page-page1',
+  templateUrl: 'page1.html'
+})
+export class Page1 {
+
+  constructor(public navCtrl: NavController) {
+    
+  }
+
+}

+ 23 - 0
src/pages/page2/page2.html

@@ -0,0 +1,23 @@
+<ion-header>
+  <ion-navbar color="eiru">
+    <button ion-button menuToggle>
+      <ion-icon name="menu"></ion-icon>
+    </button>
+    <ion-title>Page Two</ion-title>
+  </ion-navbar>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">
+      <ion-icon [name]="item.icon" item-left></ion-icon>
+      {{item.title}}
+      <div class="item-note" item-right>
+        {{item.note}}
+      </div>
+    </button>
+  </ion-list>
+  <div *ngIf="selectedItem" padding>
+    You navigated here from <b>{{selectedItem.title}}</b>
+  </div>
+</ion-content>

+ 3 - 0
src/pages/page2/page2.scss

@@ -0,0 +1,3 @@
+page-page2 {
+
+}

+ 38 - 0
src/pages/page2/page2.ts

@@ -0,0 +1,38 @@
+import { Component } from '@angular/core';
+
+import { NavController, NavParams } from 'ionic-angular';
+
+@Component({
+  selector: 'page-page2',
+  templateUrl: 'page2.html'
+})
+export class Page2 {
+  selectedItem: any;
+  icons: string[];
+  items: Array<{title: string, note: string, icon: string}>;
+
+  constructor(public navCtrl: NavController, public navParams: NavParams) {
+    // If we navigated to this page, we will have an item available as a nav param
+    this.selectedItem = navParams.get('item');
+
+    // Let's populate this page with some filler content for funzies
+    this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
+    'american-football', 'boat', 'bluetooth', 'build'];
+
+    this.items = [];
+    for (let i = 1; i < 11; i++) {
+      this.items.push({
+        title: 'Item ' + i,
+        note: 'This is item #' + i,
+        icon: this.icons[Math.floor(Math.random() * this.icons.length)]
+      });
+    }
+  }
+
+  itemTapped(event, item) {
+    // That's right, we're pushing to ourselves!
+    this.navCtrl.push(Page2, {
+      item: item
+    });
+  }
+}

+ 45 - 0
src/providers/token-auth.ts

@@ -0,0 +1,45 @@
+import { Injectable } from '@angular/core';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/toPromise';
+import 'rxjs/add/operator/catch';
+
+@Injectable()
+export class TokenAuth {
+
+    token: string;
+
+    constructor(public http: Http) {
+        console.log('Hello TokenAuth Provider');
+    }
+
+    getToken() {
+
+    }
+
+    // Check if token exist on mobile device
+    private tokenExists(): boolean {
+        return true;
+    }
+
+    // Get token from server
+    private getTokenFromServer(url: string, username: string, password: string): Promise<string> {
+        let body = JSON.stringify({
+            username: username,
+            password: password
+        });
+
+        return this.http.post(url, body).toPromise().then(this.extractData).catch(this.handleError);
+    }
+
+    // Extract data from http response
+    private extractData(response: Response) {
+        let body = response.json();
+
+        return body.data || {};
+    }
+
+    // Handle error if ocurred
+    private handleError(error: any) {
+        return Promise.reject(error.response);
+    }
+}

+ 12 - 0
src/theme/global.scss

@@ -0,0 +1,12 @@
+// http://ionicframework.com/docs/v2/theming/
+
+
+// Global CSS
+// --------------------------------------------------
+// Put CSS rules here that you want to apply globally.
+//
+// To declare rules for a specific mode, create a child rule
+// for the .md, .ios, or .wp mode classes. The mode class is
+// automatically applied to the <body> element in the app.
+//
+// App Shared Sass variables belong in app.variables.scss.

+ 53 - 0
src/theme/variables.scss

@@ -0,0 +1,53 @@
+// Ionic Variables and Theming. For more info, please see:
+// http://ionicframework.com/docs/v2/theming/
+@import "ionic.globals";
+
+
+// Shared Variables
+// --------------------------------------------------
+// To customize the look and feel of this app, you can override
+// the Sass variables found in Ionic's source scss files.
+// To view all the possible Ionic variables, see:
+// http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
+
+$text-color:        #000;
+$background-color:  #fff;
+
+
+// Named Color Variables
+// --------------------------------------------------
+// Named colors makes it easy to reuse colors on various components.
+// It's highly recommended to change the default colors
+// to match your app's branding. Ionic uses a Sass map of
+// colors so you can add, rename and remove colors as needed.
+// The "primary" color is the only required color in the map.
+
+$colors: (
+  // primary:    #387ef5,
+  primary:    #7985cb,
+  secondary:  #32db64,
+  danger:     #f53d3d,
+  light:      #f4f4f4,
+  dark:       #222,
+  favorite:   #69BB7B,
+  eiru:       #3f50b4,
+);
+
+
+// App Theme
+// --------------------------------------------------
+// Ionic apps can have different themes applied, which can
+// then be future customized. This import comes last
+// so that the above variables are used and Ionic's
+// default are overridden.
+
+@import "ionic.theme.default";
+
+
+// Ionicons
+// --------------------------------------------------
+// The premium icon font for Ionic. For more info, please see:
+// http://ionicframework.com/docs/v2/ionicons/
+
+$ionicons-font-path: "../assets/fonts";
+@import "ionicons";

+ 22 - 0
tsconfig.json

@@ -0,0 +1,22 @@
+{
+  "compilerOptions": {
+    "allowSyntheticDefaultImports": true,
+    "declaration": true,
+    "emitDecoratorMetadata": true,
+    "experimentalDecorators": true,
+    "lib": [
+      "dom",
+      "es2015"
+    ],
+    "module": "es2015",
+    "moduleResolution": "node",
+    "target": "es5"
+  },
+  "exclude": [
+    "node_modules"
+  ],
+  "compileOnSave": false,
+  "atom": {
+    "rewriteTsconfig": false
+  }
+}

+ 11 - 0
tslint.json

@@ -0,0 +1,11 @@
+{
+  "rules": {
+    "no-duplicate-variable": true,
+    "no-unused-variable": [
+      true
+    ]
+  },
+  "rulesDirectory": [
+    "node_modules/tslint-eslint-rules/dist/rules"
+  ]
+}