merge
@@ -26,7 +26,6 @@ npm-debug.log*
|
|||||||
/coverage
|
/coverage
|
||||||
/dist
|
/dist
|
||||||
/node_modules
|
/node_modules
|
||||||
/android
|
|
||||||
/platforms
|
/platforms
|
||||||
/plugins
|
/plugins
|
||||||
/www
|
/www
|
||||||
@@ -34,7 +33,6 @@ npm-debug.log*
|
|||||||
/mobilefirst
|
/mobilefirst
|
||||||
|
|
||||||
# Custom
|
# Custom
|
||||||
/android
|
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
|
||||||
|
|
||||||
|
# Built application files
|
||||||
|
*.apk
|
||||||
|
*.aar
|
||||||
|
*.ap_
|
||||||
|
*.aab
|
||||||
|
|
||||||
|
# Files for the ART/Dalvik VM
|
||||||
|
*.dex
|
||||||
|
|
||||||
|
# Java class files
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
bin/
|
||||||
|
gen/
|
||||||
|
out/
|
||||||
|
# Uncomment the following line in case you need and you don't have the release build type files in your app
|
||||||
|
# release/
|
||||||
|
|
||||||
|
# Gradle files
|
||||||
|
.gradle/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Local configuration file (sdk path, etc)
|
||||||
|
local.properties
|
||||||
|
|
||||||
|
# Proguard folder generated by Eclipse
|
||||||
|
proguard/
|
||||||
|
|
||||||
|
# Log Files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Android Studio Navigation editor temp files
|
||||||
|
.navigation/
|
||||||
|
|
||||||
|
# Android Studio captures folder
|
||||||
|
captures/
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
*.iml
|
||||||
|
.idea/workspace.xml
|
||||||
|
.idea/tasks.xml
|
||||||
|
.idea/gradle.xml
|
||||||
|
.idea/assetWizardSettings.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
.idea/libraries
|
||||||
|
# Android Studio 3 in .gitignore file.
|
||||||
|
.idea/caches
|
||||||
|
.idea/modules.xml
|
||||||
|
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
|
||||||
|
.idea/navEditor.xml
|
||||||
|
|
||||||
|
# Keystore files
|
||||||
|
# Uncomment the following lines if you do not want to check your keystore files in.
|
||||||
|
#*.jks
|
||||||
|
#*.keystore
|
||||||
|
|
||||||
|
# External native build folder generated in Android Studio 2.2 and later
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx/
|
||||||
|
|
||||||
|
# Google Services (e.g. APIs or Firebase)
|
||||||
|
# google-services.json
|
||||||
|
|
||||||
|
# Freeline
|
||||||
|
freeline.py
|
||||||
|
freeline/
|
||||||
|
freeline_project_description.json
|
||||||
|
|
||||||
|
# fastlane
|
||||||
|
fastlane/report.xml
|
||||||
|
fastlane/Preview.html
|
||||||
|
fastlane/screenshots
|
||||||
|
fastlane/test_output
|
||||||
|
fastlane/readme.md
|
||||||
|
|
||||||
|
# Version control
|
||||||
|
vcs.xml
|
||||||
|
|
||||||
|
# lint
|
||||||
|
lint/intermediates/
|
||||||
|
lint/generated/
|
||||||
|
lint/outputs/
|
||||||
|
lint/tmp/
|
||||||
|
# lint/reports/
|
||||||
|
|
||||||
|
# Android Profiling
|
||||||
|
*.hprof
|
||||||
|
|
||||||
|
# Cordova plugins for Capacitor
|
||||||
|
capacitor-cordova-android-plugins
|
||||||
|
|
||||||
|
# Copied web assets
|
||||||
|
app/src/main/assets/public
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="11" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenRepo" />
|
||||||
|
<option name="name" value="MavenRepo" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://maven.google.com" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://jitpack.io" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DesignSurface">
|
||||||
|
<option name="filePathToZoomLevelMap">
|
||||||
|
<map>
|
||||||
|
<entry key="..\:/Users/eudes.inacio/Gabinet-DigitalProject/gabinete-digital_latest/gabinete-digital/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.1" />
|
||||||
|
<entry key="..\:/Users/eudes.inacio/Gabinet-DigitalProject/gabinete-digital_latest/gabinete-digital/android/app/src/main/res/drawable/ic_launcher_background.xml" value="0.1037037037037037" />
|
||||||
|
<entry key="..\:/Users/eudes.inacio/Gabinet-DigitalProject/gabinete-digital_latest/gabinete-digital/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.14635416666666667" />
|
||||||
|
<entry key="..\:/Users/eudes.inacio/Gabinet-DigitalProject/gabinete-digital_latest/gabinete-digital/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.10648148148148148" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/build/*
|
||||||
|
!/build/.npmkeep
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.gpr.gabinetedigital"
|
||||||
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
aaptOptions {
|
||||||
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||||
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||||||
|
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
flatDir{
|
||||||
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
url "https://jitpack.io"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'com.google.firebase:firebase-config:15.0.2'
|
||||||
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
||||||
|
implementation project(':capacitor-android')
|
||||||
|
testImplementation "junit:junit:$junitVersion"
|
||||||
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
||||||
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
||||||
|
implementation project(':capacitor-cordova-android-plugins')
|
||||||
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: 'capacitor.build.gradle'
|
||||||
|
|
||||||
|
try {
|
||||||
|
def servicesJSON = file('google-services.json')
|
||||||
|
if (servicesJSON.text) {
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
}
|
||||||
|
} catch(Exception e) {
|
||||||
|
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||||
|
dependencies {
|
||||||
|
implementation project(':byteowls-capacitor-filesharer')
|
||||||
|
implementation project(':capacitor-community-camera-preview')
|
||||||
|
implementation project(':capacitor-app')
|
||||||
|
implementation project(':capacitor-browser')
|
||||||
|
implementation project(':capacitor-camera')
|
||||||
|
implementation project(':capacitor-device')
|
||||||
|
implementation project(':capacitor-filesystem')
|
||||||
|
implementation project(':capacitor-haptics')
|
||||||
|
implementation project(':capacitor-keyboard')
|
||||||
|
implementation project(':capacitor-local-notifications')
|
||||||
|
implementation project(':capacitor-network')
|
||||||
|
implementation project(':capacitor-push-notifications')
|
||||||
|
implementation project(':capacitor-share')
|
||||||
|
implementation project(':capacitor-storage')
|
||||||
|
implementation project(':capacitor-voice-recorder')
|
||||||
|
implementation "com.soundcloud.android:android-crop:1.0.0@aar"
|
||||||
|
implementation "com.squareup.okhttp:okhttp-urlconnection:2+"
|
||||||
|
}
|
||||||
|
apply from: "../../node_modules/com-sarriaroman-photoviewer/src/android/photoviewer.gradle"
|
||||||
|
apply from: "../../node_modules/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle"
|
||||||
|
apply from: "../../node_modules/cordova-plugin-fingerprint-aio/src/android/build.gradle"
|
||||||
|
|
||||||
|
if (hasProperty('postBuildExtras')) {
|
||||||
|
postBuildExtras()
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "800733765231",
|
||||||
|
"firebase_url": "https://gabinete-digital-2020.firebaseio.com",
|
||||||
|
"project_id": "gabinete-digital-2020",
|
||||||
|
"storage_bucket": "gabinete-digital-2020.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:800733765231:android:e7ffc0b310037d9f13779a",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.gpr.gabinetedigital"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "800733765231-92oa7ib62ob0pkouphb5i5sp01vkalid.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyD0pfW45DLoW6mqvZRklJdbfSTskW22Fok"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "800733765231-92oa7ib62ob0pkouphb5i5sp01vkalid.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.gpr.gabinetedigital",
|
||||||
|
"variantName": "release",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"versionCode": 1,
|
||||||
|
"versionName": "1.0",
|
||||||
|
"outputFile": "app-release.apk"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.getcapacitor.myapp;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void useAppContext() throws Exception {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
|
|
||||||
|
assertEquals("com.getcapacitor.app", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<manifest package="com.gpr.gabinetedigital" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name=".App" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
|
||||||
|
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/title_activity_main" android:launchMode="singleTask" android:name="com.gpr.gabinetedigital.MainActivity" android:theme="@style/AppTheme.NoActionBarLaunch">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<provider android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
|
||||||
|
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<manifest package="com.gpr.gabinetedigital" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name=".App" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
|
||||||
|
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/title_activity_main" android:launchMode="singleTask" android:name="com.gpr.gabinetedigital.MainActivity" android:theme="@style/AppTheme.NoActionBarLaunch">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<provider android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
|
||||||
|
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"appId": "com.capacitorjs.app.testapp",
|
||||||
|
"appName": "capacitor-testapp",
|
||||||
|
"webDir": "www",
|
||||||
|
"plugins": {
|
||||||
|
"SplashScreen": {
|
||||||
|
"launchAutoHide": false
|
||||||
|
},
|
||||||
|
"LocalNotifications": {
|
||||||
|
"smallIcon": "ic_stat_icon_config_sample",
|
||||||
|
"iconColor": "#CE0B7C"
|
||||||
|
},
|
||||||
|
"PushNotifications": {
|
||||||
|
"presentationOptions": [
|
||||||
|
"alert",
|
||||||
|
"sound"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"pkg": "@byteowls/capacitor-filesharer",
|
||||||
|
"classpath": "com.byteowls.capacitor.filesharer.FileSharerPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor-community/camera-preview",
|
||||||
|
"classpath": "com.ahm.capacitor.camera.preview.CameraPreview"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/app",
|
||||||
|
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/browser",
|
||||||
|
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/camera",
|
||||||
|
"classpath": "com.capacitorjs.plugins.camera.CameraPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/device",
|
||||||
|
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/filesystem",
|
||||||
|
"classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/haptics",
|
||||||
|
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/keyboard",
|
||||||
|
"classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/local-notifications",
|
||||||
|
"classpath": "com.capacitorjs.plugins.localnotifications.LocalNotificationsPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/network",
|
||||||
|
"classpath": "com.capacitorjs.plugins.network.NetworkPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/push-notifications",
|
||||||
|
"classpath": "com.capacitorjs.plugins.pushnotifications.PushNotificationsPlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/share",
|
||||||
|
"classpath": "com.capacitorjs.plugins.share.SharePlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/storage",
|
||||||
|
"classpath": "com.capacitorjs.plugins.storage.StoragePlugin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pkg": "capacitor-voice-recorder",
|
||||||
|
"classpath": "com.tchvu3.capacitorvoicerecorder.VoiceRecorder"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
package com.capacitorjs.app.testapp;
|
||||||
|
|
||||||
|
import com.getcapacitor.BridgeActivity;
|
||||||
|
|
||||||
|
public class MainActivity extends BridgeActivity {}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.gpr.gabinetedigital;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.google.android.gms.tasks.OnCompleteListener;
|
||||||
|
import com.google.android.gms.tasks.Task;
|
||||||
|
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class App extends Application {
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
|
||||||
|
FirebaseRemoteConfig remoteConfig = FirebaseRemoteConfig.getInstance();
|
||||||
|
|
||||||
|
Map<String,Object> defaultValue = new HashMap<>();
|
||||||
|
defaultValue.put(UpdateHelper.KEY_UPDATE_ENABLE,false);
|
||||||
|
defaultValue.put(UpdateHelper.KEY_UPDATE_VERSION,"1.0");
|
||||||
|
defaultValue.put(UpdateHelper.KEY_UPDATE_URL,"https://d953-41-63-166-54.ngrok.io/gabinete_digital.apk");
|
||||||
|
|
||||||
|
remoteConfig.setDefaults(defaultValue);
|
||||||
|
remoteConfig.fetch(1)
|
||||||
|
.addOnCompleteListener(new OnCompleteListener<Void>() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(@NonNull Task<Void> task) {
|
||||||
|
if(task.isSuccessful()) {
|
||||||
|
remoteConfig.activateFetched();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.gpr.gabinetedigital;
|
||||||
|
|
||||||
|
import com.getcapacitor.BridgeActivity;
|
||||||
|
|
||||||
|
public class MainActivity extends BridgeActivity {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.gpr.gabinetedigital;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Application;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
public class UpdateActivity extends Application implements UpdateHelper.onUpdateCheckListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
|
||||||
|
UpdateHelper.with(this)
|
||||||
|
.onUpdateCheck(this)
|
||||||
|
.check();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdateCheckListener(String urlApp) {
|
||||||
|
|
||||||
|
AlertDialog alertDialog = new AlertDialog.Builder(this)
|
||||||
|
.setTitle("New Version Available")
|
||||||
|
.setMessage("Please update to new version to continue use")
|
||||||
|
.setPositiveButton("UPDATE", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
Toast.makeText(UpdateActivity.this, ""+urlApp,Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}).setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
}).create();
|
||||||
|
alertDialog.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.gpr.gabinetedigital;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
public class UpdateApp extends AsyncTask<String,Void,Void> {
|
||||||
|
private Context context;
|
||||||
|
public void setContext(Context contextf){
|
||||||
|
context = contextf;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Void doInBackground(String... arg0) {
|
||||||
|
try {
|
||||||
|
URL url = new URL(arg0[0]);
|
||||||
|
HttpURLConnection c = (HttpURLConnection) url.openConnection();
|
||||||
|
c.setRequestMethod("GET");
|
||||||
|
c.setDoOutput(true);
|
||||||
|
c.connect();
|
||||||
|
|
||||||
|
String PATH = "/mnt/sdcard/Download/";
|
||||||
|
File file = new File(PATH);
|
||||||
|
file.mkdirs();
|
||||||
|
File outputFile = new File(file, "update.apk");
|
||||||
|
if(outputFile.exists()){
|
||||||
|
outputFile.delete();
|
||||||
|
}
|
||||||
|
FileOutputStream fos = new FileOutputStream(outputFile);
|
||||||
|
|
||||||
|
InputStream is = c.getInputStream();
|
||||||
|
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
int len1 = 0;
|
||||||
|
while ((len1 = is.read(buffer)) != -1) {
|
||||||
|
fos.write(buffer, 0, len1);
|
||||||
|
}
|
||||||
|
fos.close();
|
||||||
|
is.close();
|
||||||
|
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
|
intent.setDataAndType(Uri.fromFile(new File("/mnt/sdcard/Download/update.apk")), "application/vnd.android.package-archive");
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // without this flag android returned a intent error!
|
||||||
|
context.startActivity(intent);
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("UpdateAPP", "Update error! " + e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.gpr.gabinetedigital;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||||
|
|
||||||
|
public class UpdateHelper {
|
||||||
|
public static String KEY_UPDATE_ENABLE = "is_update";
|
||||||
|
public static String KEY_UPDATE_VERSION = "version";
|
||||||
|
public static String KEY_UPDATE_URL = "update_url";
|
||||||
|
|
||||||
|
public interface onUpdateCheckListener {
|
||||||
|
void onUpdateCheckListener(String urlApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Builder with(Context context) {
|
||||||
|
return new Builder(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
private onUpdateCheckListener onUpdateCheckListener;
|
||||||
|
private Context context;
|
||||||
|
|
||||||
|
public UpdateHelper(Context context, UpdateHelper.onUpdateCheckListener onUpdateCheckListener) {
|
||||||
|
this.onUpdateCheckListener = onUpdateCheckListener;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void check() {
|
||||||
|
FirebaseRemoteConfig remoteconfig = FirebaseRemoteConfig.getInstance();
|
||||||
|
if(remoteconfig.getBoolean(KEY_UPDATE_ENABLE)) {
|
||||||
|
String currentVersion = remoteconfig.getString(KEY_UPDATE_VERSION);
|
||||||
|
String appVersion = getAppVersion(context);
|
||||||
|
String updateURL = remoteconfig.getString(KEY_UPDATE_URL);
|
||||||
|
|
||||||
|
if(!TextUtils.equals(currentVersion,appVersion) && onUpdateCheckListener != null)
|
||||||
|
onUpdateCheckListener.onUpdateCheckListener(updateURL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getAppVersion(Context context) {
|
||||||
|
String result ="";
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = context.getPackageManager().getPackageInfo(context.getPackageName(), 0)
|
||||||
|
.versionName;
|
||||||
|
result = result.replaceAll("[a-ZA-Z] |-", "");
|
||||||
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
private Context context;
|
||||||
|
private onUpdateCheckListener onUpdateCheckListener;
|
||||||
|
|
||||||
|
public Builder(Context context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder onUpdateCheck(onUpdateCheckListener onUpdateCheckListener) {
|
||||||
|
this.onUpdateCheckListener = onUpdateCheckListener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateHelper build() {
|
||||||
|
return new UpdateHelper(context, onUpdateCheckListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateHelper check() {
|
||||||
|
UpdateHelper updateHelper = build();
|
||||||
|
updateHelper.check();
|
||||||
|
|
||||||
|
return updateHelper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
|
android:viewportWidth="108">
|
||||||
|
<path
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||||
|
android:strokeColor="#00000000"
|
||||||
|
android:strokeWidth="1">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="78.5885"
|
||||||
|
android:endY="90.9159"
|
||||||
|
android:startX="48.7653"
|
||||||
|
android:startY="61.0927"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||||
|
android:strokeColor="#00000000"
|
||||||
|
android:strokeWidth="1" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
|
android:viewportWidth="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#26A69A"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeColor="#33FFFFFF"
|
||||||
|
android:strokeWidth="0.8" />
|
||||||
|
</vector>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#FEFFFF</color>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">Gabinete Digital</string>
|
||||||
|
<string name="title_activity_main">Gabinete Digital</string>
|
||||||
|
<string name="package_name">com.gpr.gabinetedigital</string>
|
||||||
|
<string name="custom_url_scheme">com.gpr.gabinetedigital</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
<item name="android:background">@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||||
|
<item name="android:background">@drawable/splash</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
|
<access origin="*" />
|
||||||
|
|
||||||
|
<feature name="CropPlugin">
|
||||||
|
<param name="android-package" value="com.jeduan.crop.CropPlugin"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="sqlDB">
|
||||||
|
<param name="android-package" value="me.rahul.plugins.sqlDB.sqlDB"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="FilePath">
|
||||||
|
<param name="android-package" value="com.hiddentao.cordova.filepath.FilePath"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="OkHttpPlugin">
|
||||||
|
<param name="android-package" value="com.google.cordova.OkHttpPlugin"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="CDVOrientation">
|
||||||
|
<param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="SQLitePlugin">
|
||||||
|
<param name="android-package" value="io.sqlc.SQLitePlugin"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="PhotoViewer">
|
||||||
|
<param name="android-package" value="com.sarriaroman.PhotoViewer.PhotoViewer"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Device">
|
||||||
|
<param name="android-package" value="org.apache.cordova.device.Device"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Notification">
|
||||||
|
<param name="android-package" value="org.apache.cordova.dialogs.Notification"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="File">
|
||||||
|
<param name="android-package" value="org.apache.cordova.file.FileUtils"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Fingerprint">
|
||||||
|
<param name="android-package" value="de.niklasmerz.cordova.biometric.Fingerprint"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Globalization">
|
||||||
|
<param name="android-package" value="org.apache.cordova.globalization.Globalization"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="InAppBrowser">
|
||||||
|
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Media">
|
||||||
|
<param name="android-package" value="org.apache.cordova.media.AudioHandler"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Capture">
|
||||||
|
<param name="android-package" value="org.apache.cordova.mediacapture.Capture"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="NetworkStatus">
|
||||||
|
<param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="StatusBar">
|
||||||
|
<param name="android-package" value="org.apache.cordova.statusbar.StatusBar"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<feature name="Whitelist">
|
||||||
|
<param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
|
||||||
|
</widget>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<external-path name="my_images" path="." />
|
||||||
|
<cache-path name="my_cache_images" path="." />
|
||||||
|
</paths>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.getcapacitor.myapp;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
public class ExampleUnitTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void addition_isCorrect() throws Exception {
|
||||||
|
assertEquals(4, 2 + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||||
|
classpath 'com.google.gms:google-services:4.3.5'
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "variables.gradle"
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task clean(type: Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||||
|
include ':capacitor-android'
|
||||||
|
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||||
|
|
||||||
|
include ':byteowls-capacitor-filesharer'
|
||||||
|
project(':byteowls-capacitor-filesharer').projectDir = new File('../node_modules/@byteowls/capacitor-filesharer/android')
|
||||||
|
|
||||||
|
include ':capacitor-community-camera-preview'
|
||||||
|
project(':capacitor-community-camera-preview').projectDir = new File('../node_modules/@capacitor-community/camera-preview/android')
|
||||||
|
|
||||||
|
include ':capacitor-app'
|
||||||
|
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
|
||||||
|
|
||||||
|
include ':capacitor-browser'
|
||||||
|
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
|
||||||
|
|
||||||
|
include ':capacitor-camera'
|
||||||
|
project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
|
||||||
|
|
||||||
|
include ':capacitor-device'
|
||||||
|
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
|
||||||
|
|
||||||
|
include ':capacitor-filesystem'
|
||||||
|
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
|
||||||
|
|
||||||
|
include ':capacitor-haptics'
|
||||||
|
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
|
||||||
|
|
||||||
|
include ':capacitor-keyboard'
|
||||||
|
project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
|
||||||
|
|
||||||
|
include ':capacitor-local-notifications'
|
||||||
|
project(':capacitor-local-notifications').projectDir = new File('../node_modules/@capacitor/local-notifications/android')
|
||||||
|
|
||||||
|
include ':capacitor-network'
|
||||||
|
project(':capacitor-network').projectDir = new File('../node_modules/@capacitor/network/android')
|
||||||
|
|
||||||
|
include ':capacitor-push-notifications'
|
||||||
|
project(':capacitor-push-notifications').projectDir = new File('../node_modules/@capacitor/push-notifications/android')
|
||||||
|
|
||||||
|
include ':capacitor-share'
|
||||||
|
project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android')
|
||||||
|
|
||||||
|
include ':capacitor-storage'
|
||||||
|
project(':capacitor-storage').projectDir = new File('../node_modules/@capacitor/storage/android')
|
||||||
|
|
||||||
|
include ':capacitor-voice-recorder'
|
||||||
|
project(':capacitor-voice-recorder').projectDir = new File('../node_modules/capacitor-voice-recorder/android')
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Automatically convert third-party libraries to use AndroidX
|
||||||
|
android.enableJetifier=true
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
include ':app'
|
||||||
|
include ':capacitor-cordova-android-plugins'
|
||||||
|
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
|
||||||
|
|
||||||
|
apply from: 'capacitor.settings.gradle'
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
ext {
|
||||||
|
minSdkVersion = 21
|
||||||
|
compileSdkVersion = 30
|
||||||
|
targetSdkVersion = 30
|
||||||
|
androidxActivityVersion = '1.2.0'
|
||||||
|
androidxAppCompatVersion = '1.2.0'
|
||||||
|
androidxCoordinatorLayoutVersion = '1.1.0'
|
||||||
|
androidxCoreVersion = '1.3.2'
|
||||||
|
androidxFragmentVersion = '1.3.0'
|
||||||
|
junitVersion = '4.13.1'
|
||||||
|
androidxJunitVersion = '1.1.2'
|
||||||
|
androidxEspressoCoreVersion = '3.3.0'
|
||||||
|
cordovaAndroidVersion = '7.0.0'
|
||||||
|
}
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"@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",
|
||||||
"@ionic-native/fingerprint-aio": "^4.20.0",
|
"@ionic-native/fingerprint-aio": "^4.20.0",
|
||||||
"@ionic-native/http": "^5.31.1",
|
"@ionic-native/http": "^5.36.0",
|
||||||
"@ionic-native/image-picker": "^5.36.0",
|
"@ionic-native/image-picker": "^5.36.0",
|
||||||
"@ionic-native/in-app-browser": "^5.28.0",
|
"@ionic-native/in-app-browser": "^5.28.0",
|
||||||
"@ionic-native/ionic-webview": "^5.36.0",
|
"@ionic-native/ionic-webview": "^5.36.0",
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
"angular-svg-icon": "^12.0.0",
|
"angular-svg-icon": "^12.0.0",
|
||||||
"angular-tag-cloud-module": "^5.2.2",
|
"angular-tag-cloud-module": "^5.2.2",
|
||||||
"beast-orm": "0.0.7",
|
"beast-orm": "0.0.7",
|
||||||
|
"base64-js": "^1.5.1",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.0",
|
||||||
"build": "0.1.4",
|
"build": "0.1.4",
|
||||||
"capacitor-voice-recorder": "^2.0.0",
|
"capacitor-voice-recorder": "^2.0.0",
|
||||||
@@ -134,7 +135,7 @@
|
|||||||
"lite-server": "^2.6.1",
|
"lite-server": "^2.6.1",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"ng-lazyload-image": "^9.1.2",
|
"ng-lazyload-image": "^9.1.2",
|
||||||
"ng2-pdf-viewer": "^7.0.1",
|
"ng2-pdf-viewer": "^3.0.8",
|
||||||
"ngx-cookie-service": "^12.0.3",
|
"ngx-cookie-service": "^12.0.3",
|
||||||
"ngx-image-compress": "^11.0.3",
|
"ngx-image-compress": "^11.0.3",
|
||||||
"ngx-image-cropper": "^5.0.1",
|
"ngx-image-cropper": "^5.0.1",
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
|||||||
Media,
|
Media,
|
||||||
StreamingMedia,
|
StreamingMedia,
|
||||||
PhotoViewer,
|
PhotoViewer,
|
||||||
NgxImageCompressService
|
NgxImageCompressService,
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
|
|||||||
@@ -1,9 +1,25 @@
|
|||||||
<ion-content class=" bg-blue">
|
<ion-content class=" bg-blue">
|
||||||
<div class="main-content width-100 overflow-y-auto height-100">
|
<div class="main-content width-100 overflow-y-auto height-100">
|
||||||
<div class="profile-header width-100">
|
<div class="profile-header width-100">
|
||||||
<div class="div-logo d-md-none">
|
<div class="div-logo d-md-none width-40">
|
||||||
<div class="logo height-fit-content">
|
<div class="logo-icon">
|
||||||
<img class="img" src='assets/images/logo-no-bg.png' alt='logo'>
|
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||||
|
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||||
|
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||||
|
<div class="logo-description-content">
|
||||||
|
<p class="logo-description-text">Presidente da República</p>
|
||||||
|
<div class="add-line"></div>
|
||||||
|
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||||
|
<div class="logo-description-content">
|
||||||
|
<p class="logo-description-text color-white">Presidente da República</p>
|
||||||
|
<div class="add-line-white"></div>
|
||||||
|
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
||||||
|
|||||||
@@ -10,18 +10,68 @@
|
|||||||
|
|
||||||
.div-logo{
|
.div-logo{
|
||||||
background: transparent;
|
background: transparent;
|
||||||
width: calc(100% - 40px) !important;
|
width: em(140px);
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: black;
|
||||||
|
overflow: auto;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
.logo{
|
.logo-icon{
|
||||||
width: 140px;
|
width: 25.33%;
|
||||||
.img{
|
overflow: auto;
|
||||||
|
|
||||||
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo-description{
|
||||||
|
width: 74.67%;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 8.5px;
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
|
||||||
|
.logo-description-content{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.logo-description-text{
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-line{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
margin-bottom: 2.5px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-line-white{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
margin-bottom: 2.5px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.color-white{
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-botton-border{
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-botton-border-white{
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn-close{
|
.btn-close{
|
||||||
|
|||||||
@@ -1,8 +1,24 @@
|
|||||||
<ion-header class=" bg-blue ion-no-border">
|
<ion-header class=" bg-blue ion-no-border">
|
||||||
<div class="profile-header width-100">
|
<div class="profile-header width-100">
|
||||||
<div class="div-logo d-md-none">
|
<div class="div-logo d-md-none width-40">
|
||||||
<div class="logo height-fit-content">
|
<div class="logo-icon">
|
||||||
<img class="img" src='assets/images/logo-no-bg.png' alt='logo'>
|
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||||
|
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||||
|
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||||
|
<div class="logo-description-content">
|
||||||
|
<p class="logo-description-text">Presidente da República</p>
|
||||||
|
<div class="add-line"></div>
|
||||||
|
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||||
|
<div class="logo-description-content">
|
||||||
|
<p class="logo-description-text color-white">Presidente da República</p>
|
||||||
|
<div class="add-line-white"></div>
|
||||||
|
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
||||||
@@ -13,7 +29,7 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-header class=" bg-blue ion-no-border">
|
<ion-header class=" bg-blue ion-no-border">
|
||||||
<div class="profile-content">
|
<div class="profile-content">
|
||||||
|
|
||||||
<div class="profile-title d-flex justify-content-center width-100">
|
<div class="profile-title d-flex justify-content-center width-100">
|
||||||
<ion-label >{{loggeduser.RoleDescription}}</ion-label>
|
<ion-label >{{loggeduser.RoleDescription}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,7 +53,7 @@
|
|||||||
<div class="d-flex flex-column height-100 overflow-y-auto">
|
<div class="d-flex flex-column height-100 overflow-y-auto">
|
||||||
|
|
||||||
<div class="notifications-content height-100">
|
<div class="notifications-content height-100">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
||||||
*ngFor = "let item of notificationdata; let i = index"
|
*ngFor = "let item of notificationdata; let i = index"
|
||||||
@@ -66,9 +82,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -4,20 +4,70 @@
|
|||||||
padding: 20px 20px;
|
padding: 20px 20px;
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
|
|
||||||
.div-logo {
|
.div-logo{
|
||||||
background: transparent;
|
background: transparent;
|
||||||
width: calc(100% - 40px) !important;
|
width: em(140px);
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: black;
|
||||||
|
overflow: auto;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
.logo {
|
.logo-icon{
|
||||||
width: 140px;
|
width: 25.33%;
|
||||||
.img {
|
overflow: auto;
|
||||||
|
|
||||||
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo-description{
|
||||||
|
width: 74.67%;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 8.5px;
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
|
||||||
|
.logo-description-content{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.logo-description-text{
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-line{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
margin-bottom: 2.5px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-line-white{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
margin-bottom: 2.5px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.color-white{
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-botton-border{
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-botton-border-white{
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn-close {
|
.btn-close {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { ViewMediaPageRoutingModule } from './view-media-routing.module';
|
|||||||
|
|
||||||
import { ViewMediaPage } from './view-media.page';
|
import { ViewMediaPage } from './view-media.page';
|
||||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -15,7 +16,8 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
ViewMediaPageRoutingModule
|
ViewMediaPageRoutingModule,
|
||||||
|
PdfViewerModule
|
||||||
],
|
],
|
||||||
declarations: [ViewMediaPage]
|
declarations: [ViewMediaPage]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -20,7 +20,13 @@
|
|||||||
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
|
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
|
||||||
<ion-slide>
|
<ion-slide>
|
||||||
<div class="swiper-zoom-container">
|
<div class="swiper-zoom-container">
|
||||||
<img src="{{image}}">
|
<div *ngIf="type == 'application/img'">
|
||||||
|
<img src="{{image}}">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="type == 'application/pdf'">
|
||||||
|
<pdf-viewer [src]="image" [render-text]="true" [original-size]="false" [zoom]="0.5" style="display: block;">
|
||||||
|
</pdf-viewer>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-slide>
|
</ion-slide>
|
||||||
</ion-slides>
|
</ion-slides>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { ModalController, NavParams } from '@ionic/angular';
|
|||||||
export class ViewMediaPage implements OnInit {
|
export class ViewMediaPage implements OnInit {
|
||||||
|
|
||||||
image: any;
|
image: any;
|
||||||
|
type: any;
|
||||||
name: string
|
name: string
|
||||||
_updatedAt: string
|
_updatedAt: string
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ export class ViewMediaPage implements OnInit {
|
|||||||
private navParams:NavParams,
|
private navParams:NavParams,
|
||||||
) {
|
) {
|
||||||
this.image = this.navParams.get('image')
|
this.image = this.navParams.get('image')
|
||||||
|
this.type = this.navParams.get('type')
|
||||||
this.name = this.navParams.get('username')
|
this.name = this.navParams.get('username')
|
||||||
this._updatedAt = this.navParams.get('_updatedAt')
|
this._updatedAt = this.navParams.get('_updatedAt')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<div *ngIf="room.lastMessage" class="item-description" [class.item-description-active]="room.id == idSelected">
|
<div *ngIf="room.lastMessage" class="item-description" [class.item-description-active]="room.id == idSelected">
|
||||||
|
|
||||||
<ion-label *ngIf="room.lastMessage && room.otherUserType == false">{{room.lastMessage.msg}}</ion-label>
|
<ion-label *ngIf="room.lastMessage && room.otherUserType == false">{{room.lastMessage.msg}}</ion-label>
|
||||||
<ion-label *ngIf="room.otherUserType == true">A escrever...</ion-label>
|
<ion-label *ngIf="room.otherUserType == true">está escrever...</ion-label>
|
||||||
<!-- <ion-label *ngIf="room.lastMessage.file">
|
<!-- <ion-label *ngIf="room.lastMessage.file">
|
||||||
<fa-icon *ngIf="room.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
<fa-icon *ngIf="room.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
||||||
</ion-label> -->
|
</ion-label> -->
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.id ==idSelected">
|
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.id ==idSelected">
|
||||||
<div class="item-message" *ngIf="group.otherUserType == false">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
<div class="item-message" *ngIf="group.otherUserType == false">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
||||||
<div *ngIf="group.otherUserType == true">{{group.userThatIsTyping}} A escrever ...</div>
|
<div *ngIf="group.otherUserType == true">{{group.userThatIsTyping}} está escrever ...</div>
|
||||||
|
|
||||||
<div class="item-files add-ellipsis" *ngIf="group.file">
|
<div class="item-files add-ellipsis" *ngIf="group.file">
|
||||||
<fa-icon *ngIf="group.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
<fa-icon *ngIf="group.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="msg.file.type != 'application/img'">
|
<div *ngIf="msg.file.type != 'application/img'">
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<div (click)="viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
<div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||||
<span *ngIf="msg.file.type">
|
<span *ngIf="msg.file.type">
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked, AfterViewInit, OnDestroy, ChangeDetectorRef, } from '@angular/core';
|
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked, AfterViewInit, OnDestroy, ChangeDetectorRef, } from '@angular/core';
|
||||||
import { ActionSheetController, IonSlides, MenuController, ModalController, NavParams, PopoverController,Platform } from '@ionic/angular';
|
import { ActionSheetController, IonSlides, MenuController, ModalController, NavParams, PopoverController, Platform } from '@ionic/angular';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { ChatService } from 'src/app/services/chat.service';
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
@@ -8,7 +8,7 @@ import { ChatPopoverPage } from 'src/app/shared/popover/chat-popover/chat-popove
|
|||||||
import { ContactsPage } from '../new-group/contacts/contacts.page';
|
import { ContactsPage } from '../new-group/contacts/contacts.page';
|
||||||
import { NewGroupPage } from '../new-group/new-group.page';
|
import { NewGroupPage } from '../new-group/new-group.page';
|
||||||
import { GroupContactsPage } from './group-contacts/group-contacts.page';
|
import { GroupContactsPage } from './group-contacts/group-contacts.page';
|
||||||
import {Router} from '@angular/router'
|
import { Router } from '@angular/router'
|
||||||
import { EditGroupPage } from '../edit-group/edit-group.page';
|
import { EditGroupPage } from '../edit-group/edit-group.page';
|
||||||
import { TimeService } from 'src/app/services/functions/time.service';
|
import { TimeService } from 'src/app/services/functions/time.service';
|
||||||
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
|
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
|
||||||
@@ -43,33 +43,33 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
isGroupCreated:boolean;
|
isGroupCreated: boolean;
|
||||||
loggedUser: any;
|
loggedUser: any;
|
||||||
|
|
||||||
room:any;
|
room: any;
|
||||||
roomName:any;
|
roomName: any;
|
||||||
members:any;
|
members: any;
|
||||||
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
||||||
allUsers:any[] = [];
|
allUsers: any[] = [];
|
||||||
|
|
||||||
roomId: string;
|
roomId: string;
|
||||||
loggedUserChat:any;
|
loggedUserChat: any;
|
||||||
eventSelectedDate: Date = new Date();
|
eventSelectedDate: Date = new Date();
|
||||||
|
|
||||||
scrollingOnce:boolean = true;
|
scrollingOnce: boolean = true;
|
||||||
private scrollChangeCallback: () => void;
|
private scrollChangeCallback: () => void;
|
||||||
currentPosition: any;
|
currentPosition: any;
|
||||||
startPosition: number;
|
startPosition: number;
|
||||||
|
|
||||||
capturedImage:any;
|
capturedImage: any;
|
||||||
capturedImageTitle:any;
|
capturedImageTitle: any;
|
||||||
attendees: EventPerson[] = [];
|
attendees: EventPerson[] = [];
|
||||||
scrollToBottomBtn = false;
|
scrollToBottomBtn = false;
|
||||||
|
|
||||||
longPressActive = false;
|
longPressActive = false;
|
||||||
showMessageOptions = false;
|
showMessageOptions = false;
|
||||||
selectedMsgId:string;
|
selectedMsgId: string;
|
||||||
roomCountDownDate:any;
|
roomCountDownDate: any;
|
||||||
downloadFile: any;
|
downloadFile: any;
|
||||||
|
|
||||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||||
@@ -104,7 +104,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.isGroupCreated = true;
|
this.isGroupCreated = true;
|
||||||
this.roomId = this.navParams.get('roomId');
|
this.roomId = this.navParams.get('roomId');
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
if( window.innerWidth > 701){
|
if (window.innerWidth > 701) {
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -113,7 +113,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
|
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
|
||||||
this.wsChatMethodsService.openRoom(this.roomId)
|
this.wsChatMethodsService.openRoom(this.roomId)
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.scrollToBottomClicked()
|
this.scrollToBottomClicked()
|
||||||
}, 50)
|
}, 50)
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.roomId);
|
console.log(this.roomId);
|
||||||
this.loggedUser=this.loggedUserChat;
|
this.loggedUser = this.loggedUserChat;
|
||||||
this.getRoomInfo();
|
this.getRoomInfo();
|
||||||
this.scrollToBottom();
|
this.scrollToBottom();
|
||||||
this.serverLongPull();
|
this.serverLongPull();
|
||||||
@@ -134,7 +134,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setStatus(status:string){
|
setStatus(status: string) {
|
||||||
let body = {
|
let body = {
|
||||||
message: '',
|
message: '',
|
||||||
status: status,
|
status: status,
|
||||||
@@ -144,16 +144,16 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteMessage(msgId:string){
|
deleteMessage(msgId: string) {
|
||||||
let body = {
|
let body = {
|
||||||
"roomId": this.roomId,
|
"roomId": this.roomId,
|
||||||
"msgId": msgId,
|
"msgId": msgId,
|
||||||
"asUser": false,
|
"asUser": false,
|
||||||
}
|
}
|
||||||
if(msgId){
|
if (msgId) {
|
||||||
//this.alertService.confirmDeleteMessage(body);
|
//this.alertService.confirmDeleteMessage(body);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.toastService.badRequest('Não foi possível apagar');
|
this.toastService.badRequest('Não foi possível apagar');
|
||||||
}
|
}
|
||||||
this.showMessageOptions = false;
|
this.showMessageOptions = false;
|
||||||
@@ -166,12 +166,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePress(id?:string){
|
handlePress(id?: string) {
|
||||||
this.selectedMsgId = id;
|
this.selectedMsgId = id;
|
||||||
this.showMessageOptions = true;
|
this.showMessageOptions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(){
|
handleClick() {
|
||||||
this.showMessageOptions = false;
|
this.showMessageOptions = false;
|
||||||
this.selectedMsgId = "";
|
this.selectedMsgId = "";
|
||||||
}
|
}
|
||||||
@@ -188,10 +188,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
//alert('UP');
|
//alert('UP');
|
||||||
this.scrollingOnce = false;
|
this.scrollingOnce = false;
|
||||||
}
|
}
|
||||||
if((containerHeight - 100) > scroll){
|
if ((containerHeight - 100) > scroll) {
|
||||||
this.scrollToBottomBtn = true;
|
this.scrollToBottomBtn = true;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.scrollToBottomBtn = false;
|
this.scrollToBottomBtn = false;
|
||||||
}
|
}
|
||||||
this.currentPosition = scroll;
|
this.currentPosition = scroll;
|
||||||
@@ -225,25 +225,25 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
scrollToBottom(): void {
|
scrollToBottom(): void {
|
||||||
try {
|
try {
|
||||||
if(this.scrollingOnce){
|
if (this.scrollingOnce) {
|
||||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||||
//this.scrollingOnce = false;
|
//this.scrollingOnce = false;
|
||||||
}
|
}
|
||||||
} catch(err) { }
|
} catch (err) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToBottomClicked = () => {
|
scrollToBottomClicked = () => {
|
||||||
try {
|
try {
|
||||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||||
} catch(err) { }
|
} catch (err) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
getRoomInfo(){
|
getRoomInfo() {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
this.chatService.getRoomInfo(this.roomId).subscribe(room => {
|
||||||
this.room = room['room'];
|
this.room = room['room'];
|
||||||
this.roomName = this.room.name.split('-').join(' ');
|
this.roomName = this.room.name.split('-').join(' ');
|
||||||
if(this.room.customFields.countDownDate){
|
if (this.room.customFields.countDownDate) {
|
||||||
this.roomCountDownDate = this.timeService.countDownDateTimer(this.room.customFields.countDownDate, this.room._id);
|
this.roomCountDownDate = this.timeService.countDownDateTimer(this.room.customFields.countDownDate, this.room._id);
|
||||||
}
|
}
|
||||||
this.getGroupContacts(this.room);
|
this.getGroupContacts(this.room);
|
||||||
@@ -251,9 +251,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getChatMembers(){
|
async getChatMembers() {
|
||||||
//return await this.chatService.getMembers(roomId).toPromise();
|
//return await this.chatService.getMembers(roomId).toPromise();
|
||||||
this.chatService.getAllUsers().subscribe(res=> {
|
this.chatService.getAllUsers().subscribe(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||||
@@ -266,28 +266,28 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.loadGroupMessages();
|
this.loadGroupMessages();
|
||||||
} */
|
} */
|
||||||
|
|
||||||
close(){
|
close() {
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefresh(ev:any){
|
doRefresh(ev: any) {
|
||||||
this.getRoomInfo();
|
this.getRoomInfo();
|
||||||
ev.target.complete();
|
ev.target.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
getGroupContacts(room:any){
|
getGroupContacts(room: any) {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
//If group is private call getGroupMembers
|
//If group is private call getGroupMembers
|
||||||
if(this.room.t === 'p'){
|
if (this.room.t === 'p') {
|
||||||
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
this.chatService.getGroupMembers(this.roomId).subscribe(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.members = res['members'];
|
this.members = res['members'];
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//Otherwise call getChannelMembers for públic groups
|
//Otherwise call getChannelMembers for públic groups
|
||||||
else{
|
else {
|
||||||
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
this.chatService.getChannelMembers(this.roomId).subscribe(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.members = res['members'];
|
this.members = res['members'];
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -296,10 +296,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
showDateDuration(start:any){
|
showDateDuration(start: any) {
|
||||||
return this.timeService.showDateDuration(start);
|
return this.timeService.showDateDuration(start);
|
||||||
}
|
}
|
||||||
countDownDate(date:any, roomId:string){
|
countDownDate(date: any, roomId: string) {
|
||||||
this.roomCountDownDate = this.timeService.countDownDate(date, roomId);
|
this.roomCountDownDate = this.timeService.countDownDate(date, roomId);
|
||||||
return this.timeService.countDownDateTimer(date, roomId);
|
return this.timeService.countDownDateTimer(date, roomId);
|
||||||
}
|
}
|
||||||
@@ -328,33 +328,33 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(res => {
|
||||||
if(res.data == 'leave'){
|
if (res.data == 'leave') {
|
||||||
console.log('saiu do grupo');
|
console.log('saiu do grupo');
|
||||||
//this.wsChatMethodsService.subscribeToRoomUpdate(this.roomId, this.room);
|
//this.wsChatMethodsService.subscribeToRoomUpdate(this.roomId, this.room);
|
||||||
}
|
}
|
||||||
else if(res.data == 'cancel'){
|
else if (res.data == 'cancel') {
|
||||||
console.log('cancel');
|
console.log('cancel');
|
||||||
}
|
}
|
||||||
else if(res.data == 'edit'){
|
else if (res.data == 'edit') {
|
||||||
this.editGroup(this.roomId);
|
this.editGroup(this.roomId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
viewDocument(file:any, url?:string){
|
viewDocument(file: any, url?: string) {
|
||||||
|
|
||||||
if(file.type == "application/webtrix") {
|
if (file.type == "application/webtrix") {
|
||||||
this.openViewDocumentModal(file);
|
this.openViewDocumentModal(file);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let fullUrl = "https://www.tabularium.pt" + url;
|
let fullUrl = "https://www.tabularium.pt" + url;
|
||||||
this.fileService.viewDocumentByUrl(fullUrl);
|
this.fileService.viewDocumentByUrl(fullUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async openViewDocumentModal(file:any){
|
async openViewDocumentModal(file: any) {
|
||||||
|
|
||||||
let task = {
|
let task = {
|
||||||
serialNumber: '',
|
serialNumber: '',
|
||||||
@@ -371,17 +371,17 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let doc = {
|
let doc = {
|
||||||
"Id": "",
|
"Id": "",
|
||||||
"ParentId": "",
|
"ParentId": "",
|
||||||
"Source": 1,
|
"Source": 1,
|
||||||
"ApplicationId": file.ApplicationId,
|
"ApplicationId": file.ApplicationId,
|
||||||
"CreateDate": "",
|
"CreateDate": "",
|
||||||
"Data": null,
|
"Data": null,
|
||||||
"Description":"",
|
"Description": "",
|
||||||
"Link": null,
|
"Link": null,
|
||||||
"SourceId": file.DocId,
|
"SourceId": file.DocId,
|
||||||
"SourceName": file.Assunto,
|
"SourceName": file.Assunto,
|
||||||
"Stakeholders": "",
|
"Stakeholders": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -406,19 +406,19 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async bookMeeting() {
|
async bookMeeting() {
|
||||||
this.attendees = this.members.map((val)=>{
|
this.attendees = this.members.map((val) => {
|
||||||
return {
|
return {
|
||||||
Name: val.name,
|
Name: val.name,
|
||||||
EmailAddress: val.username+"@"+environment.domain,
|
EmailAddress: val.username + "@" + environment.domain,
|
||||||
IsRequired: "true",
|
IsRequired: "true",
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(this.attendees);
|
console.log(this.attendees);
|
||||||
this.popoverController.dismiss();
|
this.popoverController.dismiss();
|
||||||
if( window.innerWidth <= 1024){
|
if (window.innerWidth <= 1024) {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: NewEventPage,
|
component: NewEventPage,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
attendees: this.attendees,
|
attendees: this.attendees,
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
@@ -426,7 +426,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((data) => {
|
modal.onDidDismiss().then((data) => {
|
||||||
if(data){
|
if (data) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -441,7 +441,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
const image = await this.CameraService.takePicture();
|
const image = await this.CameraService.takePicture();
|
||||||
await this.fileService.saveImage(image)
|
await this.fileService.saveImage(image)
|
||||||
const lastphoto: any = await this.fileService.loadFiles();
|
const lastphoto: any = await this.fileService.loadFiles();
|
||||||
const { capturedImage, capturedImageTitle} = await this.fileService.loadFileData(lastphoto);
|
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
||||||
const base64 = await fetch(capturedImage);
|
const base64 = await fetch(capturedImage);
|
||||||
const blob = await base64.blob();
|
const blob = await base64.blob();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
@@ -454,8 +454,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
temporaryData: formData,
|
temporaryData: formData,
|
||||||
attachments: [{
|
attachments: [{
|
||||||
"title": capturedImageTitle ,
|
"title": capturedImageTitle,
|
||||||
"image_url": capturedImage, // rocketchat
|
//"image_url": capturedImage, // rocketchat
|
||||||
"text": "description",
|
"text": "description",
|
||||||
"title_link_download": false,
|
"title_link_download": false,
|
||||||
}]
|
}]
|
||||||
@@ -482,13 +482,13 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(async res=>{
|
modal.onDidDismiss().then(async res => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
|
||||||
if(data.selected) {
|
if (data.selected) {
|
||||||
|
|
||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).send({
|
this.wsChatMethodsService.getGroupRoom(this.roomId).send({
|
||||||
file:{
|
file: {
|
||||||
"name": res.data.selected.Assunto,
|
"name": res.data.selected.Assunto,
|
||||||
"type": "application/webtrix",
|
"type": "application/webtrix",
|
||||||
"ApplicationId": res.data.selected.ApplicationType,
|
"ApplicationId": res.data.selected.ApplicationType,
|
||||||
@@ -515,26 +515,37 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
async addFileToChat(types: typeof FileType[] ) {
|
async addFileToChat(types: typeof FileType[] ) {
|
||||||
|
|
||||||
|
const roomId = this.roomId
|
||||||
|
|
||||||
const file: any = await this.fileService.getFileFromDevice(types);
|
const file: any = await this.fileService.getFileFromDevice(types);
|
||||||
const imageData = await this.fileToBase64Service.convert(file)
|
console.log('Add file', file)
|
||||||
|
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
|
||||||
|
console.log('Add file', filee)
|
||||||
|
}) */
|
||||||
|
const response = await fetch(file);
|
||||||
|
const blob = await response.blob();
|
||||||
|
console.log('Add file', blob)
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("blobFile", file);
|
formData.append("blobFile", blob);
|
||||||
|
|
||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).send({
|
this.wsChatMethodsService.getGroupRoom(roomId).send({
|
||||||
file: {
|
file: {
|
||||||
"type": "application/img",
|
"type": file.type,
|
||||||
"guid": ''
|
"guid": '',
|
||||||
},
|
},
|
||||||
temporaryData: formData,
|
|
||||||
attachments: [{
|
attachments: [{
|
||||||
"title": file.name ,
|
"title": file.name ,
|
||||||
"text": "description",
|
"name": file.name ,
|
||||||
"image_url": imageData,
|
// "text": "description",
|
||||||
|
//"image_url": file.base64String, // rocketchat
|
||||||
"title_link_download": false,
|
"title_link_download": false,
|
||||||
}]
|
}],
|
||||||
|
temporaryData: formData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openChatOptions(ev?: any) {
|
async openChatOptions(ev?: any) {
|
||||||
@@ -553,7 +564,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
translucent: true
|
translucent: true
|
||||||
});
|
});
|
||||||
await popover.present();
|
await popover.present();
|
||||||
await popover.onDidDismiss().then( async(res)=>{
|
await popover.onDidDismiss().then(async (res) => {
|
||||||
console.log(res['data']);
|
console.log(res['data']);
|
||||||
if (res['data'] == 'meeting') {
|
if (res['data'] == 'meeting') {
|
||||||
this.bookMeeting();
|
this.bookMeeting();
|
||||||
@@ -575,7 +586,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async addContacts(){
|
async addContacts() {
|
||||||
console.log(this.members);
|
console.log(this.members);
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -592,12 +603,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
|
|
||||||
modal.onDidDismiss().then(()=>{
|
modal.onDidDismiss().then(() => {
|
||||||
this.getRoomInfo();
|
this.getRoomInfo();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async editGroup(roomId){
|
async editGroup(roomId) {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: EditGroupPage,
|
component: EditGroupPage,
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
@@ -606,7 +617,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((res)=>{
|
modal.onDidDismiss().then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
this.getRoomInfo();
|
this.getRoomInfo();
|
||||||
//this.modalController.dismiss(res.data);
|
//this.modalController.dismiss(res.data);
|
||||||
@@ -711,42 +722,42 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async serverLongPull(){
|
async serverLongPull() {
|
||||||
this.chatService.getPrivateGroupMessages(this.roomId).subscribe(async res => {
|
this.chatService.getPrivateGroupMessages(this.roomId).subscribe(async res => {
|
||||||
|
|
||||||
if (res == 502) {
|
if (res == 502) {
|
||||||
// Connection timeout
|
// Connection timeout
|
||||||
// happens when the connection was pending for too long
|
// happens when the connection was pending for too long
|
||||||
// let's reconnect
|
// let's reconnect
|
||||||
await this.serverLongPull();
|
await this.serverLongPull();
|
||||||
} else if (res != 200) {
|
} else if (res != 200) {
|
||||||
// Show Error
|
// Show Error
|
||||||
//showMessage(response.statusText);
|
//showMessage(response.statusText);
|
||||||
//this.loadMessages()
|
//this.loadMessages()
|
||||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||||
//this.messages = msgOnly.reverse();
|
//this.messages = msgOnly.reverse();
|
||||||
// console.log('MOBILE MSG ROCKET',this.messages);
|
// console.log('MOBILE MSG ROCKET',this.messages);
|
||||||
this.transformDataMSG(msgOnly.reverse());
|
this.transformDataMSG(msgOnly.reverse());
|
||||||
this.getRoomMessageDB(this.roomId);
|
this.getRoomMessageDB(this.roomId);
|
||||||
// Reconnect in one second
|
// Reconnect in one second
|
||||||
if(this.route.url != "/home/chat"){
|
if (this.route.url != "/home/chat") {
|
||||||
console.log("Timer message stop")
|
console.log("Timer message stop")
|
||||||
} else {
|
} else {
|
||||||
//Check if modal is opened
|
//Check if modal is opened
|
||||||
if(document.querySelector('.isGroupChatOpened')){
|
if (document.querySelector('.isGroupChatOpened')) {
|
||||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||||
await this.serverLongPull();
|
await this.serverLongPull();
|
||||||
console.log('Timer message running')
|
console.log('Timer message running')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Got message
|
// Got message
|
||||||
//let message = await response.text();
|
//let message = await response.text();
|
||||||
//this.loadMessages()
|
//this.loadMessages()
|
||||||
await this.serverLongPull();
|
await this.serverLongPull();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
sliderOpts = {
|
sliderOpts = {
|
||||||
@@ -756,86 +767,93 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
centeredSlides: true
|
centeredSlides: true
|
||||||
};
|
};
|
||||||
zoomActive = false;
|
zoomActive = false;
|
||||||
zoomScale = 1;
|
zoomScale = 1;
|
||||||
|
|
||||||
sliderZoomOpts = {
|
sliderZoomOpts = {
|
||||||
allowSlidePrev: false,
|
allowSlidePrev: false,
|
||||||
allowSlideNext: false,
|
allowSlideNext: false,
|
||||||
zoom: {
|
zoom: {
|
||||||
maxRatio: 5
|
maxRatio: 5
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
zoomChange: (scale, imageEl, slideEl) => {
|
zoomChange: (scale, imageEl, slideEl) => {
|
||||||
this.zoomActive = true;
|
this.zoomActive = true;
|
||||||
this.zoomScale = scale/5;
|
this.zoomScale = scale / 5;
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async touchEnd(zoomslides: IonSlides, card) {
|
async touchEnd(zoomslides: IonSlides, card) {
|
||||||
// Zoom back to normal
|
// Zoom back to normal
|
||||||
const slider = await zoomslides.getSwiper();
|
const slider = await zoomslides.getSwiper();
|
||||||
const zoom = slider.zoom;
|
const zoom = slider.zoom;
|
||||||
zoom.out();
|
zoom.out();
|
||||||
|
|
||||||
// Card back to normal
|
// Card back to normal
|
||||||
card.el.style['z-index'] = 9;
|
card.el.style['z-index'] = 9;
|
||||||
|
|
||||||
this.zoomActive = false;
|
this.zoomActive = false;
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
touchStart(card) {
|
touchStart(card) {
|
||||||
// Make card appear above backdrop
|
// Make card appear above backdrop
|
||||||
card.el.style['z-index'] = 11;
|
card.el.style['z-index'] = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFileMsg(msg) {
|
downloadFileMsg(msg) {
|
||||||
console.log('FILE TYPE', msg.file.type)
|
console.log('FILE TYPE', msg.file.type)
|
||||||
this.downloadFile = "";
|
this.downloadFile = "";
|
||||||
if (msg.file.type == "application/img") {
|
// if (msg.file.type == "application/img") {
|
||||||
this.AttachmentsService.downloadFile(msg.file.guid).subscribe(async (event) => {
|
this.AttachmentsService.downloadFile(msg.file.guid).subscribe(async (event) => {
|
||||||
console.log('FILE TYPE 22', msg.file.guid)
|
console.log('FILE TYPE 22', msg.file.guid)
|
||||||
var name = msg.file.guid;
|
var name = msg.file.guid;
|
||||||
|
|
||||||
if (event.type === HttpEventType.DownloadProgress) {
|
if (event.type === HttpEventType.DownloadProgress) {
|
||||||
//this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
//this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
||||||
console.log('FILE TYPE 33', msg.file.type)
|
console.log('FILE TYPE 33', msg.file.type)
|
||||||
} else if (event.type === HttpEventType.Response) {
|
} else if (event.type === HttpEventType.Response) {
|
||||||
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
if (msg.file.type == "application/img") {
|
||||||
console.log('FILE TYPE 44', this.downloadFile)
|
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||||
|
} else {
|
||||||
|
|
||||||
msg.file = {
|
this.downloadFile = event.body;
|
||||||
guid: msg.file.guid,
|
|
||||||
image_url: this.downloadFile,
|
|
||||||
type: msg.file.type
|
|
||||||
}
|
}
|
||||||
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
|
|
||||||
}
|
msg.attachments[0] = {
|
||||||
});
|
image_url: this.downloadFile,
|
||||||
console.log('FILE TYPE 44', this.downloadFile)
|
name: msg.attachments[0].name,
|
||||||
|
title: msg.attachments[0].title,
|
||||||
|
title_link_download: msg.attachments[0].title_link_download,
|
||||||
|
ts: msg.attachments[0].ts
|
||||||
|
}
|
||||||
|
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log('FILE TYPE 44', this.downloadFile)
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
async openPreview(msg) {
|
||||||
|
|
||||||
|
if (!msg.attachments[0].image_url ||msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
|
||||||
|
this.downloadFileMsg(msg)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: ViewMediaPage,
|
||||||
|
cssClass: 'modal modal-desktop',
|
||||||
|
componentProps: {
|
||||||
|
image: msg.attachments[0].image_url,
|
||||||
|
type: msg.file.type,
|
||||||
|
username: msg.u.name,
|
||||||
|
_updatedAt: msg._updatedAt
|
||||||
|
}
|
||||||
|
});
|
||||||
|
modal.present();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async openPreview(msg) {
|
|
||||||
|
|
||||||
if (msg.attachments[0].image_url === null || msg.attachments[0].image_url === '' ) {
|
|
||||||
this.downloadFileMsg(msg)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: ViewMediaPage,
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
componentProps: {
|
|
||||||
image: msg.attachments[0].image_url,
|
|
||||||
username: msg.u.name,
|
|
||||||
_updatedAt: msg._updatedAt
|
|
||||||
}
|
|
||||||
});
|
|
||||||
modal.present();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
|
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{msg.duration}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
{{last ? scrollToBottom() : ''}}
|
{{last ? scrollToBottom() : ''}}
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="msg.file">
|
<div *ngIf="msg.file">
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="msg.file.type != 'application/img'">
|
<div *ngIf="msg.file.type != 'application/img'">
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<div (click)="docIndex(i); viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
<div (click)="docIndex(i); openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||||
<span *ngIf="msg.file.type">
|
<span *ngIf="msg.file.type">
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="msg.file">
|
<div *ngIf="msg.file">
|
||||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
||||||
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
||||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
|
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
|
||||||
</div>
|
</div>
|
||||||
{{last ? scrollToBottom() : ''}}
|
{{last ? scrollToBottom() : ''}}
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
|
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
|
||||||
@@ -168,13 +168,13 @@
|
|||||||
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true">
|
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true">
|
||||||
<ngx-letters-avatar
|
<ngx-letters-avatar
|
||||||
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
|
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
|
||||||
[width]="30"
|
[width]="30"
|
||||||
[circular]="true"
|
[circular]="true"
|
||||||
fontFamily="Roboto"></ngx-letters-avatar>
|
fontFamily="Roboto"></ngx-letters-avatar>
|
||||||
Está a escrever ...
|
está a escrever ...
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-list hidden>
|
<ion-list>
|
||||||
<ion-item (click)="playFile(storedFileNames)">
|
<ion-item (click)="playFile(storedFileNames)">
|
||||||
{{storedFileNames}}
|
{{storedFileNames}}
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -182,14 +182,13 @@
|
|||||||
{{storedFileNames}}
|
{{storedFileNames}}
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
<audio hidden controls>
|
<audio controls>
|
||||||
<!-- <source src="https://www.tabularium.pt/file-upload/5g6DkyMC4MHcuaDyp/Audio%20record.mp3" type="audio/mpeg"> -->
|
<!-- <source src="https://www.tabularium.pt/file-upload/5g6DkyMC4MHcuaDyp/Audio%20record.mp3" type="audio/mpeg"> -->
|
||||||
</audio>
|
</audio>
|
||||||
<!-- <button (click)="startRecording()">Start Recording</button>
|
<button (click)="startRecording()">Start Recording</button>
|
||||||
<button (click)="stopRecording()">Stop Recording</button> -->
|
<button (click)="stopRecording()">Stop Recording</button>
|
||||||
<div class="container width-100 d-flex">
|
<div class="container width-100 d-flex">
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<button class="btn-no-color" (click)="openChatOptions()">
|
<button class="btn-no-color" (click)="openChatOptions()">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
|
|||||||
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
|
|
||||||
|
import { Directory, Encoding, FilesystemDirectory } from '@capacitor/filesystem';
|
||||||
import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder';
|
import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder';
|
||||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||||
@@ -39,6 +40,11 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
|||||||
import { Storage } from '@ionic/storage';
|
import { Storage } from '@ionic/storage';
|
||||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||||
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
|
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
|
||||||
|
import { Plugins } from '@capacitor/core';
|
||||||
|
import { fromByteArray } from 'base64-js';
|
||||||
|
|
||||||
|
const { Filesystem } = Plugins;
|
||||||
|
|
||||||
|
|
||||||
const IMAGE_DIR = 'stored-images';
|
const IMAGE_DIR = 'stored-images';
|
||||||
|
|
||||||
@@ -88,6 +94,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
myAudio: any;
|
myAudio: any;
|
||||||
downloadfile: any;
|
downloadfile: any;
|
||||||
downloadFile: any;
|
downloadFile: any;
|
||||||
|
downloadProgess: number;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public popoverController: PopoverController,
|
public popoverController: PopoverController,
|
||||||
@@ -128,7 +135,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||||
this.wsChatMethodsService.openRoom(this.roomId)
|
this.wsChatMethodsService.openRoom(this.roomId)
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.scrollToBottomClicked()
|
this.scrollToBottomClicked()
|
||||||
}, 150)
|
}, 150)
|
||||||
|
|
||||||
@@ -195,7 +202,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
const temp: any[] = result.files.reverse();
|
const temp: any[] = result.files.reverse();
|
||||||
this.storedFileNames = temp[0];
|
this.storedFileNames = temp[0];
|
||||||
console.log(this.storedFileNames);
|
console.log(this.storedFileNames);
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,10 +358,41 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
|
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
|
||||||
}
|
}
|
||||||
|
|
||||||
viewDocument(file: any, url?: string) {
|
viewDocument(msg: any, url?: string) {
|
||||||
|
console.log(msg)
|
||||||
|
if (msg.attachments.type == "application/webtrix") {
|
||||||
|
//this.openViewDocumentModal(file);
|
||||||
|
}
|
||||||
|
|
||||||
if (file.type == "application/webtrix") {
|
if (msg.attachments.type == "application/pdf") {
|
||||||
this.openViewDocumentModal(file);
|
|
||||||
|
try {
|
||||||
|
const writeSecretFile = async () => {
|
||||||
|
await Filesystem.writeFile({
|
||||||
|
path: msg.attachments.name,
|
||||||
|
data: msg.attachments.image_url,
|
||||||
|
directory: Directory.Documents,
|
||||||
|
encoding: Encoding.UTF8,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log('WRITE', writeSecretFile);
|
||||||
|
|
||||||
|
const readSecretFile = async () => {
|
||||||
|
const contents = await Filesystem.readFile({
|
||||||
|
path: msg.attachments.name,
|
||||||
|
directory: Directory.Documents,
|
||||||
|
encoding: Encoding.UTF8,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('secrets:', contents);
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log('READ', readSecretFile);
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Unable to write file", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +410,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
FolderID: '',
|
FolderID: '',
|
||||||
Subject: file.Assunto,
|
Subject: file.Assunto,
|
||||||
SourceSecFsID: file.ApplicationId,
|
SourceSecFsID: file.ApplicationId,
|
||||||
SourceType: 'DOC',
|
SourceType: 'PDF',
|
||||||
SourceID: file.DocId,
|
SourceID: file.DocId,
|
||||||
DispatchNumber: ''
|
DispatchNumber: ''
|
||||||
}
|
}
|
||||||
@@ -520,7 +557,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
const image = await this.CameraService.takePicture();
|
const image = await this.CameraService.takePicture();
|
||||||
await this.fileService.saveImage(image)
|
await this.fileService.saveImage(image)
|
||||||
const lastphoto: any = await this.fileService.loadFiles();
|
const lastphoto: any = await this.fileService.loadFiles();
|
||||||
const { capturedImage, capturedImageTitle} = await this.fileService.loadFileData(lastphoto);
|
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
||||||
|
|
||||||
|
|
||||||
const base64 = await fetch(capturedImage);
|
const base64 = await fetch(capturedImage);
|
||||||
@@ -535,8 +572,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
"guid": ''
|
"guid": ''
|
||||||
},
|
},
|
||||||
attachments: [{
|
attachments: [{
|
||||||
"image_url": capturedImage,
|
"title": capturedImageTitle,
|
||||||
"title": capturedImageTitle ,
|
|
||||||
"text": "description",
|
"text": "description",
|
||||||
"title_link_download": false,
|
"title_link_download": false,
|
||||||
}],
|
}],
|
||||||
@@ -568,14 +604,14 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(async res=>{
|
modal.onDidDismiss().then(async res => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
if(data.selected) {
|
if (data.selected) {
|
||||||
|
|
||||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||||
file:{
|
file: {
|
||||||
"name": res.data.selected.Assunto,
|
"name": res.data.selected.Assunto,
|
||||||
"type": "application/webtrix",
|
"type": "application/webtrix",
|
||||||
"ApplicationId": res.data.selected.ApplicationType,
|
"ApplicationId": res.data.selected.ApplicationType,
|
||||||
@@ -598,7 +634,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async addFileToChatMobile(types: typeof FileType[] ) {
|
async addFileToChatMobile(types: typeof FileType[]) {
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
const file = await Camera.getPhoto({
|
const file = await Camera.getPhoto({
|
||||||
@@ -611,7 +647,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
//const imageData = await this.fileToBase64Service.convert(file)
|
//const imageData = await this.fileToBase64Service.convert(file)
|
||||||
//console.log('ADDFILECHAT', imageData)
|
//console.log('ADDFILECHAT', imageData)
|
||||||
|
|
||||||
const response = await fetch('data:image/jpeg;base64,'+ file.base64String!);
|
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
@@ -624,8 +660,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
temporaryData: formData,
|
temporaryData: formData,
|
||||||
attachments: [{
|
attachments: [{
|
||||||
"title": file.path ,
|
"title": file.path,
|
||||||
"image_url": 'data:image/jpeg;base64,' +file.base64String,
|
|
||||||
"text": "description",
|
"text": "description",
|
||||||
"title_link_download": false,
|
"title_link_download": false,
|
||||||
}]
|
}]
|
||||||
@@ -635,36 +670,44 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
async addFileToChat(types: typeof FileType[] ) {
|
async addFileToChat(types: typeof FileType[]) {
|
||||||
|
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
const file: any = await this.fileService.getFileFromDevice(types);
|
const file: any = await this.fileService.getFileFromDevice(types);
|
||||||
console.log('ADDFILECHAT', file)
|
console.log('Add file', file)
|
||||||
const imageData = await this.fileToBase64Service.convert(file)
|
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
|
||||||
console.log('ADDFILECHAT', imageData)
|
console.log('Add file', filee)
|
||||||
|
}) */
|
||||||
|
const response = await fetch(file);
|
||||||
|
const blob = await response.blob();
|
||||||
|
const blob2 = new Blob([blob])
|
||||||
|
console.log('Add file base64', file)
|
||||||
|
console.log('Add file blob', blob)
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("blobFile", file);
|
formData.append("blobFile", blob2);
|
||||||
|
|
||||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||||
file: {
|
file: {
|
||||||
"type": "application/img",
|
"type": file.type,
|
||||||
"guid": '',
|
"guid": '',
|
||||||
},
|
},
|
||||||
temporaryData: formData,
|
|
||||||
attachments: [{
|
attachments: [{
|
||||||
"title": file.name ,
|
"title": file.name,
|
||||||
"image_url": imageData,
|
"name": file.name,
|
||||||
"text": "description",
|
// "text": "description",
|
||||||
"title_link_download": false,
|
"title_link_download": false,
|
||||||
}]
|
}],
|
||||||
|
temporaryData: formData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openChatOptions(ev?: any) {
|
async openChatOptions(ev?: any) {
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
console.log('MOBILE CHAT OPTION',this.members);
|
console.log('MOBILE CHAT OPTION', this.members);
|
||||||
|
|
||||||
const popover = await this.popoverController.create({
|
const popover = await this.popoverController.create({
|
||||||
component: ChatOptionsPopoverPage,
|
component: ChatOptionsPopoverPage,
|
||||||
@@ -678,7 +721,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
translucent: true
|
translucent: true
|
||||||
});
|
});
|
||||||
await popover.present();
|
await popover.present();
|
||||||
popover.onDidDismiss().then( async (res) => {
|
popover.onDidDismiss().then(async (res) => {
|
||||||
console.log(res['data']);
|
console.log(res['data']);
|
||||||
if (res['data'] == 'meeting') {
|
if (res['data'] == 'meeting') {
|
||||||
this.bookMeeting();
|
this.bookMeeting();
|
||||||
@@ -776,39 +819,58 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testeDownload(msg: MessageService) {
|
||||||
|
this.downloadFile = "";
|
||||||
|
this.AttachmentsService.downloadFileAndStore(msg.file.guid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
downloadFileMsg(msg: MessageService) {
|
downloadFileMsg(msg: MessageService) {
|
||||||
console.log('FILE TYPE', msg.file.type)
|
console.log('FILE TYPE', msg.file.type)
|
||||||
this.downloadFile = "";
|
this.downloadFile = "";
|
||||||
if (msg.file.type == "application/img") {
|
//if (msg.file.type == "application/img") {
|
||||||
this.AttachmentsService.downloadFile(msg.file.guid).subscribe(async (event) => {
|
this.AttachmentsService.downloadFile(msg.file.guid).subscribe(async (event) => {
|
||||||
console.log('FILE TYPE 22', msg.file.guid)
|
console.log('FILE TYPE 22', msg.file.guid)
|
||||||
var name = msg.file.guid;
|
var name = msg.file.guid;
|
||||||
|
|
||||||
if (event.type === HttpEventType.DownloadProgress) {
|
if (event.type === HttpEventType.DownloadProgress) {
|
||||||
//this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
||||||
console.log('FILE TYPE 33', msg.file.type)
|
console.log(this.downloadProgess)
|
||||||
} else if (event.type === HttpEventType.Response) {
|
console.log('FILE TYPE 33', msg.file.type)
|
||||||
|
} else if (event.type === HttpEventType.Response) {
|
||||||
|
if (msg.file.type == "application/img") {
|
||||||
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||||
|
} else {
|
||||||
msg.file = {
|
//console.log('TRY THIS LIBRARY ',fromByteArray(event.body));
|
||||||
guid: msg.file.guid,
|
this.downloadFile = event.body;
|
||||||
image_url: this.downloadFile,
|
|
||||||
type: msg.file.type
|
|
||||||
}
|
|
||||||
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
msg.attachments[0] = {
|
||||||
|
image_url: this.downloadFile,
|
||||||
|
name: msg.attachments[0].name,
|
||||||
|
title: msg.attachments[0].title,
|
||||||
|
title_link_download: msg.attachments[0].title_link_download,
|
||||||
|
ts: msg.attachments[0].ts
|
||||||
|
}
|
||||||
|
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
});
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openPreview(msg) {
|
testDownlod(msg: MessageService) {
|
||||||
|
this.AttachmentsService.downloadFileAndStore(msg.file.guid)
|
||||||
|
}
|
||||||
|
|
||||||
if (msg.attachments[0].image_url === null || msg.attachments[0].image_url === '' ) {
|
async openPreview(msg) {
|
||||||
this.downloadFileMsg(msg)
|
console.log(msg);
|
||||||
|
|
||||||
|
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
|
||||||
|
this.downloadFile(msg)
|
||||||
|
//this.testDownlod(msg)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -816,6 +878,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
image: msg.attachments[0].image_url,
|
image: msg.attachments[0].image_url,
|
||||||
|
type: msg.file.type,
|
||||||
username: msg.u.name,
|
username: msg.u.name,
|
||||||
_updatedAt: msg._updatedAt
|
_updatedAt: msg._updatedAt
|
||||||
}
|
}
|
||||||
@@ -845,6 +908,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// async ShareEmail(msg){
|
// async ShareEmail(msg){
|
||||||
// // Check if sharing via email is supported
|
// // Check if sharing via email is supported
|
||||||
// await Share.share({
|
// await Share.share({
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content id="main-content" class="container-wrapper">
|
<ion-content id="main-content" class="container-wrapper">
|
||||||
|
<div class="main-content height-100" *ngIf="loadedEvent" >
|
||||||
<div class="main-content d-flex flex-column height-100" *ngIf="loadedEvent" >
|
<div class="d-flex width-100">
|
||||||
<div class="pl-20 pr-20 text-center d-flex justify-center align-center" style="width:100%; height: 30px; background-color: var(--Event-approve-header-color); border-top-right-radius: 25px;border-top-left-radius: 25px;">
|
<div class="pl-20 pr-20 text-center d-flex justify-center align-center" style="width:100%; height: 30px; background-color: var(--Event-approve-header-color); border-top-right-radius: 25px;border-top-left-radius: 25px;">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons font-28" src="assets/images/icons-received-event.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons font-28" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov'" class="right-icons font-28" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov'" class="right-icons font-28" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||||
<!-- <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon> -->
|
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons font-28" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons font-28" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
<div style="color: white;">
|
||||||
<div style="color: white;">
|
Evento Pendente de Aprovação
|
||||||
Evento Pendente de Aprovação
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-content d-flex height-100 width-100">
|
<div class="d-flex width-100">
|
||||||
<div class="content d-flex flex-column width-100" *ngIf="loadedEvent.workflowInstanceDataFields">
|
<div class="content d-flex flex-column width-100" *ngIf="loadedEvent.workflowInstanceDataFields">
|
||||||
<div class="header-content width-100 d-flex justify-space-between">
|
<div class="header-content width-100 d-flex justify-space-between">
|
||||||
<div (click)="goBack()" class="header-icon-left cursor-pointer">
|
<div (click)="goBack()" class="header-icon-left cursor-pointer">
|
||||||
@@ -39,22 +39,20 @@
|
|||||||
<div class="content-location">
|
<div class="content-location">
|
||||||
<p>
|
<p>
|
||||||
<span class="location">{{loadedEvent.workflowInstanceDataFields.Location}}</span>
|
<span class="location">{{loadedEvent.workflowInstanceDataFields.Location}}</span>
|
||||||
|
|
||||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;">
|
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;">
|
||||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||||
</span>
|
</span>
|
||||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;">
|
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;">
|
||||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
||||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;">
|
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;">
|
||||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||||
</span>
|
</span>
|
||||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;">
|
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;">
|
||||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-details">
|
<div class="content-details">
|
||||||
@@ -62,13 +60,12 @@
|
|||||||
<p>{{customDate}}</p>
|
<p>{{customDate}}</p>
|
||||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) == toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) == toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) != toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}} </p>
|
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) != toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}} </p>
|
||||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == '-1'">(Não se repete)</p>
|
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType != '-1'">Repete</p>
|
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
||||||
<div class="overflow-y-auto">
|
<div class="overflow-y-auto">
|
||||||
<div class="middle-content">
|
<div class="middle-content">
|
||||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
<div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||||
@@ -86,7 +83,6 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="loadedEvent.Documents" class="bottom-content width-100">
|
<div *ngIf="loadedEvent.Documents" class="bottom-content width-100">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<h5>Documentos Anexados</h5>
|
<h5>Documentos Anexados</h5>
|
||||||
@@ -103,18 +99,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="loadedEvent" class="aside-right flex-column height-100">
|
<div *ngIf="loadedEvent" class="aside-right flex-column height-100">
|
||||||
<div class="aside-buttons">
|
<div class="aside-buttons">
|
||||||
<button hidden full class="btn-cancel" shape="round" >Editar evento</button>
|
<button hidden full class="btn-cancel" shape="round" >Editar evento</button>
|
||||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-cancel" shape="round" >Aprovar</button>
|
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-cancel" shape="round" >Aprovar</button>
|
||||||
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Rever</button>
|
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Rever</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||||
<button (click)="rejeitar(loadedEvent.serialNumber)" full class="btn-delete" shape="round" >Rejeitar</button>
|
<button (click)="rejeitar(loadedEvent.serialNumber)" full class="btn-delete" shape="round" >Rejeitar</button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>Gabinete Digital</ion-label>
|
<ion-label>Gabinete Digital</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<button *ngIf="hideRefreshBtn" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
|
<button title="Atualizar" *ngIf="hideRefreshBtn" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
|
||||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<div *ngIf="!hideRefreshBtn" class="title-icons">
|
<div *ngIf="!hideRefreshBtn" class="title-icons">
|
||||||
|
|||||||
@@ -25,11 +25,11 @@
|
|||||||
<ion-label class="title ">Acções Presidenciais</ion-label>
|
<ion-label class="title ">Acções Presidenciais</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-icon">
|
<div class="div-icon">
|
||||||
<button class="btn-no-color" (click)="AddPublicationFolder()">
|
<button title="Adicionar nova ação presidencial" class="btn-no-color" (click)="AddPublicationFolder()">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
|
<button title="Atualizar" *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
|
||||||
<ion-icon slot="icon-only" class="title-icon font-awesome" name="reload-circle" title="Actualizar"></ion-icon>
|
<ion-icon slot="icon-only" class="title-icon font-awesome" name="reload-circle" title="Actualizar"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ 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 { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image'; // <-- import it
|
import { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image';
|
||||||
|
|
||||||
export class LazyLoadImageHooks extends IntersectionObserverHooks {
|
export class LazyLoadImageHooks extends IntersectionObserverHooks {
|
||||||
setup(attributes: Attributes) {
|
setup(attributes: Attributes) {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { LoginUserRespose } from '../models/user.model';
|
import { LoginUserRespose } from '../models/user.model';
|
||||||
import { SessionStore } from '../store/session.service';
|
import { SessionStore } from '../store/session.service';
|
||||||
|
import { File } from '@ionic-native/file/ngx';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -14,7 +16,7 @@ export class AttachmentsService {
|
|||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
headers: HttpHeaders;
|
headers: HttpHeaders;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient, private platform: Platform, private file: File) {
|
||||||
this.loggeduser = SessionStore.user
|
this.loggeduser = SessionStore.user
|
||||||
this.headers = new HttpHeaders();
|
this.headers = new HttpHeaders();
|
||||||
|
|
||||||
@@ -61,6 +63,29 @@ export class AttachmentsService {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
downloadFileAndStore(guid:any) {
|
||||||
|
var name = new Date().getTime();
|
||||||
|
const downloadPath = (
|
||||||
|
this.platform.is('android')
|
||||||
|
) ? this.file.externalDataDirectory : this.file.documentsDirectory;
|
||||||
|
|
||||||
|
|
||||||
|
let vm = this;
|
||||||
|
|
||||||
|
/** HttpClient - @angular/common/http */
|
||||||
|
this.http.get(
|
||||||
|
environment.apiURL +'objectserver/streamfiles?path='+guid,
|
||||||
|
{
|
||||||
|
responseType: 'arraybuffer',
|
||||||
|
}
|
||||||
|
).subscribe((fileBlob: Uint8Array) => {
|
||||||
|
/** File - @ionic-native/file/ngx */
|
||||||
|
vm.file.writeFile(downloadPath, "YourFileName.pdf", fileBlob, {replace: true});
|
||||||
|
console.log(downloadPath +"/"+"YourFileName.pdf")
|
||||||
|
console.log(fileBlob)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getAttachmentsBySerial(serialNumber: string): Observable<Attachment[]>{
|
getAttachmentsBySerial(serialNumber: string): Observable<Attachment[]>{
|
||||||
let geturl = environment.apiURL + 'attachments/GetAttachments';
|
let geturl = environment.apiURL + 'attachments/GetAttachments';
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="div-attach">
|
<div class="div-attach">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-buttons slot="end" (click)="showAlert()">
|
<ion-buttons slot="end">
|
||||||
<ion-label color="secondary">Editar</ion-label>
|
<ion-label color="secondary">Editar</ion-label>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-label class="attach-label">Anexos</ion-label>
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="div-attach">
|
<div class="div-attach">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-buttons slot="end" (click)="showAlert()">
|
<ion-buttons slot="end">
|
||||||
<ion-label color="secondary">Editar</ion-label>
|
<ion-label color="secondary">Editar</ion-label>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-label class="attach-label">Anexos</ion-label>
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="div-attach">
|
<div class="div-attach">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-buttons slot="end" (click)="showAlert()">
|
<ion-buttons slot="end">
|
||||||
<ion-label color="secondary">Editar</ion-label>
|
<ion-label color="secondary">Editar</ion-label>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-label class="attach-label">Anexos</ion-label>
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="header-title d-flex align-center justify-between width-100">
|
<div class="header-title d-flex align-center justify-between width-100">
|
||||||
<div class="flex-grow-1">Eventos para Aprovação</div>
|
<div class="flex-grow-1">Eventos para Aprovação</div>
|
||||||
<div (click)="refreshing()">
|
<div (click)="refreshing()">
|
||||||
<button class="btn-no-color" >
|
<button title="Atualizar" class="btn-no-color" >
|
||||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="msg.file.type != 'application/img'">
|
<div *ngIf="msg.file.type != 'application/img'">
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<div (click)="viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
<div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||||
<span *ngIf="msg.file.type">
|
<span *ngIf="msg.file.type">
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||||
@@ -205,14 +205,14 @@
|
|||||||
<ion-footer>
|
<ion-footer>
|
||||||
<!-- <div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true" >A escrever...</div> -->
|
<!-- <div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true" >A escrever...</div> -->
|
||||||
|
|
||||||
<div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true">
|
<!-- <div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true">
|
||||||
<ngx-letters-avatar *ngIf="showAvatar"
|
<ngx-letters-avatar *ngIf="showAvatar"
|
||||||
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
|
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
|
||||||
[width]="30"
|
[width]="30"
|
||||||
[circular]="true"
|
[circular]="true"
|
||||||
fontFamily="Roboto"></ngx-letters-avatar>
|
fontFamily="Roboto"></ngx-letters-avatar>
|
||||||
{{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
|
{{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<div class="container width-100 d-flex">
|
<div class="container width-100 d-flex">
|
||||||
|
|||||||
@@ -699,29 +699,52 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
|
|
||||||
|
|
||||||
async addFileToChat(types: typeof FileType[] ) {
|
async addFileToChat(types: typeof FileType[] ) {
|
||||||
|
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
const file: any = await this.fileService.getFileFromDevice(types);
|
const file: any = await this.fileService.getFileFromDevice(types);
|
||||||
const imageData = await this.fileToBase64Service.convert(file)
|
console.log('Add file', file)
|
||||||
|
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
|
||||||
|
console.log('Add file', filee)
|
||||||
|
}) */
|
||||||
|
const blob = new Blob([file],{type: file.type})
|
||||||
|
console.log('Add file', blob)
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("blobFile", file);
|
formData.append("blobFile", blob);
|
||||||
|
|
||||||
|
let pdfBase64;
|
||||||
|
this.blobToBase64(blob).then(res => {
|
||||||
|
console.log('Base64 pdf', res);
|
||||||
|
this.wsChatMethodsService.getGroupRoom(roomId).send({
|
||||||
|
file: {
|
||||||
|
"type": file.type,
|
||||||
|
"guid": '',
|
||||||
|
},
|
||||||
|
attachments: [{
|
||||||
|
"title": file.name ,
|
||||||
|
"name": file.name ,
|
||||||
|
"image_url": res,
|
||||||
|
// "text": "description",
|
||||||
|
"title_link_download": false,
|
||||||
|
}],
|
||||||
|
temporaryData: formData
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.wsChatMethodsService.getGroupRoom(roomId).send({
|
|
||||||
file: {
|
|
||||||
"type": "application/img",
|
|
||||||
"guid": ''
|
|
||||||
},
|
|
||||||
temporaryData: formData,
|
|
||||||
attachments: [{
|
|
||||||
"title": file.name ,
|
|
||||||
"image_url": imageData,
|
|
||||||
"text": "description",
|
|
||||||
"title_link_download": false,
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blobToBase64 = blob => {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.readAsDataURL(blob);
|
||||||
|
return new Promise(resolve => {
|
||||||
|
reader.onloadend = () => {
|
||||||
|
resolve(reader.result);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
bookMeeting() {
|
bookMeeting() {
|
||||||
let data = {
|
let data = {
|
||||||
roomId: this.roomId,
|
roomId: this.roomId,
|
||||||
@@ -816,12 +839,19 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
//this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
//this.downloadProgess = Math.round((100 * event.loaded) / event.total);
|
||||||
console.log('FILE TYPE 33', msg.file.type)
|
console.log('FILE TYPE 33', msg.file.type)
|
||||||
} else if (event.type === HttpEventType.Response) {
|
} else if (event.type === HttpEventType.Response) {
|
||||||
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
if (msg.file.type == "application/img") {
|
||||||
|
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||||
msg.file = {
|
} else if (msg.file.type === 'application/pdf') {
|
||||||
guid: msg.file.guid,
|
|
||||||
|
this.downloadFile = event.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg.attachments[0] = {
|
||||||
image_url: this.downloadFile,
|
image_url: this.downloadFile,
|
||||||
type: msg.file.type
|
name: msg.attachments[0].name,
|
||||||
|
title: msg.attachments[0].title,
|
||||||
|
title_link_download: msg.attachments[0].title_link_download,
|
||||||
|
ts: msg.attachments[0].ts
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.storage.set(msg.file.guid, this.downloadFile).then(() => {
|
await this.storage.set(msg.file.guid, this.downloadFile).then(() => {
|
||||||
@@ -837,7 +867,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
|
|
||||||
async openPreview(msg) {
|
async openPreview(msg) {
|
||||||
|
|
||||||
if (msg.attachments[0].image_url === null || msg.attachments[0].image_url === '' ) {
|
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '' ) {
|
||||||
this.downloadFileMsg(msg)
|
this.downloadFileMsg(msg)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -846,6 +876,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
image: msg.attachments[0].image_url,
|
image: msg.attachments[0].image_url,
|
||||||
|
type: msg.file.type,
|
||||||
username: msg.u.name,
|
username: msg.u.name,
|
||||||
_updatedAt: msg._updatedAt
|
_updatedAt: msg._updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
import {MatMenuModule} from '@angular/material/menu';
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
import { LettersAvatarModule } from "ngx-letters-avatar";
|
import { LettersAvatarModule } from "ngx-letters-avatar";
|
||||||
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -22,7 +23,8 @@ import { LettersAvatarModule } from "ngx-letters-avatar";
|
|||||||
MessagesPageRoutingModule,
|
MessagesPageRoutingModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
LettersAvatarModule
|
LettersAvatarModule,
|
||||||
|
PdfViewerModule
|
||||||
|
|
||||||
],
|
],
|
||||||
exports: [MessagesPage],
|
exports: [MessagesPage],
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
</ion-refresher-content>
|
</ion-refresher-content>
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
<div class="messages" #scrollMe>
|
<div class="messages" #scrollMe>
|
||||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; let last = last">
|
<div class="messages-list-item-wrapper container-width-100"
|
||||||
|
*ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; let last = last">
|
||||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
|
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
|
||||||
<div class="message-item-options d-flex justify-content-end">
|
<div class="message-item-options d-flex justify-content-end">
|
||||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
||||||
@@ -65,7 +66,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="msg.file">
|
<div *ngIf="msg.file">
|
||||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.file.type != 'application/meeting'">
|
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'
|
||||||
|
*ngIf="msg.file.type != 'application/meeting'">
|
||||||
<div class="message-item-options d-flex justify-content-end">
|
<div class="message-item-options d-flex justify-content-end">
|
||||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
||||||
</fa-icon>
|
</fa-icon>
|
||||||
@@ -82,24 +84,28 @@
|
|||||||
<div *ngFor="let file of msg.attachments">
|
<div *ngFor="let file of msg.attachments">
|
||||||
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)" dfsdvsvs>
|
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)" dfsdvsvs>
|
||||||
<img src={{msg.attachments[0].image_url}} alt="image">
|
<img src={{msg.attachments[0].image_url}} alt="image">
|
||||||
<ion-label class="float-status-image float-status-all">
|
<ion-label class="float-status-all float-status" >
|
||||||
<ion-icon *ngIf="!msg.offline && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
|
||||||
<ion-icon *ngIf="msg.offline && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="msg.viewed.length == 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||||
|
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
||||||
|
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="msg.file.type != 'application/img'">
|
<div *ngIf="msg.file.type != 'application/img'">
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<div (click)="viewDocument(msg, file.title_link)" class="file-details add-ellipsis cursor-pointer"
|
<div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||||
*ngIf="msg.file">
|
|
||||||
<span *ngIf="msg.file.type">
|
<span *ngIf="msg.file.type">
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon">
|
||||||
|
</fa-icon>
|
||||||
<fa-icon
|
<fa-icon
|
||||||
*ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
|
*ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
|
||||||
icon="file-word" class="excel-icon"></fa-icon>
|
icon="file-word" class="excel-icon"></fa-icon>
|
||||||
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon>
|
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg">
|
||||||
<ion-icon *ngIf="msg.file.type == 'application/meeting'" src="assets/icon/webtrix.svg"></ion-icon>
|
</ion-icon>
|
||||||
|
<ion-icon *ngIf="msg.file.type == 'application/meeting'" src="assets/icon/webtrix.svg">
|
||||||
|
</ion-icon>
|
||||||
</span>
|
</span>
|
||||||
<ion-label class="file-title">{{file.title}}</ion-label>
|
<ion-label class="file-title">{{file.title}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
@@ -108,13 +114,14 @@
|
|||||||
<ion-label *ngIf="msg.file">
|
<ion-label *ngIf="msg.file">
|
||||||
<span *ngIf="file.description">{{file.description}}</span>
|
<span *ngIf="file.description">{{file.description}}</span>
|
||||||
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"> • </span>
|
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"> • </span>
|
||||||
<span
|
<span *ngIf="msg.file.type != 'application/webtrix'">{{msg.displayType}}</span>
|
||||||
*ngIf="msg.file.type != 'application/webtrix'">{{msg.displayType}}</span>
|
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-label class="float-status-webtrix float-status-all">
|
<ion-label class="float-status-all float-status" >
|
||||||
<ion-icon *ngIf="!msg.offline && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
|
||||||
<ion-icon *ngIf="msg.offline && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="msg.viewed.length == 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||||
|
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
||||||
|
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,10 +161,10 @@
|
|||||||
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true" >
|
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true" >
|
||||||
<ngx-letters-avatar *ngIf="showAvatar"
|
<ngx-letters-avatar *ngIf="showAvatar"
|
||||||
[avatarName]= "wsChatMethodsService.getDmRoom(roomId).name"
|
[avatarName]= "wsChatMethodsService.getDmRoom(roomId).name"
|
||||||
[width]="30"
|
[width]="30"
|
||||||
[circular]="true"
|
[circular]="true"
|
||||||
fontFamily="Roboto"></ngx-letters-avatar>
|
fontFamily="Roboto"></ngx-letters-avatar>
|
||||||
Está a escrever...
|
está a escrever...
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container width-100 d-flex">
|
<div class="container width-100 d-flex">
|
||||||
@@ -193,8 +200,9 @@
|
|||||||
<div class="width-100">
|
<div class="width-100">
|
||||||
<ion-item class="ion-no-padding type-message" lines="none">
|
<ion-item class="ion-no-padding type-message" lines="none">
|
||||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem"
|
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem"
|
||||||
class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
|
class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message"
|
||||||
<button hidden class="btn-no-color" >
|
(ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
|
||||||
|
<button hidden class="btn-no-color">
|
||||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||