This commit is contained in:
ivan gomes
2021-11-22 15:26:04 +01:00
parent b11b2bcb31
commit 674f3636b3
9 changed files with 78 additions and 45 deletions
@@ -1,18 +0,0 @@
Pod::Spec.new do |s|
s.name = 'CordovaPlugins'
s.version = '3.3.0'
s.summary = 'Autogenerated spec'
s.license = 'Unknown'
s.homepage = 'https://example.com'
s.authors = { 'Capacitor Generator' => 'hi@example.com' }
s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '3.3.0' }
s.source_files = 'sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '12.0'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' }
s.dependency 'CapacitorCordova'
s.swift_version = '5.1'
s.weak_frameworks = 'AudioToolbox', 'SystemConfiguration'
s.frameworks = 'AssetsLibrary', 'MobileCoreServices', 'CoreGraphics', 'CoreTelephony'
s.compiler_flags = '-w -w -DSQLITE_THREADSAFE=1 -DSQLITE_DEFAULT_SYNCHRONOUS=3 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_DEFAULT_PAGE_SIZE=4096'
end
@@ -1,16 +0,0 @@
Pod::Spec.new do |s|
s.name = 'CordovaPluginsStatic'
s.version = '3.3.0'
s.summary = 'Autogenerated spec'
s.license = 'Unknown'
s.homepage = 'https://example.com'
s.authors = { 'Capacitor Generator' => 'hi@example.com' }
s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '3.3.0' }
s.source_files = 'sourcesstatic/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '12.0'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' }
s.dependency 'CapacitorCordova'
s.swift_version = '5.1'
s.static_framework = true
end
+20
View File
@@ -2958,6 +2958,21 @@
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
} }
}, },
"@ionic-native/crop": {
"version": "5.36.0",
"resolved": "https://registry.npmjs.org/@ionic-native/crop/-/crop-5.36.0.tgz",
"integrity": "sha512-wRO8J9oSHl4klvPMti7MTYjFCl6dYHYlbe56gzImf1pwfKQ7gmusskeedABfZggPV1NHruMBKUNALdatJf603A==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/fcm": { "@ionic-native/fcm": {
"version": "5.36.0", "version": "5.36.0",
"resolved": "https://registry.npmjs.org/@ionic-native/fcm/-/fcm-5.36.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/fcm/-/fcm-5.36.0.tgz",
@@ -7842,6 +7857,11 @@
"integrity": "sha1-C8ZXVyduvZIMASzpIOJ0F3V2Nz4=", "integrity": "sha1-C8ZXVyduvZIMASzpIOJ0F3V2Nz4=",
"dev": true "dev": true
}, },
"cordova-plugin-crop": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-crop/-/cordova-plugin-crop-0.4.0.tgz",
"integrity": "sha1-TZ6Jgsz7OOBPqQnIe0vsBuLR2Ss="
},
"cordova-plugin-dbcopy": { "cordova-plugin-dbcopy": {
"version": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git#861f585e4313db828d6b8c7d354c32c83373d0d2", "version": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git#861f585e4313db828d6b8c7d354c32c83373d0d2",
"from": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git" "from": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git"
+2
View File
@@ -54,6 +54,7 @@
"@fullcalendar/interaction": "^5.3.0", "@fullcalendar/interaction": "^5.3.0",
"@ionic-native/camera": "^5.31.1", "@ionic-native/camera": "^5.31.1",
"@ionic-native/core": "^5.0.7", "@ionic-native/core": "^5.0.7",
"@ionic-native/crop": "^5.36.0",
"@ionic-native/fcm": "^5.36.0", "@ionic-native/fcm": "^5.36.0",
"@ionic-native/file": "^5.36.0", "@ionic-native/file": "^5.36.0",
"@ionic-native/file-path": "^5.30.0", "@ionic-native/file-path": "^5.30.0",
@@ -93,6 +94,7 @@
"capacitor-voice-recorder": "^2.0.0", "capacitor-voice-recorder": "^2.0.0",
"ci": "^2.1.1", "ci": "^2.1.1",
"cordova": "^10.0.0", "cordova": "^10.0.0",
"cordova-plugin-crop": "^0.4.0",
"cordova-plugin-dbcopy": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git", "cordova-plugin-dbcopy": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git",
"cordova-plugin-filepath": "^1.5.8", "cordova-plugin-filepath": "^1.5.8",
"cordova-plugin-okhttp": "^2.0.0", "cordova-plugin-okhttp": "^2.0.0",
+15 -1
View File
@@ -9,6 +9,7 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
const moment = _rollupMoment || _moment; const moment = _rollupMoment || _moment;
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker'; import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx'; import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
@@ -39,7 +40,8 @@ export class AppComponent {
/* private splashScreen: SplashScreen, */ /* private splashScreen: SplashScreen, */
private statusBar: StatusBar, private statusBar: StatusBar,
private screenOrientation: ScreenOrientation, private screenOrientation: ScreenOrientation,
private sqliteservice: SqliteService private sqliteservice: SqliteService,
private backgroundservice: BackgroundService
) { ) {
this.initializeApp(); this.initializeApp();
} }
@@ -65,6 +67,18 @@ export class AppComponent {
console.log("Error creating local database: ", error) console.log("Error creating local database: ", error)
} }
} }
window.addEventListener('online', () => {
console.log('Became online')
this.backgroundservice.online()
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
}
});
window.addEventListener('offline', () => {
console.log('Became offline')
this.backgroundservice.offline()
});
}); });
} }
+9 -1
View File
@@ -30,6 +30,7 @@ import { environment } from 'src/environments/environment';
import { TimeService } from 'src/app/services/functions/time.service'; import { TimeService } from 'src/app/services/functions/time.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { DataService } from 'src/app/services/data.service'; import { DataService } from 'src/app/services/data.service';
import { Crop } from '@ionic-native/crop/ngx';
@Component({ @Component({
@@ -119,6 +120,7 @@ export class ChatPage implements OnInit {
public ThemeService: ThemeService, public ThemeService: ThemeService,
private dataService:DataService, private dataService:DataService,
private router: Router, private router: Router,
private crop: Crop,
){ ){
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = authService.ValidatedUserChat['data'];
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
@@ -549,4 +551,10 @@ hideRefreshButton(){
modal.onDidDismiss(); modal.onDidDismiss();
} }
} // this.crop.crop('path/to/image.jpg', {quality: 75})
// .then(
// newImage => console.log('new image path is: ' + newImage),
// error => console.error('Error cropping image', error)
// );
}
@@ -414,7 +414,8 @@ export class NewPublicationPage implements OnInit {
directory: Directory.Data directory: Directory.Data
}); });
this.loadFiles(); //this.loadFiles(fileName);
this.loadFileData(fileName);
} }
private async readAsBase64(photo: Photo) { private async readAsBase64(photo: Photo) {
@@ -434,7 +435,7 @@ export class NewPublicationPage implements OnInit {
} }
} }
async loadFiles() { async loadFiles(fileName) {
this.images = []; this.images = [];
const loading = await this.loadingCtrl.create({ const loading = await this.loadingCtrl.create({
@@ -442,11 +443,11 @@ export class NewPublicationPage implements OnInit {
}); });
await loading.present(); await loading.present();
Filesystem.readdir({ /* Filesystem.readdir({
path: IMAGE_DIR, path: `${IMAGE_DIR}/${fileName}`,
directory: Directory.Data, directory: Directory.Data,
}).then(result => { }).then(result => {
console.log('ALL RESULTS', result.files[0]) console.log('ALL RESULTS', result.files)
let lastphoto = result.files[result.files.length - 1] let lastphoto = result.files[result.files.length - 1]
this.loadFileData(lastphoto); this.loadFileData(lastphoto);
}, },
@@ -461,12 +462,17 @@ export class NewPublicationPage implements OnInit {
} }
).then(_ => { ).then(_ => {
loading.dismiss(); loading.dismiss();
}); }); */
} }
async loadFileData(fileName: string) { async loadFileData(fileName: string) {
console.log('ALL PHOTOT FILE', fileName) console.log('ALL PHOTOT FILE', fileName)
// for (let f of fileNames) {
const loading = await this.loadingCtrl.create({
message: 'Loading data...',
});
await loading.present();
const filePath = `${IMAGE_DIR}/${fileName}`; const filePath = `${IMAGE_DIR}/${fileName}`;
const readFile = await Filesystem.readFile({ const readFile = await Filesystem.readFile({
@@ -483,7 +489,9 @@ export class NewPublicationPage implements OnInit {
console.log('ALL IMAGE', this.images) console.log('ALL IMAGE', this.images)
this.capturedImage = this.images[0].data this.capturedImage = this.images[0].data
//}
loading.dismiss();
} }
@@ -16,6 +16,7 @@ import { PublicationTravelFolderStore } from 'src/app/store/publication-travel-f
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { Crop } from '@ionic-native/crop/ngx';
@Component({ @Component({
selector: 'app-publications', selector: 'app-publications',
@@ -68,7 +69,8 @@ export class PublicationsPage implements OnInit {
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
private platform: Platform, private platform: Platform,
public ThemeService: ThemeService public ThemeService: ThemeService,
private crop: Crop,
) { ) {
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
@@ -91,6 +93,8 @@ export class PublicationsPage implements OnInit {
} }
hideRefreshButton() { hideRefreshButton() {
window.onresize = (event) => { window.onresize = (event) => {
if (window.innerWidth < 801) { if (window.innerWidth < 801) {
@@ -452,4 +456,12 @@ export class PublicationsPage implements OnInit {
}); });
} }
// this.crop.crop('path/to/image.jpg', {quality: 75})
// .then(
// newImage => console.log('new image path is: ' + newImage),
// error => console.error('Error cropping image', error)
// );
} }
+3
View File
@@ -1355,4 +1355,7 @@ ngx-mat-datetime-content{
--background:transparent; --background:transparent;
} }
.transparent-modal .modal-wrapper {
--background: rgba(44, 39, 45, 0.7);
}
} }