Skip to content

Commit

Permalink
feat(wallet): init wallet packaged-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed Apr 20, 2016
1 parent 9c6174d commit b363260
Show file tree
Hide file tree
Showing 27 changed files with 534 additions and 211 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<plugin name="cordova-plugin-statusbar" spec="~1.0.1" />
<plugin name="cordova-plugin-splashscreen" spec="~2.1.0" />
<plugin name="cordova-plugin-whitelist" spec="~1.0.0" />
<plugin name="cordova-sqlite-ext" spec="~0.9.1" />
<plugin name="cordova-sqlite-storage" spec="~1.2.1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
Expand Down
4 changes: 4 additions & 0 deletions develop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ var processes = [
command: 'npm',
args: ['run', 'serve-starter']
},
{
command: 'npm',
args: ['run', 'serve-wallet']
},
{
command: 'npm',
args: ['run', 'serve-simserver']
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,18 @@
"start": "node develop.js",
"electron": "electron electron.js",
"install": "npm run install-tooling && cordova prepare",
"install-tooling": "npm run link-plugin-client && npm run install-hooks && npm run install-starter && npm run install-simserver",
"install-tooling": "npm run link-plugin-client && npm run install-hooks && npm run install-starter && npm run install-wallet && npm run install-simserver",
"link-plugin-client": "cd lib/icv2-plugin-client && npm link && cd ../../ && npm link icv2-plugin-client",
"install-hooks": "cd tooling/hooks && npm install",
"install-starter": "cd packaged-plugins/starter && ln -s ../../node_modules/ node_modules && npm install",
"install-wallet": "cd packaged-plugins/wallet && ln -s ../../node_modules/ node_modules && npm install",
"install-simserver": "cd tooling/simserver && npm install",
"serve-app": "ionic serve -p 8105 -r 35735",
"serve-starter": "cd packaged-plugins/starter && ionic serve -b -p 8110 -r 35740",
"serve-wallet": "cd packaged-plugins/wallet && ionic serve -b -p 8111 -r 35741",
"serve-simserver": "node tooling/simserver/proxy.js 8110",
"clean": "git clean -dfx",
"clean-tsc": "find app lib packaged-plugins/starter/app -name '*.js' -exec rm {} \\; && find app lib packaged-plugins/starter/app -name '*.js.map' -exec rm {} \\;",
"clean-tsc": "find app lib packaged-plugins/starter/app packaged-plugins/wallet/app -name '*.js' -exec rm {} \\; && find app lib packaged-plugins/starter/app packaged-plugins/wallet/app -name '*.js.map' -exec rm {} \\;",
"test": "echo 'Running Tests:' && karma start && tsc && npm run clean-tsc",
"watch:test": "karma start --auto-watch --no-single-run",
"coverage": "tsc && karma start && npm run map-coverage && npm run clean-tsc",
Expand All @@ -74,7 +76,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/bitpay/ionic2-copay.git"
"url": "git://github.com/bitpay/icv2.git"
},
"cordovaPlugins": [
"cordova-plugin-device",
Expand All @@ -83,7 +85,7 @@
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-sqlite-ext"
"cordova-sqlite-storage"
],
"cordovaPlatforms": [
"ios"
Expand Down
1 change: 0 additions & 1 deletion packaged-plugins/starter/app/pages/landing/landing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class LandingPage {
}
}
closePlugin(){
console.log('Trying to close plugin');
this.icv2.close();
}
}
196 changes: 0 additions & 196 deletions packaged-plugins/starter/hooks/README.md

This file was deleted.

17 changes: 17 additions & 0 deletions packaged-plugins/wallet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Specifies files to intentionally ignore when using Git
# http://git-scm.com/docs/gitignore

node_modules
www/build/

*.swp
.DS_Store
Thumbs.db
*.log

/platforms
/plugins
app/**/*.js
app/**/*.js.map

typings/main*
18 changes: 18 additions & 0 deletions packaged-plugins/wallet/app/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { App, Platform } from 'ionic-angular';
import { LandingPage } from './pages/landing/landing';
import { Icv2, Activity } from 'icv2-plugin-client';

@App({
template: '<ion-nav [root]="rootPage"></ion-nav>',
providers: [Icv2],
config: {}
})
export class MyApp {
rootPage: any = LandingPage;

constructor(platform: Platform, private icv2: Icv2) {
platform.ready().then(() => {
console.log('Wallet ready.');
});
}
}
14 changes: 14 additions & 0 deletions packaged-plugins/wallet/app/pages/landing/landing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<ion-navbar *navbar>
<ion-title>{{name}}</ion-title>
<ion-buttons start>
<button (click)="closePlugin()">
<ion-icon name="close"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>

<ion-content padding>
<h2>{{name}}</h2>
<!-- <p>This image should not load within the icv2 sandbox:</p>
<img src="http://baconmockup.com/100/50"> -->
</ion-content>
15 changes: 15 additions & 0 deletions packaged-plugins/wallet/app/pages/landing/landing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {Page} from 'ionic-angular';
import { Icv2 } from 'icv2-plugin-client';

@Page({
templateUrl: 'build/pages/landing/landing.html'
})
export class LandingPage {
name: string;
constructor(private icv2: Icv2) {
this.name = 'Wallet';
}
closePlugin(){
this.icv2.close();
}
}
8 changes: 8 additions & 0 deletions packaged-plugins/wallet/app/theme/app.core.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// http://ionicframework.com/docs/v2/theming/


// App Shared Imports
// --------------------------------------------------
// These are the imports which make up the design of this app.
// By default each design mode includes these shared imports.
// App Shared Sass variables belong in app.variables.scss.
32 changes: 32 additions & 0 deletions packaged-plugins/wallet/app/theme/app.ios.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

// http://ionicframework.com/docs/v2/theming/


// App Shared Variables
// --------------------------------------------------
// Shared Sass variables go in the app.varialbes.scss file
@import 'app.variables';


// App iOS Variables
// --------------------------------------------------
// iOS only Sass variables can go here


// Ionic iOS Sass
// --------------------------------------------------
// Custom App variables must be declared before importing Ionic.
// Ionic will use its default values when a custom variable isn't provided.
@import 'ionic.ios';


// App Shared Sass
// --------------------------------------------------
// All Sass files that make up this app goes into the app.core.scss file.
// For simpler CSS overrides, custom app CSS must come after Ionic's CSS.
@import 'app.core';


// App iOS Only Sass
// --------------------------------------------------
// CSS that should only apply to the iOS app
Loading

0 comments on commit b363260

Please sign in to comment.