modalReviewd
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"appId": "com.gpr.gabinetedigital",
|
|
||||||
"appName": "gabinete-digital",
|
|
||||||
"webDir": "www",
|
|
||||||
"npmClient": "npm",
|
|
||||||
"linuxAndroidStudioPath": "/snap/android-studio/current/android-studio/bin/studio.sh",
|
|
||||||
"cordova": {
|
|
||||||
"preferences": {
|
|
||||||
"ScrollEnabled": "false",
|
|
||||||
"BackupWebStorage": "none",
|
|
||||||
"SplashMaintainAspectRatio": "true",
|
|
||||||
"FadeSplashScreenDuration": "300",
|
|
||||||
"SplashShowOnlyFirstTime": "false",
|
|
||||||
"SplashScreen": "screen",
|
|
||||||
"SplashScreenDelay": "3000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"android": {
|
|
||||||
"allowMixedContent": true
|
|
||||||
},
|
|
||||||
"bundledWebRuntime": false
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// / <reference types="@capacitor/local-notifications" />
|
||||||
|
// / <reference types="@capacitor/push-notifications" />
|
||||||
|
// / <reference types="@capacitor/splash-screen" />
|
||||||
|
|
||||||
|
import { CapacitorConfig } from '@capacitor/cli';
|
||||||
|
|
||||||
|
const config: CapacitorConfig = {
|
||||||
|
appId: 'com.capacitorjs.app.testapp',
|
||||||
|
appName: 'capacitor-testapp',
|
||||||
|
webDir: 'build',
|
||||||
|
plugins: {
|
||||||
|
SplashScreen: {
|
||||||
|
launchAutoHide: false,
|
||||||
|
},
|
||||||
|
LocalNotifications: {
|
||||||
|
smallIcon: 'ic_stat_icon_config_sample',
|
||||||
|
iconColor: '#CE0B7C',
|
||||||
|
},
|
||||||
|
PushNotifications: {
|
||||||
|
presentationOptions: ['alert', 'sound'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -2030,10 +2030,28 @@
|
|||||||
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
|
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@capacitor-community/camera-preview": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@capacitor-community/camera-preview/-/camera-preview-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-rskj/12TR4X8cUzvkWvygf7A/4TFUld9BU5nAc1gc3LXU06FGP0R/6MxZKQdf20qqRaTRLPrF3HFAlkz7xb6yg==",
|
||||||
|
"requires": {
|
||||||
|
"@capacitor/core": "^3.3.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@capacitor/core": {
|
||||||
|
"version": "3.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-3.3.2.tgz",
|
||||||
|
"integrity": "sha512-pyI3dQdQjA1L5iEw0jkeKCogx9t5d5kIFTB5M3CJRg9Uj5MIpU2J5CRj+74A7BflvZJo8IBd6IfMJaOArRumaw==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@capacitor/android": {
|
"@capacitor/android": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.2.tgz",
|
||||||
"integrity": "sha512-TB9UJh6/e6CV6KDpu/lNHKhgVvnDL2d3crNYtfKzp64CzeZhttQGIQShXSdMb3DG4kk7Zi/qBlfSaWBBD95NhQ=="
|
"integrity": "sha512-TG+tGz0KxkT/BgvSLQfbQwQ9c4Budub5TRijIGdmMbB1ZYB76TFhwvVuwWZ52HFSlKS3sx/UYLlbULL7UQ2aug=="
|
||||||
},
|
},
|
||||||
"@capacitor/app": {
|
"@capacitor/app": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
@@ -3425,6 +3443,46 @@
|
|||||||
"tslib": "^1.10.0"
|
"tslib": "^1.10.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"localforage-cordovasqlitedriver": {
|
||||||
|
"version": "1.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/localforage-cordovasqlitedriver/-/localforage-cordovasqlitedriver-1.7.0.tgz",
|
||||||
|
"integrity": "sha1-i5OVd1nuaI06WNW6fAR39sy1ODg=",
|
||||||
|
"requires": {
|
||||||
|
"localforage": ">=1.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@ionic/storage-angular": {
|
||||||
|
"version": "3.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ionic/storage-angular/-/storage-angular-3.0.6.tgz",
|
||||||
|
"integrity": "sha512-ZXlIFWGU27aCxVFgZb0KFJFtWwnn6+HK6v0rMGzjN8f7oV2ewXaQ2dl1gTw/A8YoozTVPOFxwfFHCjhWLFR1Fw==",
|
||||||
|
"requires": {
|
||||||
|
"@ionic/storage": "^3.0.4",
|
||||||
|
"tslib": "^1.10.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ionic/storage": {
|
||||||
|
"version": "3.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ionic/storage/-/storage-3.0.6.tgz",
|
||||||
|
"integrity": "sha512-sw+zSJINIpbQCGZR9mEtb9N0WmZLuhcMVqOZJBqLuDACAMdXqG39zmp5nSVqhGI1/9X3nd0K5gVn6icyVfUnUg==",
|
||||||
|
"requires": {
|
||||||
|
"localforage": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"localforage": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
|
||||||
|
"requires": {
|
||||||
|
"lie": "3.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "1.14.1",
|
"version": "1.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||||
@@ -7950,6 +8008,11 @@
|
|||||||
"integrity": "sha512-+v/VzCYBdGsIxJTP2m+RWaq7l/NLu7b976w6XGJUFiN2TVOeaGrytaR4jRy0w9akRai8uKFeBmuGHmlS/sOeCA==",
|
"integrity": "sha512-+v/VzCYBdGsIxJTP2m+RWaq7l/NLu7b976w6XGJUFiN2TVOeaGrytaR4jRy0w9akRai8uKFeBmuGHmlS/sOeCA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cordova-plugin-x-socialsharing": {
|
||||||
|
"version": "6.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cordova-plugin-x-socialsharing/-/cordova-plugin-x-socialsharing-6.0.3.tgz",
|
||||||
|
"integrity": "sha512-pnrE2CXsz4G0n0WoFDAasLS1VT3nIsNpddvXgfpiqX3wyOlSjO2NdF+sjYaTvs1B+f7z8EWbYCHpCrgBQiMLIg=="
|
||||||
|
},
|
||||||
"cordova-res": {
|
"cordova-res": {
|
||||||
"version": "0.15.3",
|
"version": "0.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-res/-/cordova-res-0.15.3.tgz",
|
"resolved": "https://registry.npmjs.org/cordova-res/-/cordova-res-0.15.3.tgz",
|
||||||
@@ -8032,19 +8095,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cordova-sqlite-storage": {
|
|
||||||
"version": "5.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-5.1.0.tgz",
|
|
||||||
"integrity": "sha512-UmHe9yQiYblDBToh3z91WHuD6ZgmCm3VX+1QFseYQs4WVQ3+ndj22qyGby/NV0uyCgok91gB1obLjLM+9vYJEw==",
|
|
||||||
"requires": {
|
|
||||||
"cordova-sqlite-storage-dependencies": "3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cordova-sqlite-storage-dependencies": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-A7gV5lQZc0oPrJ/a+lsZmMZr7vYou4MXyQFOY+b/dwuCMsagLT0EsL7oY54tqzpvjtzLfh0aZGGm9i8DMAIFSA=="
|
|
||||||
},
|
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "3.18.1",
|
"version": "3.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.1.tgz",
|
||||||
@@ -15357,14 +15407,6 @@
|
|||||||
"lie": "3.1.1"
|
"lie": "3.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"localforage-cordovasqlitedriver": {
|
|
||||||
"version": "1.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/localforage-cordovasqlitedriver/-/localforage-cordovasqlitedriver-1.7.0.tgz",
|
|
||||||
"integrity": "sha1-i5OVd1nuaI06WNW6fAR39sy1ODg=",
|
|
||||||
"requires": {
|
|
||||||
"localforage": ">=1.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"localtunnel": {
|
"localtunnel": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
|
||||||
@@ -16214,6 +16256,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
||||||
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
||||||
},
|
},
|
||||||
|
"ng-lazyload-image": {
|
||||||
|
"version": "9.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ng-lazyload-image/-/ng-lazyload-image-9.1.0.tgz",
|
||||||
|
"integrity": "sha512-ZdfCXMTaehfzxcSRRThpz9YZbEA+8LPA086Od6JiylrGj0yNM7Aq830A1x6NE/M8o2VuVq93emH9m8T6SFBHlA==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ng2-pdf-viewer": {
|
"ng2-pdf-viewer": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ng2-pdf-viewer/-/ng2-pdf-viewer-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ng2-pdf-viewer/-/ng2-pdf-viewer-7.0.1.tgz",
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
"@angular/platform-browser": "~12.1.2",
|
"@angular/platform-browser": "~12.1.2",
|
||||||
"@angular/platform-browser-dynamic": "~12.1.2",
|
"@angular/platform-browser-dynamic": "~12.1.2",
|
||||||
"@angular/router": "~12.1.2",
|
"@angular/router": "~12.1.2",
|
||||||
"@capacitor/android": "3.3.1",
|
"@capacitor-community/camera-preview": "^1.2.1",
|
||||||
|
"@capacitor/android": "^3.3.2",
|
||||||
"@capacitor/app": "^1.0.5",
|
"@capacitor/app": "^1.0.5",
|
||||||
"@capacitor/browser": "1.0.6",
|
"@capacitor/browser": "1.0.6",
|
||||||
"@capacitor/camera": "^1.2.0",
|
"@capacitor/camera": "^1.2.0",
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
"@ionic/core": "^5.8.1",
|
"@ionic/core": "^5.8.1",
|
||||||
"@ionic/pwa-elements": "^3.0.2",
|
"@ionic/pwa-elements": "^3.0.2",
|
||||||
"@ionic/storage": "^2.3.1",
|
"@ionic/storage": "^2.3.1",
|
||||||
|
"@ionic/storage-angular": "^3.0.6",
|
||||||
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
||||||
"@ngx-translate/core": "^13.0.0",
|
"@ngx-translate/core": "^13.0.0",
|
||||||
@@ -98,8 +100,8 @@
|
|||||||
"cordova-plugin-filepath": "^1.5.8",
|
"cordova-plugin-filepath": "^1.5.8",
|
||||||
"cordova-plugin-okhttp": "^2.0.0",
|
"cordova-plugin-okhttp": "^2.0.0",
|
||||||
"cordova-plugin-screen-orientation": "^3.0.2",
|
"cordova-plugin-screen-orientation": "^3.0.2",
|
||||||
|
"cordova-plugin-x-socialsharing": "^6.0.3",
|
||||||
"cordova-res": "^0.15.3",
|
"cordova-res": "^0.15.3",
|
||||||
"cordova-sqlite-storage": "^5.1.0",
|
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"crypto-js": "^4.0.0",
|
"crypto-js": "^4.0.0",
|
||||||
"date-fns": "^2.17.0",
|
"date-fns": "^2.17.0",
|
||||||
@@ -120,6 +122,7 @@
|
|||||||
"jetifier": "^1.6.8",
|
"jetifier": "^1.6.8",
|
||||||
"lite-server": "^2.6.1",
|
"lite-server": "^2.6.1",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
|
"ng-lazyload-image": "^9.1.0",
|
||||||
"ng2-pdf-viewer": "^7.0.1",
|
"ng2-pdf-viewer": "^7.0.1",
|
||||||
"ngx-cookie-service": "^12.0.3",
|
"ngx-cookie-service": "^12.0.3",
|
||||||
"ngx-image-cropper": "^5.0.1",
|
"ngx-image-cropper": "^5.0.1",
|
||||||
|
|||||||
@@ -219,6 +219,10 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: 'preview-photo',
|
path: 'preview-photo',
|
||||||
loadChildren: () => import('./modals/preview-photo/preview-photo.module').then( m => m.PreviewPhotoPageModule)
|
loadChildren: () => import('./modals/preview-photo/preview-photo.module').then( m => m.PreviewPhotoPageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'custom-image-cache',
|
||||||
|
loadChildren: () => import('./services/file/custom-image-cache/custom-image-cache.module').then( m => m.CustomImageCachePageModule)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
|||||||
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 { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||||
|
import { Directory, Filesystem } from '@capacitor/filesystem';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
@@ -41,11 +43,20 @@ export class AppComponent {
|
|||||||
private statusBar: StatusBar,
|
private statusBar: StatusBar,
|
||||||
private screenOrientation: ScreenOrientation,
|
private screenOrientation: ScreenOrientation,
|
||||||
private sqliteservice: SqliteService,
|
private sqliteservice: SqliteService,
|
||||||
private backgroundservice: BackgroundService
|
private backgroundservice: BackgroundService,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
this.createCacheFolder()
|
||||||
this.initializeApp();
|
this.initializeApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createCacheFolder(){
|
||||||
|
await Filesystem.mkdir({
|
||||||
|
directory: Directory.Cache,
|
||||||
|
path: `CACHED-IMG`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
initializeApp() {
|
initializeApp() {
|
||||||
this.platform.ready().then(() => {
|
this.platform.ready().then(() => {
|
||||||
this.statusBar.styleDefault();
|
this.statusBar.styleDefault();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
|
|||||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { Network } from '@ionic-native/network/ngx';
|
import { Network } from '@ionic-native/network/ngx';
|
||||||
import { File } from '@ionic-native/file/ngx';
|
import { File } from '@ionic-native/file/ngx';
|
||||||
import { ImageCropperModule } from 'ngx-image-cropper';
|
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -65,6 +65,9 @@ import { MediaCapture } from '@ionic-native/media-capture/ngx';
|
|||||||
import { Media } from '@ionic-native/media/ngx';
|
import { Media } from '@ionic-native/media/ngx';
|
||||||
import { StreamingMedia } from '@ionic-native/streaming-media/ngx';
|
import { StreamingMedia } from '@ionic-native/streaming-media/ngx';
|
||||||
import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';
|
import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';
|
||||||
|
import { CustomImageCachePageRoutingModule } from './services/file/custom-image-cache/custom-image-cache-routing.module';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* import { FCM } from '@ionic-native/fcm/ngx';
|
/* import { FCM } from '@ionic-native/fcm/ngx';
|
||||||
@@ -82,7 +85,11 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
|||||||
useFactory: adapterFactory
|
useFactory: adapterFactory
|
||||||
}),
|
}),
|
||||||
IonicModule.forRoot({animated: false}),
|
IonicModule.forRoot({animated: false}),
|
||||||
IonicStorageModule.forRoot(),
|
IonicStorageModule.forRoot({
|
||||||
|
name: '__mydb',
|
||||||
|
driverOrder: ['indexeddb', 'sqlite', 'websql']
|
||||||
|
}),
|
||||||
|
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
@@ -104,6 +111,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
|||||||
//
|
//
|
||||||
PdfViewerModule,
|
PdfViewerModule,
|
||||||
HammerModule,
|
HammerModule,
|
||||||
|
CustomImageCachePageRoutingModule
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,10 +4,17 @@
|
|||||||
</ion-card-header>
|
</ion-card-header>
|
||||||
<ion-card-content >
|
<ion-card-content >
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-item>Iniciar Video Chamada?</ion-item>
|
<ion-item>Tem certeza que apagar imagem?</ion-item>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-item>Iniciar Video Chamada?</ion-item>
|
<ion-item ><ion-chip>
|
||||||
|
<ion-label color="danger">Sim</ion-label>
|
||||||
|
</ion-chip>
|
||||||
|
|
||||||
|
<ion-chip class="placed">
|
||||||
|
<ion-label color="secondary" (click)= "dismiss()">Não</ion-label>
|
||||||
|
</ion-chip >
|
||||||
|
</ion-item>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
|
|||||||
@@ -61,3 +61,7 @@
|
|||||||
color: rgb(255, 38, 0);
|
color: rgb(255, 38, 0);
|
||||||
// background-color: rgb(255, 72, 0);
|
// background-color: rgb(255, 72, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.placed{
|
||||||
|
float:right
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
||||||
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-group-icons',
|
selector: 'app-group-icons',
|
||||||
@@ -9,7 +10,8 @@ import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
|||||||
export class GroupIconsPage implements OnInit {
|
export class GroupIconsPage implements OnInit {
|
||||||
|
|
||||||
constructor( private modalController: ModalController,
|
constructor( private modalController: ModalController,
|
||||||
private navParams:NavParams) { }
|
private navParams:NavParams,
|
||||||
|
private publicService:PublicationsService ) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
@@ -27,12 +29,18 @@ export class GroupIconsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dismiss() {
|
dismiss() {
|
||||||
// using the injected ModalController this page
|
// using the injected ModalController this page
|
||||||
// can "dismiss" itself and optionally pass back data
|
// can "dismiss" itself and optionally pass back data
|
||||||
this.modalController.dismiss({
|
this.modalController.dismiss({
|
||||||
'dismissed': true
|
'dismissed': true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// delete(){
|
||||||
|
// this.publicService.DeletePublication()
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<ion-card-header >
|
<ion-card-header >
|
||||||
|
|
||||||
|
|
||||||
<ion-text color="light" size="6">{{username}} <span>{{_updatedAt | date}}</span><div class="right" (click)="getIconGallery()"><ion-icon name="pencil-outline" ></ion-icon></div></ion-text>
|
<ion-text color="dark" size="6">{{username}} <span>{{_updatedAt | date}}</span><div class="right" (click)="getIconGallery()"><ion-icon name="pencil-outline" ></ion-icon></div></ion-text>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -30,20 +30,20 @@
|
|||||||
<ion-col size="4" class="ion-text-center">
|
<ion-col size="4" class="ion-text-center">
|
||||||
<ion-button (click)="close()" fill="clear" color="light">
|
<ion-button (click)="close()" fill="clear" color="light">
|
||||||
<!-- <ion-icon name="remove" slot="start"></ion-icon> -->
|
<!-- <ion-icon name="remove" slot="start"></ion-icon> -->
|
||||||
<ion-icon src="assets/icon/chat/circle-xmark-solid 1.svg" name="chatbox"></ion-icon>
|
<ion-icon src="assets/icon/chat/circle-xmark-solid 1.svg" ></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col size="4" class="ion-text-center">
|
<ion-col size="4" class="ion-text-center">
|
||||||
|
<ion-button (click)="deleteImage()" fill="clear" color="light">
|
||||||
<ion-button (click)="zoom(false)" fill="clear" color="light">
|
<ion-icon src="assets/icon/chat/Ellipse 8.svg" ></ion-icon>
|
||||||
<!-- <ion-icon name="remove" slot="start"></ion-icon> -->
|
<!-- <ion-icon class="redla" name="flower-outline"></ion-icon> -->
|
||||||
<ion-icon class="redla" name="flower-outline"></ion-icon>
|
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col size="4" class="ion-text-center">
|
<ion-col size="4" class="ion-text-center">
|
||||||
<ion-button (click)="getIconGallery()" fill="clear" color="light">
|
<ion-button (click)="getIconGallery()" fill="clear" color="light">
|
||||||
|
|
||||||
<ion-icon name="videocam" (click)="openChatVideo()"></ion-icon>
|
<ion-icon src="assets/icon/chat/Ellipselast.svg" (click)="openChatVideo()"></ion-icon>
|
||||||
|
|
||||||
|
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ion-slides {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.redla{
|
.redla{
|
||||||
color: rgb(250, 248, 248);
|
color: rgb(250, 250, 4);
|
||||||
background-color: rgb(255, 238, 0);
|
background-color: rgb(255, 238, 0);
|
||||||
border-radius: 120px;
|
border-radius: 120px;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
@@ -18,7 +18,7 @@ ion-slides {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cardconteudo {
|
.cardconteudo {
|
||||||
background: rgb(8, 8, 8);
|
background: rgb(253, 252, 252);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
||||||
import { ImageCroppedEvent } from 'ngx-image-cropper';
|
import { ImageCroppedEvent } from 'ngx-image-cropper';
|
||||||
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
import { GroupIconsPage } from '../group-icons/group-icons.page';
|
import { GroupIconsPage } from '../group-icons/group-icons.page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -11,7 +12,8 @@ import { GroupIconsPage } from '../group-icons/group-icons.page';
|
|||||||
export class PreviewCameraPage implements OnInit {
|
export class PreviewCameraPage implements OnInit {
|
||||||
|
|
||||||
constructor( private modalController: ModalController,
|
constructor( private modalController: ModalController,
|
||||||
private navParams:NavParams) { }
|
private navParams:NavParams,
|
||||||
|
private publicService: PublicationsService) { }
|
||||||
|
|
||||||
|
|
||||||
@ViewChild(IonSlides) slides : IonSlides
|
@ViewChild(IonSlides) slides : IonSlides
|
||||||
@@ -72,7 +74,7 @@ async getIconGallery(){
|
|||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: GroupIconsPage ,
|
component: GroupIconsPage ,
|
||||||
animated: true,
|
animated: true,
|
||||||
cssClass: 'transparentblack-modal',
|
cssClass: 'transparent-modal',
|
||||||
});
|
});
|
||||||
modal.present();
|
modal.present();
|
||||||
}
|
}
|
||||||
@@ -80,11 +82,25 @@ async getIconGallery(){
|
|||||||
openChat(){
|
openChat(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
this.getIconGallery()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openChatVideo(){
|
openChatVideo(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
deleteImage(){
|
||||||
|
window.onload = function(){
|
||||||
|
const delmage = document.getElementById("img")
|
||||||
|
delmage.onclick = function(){
|
||||||
|
return window.localStorage.removeItem("img")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -292,6 +292,11 @@ td.monthview-primary-with-event {
|
|||||||
|
|
||||||
.segment {
|
.segment {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
div ion-raw > ul > li{
|
||||||
|
font-size: 11pt;
|
||||||
|
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Timeline */
|
/* Timeline */
|
||||||
|
|||||||
@@ -652,6 +652,9 @@ touchStart(card) {
|
|||||||
modal.present();
|
modal.present();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
imageSize(img){
|
imageSize(img){
|
||||||
var canvas = document.createElement('canvas');
|
var canvas = document.createElement('canvas');
|
||||||
var ctx = canvas.getContext('2d');
|
var ctx = canvas.getContext('2d');
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
const image = await Camera.getPhoto({
|
const image = await Camera.getPhoto({
|
||||||
quality: 50,
|
quality: 50,
|
||||||
allowEditing: false,
|
allowEditing: false,
|
||||||
|
width:50,
|
||||||
|
height: 50,
|
||||||
resultType: CameraResultType.Uri,
|
resultType: CameraResultType.Uri,
|
||||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||||
|
|
||||||
@@ -393,6 +395,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
async selectImage() {
|
async selectImage() {
|
||||||
const image = await Camera.getPhoto({
|
const image = await Camera.getPhoto({
|
||||||
quality: 50,
|
quality: 50,
|
||||||
|
width:50,
|
||||||
|
height:50,
|
||||||
allowEditing: false,
|
allowEditing: false,
|
||||||
resultType: CameraResultType.Uri,
|
resultType: CameraResultType.Uri,
|
||||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { PublicationDetailPageModule } from 'src/app/shared/publication/view-pub
|
|||||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||||
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
||||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -29,6 +30,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|||||||
PublicationDetailPageModule,
|
PublicationDetailPageModule,
|
||||||
NewActionPageModule,
|
NewActionPageModule,
|
||||||
EditActionPageModule,
|
EditActionPageModule,
|
||||||
|
LazyLoadImageModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PublicationsPage,
|
PublicationsPage,
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import { ViewPublicationsPage } from './view-publications.page';
|
|||||||
|
|
||||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||||
|
|
||||||
|
import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -18,6 +21,7 @@ import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
|||||||
|
|
||||||
ViewPublicationsPageRoutingModule,
|
ViewPublicationsPageRoutingModule,
|
||||||
HeaderPageModule,
|
HeaderPageModule,
|
||||||
|
LazyLoadImageModule
|
||||||
],
|
],
|
||||||
exports: [ViewPublicationsPage],
|
exports: [ViewPublicationsPage],
|
||||||
declarations: [ViewPublicationsPage]
|
declarations: [ViewPublicationsPage]
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
(click)="goToPublicationDetail(publication.DocumentId)"
|
||||||
>
|
>
|
||||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||||
<img src="{{publication.FileBase64}}" alt="image">
|
<img [debug]= "true" [defaultImage] = "defaultImage" [lazyLoad]="publication.FileBase64" src="{{publication.FileBase64}}" alt="image">
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { PublicationDetailPage } from './publication-detail/publication-detail.p
|
|||||||
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 { forkJoin } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-publications',
|
selector: 'app-view-publications',
|
||||||
@@ -25,7 +26,9 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
|
|
||||||
publicationList: Publication[] = new Array();
|
publicationList: Publication[] = new Array();
|
||||||
item: PublicationFolder;
|
item: PublicationFolder;
|
||||||
|
defaultImage = "https://governo.gov.ao/ao/noticias/presidente-joao-lourenco-ouviu-a-voz-da-igreja/"
|
||||||
folderId: string;
|
folderId: string;
|
||||||
|
id: string;
|
||||||
error: any;
|
error: any;
|
||||||
|
|
||||||
publicationListStorage = PublicationListStorage
|
publicationListStorage = PublicationListStorage
|
||||||
@@ -66,9 +69,15 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.folderId = this.folderId['ProcessId']
|
this.folderId = this.folderId['ProcessId']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (typeof (this.id) == 'object') {
|
||||||
|
this.id = this.id['ProcessId']
|
||||||
|
}
|
||||||
|
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getPublications();
|
this.testForkJoin()
|
||||||
|
// this.getPublications();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
this.backgroundservice.registerBackService('Online',() => {
|
this.backgroundservice.registerBackService('Online',() => {
|
||||||
@@ -85,14 +94,20 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.folderId = this.folderId['ProcessId']
|
this.folderId = this.folderId['ProcessId']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (typeof (this.id == 'object') {
|
||||||
|
// this.id = this.id['ProcessId']
|
||||||
|
// }
|
||||||
|
this.testForkJoin()
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
this.getPublications();
|
// this.getPublications();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefresh = (event) => {
|
doRefresh = (event) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.testForkJoin()
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
this.getPublications();
|
// this.getPublications();
|
||||||
event.target.complete();
|
event.target.complete();
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
@@ -119,7 +134,43 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// goes to fork
|
||||||
|
getPublicationsIds() {
|
||||||
|
|
||||||
|
this.showLoader = true;
|
||||||
|
const folderId = this.folderId
|
||||||
|
|
||||||
|
this.publications.GetIdsPublicationsImages(this.id).subscribe(res => {
|
||||||
|
|
||||||
|
console.log(this.id)
|
||||||
|
|
||||||
|
this.publicationList = new Array();
|
||||||
|
|
||||||
|
res.forEach(element => {
|
||||||
|
console.log('getPublications', element)
|
||||||
|
let item: Publication = this.publicationPipe.itemList(element)
|
||||||
|
this.publicationList.push(item);
|
||||||
|
});
|
||||||
|
this.sqliteservice.updateactions(this.id, JSON.stringify(this.publicationList));
|
||||||
|
|
||||||
|
// this.publicationListStorage.add(id, this.publicationList)
|
||||||
|
// this.getpublication = this.publicationList;
|
||||||
|
|
||||||
|
// this.showLoader = false;
|
||||||
|
// }, (error) => {
|
||||||
|
|
||||||
|
// if(error.status == '0') {
|
||||||
|
// this.getFromDB();
|
||||||
|
// }
|
||||||
|
// if (error.status == '404') {
|
||||||
|
// this.error = 'Sem publicações disponíveis!';
|
||||||
|
// this.publicationList = [];
|
||||||
|
// this.publicationListStorage.add(id, this.publicationList)
|
||||||
|
// }
|
||||||
|
this.showLoader = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// goes to fork
|
||||||
getPublications() {
|
getPublications() {
|
||||||
|
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
@@ -156,6 +207,16 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testForkJoin(){
|
||||||
|
forkJoin([
|
||||||
|
this.getPublications(),
|
||||||
|
this.getPublicationsIds()
|
||||||
|
|
||||||
|
]).subscribe(allResults =>{
|
||||||
|
this.publicationList = allResults[2]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
getFromDB() {
|
getFromDB() {
|
||||||
|
|
||||||
this.sqliteservice.getActionById(this.folderId).then((publications) => {
|
this.sqliteservice.getActionById(this.folderId).then((publications) => {
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { CustomImageCachePage } from './custom-image-cache.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: CustomImageCachePage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class CustomImageCachePageRoutingModule {}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { CustomImageCachePageRoutingModule } from './custom-image-cache-routing.module';
|
||||||
|
|
||||||
|
import { CustomImageCachePage } from './custom-image-cache.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
CustomImageCachePageRoutingModule
|
||||||
|
],
|
||||||
|
exports: [CustomImageCachePage],
|
||||||
|
declarations: [CustomImageCachePage]
|
||||||
|
})
|
||||||
|
export class CustomImageCachePageModule {}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<img [src]="_src" *ngIf="_src !=''; else loading;">
|
||||||
|
|
||||||
|
<ng-template #loading>
|
||||||
|
<ion-spinner></ion-spinner>
|
||||||
|
</ng-template>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { CustomImageCachePage } from './custom-image-cache.page';
|
||||||
|
|
||||||
|
describe('CustomImageCachePage', () => {
|
||||||
|
let component: CustomImageCachePage;
|
||||||
|
let fixture: ComponentFixture<CustomImageCachePage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ CustomImageCachePage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(CustomImageCachePage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
import { Directory, Filesystem } from '@capacitor/filesystem';
|
||||||
|
// import { readFile } from 'fs';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const CACHE_FOLDER = 'CACHED-IMG'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-custom-image-cache',
|
||||||
|
templateUrl: './custom-image-cache.page.html',
|
||||||
|
styleUrls: ['./custom-image-cache.page.scss'],
|
||||||
|
})
|
||||||
|
export class CustomImageCachePage implements OnInit {
|
||||||
|
|
||||||
|
_src ="";
|
||||||
|
@Input () spinner = false
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
set src(imageUrl: string){
|
||||||
|
console.log('SET SOURCE', imageUrl)
|
||||||
|
|
||||||
|
const imageName = imageUrl.split('/').pop()
|
||||||
|
const fileType = imageName.split('.').pop()
|
||||||
|
|
||||||
|
Filesystem.readFile({
|
||||||
|
directory: Directory.Cache,
|
||||||
|
path: `${CACHE_FOLDER}/${imageName}`}).then(readFile =>{
|
||||||
|
console.log('LOCAL FILE: ', readFile)
|
||||||
|
// set to SRC
|
||||||
|
this._src = `data:image/${fileType};base64ToFile, ${readFile.data}`
|
||||||
|
}).catch(async e =>{
|
||||||
|
await this.storedImage(imageUrl, imageName)
|
||||||
|
})
|
||||||
|
Filesystem.readFile({
|
||||||
|
directory: Directory.Cache,
|
||||||
|
path: `${CACHE_FOLDER}/${imageName}`
|
||||||
|
}).then(readFile =>{
|
||||||
|
this._src = `data:image/${fileType};base64ToFile, ${readFile.data}`
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
async storedImage(url, path){
|
||||||
|
const response = await fetch(`http://api-cors-proxy-devdactic.herokuapp.com/${url}`)
|
||||||
|
const blob = await response.blob()
|
||||||
|
|
||||||
|
const base64Data = await this.convertBlobToBase64(blob) as string;
|
||||||
|
const savedFile = await Filesystem.writeFile({
|
||||||
|
path: `${CACHE_FOLDER}/${path}`,
|
||||||
|
data: base64Data,
|
||||||
|
directory: Directory.Cache
|
||||||
|
})
|
||||||
|
return savedFile
|
||||||
|
}
|
||||||
|
|
||||||
|
convertBlobToBase64(blob: Blob){
|
||||||
|
return new Promise((resolve, reject) =>{
|
||||||
|
const reader = new FileReader;
|
||||||
|
reader.onerror = reject;
|
||||||
|
reader.onload = () => {
|
||||||
|
resolve(reader.result)
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(blob)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable, OnInit } from '@angular/core';
|
||||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { AuthService } from '../services/auth.service';
|
import { AuthService } from '../services/auth.service';
|
||||||
@@ -6,20 +6,27 @@ import { LoginUserRespose } from '../models/user.model';
|
|||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError } from 'rxjs/operators'
|
import { catchError } from 'rxjs/operators'
|
||||||
import { Publication } from '../models/publication';
|
import { Publication } from '../models/publication';
|
||||||
|
import { getUrl } from 'ionicons/dist/types/components/icon/utils';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class PublicationsService {
|
export class PublicationsService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
authheader = {};
|
authheader = {};
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
headers: HttpHeaders;
|
headers: HttpHeaders;
|
||||||
|
|
||||||
constructor(private http: HttpClient, user: AuthService) {
|
constructor(private http: HttpClient, user: AuthService,
|
||||||
|
private activatedRoute: ActivatedRoute,
|
||||||
|
private router: Router) {
|
||||||
this.loggeduser = user.ValidatedUser;
|
this.loggeduser = user.ValidatedUser;
|
||||||
this.headers = new HttpHeaders();
|
this.headers = new HttpHeaders();
|
||||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetPublicationFolderList(){
|
GetPublicationFolderList(){
|
||||||
@@ -77,6 +84,7 @@ export class PublicationsService {
|
|||||||
return this.http.delete<any>(`${geturl}`, options);
|
return this.http.delete<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//this worker obervable goes to ForkJoin as a second api call
|
||||||
GetPublications(id:any){
|
GetPublications(id:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions/'+ id +'/posts';
|
const geturl = environment.apiURL + 'presidentialActions/'+ id +'/posts';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
@@ -90,6 +98,20 @@ export class PublicationsService {
|
|||||||
return this.http.get<Publication[]>(`${geturl}`, options)
|
return this.http.get<Publication[]>(`${geturl}`, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this one too,goes to observable as a first api call
|
||||||
|
GetIdsPublicationsImages(id:any){
|
||||||
|
const geturl = environment.apiURL + 'presidentialActions/'+ id +'/posts/ids';
|
||||||
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.set("folderId", id);
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
headers: this.headers,
|
||||||
|
params: params
|
||||||
|
};
|
||||||
|
return this.http.get<number[]>(`${geturl}`, options)
|
||||||
|
}
|
||||||
|
|
||||||
GetPublicationById( publicationId:any){
|
GetPublicationById( publicationId:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions/posts/'+ publicationId;
|
const geturl = environment.apiURL + 'presidentialActions/posts/'+ publicationId;
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
@@ -103,6 +125,60 @@ export class PublicationsService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// my own tries
|
||||||
|
|
||||||
|
GetPublicationByIdNext( publicationId:any){
|
||||||
|
let geturl = environment.apiURL + 'presidentialActions/'+ publicationId + '/posts/ids';
|
||||||
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.set("folderId", publicationId);
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
headers: this.headers,
|
||||||
|
/* params: params */
|
||||||
|
};
|
||||||
|
|
||||||
|
const imageLoads = !!(+localStorage.getItem('loadedimage'))
|
||||||
|
if(imageLoads){
|
||||||
|
return true
|
||||||
|
}else{
|
||||||
|
const navigation = this.router.getCurrentNavigation()
|
||||||
|
console.log('nav:', navigation)
|
||||||
|
|
||||||
|
if(navigation){
|
||||||
|
geturl = navigation.extractedUrl.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
this.router.navigate([URL], {queryParams: {returnto: geturl}})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GetIdsPublicationNext(id:any){
|
||||||
|
let geturl = environment.apiURL + 'presidentialActions/posts/' + id;
|
||||||
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.set("id", id);
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
headers: this.headers,
|
||||||
|
params: params
|
||||||
|
};
|
||||||
|
|
||||||
|
var search = this.http.get<any>(`${geturl}`, options).subscribe(
|
||||||
|
res => {
|
||||||
|
res.this.activatedRoute.snapshot.queryParams.get('returnto') || '/posts'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
return search
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//my last tries
|
||||||
|
|
||||||
CreatePublication(folderId:any,body:any){
|
CreatePublication(folderId:any,body:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions/'+folderId+'/posts';
|
const geturl = environment.apiURL + 'presidentialActions/'+folderId+'/posts';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|||||||
@@ -31,9 +31,12 @@ export class PublicationListService {
|
|||||||
return this._document[folderId]
|
return this._document[folderId]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add(folderId, document = []) {
|
add(folderId, document = []) {
|
||||||
this._document[folderId] = document
|
this._document[folderId] = document
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
localstoreService.set(this.keyName, {
|
localstoreService.set(this.keyName, {
|
||||||
document: this._document
|
document: this._document
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="231" height="209" viewBox="0 0 231 209" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="115.5" cy="104.5" rx="115.5" ry="104.5" fill="#FFC701"/>
|
||||||
|
<path d="M144.892 61.7779V152.14C144.892 160.457 139.981 167.2 133.922 167.2H68.0995C62.0406 167.2 57.129 160.457 57.129 152.14V61.7779C57.129 53.4603 62.0406 46.7177 68.0995 46.7177H133.922C139.979 46.7177 144.892 53.4603 144.892 61.7779ZM188.774 66.6412V147.245C188.774 155.246 182.107 159.918 177.258 155.337L152.206 131.651V82.2662L177.255 58.5588C182.123 53.9748 188.774 58.6718 188.774 66.6412Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 594 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="3300" height="3052" viewBox="0 0 3300 3052" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="1650" cy="1526" rx="1650" ry="1526" fill="#FCD13A"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 177 B |
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="4835" height="4995" viewBox="0 0 4835 4995" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="2417.5" cy="2497.5" rx="2417.5" ry="2497.5" fill="#FCD13A"/>
|
||||||
|
<path d="M2217.16 2587.47H1726.53C1263.52 2587.47 888 3158.1 888 3861.83C888 4003.02 963.095 4117 1055.71 4117H2888.08C2980.69 4117 3055.69 4003.02 3055.69 3861.83C3055.69 3158.1 2680.22 2587.47 2217.16 2587.47ZM1971.85 2234.5C2313.93 2234.5 2591.19 1813.07 2591.19 1293.25C2591.19 773.43 2313.93 352 1971.85 352C1629.76 352 1352.51 773.43 1352.51 1293.25C1352.51 1813.07 1629.76 2234.5 1971.85 2234.5ZM3684.23 1992.57L3911.79 1646.73C3957.15 1577.79 3957.15 1466.13 3911.79 1397.16C3866.42 1328.18 3792.95 1328.22 3747.56 1397.16L3520.2 1749.9L3292.64 1404.07C3247.28 1335.13 3173.8 1335.13 3128.42 1404.07C3083.03 1473.01 3083.05 1584.67 3128.42 1653.65L3355.98 1999.48L3128.42 2345.32C3083.05 2414.26 3083.05 2525.92 3128.42 2594.9C3173.77 2663.82 3247.25 2663.88 3292.64 2594.9L3520.2 2248.47L3747.76 2594.31C3793.11 2663.23 3866.59 2663.29 3911.98 2594.31C3957.34 2525.37 3957.34 2413.71 3911.98 2344.73L3684.23 1992.57Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="275" height="245" viewBox="0 0 275 245" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="137.5" cy="122.5" rx="137.5" ry="122.5" fill="#FFC701"/>
|
||||||
|
<path d="M172.491 72.4191V178.346C172.491 188.096 166.644 196 159.431 196H81.0708C73.8579 196 68.0108 188.096 68.0108 178.346V72.4191C68.0108 62.6687 73.8579 54.7647 81.0708 54.7647H159.431C166.641 54.7647 172.491 62.6687 172.491 72.4191ZM224.731 78.12V172.608C224.731 181.987 216.795 187.463 211.021 182.093L181.198 154.328V96.4364L211.018 68.6455C216.814 63.2719 224.731 68.7779 224.731 78.12Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 589 B |
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="379" height="336" viewBox="0 0 379 336" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="189.5" cy="168" rx="189.5" ry="168" fill="#FFC701" fill-opacity="0.99"/>
|
||||||
|
<path d="M237.724 99.3176V244.588C237.724 257.96 229.666 268.8 219.725 268.8H111.73C101.79 268.8 93.7312 257.96 93.7312 244.588V99.3176C93.7312 85.9457 101.79 75.1059 111.73 75.1059H219.725C229.662 75.1059 237.724 85.9457 237.724 99.3176ZM309.72 107.136V236.719C309.72 249.582 298.782 257.093 290.825 249.728L249.723 211.65V132.256L290.821 94.1424C298.809 86.7729 309.72 94.324 309.72 107.136Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 603 B |
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="1370" height="1158" viewBox="0 0 1370 1158" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse cx="685" cy="579" rx="685" ry="579" fill="#FFC701" fill-opacity="0.99"/>
|
||||||
|
<path d="M859.319 342.291V842.956C859.319 889.041 830.19 926.4 794.256 926.4H403.88C367.946 926.4 338.817 889.041 338.817 842.956V342.291C338.817 296.206 367.946 258.847 403.88 258.847H794.256C830.176 258.847 859.319 296.206 859.319 342.291ZM1119.57 369.237V815.836C1119.57 860.166 1080.03 886.051 1051.27 860.67L902.694 729.437V455.81L1051.25 324.455C1080.13 299.057 1119.57 325.081 1119.57 369.237Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 4.0 MiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="3495" height="3334" viewBox="0 0 3495 3334" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1747.5 0C783.939 0 0 747.826 0 1667C0 2586.17 783.939 3334 1747.5 3334C2711.06 3334 3495 2586.17 3495 1667C3495 747.826 2711.06 0 1747.5 0ZM1747.5 2563.89C1714.27 2563.89 1681.78 2554.49 1654.15 2536.88C1626.52 2519.27 1604.98 2494.23 1592.26 2464.95C1579.54 2435.66 1576.22 2403.43 1582.7 2372.33C1589.18 2341.24 1605.19 2312.68 1628.69 2290.26C1652.18 2267.85 1682.12 2252.58 1714.72 2246.4C1747.31 2240.21 1781.1 2243.39 1811.8 2255.52C1842.51 2267.65 1868.75 2288.19 1887.21 2314.55C1905.67 2340.91 1915.53 2371.9 1915.53 2403.61C1915.53 2446.12 1897.83 2486.89 1866.31 2516.95C1834.8 2547.01 1792.06 2563.89 1747.5 2563.89ZM1929.98 951.793L1881.76 1929.55C1881.76 1963.56 1867.59 1996.18 1842.38 2020.23C1817.17 2044.27 1782.98 2057.78 1747.33 2057.78C1711.68 2057.78 1677.49 2044.27 1652.28 2020.23C1627.07 1996.18 1612.91 1963.56 1612.91 1929.55L1564.68 952.274V951.873C1563.63 928.385 1567.56 904.936 1576.26 882.937C1584.95 860.939 1598.22 840.847 1615.27 823.87C1632.32 806.893 1652.8 793.384 1675.46 784.155C1698.13 774.925 1722.52 770.168 1747.16 770.168C1771.81 770.168 1796.2 774.925 1818.87 784.155C1841.53 793.384 1862.01 806.893 1879.06 823.87C1896.1 840.847 1909.38 860.939 1918.07 882.937C1926.76 904.936 1930.7 928.385 1929.64 951.873L1929.98 951.793Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="3495" height="3334" viewBox="0 0 3495 3334" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1747.5 0C782.279 0 0 746.243 0 1667C0 2587.76 782.279 3334 1747.5 3334C2712.72 3334 3495 2587.76 3495 1667C3495 746.243 2712.72 0 1747.5 0ZM1747.5 833.5C1868.12 833.5 1965.94 926.813 1965.94 1041.88C1965.94 1156.94 1868.12 1250.25 1747.5 1250.25C1626.88 1250.25 1529.06 1157.13 1529.06 1041.88C1529.06 926.618 1626.68 833.5 1747.5 833.5ZM2020.55 2500.5H1474.45C1384.35 2500.5 1310.62 2430.82 1310.62 2344.22C1310.62 2257.61 1384.01 2187.94 1474.45 2187.94H1583.67V1771.19H1529.06C1438.62 1771.19 1365.23 1701.19 1365.23 1614.91C1365.23 1528.63 1438.96 1458.62 1529.06 1458.62H1747.5C1837.95 1458.62 1911.33 1528.63 1911.33 1614.91V2187.94H2020.55C2110.99 2187.94 2184.38 2257.94 2184.38 2344.22C2184.38 2430.5 2111.33 2500.5 2020.55 2500.5Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 878 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-info" class="svg-inline--fa fa-circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"></path></svg>
|
||||||
|
After Width: | Height: | Size: 596 B |
@@ -1336,12 +1336,12 @@ ngx-mat-datetime-content{
|
|||||||
.ldio-rpinwye8j0b div { box-sizing: content-box; }
|
.ldio-rpinwye8j0b div { box-sizing: content-box; }
|
||||||
|
|
||||||
.transparent-modal {
|
.transparent-modal {
|
||||||
--background: #dfb2b2e7;
|
--background: #f1eaeae7;
|
||||||
--margin: 0;
|
--margin: 0;
|
||||||
--padding: 0;
|
--padding: 0;
|
||||||
|
|
||||||
ion-content {
|
ion-content {
|
||||||
--background:#caa1a1e7;
|
--background:#f1f0ebe7;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1361,3 +1361,16 @@ ngx-mat-datetime-content{
|
|||||||
--background: rgba(8, 8, 8, 0.7);
|
--background: rgba(8, 8, 8, 0.7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||||
|
$font-size: 11pt;
|
||||||
|
|
||||||
|
ion-segment-button .segment ion-row ul> li{
|
||||||
|
font-family: $font-family;
|
||||||
|
font-size: $font-size;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"module": "es2020",
|
"module": "es2020",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "es2015",
|
"target": "es2017",
|
||||||
//"target": "es5",
|
//"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2018",
|
"es2018",
|
||||||
|
|||||||