Skip to content

Commit

Permalink
Merge pull request #87 from myclubapp/feat/removeMembers
Browse files Browse the repository at this point in the history
Feat/remove members
  • Loading branch information
sansan88 authored Oct 5, 2023
2 parents b690be0 + 1cab08a commit e52cb70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ion-label>myclub</ion-label>
</ion-item>

<ion-list [inset]="true" slot="content">
<ion-list slot="content">
<ion-note>{{ email }}</ion-note>

<ion-menu-toggle auto-hide="false">
Expand Down Expand Up @@ -60,7 +60,7 @@
<ion-label>Administration</ion-label>
</ion-item>

<ion-list [inset]="true" slot="content">
<ion-list slot="content">
<ion-menu-toggle auto-hide="false">
<ion-item routerDirection="root" [routerLink]="['/club-list']" lines="none" detail="true"
routerLinkActive="selected">
Expand Down
17 changes: 15 additions & 2 deletions src/app/pages/profile/profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { UserProfileService } from "src/app/services/firebase/user-profile.servi
import { switchMap, take, tap } from "rxjs/operators";
import {
AlertController,
LoadingController,
MenuController,
ToastController,
} from "@ionic/angular";
Expand Down Expand Up @@ -61,6 +62,7 @@ export class ProfilePage implements OnInit, AfterViewInit {
private readonly fbService: FirebaseService,
private readonly profileService: UserProfileService,
private readonly toastController: ToastController,
private readonly loadingController: LoadingController,
private readonly alertController: AlertController,
private readonly router: Router,
private readonly menuCtrl: MenuController
Expand Down Expand Up @@ -201,6 +203,15 @@ export class ProfilePage implements OnInit, AfterViewInit {
*/

async takePicture() {

const loading = await this.loadingController.create({
message: 'Profilbild wird hochgeladen',
showBackdrop: true,
backdropDismiss: false,
translucent: true,
spinner: "circular",
});

const image = await Camera.getPhoto({
quality: 90,
allowEditing: true,
Expand All @@ -211,15 +222,17 @@ export class ProfilePage implements OnInit, AfterViewInit {
direction: CameraDirection.Front,
});

loading.present();
// image.webPath will contain a path that can be set as an image src.
// You can access the original file using image.path, which can be
// passed to the Filesystem API to read the raw data of the image,
// if desired (or pass resultType: CameraResultType.Base64 to getPhoto)
var imageUrl = image.base64String;
console.log(image);
// var imageUrl = image.base64String;
// console.log(image);

// const user: User = await this.authService.getUser();
await this.profileService.setUserProfilePicture(image);
loading.dismiss();
await this.presentToastTakePicture();
}

Expand Down

0 comments on commit e52cb70

Please sign in to comment.