Skip to content

Commit

Permalink
epub
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-lab committed Sep 25, 2019
1 parent ef4275a commit c905ebd
Show file tree
Hide file tree
Showing 9 changed files with 902 additions and 153 deletions.
2 changes: 2 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
Expand Down Expand Up @@ -100,5 +101,6 @@
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-tts" spec="0.2.3" />
<plugin name="cordova-plugin-file" spec="6.0.2" />
<engine name="android" spec="7.1.4" />
</widget>
32 changes: 21 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@ionic-native/core": "^5.0.0",
"@ionic-native/diagnostic": "^5.14.0",
"@ionic-native/file": "^5.14.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/text-to-speech": "^5.14.0",
"@ionic/angular": "^4.7.1",
"cordova-android": "7.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-splashscreen": "^5.0.2",
Expand All @@ -37,6 +37,7 @@
"cordova-plugin-whitelist": "^1.3.3",
"core-js": "^2.5.4",
"epub": "^1.1.0",
"node": "^12.10.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
Expand All @@ -53,7 +54,7 @@
"@ionic/angular-toolkit": "~2.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"@types/node": "^7.10.7",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
Expand All @@ -78,10 +79,11 @@
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-file": {}
},
"platforms": [
"android"
]
}
}
}
3 changes: 1 addition & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { FilesManager } from './services/files.service';
import { File } from '@ionic-native/file/ngx';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
//import { Diagnostic } from '@ionic-native/diagnostic/ngx';

@NgModule({
declarations: [AppComponent],
Expand All @@ -21,7 +21,6 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx';
SplashScreen,
FilesManager,
File,
Diagnostic,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
Expand Down
16 changes: 12 additions & 4 deletions src/app/home/home.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</ion-header>

<ion-content>
<ion-segment (ionChange)="onScan($event)">
<ion-segment (ionChange)="onScan()" [(ngModel)]="which">
<ion-segment-button value="1">
<ion-label>SD Card</ion-label>
</ion-segment-button>
Expand All @@ -18,7 +18,11 @@
<ion-label>Internal</ion-label>
</ion-segment-button>
</ion-segment>
<ion-segment [(ngModel)]="display">
<ion-item>
<ion-label>Recursive</ion-label>
<ion-toggle [(ngModel)]="recursive" (ionChange)="onScan()"></ion-toggle>
</ion-item>
<!-- <ion-segment [(ngModel)]="display">
<ion-segment-button value="jcInfo">
<ion-label>Info</ion-label>
</ion-segment-button>
Expand All @@ -31,6 +35,10 @@
<ion-segment-button value="fileSysArray">
<ion-label>Array</ion-label>
</ion-segment-button>
</ion-segment>
<div class="ion-padding" [innerHtml]="files[display]"></div>
</ion-segment> -->
<ion-list>
<ion-item *ngFor="let file of files.fileArray">
{{file}}
</ion-item>
</ion-list>
</ion-content>
12 changes: 7 additions & 5 deletions src/app/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ import { FilesManager } from '../services/files.service';
styleUrls: ['home.page.scss'],
})
export class HomePage {
display: string
display: string;
which: number = 1;
recursive: boolean;
constructor(
private files: FilesManager
) {
files.listFileSys(1);
files.loadFiles(this.which, this.recursive);
}

onScan(ev: any) {
console.log(ev);
this.files.listFileSys(parseInt(ev.detail.value));
onScan() {
let which = typeof this.which == 'string' ? parseInt(this.which) : this.which;
this.files.loadFiles(which, this.recursive);
}

}
Loading

0 comments on commit c905ebd

Please sign in to comment.