mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Disabled capacitor and add camera integration
This commit is contained in:
@@ -56,24 +56,24 @@ export class AuthService {
|
||||
}
|
||||
|
||||
//Get user data from RocketChat
|
||||
getUserData(){
|
||||
/* getUserData(){
|
||||
this.storageService.get(AuthConnstants.AUTH).then(res=>{
|
||||
this.userData$.next(res);
|
||||
})
|
||||
}
|
||||
} */
|
||||
|
||||
getProfile(){
|
||||
/* getProfile(){
|
||||
this.storageService.get(AuthConnstants.PROFILE).then(res=>{
|
||||
return res;
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
logoutChat(){
|
||||
//this.storageService.clear();
|
||||
this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
|
||||
/* this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
|
||||
this.userData$.next('');
|
||||
this.router.navigate(['']);
|
||||
})
|
||||
}) */
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
/* import {
|
||||
Plugins,
|
||||
PushNotification,
|
||||
PushNotificationToken,
|
||||
PushNotificationActionPerformed,
|
||||
Capacitor
|
||||
} from '@capacitor/core';
|
||||
} from '@capacitor/core'; */
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
const { PushNotifications } = Plugins;
|
||||
/* const { PushNotifications } = Plugins; */
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -17,7 +17,7 @@ export class FcmService {
|
||||
|
||||
constructor(private router: Router) { }
|
||||
|
||||
initPush() {
|
||||
/* initPush() {
|
||||
if (Capacitor.platform !== 'web') {
|
||||
this.registerPush();
|
||||
}
|
||||
@@ -58,7 +58,7 @@ export class FcmService {
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
} */
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Plugins, CameraResultType, Capacitor, FilesystemDirectory, CameraPhoto, CameraSource } from '@capacitor/core';
|
||||
/* import { Plugins, CameraResultType, Capacitor, FilesystemDirectory, CameraPhoto, CameraSource } from '@capacitor/core'; */
|
||||
import { Photo } from '../models/photo';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
@@ -27,6 +27,8 @@ export class PhotoService {
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
mediaType: this.camera.MediaType.PICTURE
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugins } from '@capacitor/core';
|
||||
const { Storage } = Plugins;
|
||||
/* import { Plugins } from '@capacitor/core';
|
||||
const { Storage } = Plugins; */
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class StorageService {
|
||||
constructor() {}
|
||||
|
||||
// Store the value
|
||||
/* // Store the value
|
||||
async store(storageKey: string, value: any) {
|
||||
const encryptedValue = btoa(escape(JSON.stringify(value)));
|
||||
await Storage.set({
|
||||
@@ -29,5 +29,5 @@ const { Storage } = Plugins;
|
||||
// Clear storage
|
||||
async clear() {
|
||||
await Storage.clear();
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user