Changed touchStart by click
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
fill="clear"
|
fill="clear"
|
||||||
class="m-0 p-0 min-h-0 text-[11px] font-black bg-black text-white rounded-3xl"
|
class="m-0 p-0 min-h-0 text-[11px] font-black bg-black text-white rounded-3xl"
|
||||||
style="--padding-top: 4px; --padding-bottom: 4px;"
|
style="--padding-top: 4px; --padding-bottom: 4px;"
|
||||||
(touchstart)="setOpen(true)">
|
(click)="setOpen(true)">
|
||||||
{{ action() }}
|
{{ action() }}
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Défi Quotidien</ion-title>
|
<ion-title>Défi Quotidien</ion-title>
|
||||||
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
||||||
<ion-back-button default-href="" (touchstart)="setOpen(false)"></ion-back-button>
|
<ion-back-button default-href="" (click)="setOpen(false)"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<app-proof-form #proofForm></app-proof-form>
|
<app-proof-form #proofForm></app-proof-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-button expand="block" (touchstart)="sendProof(data().id)">Soumettre ma preuve</ion-button>
|
<ion-button expand="block" (click)="sendProof(data().id)">Soumettre ma preuve</ion-button>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
||||||
</ion-avatar>
|
</ion-avatar>
|
||||||
<ion-label class="text-xs font-mono">{{ request.username }}</ion-label>
|
<ion-label class="text-xs font-mono">{{ request.username }}</ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="acceptRequest(request)">
|
<ion-button fill="clear" (click)="acceptRequest(request)">
|
||||||
<ion-icon slot="icon-only" name="check" class="text-green-600 m-0"></ion-icon>
|
<ion-icon slot="icon-only" name="check" class="text-green-600 m-0"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
<app-pipe></app-pipe>
|
<app-pipe></app-pipe>
|
||||||
<ion-button fill="clear" (touchstart)="rejectRequest(request.userId)">
|
<ion-button fill="clear" (click)="rejectRequest(request.userId)">
|
||||||
<ion-icon slot="icon-only" name="close" class="text-red-600 m-0"></ion-icon>
|
<ion-icon slot="icon-only" name="close" class="text-red-600 m-0"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -24,11 +24,11 @@
|
|||||||
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
||||||
</ion-avatar>
|
</ion-avatar>
|
||||||
<ion-label class="text-xs font-mono">{{ request.username }}</ion-label>
|
<ion-label class="text-xs font-mono">{{ request.username }}</ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="acceptRequest(request)">
|
<ion-button fill="clear" (click)="acceptRequest(request)">
|
||||||
<ion-icon slot="icon-only" name="check" class="text-green-600 m-0"></ion-icon>
|
<ion-icon slot="icon-only" name="check" class="text-green-600 m-0"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
<app-pipe></app-pipe>
|
<app-pipe></app-pipe>
|
||||||
<ion-button fill="clear" (touchstart)="rejectRequest(request.userId)">
|
<ion-button fill="clear" (click)="rejectRequest(request.userId)">
|
||||||
<ion-icon slot="icon-only" name="close" class="text-red-600 m-0"></ion-icon>
|
<ion-icon slot="icon-only" name="close" class="text-red-600 m-0"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
||||||
</ion-avatar>
|
</ion-avatar>
|
||||||
<ion-label class="text-xs font-mono font-bold"
|
<ion-label class="text-xs font-mono font-bold"
|
||||||
(touchstart)="setOpen(true, friend.friendId)">{{ friend.username }}
|
(click)="setOpen(true, friend.friendId)">{{ friend.username }}
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-label class="text-xs font-mono text-gray-400">{{ friend.score }} <em>pts</em></ion-label>
|
<ion-label class="text-xs font-mono text-gray-400">{{ friend.score }} <em>pts</em></ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="deleteFriend(friend.friendId)">
|
<ion-button fill="clear" (click)="deleteFriend(friend.friendId)">
|
||||||
<ion-icon slot="icon-only" name="close" class="text-red-600"></ion-icon>
|
<ion-icon slot="icon-only" name="close" class="text-red-600"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
src="https://ionicframework.com/docs/img/demos/avatar.svg"/>
|
||||||
</ion-avatar>
|
</ion-avatar>
|
||||||
<ion-label class="text-xs font-mono font-bold"
|
<ion-label class="text-xs font-mono font-bold"
|
||||||
(touchstart)="setOpen(true, friend.friendId)">{{ friend.username }}
|
(click)="setOpen(true, friend.friendId)">{{ friend.username }}
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-label class="text-xs font-mono text-gray-400">{{ friend.score }} <em>pts</em></ion-label>
|
<ion-label class="text-xs font-mono text-gray-400">{{ friend.score }} <em>pts</em></ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="deleteFriend(friend.friendId)">
|
<ion-button fill="clear" (click)="deleteFriend(friend.friendId)">
|
||||||
<ion-icon slot="icon-only" name="close" class="text-red-600"></ion-icon>
|
<ion-icon slot="icon-only" name="close" class="text-red-600"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Profil</ion-title>
|
<ion-title>Profil</ion-title>
|
||||||
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
||||||
<ion-back-button default-href="" (touchstart)="setOpen(false, null)"></ion-back-button>
|
<ion-back-button default-href="" (click)="setOpen(false, null)"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<ion-label class="text-xs font-mono text-gray-400">{{ result.getUserStatsDto.score }}
|
<ion-label class="text-xs font-mono text-gray-400">{{ result.getUserStatsDto.score }}
|
||||||
<em>pts</em>
|
<em>pts</em>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="addFriend(result.id)">
|
<ion-button fill="clear" (click)="addFriend(result.id)">
|
||||||
<ion-icon slot="icon-only" name="send" class="text-green-700 text-2xl"></ion-icon>
|
<ion-icon slot="icon-only" name="send" class="text-green-700 text-2xl"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<ion-label class="text-xs font-mono text-gray-400">{{ result.getUserStatsDto.score }}
|
<ion-label class="text-xs font-mono text-gray-400">{{ result.getUserStatsDto.score }}
|
||||||
<em>pts</em>
|
<em>pts</em>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-button fill="clear" (touchstart)="addFriend(result.id)">
|
<ion-button fill="clear" (click)="addFriend(result.id)">
|
||||||
<ion-icon slot="icon-only" name="send" class="text-green-700 text-2xl"></ion-icon>
|
<ion-icon slot="icon-only" name="send" class="text-green-700 text-2xl"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||
@@ -2,36 +2,38 @@
|
|||||||
<ion-list>
|
<ion-list>
|
||||||
@for (n of options; track n) {
|
@for (n of options; track n) {
|
||||||
@if (n == options.length) {
|
@if (n == options.length) {
|
||||||
<ion-item lines="none">
|
<ion-item lines="none" class="transition-all duration-200 active:[--background:#DBD8D7]" (click)="logOut()">
|
||||||
<p class="text-sm text-red-800">Se déconnecter</p>
|
<p class="text-sm text-red-800">Se déconnecter</p>
|
||||||
<ion-icon slot="end" class="text-xl text-red-800" name="logout"></ion-icon>
|
<ion-icon slot="end" class="text-xl text-red-800" name="logout"></ion-icon>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
} @else {
|
} @else {
|
||||||
<ion-item lines="full">
|
|
||||||
@switch (n) {
|
@switch (n) {
|
||||||
@case (1) {
|
@case (1) {
|
||||||
|
<ion-item lines="full" class="transition-all duration-200 active:[--background:#DBD8D7]">
|
||||||
<p class="text-sm text-gray-600">Ma galerie</p>
|
<p class="text-sm text-gray-600">Ma galerie</p>
|
||||||
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
}
|
}
|
||||||
@case (2) {
|
@case (2) {
|
||||||
<p class="text-sm text-gray-600">Modifier le pseudo</p>
|
<ion-item lines="full" class="transition-all duration-200 active:[--background:#DBD8D7]">
|
||||||
|
<p class="text-sm text-gray-600">Modifier mes informations</p>
|
||||||
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
}
|
}
|
||||||
@case (3) {
|
@case (3) {
|
||||||
<p class="text-sm text-gray-600">Modifier l'email</p>
|
<ion-item lines="full" class="transition-all duration-200 active:[--background:#DBD8D7]">
|
||||||
|
<p class="text-sm text-gray-600">Modifier mon mot de passe</p>
|
||||||
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
}
|
}
|
||||||
@case (4) {
|
@case (4) {
|
||||||
<p class="text-sm text-gray-600">Modifier le mot de passe</p>
|
<ion-item lines="full" class="transition-all duration-200 active:[--background:#DBD8D7]">
|
||||||
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
|
||||||
}
|
|
||||||
@case (5) {
|
|
||||||
<p class="text-sm text-gray-600">Changer de désignation</p>
|
<p class="text-sm text-gray-600">Changer de désignation</p>
|
||||||
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
<ion-icon slot="end" class="text-xl text-gray-400" name="chevron"></ion-icon>
|
||||||
}
|
|
||||||
}
|
|
||||||
</ion-item>
|
</ion-item>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component, inject} from '@angular/core';
|
||||||
import {IonicModule} from "@ionic/angular";
|
import {IonicModule, LoadingController, NavController} from "@ionic/angular";
|
||||||
import {logOutOutline, chevronForwardOutline} from "ionicons/icons";
|
import {logOutOutline, chevronForwardOutline} from "ionicons/icons";
|
||||||
import {addIcons} from "ionicons";
|
import {addIcons} from "ionicons";
|
||||||
|
import {AuthManageService} from "../../services/auth-manage";
|
||||||
|
|
||||||
addIcons({
|
addIcons({
|
||||||
'logout': logOutOutline,
|
'logout': logOutOutline,
|
||||||
@@ -17,6 +18,22 @@ addIcons({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SettingsOptionsComponent {
|
export class SettingsOptionsComponent {
|
||||||
|
private authManageService = inject(AuthManageService);
|
||||||
|
private loadCtrl = inject(LoadingController);
|
||||||
|
private navCtrl = inject(NavController);
|
||||||
|
|
||||||
options = [1, 2, 3, 4, 5, 6];
|
options = [1, 2, 3, 4, 5];
|
||||||
|
|
||||||
|
async logOut(){
|
||||||
|
const loading = await this.loadCtrl.create({
|
||||||
|
message: 'Déconnexion en cours...',
|
||||||
|
spinner: 'lines-sharp-small'
|
||||||
|
});
|
||||||
|
await loading.present();
|
||||||
|
|
||||||
|
this.authManageService.logout();
|
||||||
|
await this.navCtrl.navigateRoot('/');
|
||||||
|
|
||||||
|
await loading.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<ion-buttons slot="secondary">
|
<ion-buttons slot="secondary">
|
||||||
<ion-button fill="solid" style="--background: #F0EFE9;"
|
<ion-button fill="solid" style="--background: #F0EFE9;"
|
||||||
class="border border-gray-300 rounded-lg overflow-hidden"
|
class="border border-gray-300 rounded-lg overflow-hidden"
|
||||||
(touchstart)="setOpen(true)">
|
(click)="setOpen(true)">
|
||||||
<ion-icon slot="icon-only" class="text-xl text-gray-500" name="profile"></ion-icon>
|
<ion-icon slot="icon-only" class="text-xl text-gray-500" name="profile"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
<ion-buttons slot="start" style="--ion-color-primary: #0054E9;">
|
||||||
<ion-back-button default-href="" (touchstart)="setOpen(false)"></ion-back-button>
|
<ion-back-button default-href="" (click)="setOpen(false)"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>Profil</ion-title>
|
<ion-title>Profil</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
@if (authState()) {
|
@if (authState()) {
|
||||||
<app-sign-in-form class="mb-9" #loginForm></app-sign-in-form>
|
<app-sign-in-form class="mb-9" #loginForm></app-sign-in-form>
|
||||||
|
|
||||||
<ion-button class="w-10/12 mt-0 border-0" color="primary" (touchstart)="connectUser()">
|
<ion-button class="w-10/12 mt-0 border-0" color="primary" (click)="connectUser()">
|
||||||
<p class="text-white font-bold m-0">Se connecter</p>
|
<p class="text-white font-bold m-0">Se connecter</p>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<app-sign-on-form #userForm></app-sign-on-form>
|
<app-sign-on-form #userForm></app-sign-on-form>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ion-button class="w-10/12 mt-0" color="secondary" (touchstart)="createAccount()">
|
<ion-button class="w-10/12 mt-0" color="secondary" (click)="createAccount()">
|
||||||
<p class="text-black font-bold m-0">Créer un compte</p>
|
<p class="text-black font-bold m-0">Créer un compte</p>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user