Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding demo project #8

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Adding demo project #8

wants to merge 8 commits into from

Conversation

sc-nick
Copy link

@sc-nick sc-nick commented May 10, 2021

No description provided.

demo/config.xml Outdated
Comment on lines 96 to 101
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugin tag not used now with new cordova version

Suggested change
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 1 to 8
These are Cordova resources. You can replace icon.png and splash.png and run
`ionic cordova resources` to generate custom icons and splash screens for your
app. See `ionic cordova resources --help` for details.

Cordova reference documentation:

- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
Copy link
Member

@dinitri dinitri May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little description on how to build and launch app

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

outputType: 1,
};

window.imagePicker.getPictures(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can try to declare imagePicker var as any at the top and use it directly instead of using window

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 28 to 29
this.images = [];
this.images = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate assignment

Suggested change
this.images = [];
this.images = [];
this.images = [];

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 16 to 30
<ion-grid>
<ion-row *ngFor="let row of grid">
<ion-col width-33 *ngFor="let img of row">
<div class="img-container" *ngIf="img">
<div class="close-btn">
<ion-icon
name="trash-outline"
(click)="removeImage(img)"
></ion-icon>
</div>
<img [src]="img | safe" height="150" />
</div>
</ion-col>
</ion-row>
</ion-grid>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can simplify the grid display using a flat array of urls and property size=4 to get 3 columns
In home.page.ts

images = [
  "path",
  "path",
  "path",
  "path",
       .
       .
     etc
];

in home.page.html

<ion-grid>
    <ion-row>
      <ion-col *ngFor="let url of images" ion-col [size="4"]>
        <div class="img-container">
            <div class="close-btn">
              <ion-icon
                name="trash-outline"
                (click)="removeImage(img)"
              ></ion-icon>
        </div>
        <img [src]="url | safe" height="150" />
      </ion-col>
    </ion-row>
 </ion-grid>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

src/android/ImagePicker.java Outdated Show resolved Hide resolved
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fichier à supprimer.

demo/config.xml Outdated
Comment on lines 3 to 5
<name>demo</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="[email protected]" href="http://ionicframework.com/">Ionic Framework Team</author>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>demo</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<name>ImagePicker demo</name>
<description>Demo app for image picker cordova app.</description>
<author email="nick.andrianaharimalala@sc-mauritius.com" href="http://spoonconsulting.com/">Spoon Consulting Ltd</author>

@@ -0,0 +1,7 @@
{
"name": "demo",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "demo",
"name": "ImagePicker demo",

@@ -0,0 +1,90 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock.json à supprimer.

@@ -0,0 +1,90 @@
{
"name": "demo",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "demo",
"name": "ImagePicker demo",

"cordova": {
"plugins": {
"@spoonconsulting/cordova-plugin-telerik-imagepicker": {
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "DemoIPicker require access to photo library to choose from existing photos."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "DemoIPicker require access to photo library to choose from existing photos."
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "ImagePicker demo require access to photo library to choose from existing photos."

const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
// TODO: add more tests!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, je ne pense pas qu'on voudrait des tests sur l'app demo.

<input type="button" value="Open gallery" (click)="openGallery()" />
<ion-grid>
<ion-row>
<ion-col *ngFor="let url of images" ion-col size="4">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<ion-col *ngFor="let url of images" ion-col size="4">
<ion-col *ngFor="let url of images" size="4">

Besoin de ça ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non

);
}

hasReadPermission() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est utilisé où ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dsl, c reglé

@@ -0,0 +1,14 @@
import { AppPage } from './app.po';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On n'a pas besoin de tests sur l'app demo. Tu peux supprimer les fichiers pour les tests. @ombr on est d'accord ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@sc-nick
Copy link
Author

sc-nick commented May 17, 2021

@azharbeebeejaun je pense que c bon

@ombr ombr requested a review from YushraJewon May 17, 2021 16:48
@ombr ombr removed their request for review May 27, 2021 14:25
@YushraJewon YushraJewon removed their request for review May 30, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants