diff --git a/.gitignore b/.gitignore index 142cc2297..9796ab682 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ src/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf node_modules_ node_modules__ plugins_ +ios diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 000000000..75e8c5aec --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,9 @@ +App/build +App/Pods +App/Podfile.lock +App/App/public +DerivedData +xcuserdata + +# Cordova plugins for Capacitor +capacitor-cordova-ios-plugins diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj new file mode 100644 index 000000000..8d49770cd --- /dev/null +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -0,0 +1,402 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; }; + 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; }; + 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; }; + 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; }; + 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; }; + 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; }; + 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; }; + A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; }; + 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = ""; }; + 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = ""; }; + AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; + FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 504EC3011FED79650016851F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = { + isa = PBXGroup; + children = ( + AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 504EC2FB1FED79650016851F = { + isa = PBXGroup; + children = ( + 504EC3061FED79650016851F /* App */, + 504EC3051FED79650016851F /* Products */, + 7F8756D8B27F46E3366F6CEA /* Pods */, + 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */, + ); + sourceTree = ""; + }; + 504EC3051FED79650016851F /* Products */ = { + isa = PBXGroup; + children = ( + 504EC3041FED79650016851F /* App.app */, + ); + name = Products; + sourceTree = ""; + }; + 504EC3061FED79650016851F /* App */ = { + isa = PBXGroup; + children = ( + 50379B222058CBB4000EE86E /* capacitor.config.json */, + 504EC3071FED79650016851F /* AppDelegate.swift */, + 504EC30B1FED79650016851F /* Main.storyboard */, + 504EC30E1FED79650016851F /* Assets.xcassets */, + 504EC3101FED79650016851F /* LaunchScreen.storyboard */, + 504EC3131FED79650016851F /* Info.plist */, + 2FAD9762203C412B000D30F8 /* config.xml */, + 50B271D01FEDC1A000F3C39B /* public */, + ); + path = App; + sourceTree = ""; + }; + 7F8756D8B27F46E3366F6CEA /* Pods */ = { + isa = PBXGroup; + children = ( + FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */, + AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 504EC3031FED79650016851F /* App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */; + buildPhases = ( + 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */, + 504EC3001FED79650016851F /* Sources */, + 504EC3011FED79650016851F /* Frameworks */, + 504EC3021FED79650016851F /* Resources */, + 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = App; + productName = App; + productReference = 504EC3041FED79650016851F /* App.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 504EC2FC1FED79650016851F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + TargetAttributes = { + 504EC3031FED79650016851F = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 504EC2FB1FED79650016851F; + productRefGroup = 504EC3051FED79650016851F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 504EC3031FED79650016851F /* App */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 504EC3021FED79650016851F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */, + 50B271D11FEDC1A000F3C39B /* public in Resources */, + 504EC30F1FED79650016851F /* Assets.xcassets in Resources */, + 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */, + 504EC30D1FED79650016851F /* Main.storyboard in Resources */, + 2FAD9763203C412B000D30F8 /* config.xml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 504EC3001FED79650016851F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 504EC30B1FED79650016851F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 504EC30C1FED79650016851F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 504EC3111FED79650016851F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 504EC3141FED79650016851F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 504EC3151FED79650016851F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 504EC3171FED79650016851F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = App/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; + PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 504EC3181FED79650016851F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = App/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 504EC3141FED79650016851F /* Debug */, + 504EC3151FED79650016851F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 504EC3171FED79650016851F /* Debug */, + 504EC3181FED79650016851F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 504EC2FC1FED79650016851F /* Project object */; +} diff --git a/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..42daef8a1 --- /dev/null +++ b/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/App/App.xcworkspace/contents.xcworkspacedata b/ios/App/App.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..b301e824b --- /dev/null +++ b/ios/App/App.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift new file mode 100644 index 000000000..53e376039 --- /dev/null +++ b/ios/App/App/AppDelegate.swift @@ -0,0 +1,60 @@ +import UIKit +import Capacitor + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + // Called when the app was launched with a url. Feel free to add additional processing here, + // but if you want the App API to support tracking app url opens, make sure to keep this call + return ApplicationDelegateProxy.shared.application(app, open: url, options: options) + } + + func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { + // Called when the app was launched with an activity, including Universal Links. + // Feel free to add additional processing here, but if you want the App API to support + // tracking app url opens, make sure to keep this call + return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + + let statusBarRect = UIApplication.shared.statusBarFrame + guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return } + + if statusBarRect.contains(touchPoint) { + NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil) + } + } + +} diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png new file mode 100644 index 000000000..2f503741c Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png new file mode 100644 index 000000000..dd72c1ce8 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png new file mode 100644 index 000000000..dd72c1ce8 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png new file mode 100644 index 000000000..7fbf0a84a Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png new file mode 100644 index 000000000..f996ea18f Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png new file mode 100644 index 000000000..bb2935fb7 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png new file mode 100644 index 000000000..bb2935fb7 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png new file mode 100644 index 000000000..21d16e5b1 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png new file mode 100644 index 000000000..dd72c1ce8 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png new file mode 100644 index 000000000..ff0754519 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png new file mode 100644 index 000000000..ff0754519 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png new file mode 100644 index 000000000..3401fa887 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png new file mode 100644 index 000000000..adf6ba01d Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png new file mode 100644 index 000000000..ffd0da781 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png new file mode 100644 index 000000000..90aea7cd2 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png new file mode 100644 index 000000000..2f5eafb6b Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png new file mode 100644 index 000000000..89c8d0448 Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png new file mode 100644 index 000000000..ef541c90a Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png differ diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..90eea7ec7 --- /dev/null +++ b/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "AppIcon-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "AppIcon-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "AppIcon-29x29@2x-1.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "AppIcon-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "AppIcon-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "AppIcon-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "AppIcon-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "AppIcon-20x20@2x-1.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon-40x40@2x-1.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "AppIcon-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "AppIcon-512@2x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/App/App/Assets.xcassets/Contents.json b/ios/App/App/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/ios/App/App/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json b/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json new file mode 100644 index 000000000..d7d96a67c --- /dev/null +++ b/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "splash-2732x2732-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "splash-2732x2732-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "splash-2732x2732.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png differ diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png differ diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png differ diff --git a/ios/App/App/Base.lproj/LaunchScreen.storyboard b/ios/App/App/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..e7ae5d780 --- /dev/null +++ b/ios/App/App/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/App/App/Base.lproj/Main.storyboard b/ios/App/App/Base.lproj/Main.storyboard new file mode 100644 index 000000000..b44df7be8 --- /dev/null +++ b/ios/App/App/Base.lproj/Main.storyboard @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist new file mode 100644 index 000000000..a63138a44 --- /dev/null +++ b/ios/App/App/Info.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + gabinete-digital + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSMicrophoneUsageDescription + We want to record some audio from you + + diff --git a/ios/App/App/capacitor.config.json b/ios/App/App/capacitor.config.json new file mode 100644 index 000000000..8deba142d --- /dev/null +++ b/ios/App/App/capacitor.config.json @@ -0,0 +1,22 @@ +{ + "appId": "com.gpr.gabinetedigital", + "appName": "gabinete-digital", + "webDir": "www", + "npmClient": "npm", + "linuxAndroidStudioPath": "/snap/android-studio/current/android-studio/bin/studio.sh", + "cordova": { + "preferences": { + "ScrollEnabled": "false", + "BackupWebStorage": "none", + "SplashMaintainAspectRatio": "true", + "FadeSplashScreenDuration": "300", + "SplashShowOnlyFirstTime": "false", + "SplashScreen": "screen", + "SplashScreenDelay": "3000" + } + }, + "android": { + "allowMixedContent": true + }, + "bundledWebRuntime": false +} diff --git a/ios/App/App/config.xml b/ios/App/App/config.xml new file mode 100644 index 000000000..43b503a74 --- /dev/null +++ b/ios/App/App/config.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ios/App/Podfile b/ios/App/Podfile new file mode 100644 index 000000000..ee4cde511 --- /dev/null +++ b/ios/App/Podfile @@ -0,0 +1,27 @@ +platform :ios, '12.0' +use_frameworks! + +# workaround to avoid Xcode caching of Pods that requires +# Product -> Clean Build Folder after new Cordova plugins installed +# Requires CocoaPods 1.6 or newer +install! 'cocoapods', :disable_input_output_paths => true + +def capacitor_pods + pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' + pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' + pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app' + pod 'CapacitorCamera', :path => '..\..\node_modules\@capacitor\camera' + pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics' + pod 'CapacitorKeyboard', :path => '..\..\node_modules\@capacitor\keyboard' + pod 'CapacitorNetwork', :path => '..\..\node_modules\@capacitor\network' + pod 'CapacitorFilesystem', :path => '..\..\node_modules\@capacitor\filesystem' + pod 'CapacitorPushNotifications', :path => '..\..\node_modules\@capacitor\push-notifications' + pod 'CapacitorVoiceRecorder', :path => '..\..\node_modules\capacitor-voice-recorder' + pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' + pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins' +end + +target 'App' do + capacitor_pods + # Add your Pods here +end diff --git a/package-lock.json b/package-lock.json index ec86b1c11..ac401ff1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2031,15 +2031,20 @@ "dev": true }, "@capacitor/android": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.0.tgz", - "integrity": "sha512-dzbzdN7KjjwpUbg7mZKVkgAVytEwGyXUL4Z1t9c12UhViJaNjU7/nSlTXjb+IiauwVg9oI2LHtSVrp1NIjUycw==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.1.tgz", + "integrity": "sha512-TB9UJh6/e6CV6KDpu/lNHKhgVvnDL2d3crNYtfKzp64CzeZhttQGIQShXSdMb3DG4kk7Zi/qBlfSaWBBD95NhQ==" }, "@capacitor/app": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-1.0.5.tgz", "integrity": "sha512-U0dAw1CAjKyguSRxKDabszsQ4dj679RnxaUZrSHDR5Jnt5x308oQuKXFP++wnMBbw72D02iqjG0a+/Ujye7C9g==" }, + "@capacitor/camera": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@capacitor/camera/-/camera-1.2.0.tgz", + "integrity": "sha512-NAIGWnyHBGQ/dgla/D4KDkAeQ2f3fzw+D+DIkGNH3f1ciX4bXC7lNbDVU67SMOuNt+CmcTJF64q3nVXcpv5JvQ==" + }, "@capacitor/cli": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-3.3.0.tgz", @@ -2152,26 +2157,36 @@ "tslib": "^2.1.0" } }, + "@capacitor/filesystem": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-1.0.6.tgz", + "integrity": "sha512-8xqUbDZFGBMhgqoBSn9wEd9OBPdHIRegQ9zCCZcpHNf3FFAIby1ck+aDFnoq+Da49xhD6ks1SKCBSxz/26qWTw==" + }, "@capacitor/haptics": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-1.1.2.tgz", - "integrity": "sha512-h7uAK/iTSDYfvMY2aaZJ5tlGyIOOdH17mzHHED4jgP3TSXbsmeYU839u56hNGi9vb4Q00Jsb0YzsDMzSjv4Nag==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-1.1.3.tgz", + "integrity": "sha512-ui2mY/riK1Y4bxnJKJfclWO61obZ0RHmtErPhpmt4wIEVjG1segYdFop45R2PxyEwoUJgzEsAxnviM/T6k8seQ==" + }, + "@capacitor/ios": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-3.3.0.tgz", + "integrity": "sha512-KImT4hVoQJuAfe01wUYiMLnutMu7PxVCv4c8HVWiW+OuyyOua3lC8wQ5gAauGDugAo6mdM7fVva5a0Vtyhnbdg==" }, "@capacitor/keyboard": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-1.1.2.tgz", - "integrity": "sha512-EUduhQzrHma4PlGfdSxVeGIwxR2+/xLRDbjQH5Q4cXqrlYssIX2UyQrL4wNpDaAOg1Z4VD8EzzVolC81LG6Q+A==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-1.1.3.tgz", + "integrity": "sha512-WpD1f/3HH6IpADiRaFTDGdhrqYhZDikybXXhUdGAEEwHbErHt9zS5RQgbeROjGmkXcurVvQsalQ59YuKU0VzwA==" + }, + "@capacitor/network": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@capacitor/network/-/network-1.0.6.tgz", + "integrity": "sha512-xkkmRLlFcg1dM0WfblxKwcKFjcfBQ04yWYX0ubD/n5QfQjLCCb8GbAHlorqIyt2j4PUvSAb0ERLyL89hpKlh2w==" }, "@capacitor/push-notifications": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/@capacitor/push-notifications/-/push-notifications-1.0.7.tgz", "integrity": "sha512-vbvAptFq5cI6xKYYWMb7tsWvA88/PTG4v6ptxN0Ygtc1fQ4l/AzONQiYqdtFpbBhF2fML2kXQ/5eSAfn8HY9aw==" }, - "@capacitor/status-bar": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-1.0.5.tgz", - "integrity": "sha512-SZuxjaN5Nr8FKUVlkVH3l0X2JWey0yVMfMhyE3RG7ryUSAesgs3bvkAEXSfjphsHOpt4A/rEeCJb2ZbeCBwroA==" - }, "@cnakazawa/watch": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", @@ -6676,6 +6691,14 @@ "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", "dev": true }, + "capacitor-voice-recorder": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capacitor-voice-recorder/-/capacitor-voice-recorder-2.0.0.tgz", + "integrity": "sha512-YU0tN8+A963sCYjL9du6jbUqOh5w5dJf++8IFBkuV0sDQZuuLaK//1RypJi0MQLifQESZSjhTVWoXTViIthA/w==", + "requires": { + "get-blob-duration": "^1.2.0" + } + }, "capture-exit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", @@ -7883,18 +7906,6 @@ "integrity": "sha512-ThmXzl6QIKWFXf4wWw7Q/zpB+VKkz3VM958+5A0sXD4jmR++u7KnGttLksXshVwWr6lvGwUebLYtIyXwS4Ovcg==", "dev": true }, - "cordova-plugin-streaming-media": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-streaming-media/-/cordova-plugin-streaming-media-2.3.0.tgz", - "integrity": "sha512-og7UmXbaWoSrOmo/mZu/c7vKDdUMu2eVrdRMvIJY6qqZ6Fv2BrJvOXm8prVt0xjWqWOMJpQs3DAajX8+N39Cqw==", - "dev": true - }, - "cordova-plugin-telerik-imagepicker": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/cordova-plugin-telerik-imagepicker/-/cordova-plugin-telerik-imagepicker-2.3.6.tgz", - "integrity": "sha512-guf+BHB7O3g1ll3++d+aOvTGHXwBmqdxBFJTCKKMIGqazlf+Sq3Bsd1tRRswPRxy1MZRlJIe6Arz4pdCCmOigA==", - "dev": true - }, "cordova-plugin-whitelist": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.5.tgz", @@ -10384,6 +10395,24 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, + "get-blob-duration": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-blob-duration/-/get-blob-duration-1.2.0.tgz", + "integrity": "sha512-2xNJa+oKznR21eC2ThMzw4a1931a3ogA8aHoY92xruZufc/02G7pl/P793GJZytkyI8xMJ2DepEQ7MWvg/tn/Q==", + "requires": { + "@babel/runtime": "7.11.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", + "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -19331,8 +19360,7 @@ "regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, "regenerator-transform": { "version": "0.14.5", diff --git a/package.json b/package.json index 8bc0fca72..f11eabe0a 100644 --- a/package.json +++ b/package.json @@ -31,13 +31,16 @@ "@angular/platform-browser": "~12.1.2", "@angular/platform-browser-dynamic": "~12.1.2", "@angular/router": "~12.1.2", - "@capacitor/android": "^3.3.0", + "@capacitor/android": "^3.3.1", "@capacitor/app": "^1.0.5", + "@capacitor/camera": "^1.2.0", "@capacitor/core": "^3.3.0", "@capacitor/haptics": "^1.1.2", "@capacitor/keyboard": "^1.1.2", + "@capacitor/network": "^1.0.6", + "@capacitor/filesystem": "^1.0.6", + "@capacitor/ios": "3.3.0", "@capacitor/push-notifications": "^1.0.7", - "@capacitor/status-bar": "^1.0.5", "@fortawesome/angular-fontawesome": "^0.9.0", "@fortawesome/fontawesome-free": "^5.15.3", "@fortawesome/fontawesome-svg-core": "^1.2.35", @@ -84,6 +87,7 @@ "angular-tag-cloud-module": "^5.2.2", "bootstrap": "^4.5.0", "build": "0.1.4", + "capacitor-voice-recorder": "^2.0.0", "ci": "^2.1.1", "cordova": "^10.0.0", "cordova-plugin-dbcopy": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git", @@ -162,8 +166,6 @@ "cordova-plugin-network-information": "^3.0.0", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", - "cordova-plugin-streaming-media": "^2.3.0", - "cordova-plugin-telerik-imagepicker": "^2.3.6", "cordova-plugin-whitelist": "^1.3.4", "es6-promise-plugin": "^4.2.2", "jasmine-core": "~3.6.0", diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png index 04e311da6..14ced160f 100644 Binary files a/resources/android/icon/drawable-hdpi-icon.png and b/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png index aa2ff071a..3b3fc667d 100644 Binary files a/resources/android/icon/drawable-ldpi-icon.png and b/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png index 2cf429a73..2762a5041 100644 Binary files a/resources/android/icon/drawable-mdpi-icon.png and b/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/resources/android/icon/drawable-playstore-512-icon.png b/resources/android/icon/drawable-playstore-512-icon.png index a6aac8994..dc50fce84 100644 Binary files a/resources/android/icon/drawable-playstore-512-icon.png and b/resources/android/icon/drawable-playstore-512-icon.png differ diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png index bacfb6af4..4be2d7b06 100644 Binary files a/resources/android/icon/drawable-xhdpi-icon.png and b/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png index de1e489c7..12c9f53c6 100644 Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and b/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png index 3491a1569..f7fef445b 100644 Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and b/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/resources/android/icon/mipmap-hdpi/ic_launcher.png b/resources/android/icon/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..e5e0b8e04 Binary files /dev/null and b/resources/android/icon/mipmap-hdpi/ic_launcher.png differ diff --git a/resources/android/icon/mipmap-ldpi/ic_launcher.png b/resources/android/icon/mipmap-ldpi/ic_launcher.png index dd87e2d73..45efa5ab5 100644 Binary files a/resources/android/icon/mipmap-ldpi/ic_launcher.png and b/resources/android/icon/mipmap-ldpi/ic_launcher.png differ diff --git a/resources/android/icon/mipmap-mdpi/ic_launcher.png b/resources/android/icon/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..19f73eee8 Binary files /dev/null and b/resources/android/icon/mipmap-mdpi/ic_launcher.png differ diff --git a/resources/android/icon/mipmap-xhdpi/ic_launcher.png b/resources/android/icon/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..de5f6e383 Binary files /dev/null and b/resources/android/icon/mipmap-xhdpi/ic_launcher.png differ diff --git a/resources/android/icon/mipmap-xxhdpi/ic_launcher.png b/resources/android/icon/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..b74f60b81 Binary files /dev/null and b/resources/android/icon/mipmap-xxhdpi/ic_launcher.png differ diff --git a/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png b/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..044dff1f7 Binary files /dev/null and b/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/resources/android/splash/drawable-land-hdpi-screen.png b/resources/android/splash/drawable-land-hdpi-screen.png index 4c5cfeb31..862b1494c 100644 Binary files a/resources/android/splash/drawable-land-hdpi-screen.png and b/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-ldpi-screen.png b/resources/android/splash/drawable-land-ldpi-screen.png index 4a0858c56..9bbd8ea10 100644 Binary files a/resources/android/splash/drawable-land-ldpi-screen.png and b/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-land-mdpi-screen.png b/resources/android/splash/drawable-land-mdpi-screen.png index 41aa328f3..c9e3e9ac2 100644 Binary files a/resources/android/splash/drawable-land-mdpi-screen.png and b/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xhdpi-screen.png b/resources/android/splash/drawable-land-xhdpi-screen.png index 872a0d064..0849e8817 100644 Binary files a/resources/android/splash/drawable-land-xhdpi-screen.png and b/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxhdpi-screen.png b/resources/android/splash/drawable-land-xxhdpi-screen.png index 2838f1baf..7d6fc0737 100644 Binary files a/resources/android/splash/drawable-land-xxhdpi-screen.png and b/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxxhdpi-screen.png b/resources/android/splash/drawable-land-xxxhdpi-screen.png index 5b8481c1d..aff1cd850 100644 Binary files a/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-hdpi-screen.png b/resources/android/splash/drawable-port-hdpi-screen.png index 5c153233a..7180ee893 100644 Binary files a/resources/android/splash/drawable-port-hdpi-screen.png and b/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-ldpi-screen.png b/resources/android/splash/drawable-port-ldpi-screen.png index e21dcb7d5..6ddb87e9a 100644 Binary files a/resources/android/splash/drawable-port-ldpi-screen.png and b/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-port-mdpi-screen.png b/resources/android/splash/drawable-port-mdpi-screen.png index e31515340..a464461b0 100644 Binary files a/resources/android/splash/drawable-port-mdpi-screen.png and b/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xhdpi-screen.png b/resources/android/splash/drawable-port-xhdpi-screen.png index c55faaef7..e04e5598e 100644 Binary files a/resources/android/splash/drawable-port-xhdpi-screen.png and b/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxhdpi-screen.png b/resources/android/splash/drawable-port-xxhdpi-screen.png index 22b0a9094..ce228b013 100644 Binary files a/resources/android/splash/drawable-port-xxhdpi-screen.png and b/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxxhdpi-screen.png b/resources/android/splash/drawable-port-xxxhdpi-screen.png index 4d3b27c1c..00f70995a 100644 Binary files a/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/resources/blackberry10/icon/icon-110.png b/resources/blackberry10/icon/icon-110.png index 44a3739a3..d15821f6d 100644 Binary files a/resources/blackberry10/icon/icon-110.png and b/resources/blackberry10/icon/icon-110.png differ diff --git a/resources/blackberry10/icon/icon-144.png b/resources/blackberry10/icon/icon-144.png index d11d659a1..b74f60b81 100644 Binary files a/resources/blackberry10/icon/icon-144.png and b/resources/blackberry10/icon/icon-144.png differ diff --git a/resources/blackberry10/icon/icon-90.png b/resources/blackberry10/icon/icon-90.png index 35f87072b..aef56ebdc 100644 Binary files a/resources/blackberry10/icon/icon-90.png and b/resources/blackberry10/icon/icon-90.png differ diff --git a/resources/blackberry10/icon/icon-96.png b/resources/blackberry10/icon/icon-96.png index c68bc0adc..de5f6e383 100644 Binary files a/resources/blackberry10/icon/icon-96.png and b/resources/blackberry10/icon/icon-96.png differ diff --git a/resources/icon.png b/resources/icon.png index 386df1e6c..550d059c1 100644 Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/resources/ios/icon/AppIcon-20x20@1x.png b/resources/ios/icon/AppIcon-20x20@1x.png index ce7aac50d..a2063b2e9 100644 Binary files a/resources/ios/icon/AppIcon-20x20@1x.png and b/resources/ios/icon/AppIcon-20x20@1x.png differ diff --git a/resources/ios/icon/AppIcon-20x20@2x-1.png b/resources/ios/icon/AppIcon-20x20@2x-1.png index 6169994b6..9a2bb303a 100644 Binary files a/resources/ios/icon/AppIcon-20x20@2x-1.png and b/resources/ios/icon/AppIcon-20x20@2x-1.png differ diff --git a/resources/ios/icon/AppIcon-20x20@2x.png b/resources/ios/icon/AppIcon-20x20@2x.png index 6169994b6..9a2bb303a 100644 Binary files a/resources/ios/icon/AppIcon-20x20@2x.png and b/resources/ios/icon/AppIcon-20x20@2x.png differ diff --git a/resources/ios/icon/AppIcon-20x20@3x.png b/resources/ios/icon/AppIcon-20x20@3x.png index 20111cd9b..49ac4dde5 100644 Binary files a/resources/ios/icon/AppIcon-20x20@3x.png and b/resources/ios/icon/AppIcon-20x20@3x.png differ diff --git a/resources/ios/icon/AppIcon-29x29@1x.png b/resources/ios/icon/AppIcon-29x29@1x.png index 6046dfe07..f31b2c258 100644 Binary files a/resources/ios/icon/AppIcon-29x29@1x.png and b/resources/ios/icon/AppIcon-29x29@1x.png differ diff --git a/resources/ios/icon/AppIcon-29x29@2x-1.png b/resources/ios/icon/AppIcon-29x29@2x-1.png index 5bd5bf512..b77c5cd40 100644 Binary files a/resources/ios/icon/AppIcon-29x29@2x-1.png and b/resources/ios/icon/AppIcon-29x29@2x-1.png differ diff --git a/resources/ios/icon/AppIcon-29x29@2x.png b/resources/ios/icon/AppIcon-29x29@2x.png index 5bd5bf512..b77c5cd40 100644 Binary files a/resources/ios/icon/AppIcon-29x29@2x.png and b/resources/ios/icon/AppIcon-29x29@2x.png differ diff --git a/resources/ios/icon/AppIcon-29x29@3x.png b/resources/ios/icon/AppIcon-29x29@3x.png index b5079ae4e..b8dd76f73 100644 Binary files a/resources/ios/icon/AppIcon-29x29@3x.png and b/resources/ios/icon/AppIcon-29x29@3x.png differ diff --git a/resources/ios/icon/AppIcon-40x40@1x.png b/resources/ios/icon/AppIcon-40x40@1x.png index 6169994b6..9a2bb303a 100644 Binary files a/resources/ios/icon/AppIcon-40x40@1x.png and b/resources/ios/icon/AppIcon-40x40@1x.png differ diff --git a/resources/ios/icon/AppIcon-40x40@2x-1.png b/resources/ios/icon/AppIcon-40x40@2x-1.png index 192d6e5b0..f816ab30f 100644 Binary files a/resources/ios/icon/AppIcon-40x40@2x-1.png and b/resources/ios/icon/AppIcon-40x40@2x-1.png differ diff --git a/resources/ios/icon/AppIcon-40x40@2x.png b/resources/ios/icon/AppIcon-40x40@2x.png index 192d6e5b0..f816ab30f 100644 Binary files a/resources/ios/icon/AppIcon-40x40@2x.png and b/resources/ios/icon/AppIcon-40x40@2x.png differ diff --git a/resources/ios/icon/AppIcon-40x40@3x.png b/resources/ios/icon/AppIcon-40x40@3x.png index cd1c092f2..5ed265fc0 100644 Binary files a/resources/ios/icon/AppIcon-40x40@3x.png and b/resources/ios/icon/AppIcon-40x40@3x.png differ diff --git a/resources/ios/icon/AppIcon-512@2x.png b/resources/ios/icon/AppIcon-512@2x.png index 37aa479ee..3098f0290 100644 Binary files a/resources/ios/icon/AppIcon-512@2x.png and b/resources/ios/icon/AppIcon-512@2x.png differ diff --git a/resources/ios/icon/AppIcon-60x60@2x.png b/resources/ios/icon/AppIcon-60x60@2x.png index cd1c092f2..5ed265fc0 100644 Binary files a/resources/ios/icon/AppIcon-60x60@2x.png and b/resources/ios/icon/AppIcon-60x60@2x.png differ diff --git a/resources/ios/icon/AppIcon-60x60@3x.png b/resources/ios/icon/AppIcon-60x60@3x.png index 8be6ae6b0..c9b2b3334 100644 Binary files a/resources/ios/icon/AppIcon-60x60@3x.png and b/resources/ios/icon/AppIcon-60x60@3x.png differ diff --git a/resources/ios/icon/AppIcon-76x76@1x.png b/resources/ios/icon/AppIcon-76x76@1x.png index ef70c6601..83b6e7132 100644 Binary files a/resources/ios/icon/AppIcon-76x76@1x.png and b/resources/ios/icon/AppIcon-76x76@1x.png differ diff --git a/resources/ios/icon/AppIcon-76x76@2x.png b/resources/ios/icon/AppIcon-76x76@2x.png index 813528101..15999784e 100644 Binary files a/resources/ios/icon/AppIcon-76x76@2x.png and b/resources/ios/icon/AppIcon-76x76@2x.png differ diff --git a/resources/ios/icon/AppIcon-83.5x83.5@2x.png b/resources/ios/icon/AppIcon-83.5x83.5@2x.png index cb8a9b492..71a59f4fc 100644 Binary files a/resources/ios/icon/AppIcon-83.5x83.5@2x.png and b/resources/ios/icon/AppIcon-83.5x83.5@2x.png differ diff --git a/resources/ios/splash/Default-568h@2x~iphone.png b/resources/ios/splash/Default-568h@2x~iphone.png index 320164ea9..d345ad9bf 100644 Binary files a/resources/ios/splash/Default-568h@2x~iphone.png and b/resources/ios/splash/Default-568h@2x~iphone.png differ diff --git a/resources/ios/splash/Default-667h.png b/resources/ios/splash/Default-667h.png index a366a7a4e..1005dc131 100644 Binary files a/resources/ios/splash/Default-667h.png and b/resources/ios/splash/Default-667h.png differ diff --git a/resources/ios/splash/Default-736h.png b/resources/ios/splash/Default-736h.png index b0c43db31..e4e0d68a5 100644 Binary files a/resources/ios/splash/Default-736h.png and b/resources/ios/splash/Default-736h.png differ diff --git a/resources/ios/splash/Default-Landscape-736h.png b/resources/ios/splash/Default-Landscape-736h.png index 95fa6931c..e5c45d7f6 100644 Binary files a/resources/ios/splash/Default-Landscape-736h.png and b/resources/ios/splash/Default-Landscape-736h.png differ diff --git a/resources/ios/splash/Default-Landscape@2x~ipad.png b/resources/ios/splash/Default-Landscape@2x~ipad.png index 6bcebee94..291dc652f 100644 Binary files a/resources/ios/splash/Default-Landscape@2x~ipad.png and b/resources/ios/splash/Default-Landscape@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Landscape@~ipadpro.png b/resources/ios/splash/Default-Landscape@~ipadpro.png index 28edd89da..7097bf323 100644 Binary files a/resources/ios/splash/Default-Landscape@~ipadpro.png and b/resources/ios/splash/Default-Landscape@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Landscape~ipad.png b/resources/ios/splash/Default-Landscape~ipad.png index d479faee8..0ef2671a9 100644 Binary files a/resources/ios/splash/Default-Landscape~ipad.png and b/resources/ios/splash/Default-Landscape~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@2x~ipad.png b/resources/ios/splash/Default-Portrait@2x~ipad.png index 0d99e371e..a2ad24783 100644 Binary files a/resources/ios/splash/Default-Portrait@2x~ipad.png and b/resources/ios/splash/Default-Portrait@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@~ipadpro.png b/resources/ios/splash/Default-Portrait@~ipadpro.png index d131a50cf..06082f2e5 100644 Binary files a/resources/ios/splash/Default-Portrait@~ipadpro.png and b/resources/ios/splash/Default-Portrait@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Portrait~ipad.png b/resources/ios/splash/Default-Portrait~ipad.png index d761be588..a62f0c751 100644 Binary files a/resources/ios/splash/Default-Portrait~ipad.png and b/resources/ios/splash/Default-Portrait~ipad.png differ diff --git a/resources/ios/splash/Default@2x~iphone.png b/resources/ios/splash/Default@2x~iphone.png index 9641adcd8..fc1cbf65e 100644 Binary files a/resources/ios/splash/Default@2x~iphone.png and b/resources/ios/splash/Default@2x~iphone.png differ diff --git a/resources/ios/splash/Default~iphone.png b/resources/ios/splash/Default~iphone.png index f65e1fb76..341a70cc3 100644 Binary files a/resources/ios/splash/Default~iphone.png and b/resources/ios/splash/Default~iphone.png differ diff --git a/resources/splash.png b/resources/splash.png index ef651e015..a1e7cd675 100644 Binary files a/resources/splash.png and b/resources/splash.png differ diff --git a/resources/windows/icon/Square150x150Logo.scale-100.png b/resources/windows/icon/Square150x150Logo.scale-100.png index b37892ad8..d65610cad 100644 Binary files a/resources/windows/icon/Square150x150Logo.scale-100.png and b/resources/windows/icon/Square150x150Logo.scale-100.png differ diff --git a/resources/windows/icon/Square150x150Logo.scale-125.png b/resources/windows/icon/Square150x150Logo.scale-125.png index a2ae97d73..2e647281e 100644 Binary files a/resources/windows/icon/Square150x150Logo.scale-125.png and b/resources/windows/icon/Square150x150Logo.scale-125.png differ diff --git a/resources/windows/icon/Square150x150Logo.scale-150.png b/resources/windows/icon/Square150x150Logo.scale-150.png index 848524211..0ec04871c 100644 Binary files a/resources/windows/icon/Square150x150Logo.scale-150.png and b/resources/windows/icon/Square150x150Logo.scale-150.png differ diff --git a/resources/windows/icon/Square150x150Logo.scale-200.png b/resources/windows/icon/Square150x150Logo.scale-200.png index af4f7511a..1ef91fc9b 100644 Binary files a/resources/windows/icon/Square150x150Logo.scale-200.png and b/resources/windows/icon/Square150x150Logo.scale-200.png differ diff --git a/resources/windows/icon/Square150x150Logo.scale-400.png b/resources/windows/icon/Square150x150Logo.scale-400.png index 61162ccaf..adabb88ab 100644 Binary files a/resources/windows/icon/Square150x150Logo.scale-400.png and b/resources/windows/icon/Square150x150Logo.scale-400.png differ diff --git a/resources/windows/icon/Square44x44Logo.scale-100.png b/resources/windows/icon/Square44x44Logo.scale-100.png index d13105c45..7ac59d0a2 100644 Binary files a/resources/windows/icon/Square44x44Logo.scale-100.png and b/resources/windows/icon/Square44x44Logo.scale-100.png differ diff --git a/resources/windows/icon/Square44x44Logo.scale-125.png b/resources/windows/icon/Square44x44Logo.scale-125.png index fb2b99b6d..d29182bc1 100644 Binary files a/resources/windows/icon/Square44x44Logo.scale-125.png and b/resources/windows/icon/Square44x44Logo.scale-125.png differ diff --git a/resources/windows/icon/Square44x44Logo.scale-150.png b/resources/windows/icon/Square44x44Logo.scale-150.png index 45eac3c5f..9f2a9adf2 100644 Binary files a/resources/windows/icon/Square44x44Logo.scale-150.png and b/resources/windows/icon/Square44x44Logo.scale-150.png differ diff --git a/resources/windows/icon/Square44x44Logo.scale-200.png b/resources/windows/icon/Square44x44Logo.scale-200.png index 27de7c0e3..58477123c 100644 Binary files a/resources/windows/icon/Square44x44Logo.scale-200.png and b/resources/windows/icon/Square44x44Logo.scale-200.png differ diff --git a/resources/windows/icon/Square44x44Logo.scale-400.png b/resources/windows/icon/Square44x44Logo.scale-400.png index 8e710f4b6..f094b8b3f 100644 Binary files a/resources/windows/icon/Square44x44Logo.scale-400.png and b/resources/windows/icon/Square44x44Logo.scale-400.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-16.png b/resources/windows/icon/Square44x44Logo.targetsize-16.png index ca471932e..3d7f0d575 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-16.png and b/resources/windows/icon/Square44x44Logo.targetsize-16.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-20.png b/resources/windows/icon/Square44x44Logo.targetsize-20.png index ce7aac50d..a2063b2e9 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-20.png and b/resources/windows/icon/Square44x44Logo.targetsize-20.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-24.png b/resources/windows/icon/Square44x44Logo.targetsize-24.png index 20056b5f6..e56c65912 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-24.png and b/resources/windows/icon/Square44x44Logo.targetsize-24.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-256.png b/resources/windows/icon/Square44x44Logo.targetsize-256.png index 65acd4ecb..839323623 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-256.png and b/resources/windows/icon/Square44x44Logo.targetsize-256.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-30.png b/resources/windows/icon/Square44x44Logo.targetsize-30.png index 81ffbecf9..2295733ef 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-30.png and b/resources/windows/icon/Square44x44Logo.targetsize-30.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-32.png b/resources/windows/icon/Square44x44Logo.targetsize-32.png index 1f75824ea..e4b8e19a8 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-32.png and b/resources/windows/icon/Square44x44Logo.targetsize-32.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-36.png b/resources/windows/icon/Square44x44Logo.targetsize-36.png index dd87e2d73..45efa5ab5 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-36.png and b/resources/windows/icon/Square44x44Logo.targetsize-36.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-40.png b/resources/windows/icon/Square44x44Logo.targetsize-40.png index 6169994b6..9a2bb303a 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-40.png and b/resources/windows/icon/Square44x44Logo.targetsize-40.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-48.png b/resources/windows/icon/Square44x44Logo.targetsize-48.png index ed9328d64..19f73eee8 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-48.png and b/resources/windows/icon/Square44x44Logo.targetsize-48.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-60.png b/resources/windows/icon/Square44x44Logo.targetsize-60.png index 20111cd9b..49ac4dde5 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-60.png and b/resources/windows/icon/Square44x44Logo.targetsize-60.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-64.png b/resources/windows/icon/Square44x44Logo.targetsize-64.png index 947604030..324cdcb47 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-64.png and b/resources/windows/icon/Square44x44Logo.targetsize-64.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-72.png b/resources/windows/icon/Square44x44Logo.targetsize-72.png index 2a90f40f8..e5e0b8e04 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-72.png and b/resources/windows/icon/Square44x44Logo.targetsize-72.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-80.png b/resources/windows/icon/Square44x44Logo.targetsize-80.png index 192d6e5b0..f816ab30f 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-80.png and b/resources/windows/icon/Square44x44Logo.targetsize-80.png differ diff --git a/resources/windows/icon/Square44x44Logo.targetsize-96.png b/resources/windows/icon/Square44x44Logo.targetsize-96.png index c68bc0adc..de5f6e383 100644 Binary files a/resources/windows/icon/Square44x44Logo.targetsize-96.png and b/resources/windows/icon/Square44x44Logo.targetsize-96.png differ diff --git a/resources/windows/icon/Square71x71Logo.scale-100.png b/resources/windows/icon/Square71x71Logo.scale-100.png index 83a57792a..717533370 100644 Binary files a/resources/windows/icon/Square71x71Logo.scale-100.png and b/resources/windows/icon/Square71x71Logo.scale-100.png differ diff --git a/resources/windows/icon/Square71x71Logo.scale-125.png b/resources/windows/icon/Square71x71Logo.scale-125.png index 5c9c35930..140268288 100644 Binary files a/resources/windows/icon/Square71x71Logo.scale-125.png and b/resources/windows/icon/Square71x71Logo.scale-125.png differ diff --git a/resources/windows/icon/Square71x71Logo.scale-150.png b/resources/windows/icon/Square71x71Logo.scale-150.png index b6187d3ce..0752df0ca 100644 Binary files a/resources/windows/icon/Square71x71Logo.scale-150.png and b/resources/windows/icon/Square71x71Logo.scale-150.png differ diff --git a/resources/windows/icon/Square71x71Logo.scale-200.png b/resources/windows/icon/Square71x71Logo.scale-200.png index af1931c6c..01ea8ff0c 100644 Binary files a/resources/windows/icon/Square71x71Logo.scale-200.png and b/resources/windows/icon/Square71x71Logo.scale-200.png differ diff --git a/resources/windows/icon/Square71x71Logo.scale-400.png b/resources/windows/icon/Square71x71Logo.scale-400.png index dae484fc8..1a107f7e2 100644 Binary files a/resources/windows/icon/Square71x71Logo.scale-400.png and b/resources/windows/icon/Square71x71Logo.scale-400.png differ diff --git a/resources/windows/splash/SplashScreen.scale-100.png b/resources/windows/splash/SplashScreen.scale-100.png index 3b4c6eb16..fcb53cb99 100644 Binary files a/resources/windows/splash/SplashScreen.scale-100.png and b/resources/windows/splash/SplashScreen.scale-100.png differ diff --git a/resources/windows/splash/SplashScreen.scale-125.png b/resources/windows/splash/SplashScreen.scale-125.png index 128200175..d2d95ad26 100644 Binary files a/resources/windows/splash/SplashScreen.scale-125.png and b/resources/windows/splash/SplashScreen.scale-125.png differ diff --git a/resources/windows/splash/SplashScreen.scale-150.png b/resources/windows/splash/SplashScreen.scale-150.png index 7e28b2b5f..ba33bd3cf 100644 Binary files a/resources/windows/splash/SplashScreen.scale-150.png and b/resources/windows/splash/SplashScreen.scale-150.png differ diff --git a/resources/windows/splash/SplashScreen.scale-200.png b/resources/windows/splash/SplashScreen.scale-200.png index f23b0a5c0..4b667952f 100644 Binary files a/resources/windows/splash/SplashScreen.scale-200.png and b/resources/windows/splash/SplashScreen.scale-200.png differ diff --git a/resources/windows/splash/SplashScreen.scale-400.png b/resources/windows/splash/SplashScreen.scale-400.png index 02643d1af..a076ec653 100644 Binary files a/resources/windows/splash/SplashScreen.scale-400.png and b/resources/windows/splash/SplashScreen.scale-400.png differ diff --git a/resources/windows/splash/Wide310x150Logo.scale-100.png b/resources/windows/splash/Wide310x150Logo.scale-100.png index 5e1676ce1..8e9e6749d 100644 Binary files a/resources/windows/splash/Wide310x150Logo.scale-100.png and b/resources/windows/splash/Wide310x150Logo.scale-100.png differ diff --git a/resources/windows/splash/Wide310x150Logo.scale-125.png b/resources/windows/splash/Wide310x150Logo.scale-125.png index 96eddb75c..b69ed751f 100644 Binary files a/resources/windows/splash/Wide310x150Logo.scale-125.png and b/resources/windows/splash/Wide310x150Logo.scale-125.png differ diff --git a/resources/windows/splash/Wide310x150Logo.scale-150.png b/resources/windows/splash/Wide310x150Logo.scale-150.png index 7ea4ed7ad..637e2d85d 100644 Binary files a/resources/windows/splash/Wide310x150Logo.scale-150.png and b/resources/windows/splash/Wide310x150Logo.scale-150.png differ diff --git a/resources/windows/splash/Wide310x150Logo.scale-200.png b/resources/windows/splash/Wide310x150Logo.scale-200.png index 3b4c6eb16..fcb53cb99 100644 Binary files a/resources/windows/splash/Wide310x150Logo.scale-200.png and b/resources/windows/splash/Wide310x150Logo.scale-200.png differ diff --git a/resources/windows/splash/Wide310x150Logo.scale-400.png b/resources/windows/splash/Wide310x150Logo.scale-400.png index f23b0a5c0..4b667952f 100644 Binary files a/resources/windows/splash/Wide310x150Logo.scale-400.png and b/resources/windows/splash/Wide310x150Logo.scale-400.png differ diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index a95593612..c508018d4 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -1,12 +1,12 @@ import { Component, OnInit, NgZone } from '@angular/core'; import { Router, NavigationExtras } from '@angular/router'; -import { AnimationController, ModalController,Platform } from '@ionic/angular'; +import { AnimationController, ModalController, Platform } from '@ionic/angular'; import { LoginUserRespose } from 'src/app/models/user.model'; import { AuthService } from 'src/app/services/auth.service'; import { LocalstoreService } from 'src/app/store/localstore.service'; import { EditProfilePage } from './edit-profile/edit-profile.page'; import { StorageService } from '../../services/storage.service'; -/* import { NotificationsService } from '../../services/notifications.service'; */ +import { NotificationsService } from '../../services/notifications.service'; import { SessionStore } from 'src/app/store/session.service'; import { EventTrigger } from '../../services/eventTrigger.service'; import { ThemeService } from 'src/app/services/theme.service' @@ -28,7 +28,7 @@ export class ProfilePage implements OnInit { typeagenda2: "pessoal"; pr: "100000014"; md: "100000011"; - date:"60:20"; + date: "60:20"; location: "Gabinete"; constructor(private modalController: ModalController, @@ -38,9 +38,8 @@ export class ProfilePage implements OnInit { private localstoreService: LocalstoreService, private storageservice: StorageService, private zone: NgZone, - /* private notificationservice: NotificationsService, */ + private notificationservice: NotificationsService, private platform: Platform, - /* private notificationsService: NotificationsService, */ private eventtrigger: EventTrigger, public ThemeService: ThemeService ) { @@ -59,14 +58,14 @@ export class ProfilePage implements OnInit { this.getNotificationData(); } - /* this.notificationsService.registerCallback( - 'any', - () => { - setTimeout(()=>{ - this.getNotificationData(); - }, 100) - } - ) */ + /* this.notificationsService.registerCallback( + 'any', + () => { + setTimeout(()=>{ + this.getNotificationData(); + }, 100) + } + ) */ } @@ -77,65 +76,49 @@ export class ProfilePage implements OnInit { notImplemented() { } - asyncNotification(){} + asyncNotification() { } async getNotificationData() { this.storageservice.get("Notifications").then((value) => { console.log("Init get store", value) this.DataArray = [] - value.forEach((element,i) => { - console.log("ARaaAA", element) - let notificationObject = { - index: i, - title: element.title, - Service: element.data.Service, - Object: element.data.Object, - IdObject: element.data.IdObject, - FolderId: element.data.FolderId, - body: element.body, - dateInit: this.getFormatedTime(element.data.dateInit), - dateEnd: this.getFormatedTime(element.data.dateEnd), - Location: element.data.Location, - TypeAgenda: element.data.TypeAgenda, - Role: element.data.Role, - Status: element.data.Status - } - /* if(element.payload){ - var payload = JSON.parse(element.payload) + value.forEach((element, i) => { + let notificationObject; + if (element.data) { + console.log("ARaaAA", element) notificationObject = { - //index: i, - //alert: element.alert, - Service: payload.Service, - Object: payload.Object, - IdObject: payload.IdObject, - //FolderId: payload.FolderId, - //desc: payload.desc, - //dateInit: this.getFormatedTime(payload.dateInit), - //dateEnd: this.getFormatedTime(payload.dateEnd), - //Location: payload.Location, - //TypeAgenda: payload.TypeAgenda, - //Role: payload.Role, - //Status: payload.Status + index: i, + title: element.title, + Service: element.data.Service, + Object: element.data.Object, + IdObject: element.data.IdObject, + FolderId: element.data.FolderId, + body: element.body, + dateInit: this.getFormatedTime(element.data.dateInit), + dateEnd: this.getFormatedTime(element.data.dateEnd), + Location: element.data.Location, + TypeAgenda: element.data.TypeAgenda, + Role: element.data.Role, + Status: element.data.Status } } else { notificationObject = { - index: i, - alert: element.alert, - Service: element.Service, - Object: element.Object, - IdObject: element.IdObject, FolderId: element.FolderId, - desc: element.desc, - dateInit: element.dateInit, - dateEnd: element.dateEnd, + IdObject: element.IdObject, Location: element.Location, - TypeAgenda: element.TypeAgenda, + Object: element.Object, Role: element.Role, - Status: element.Status - } - }*/ - + Service: element.Service, + Status: element.Status, + TypeAgenda: element.TypeAgenda, + body: element.body, + dateEnd: element.dateEnd, + dateInit: element.dateInit, + index: element.index, + title: element.title + } + } this.DataArray.push(notificationObject) }); @@ -149,20 +132,20 @@ export class ProfilePage implements OnInit { } - getFormatedTime(dateString){ + getFormatedTime(dateString) { var date = new Date(dateString); var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours(); var am_pm = date.getHours() >= 12 ? "pm" : "am"; var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); let time = hours + ":" + minutes /* + " " + am_pm */; - console.log('Formate',time) + console.log('Formate', time) return time; - } + } notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => { if (Service === "agenda" && IdObject.length > 10) { - console.log("Id Lenght",IdObject.length) + console.log("Id Lenght", IdObject.length) this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda'])); } else if (Service === "gabinete-digital" && Object === "expediente") { @@ -170,7 +153,7 @@ export class ProfilePage implements OnInit { } else if (Service === "agenda" && Object === "event-list") { //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); - this.zone.run(() =>this.router.navigate(['/home/agenda/event-list/approve-event',IdObject, 'agenda'])); + this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda'])); } else if (Service === "gabinete-digital" && Object === "despachos") { @@ -186,7 +169,7 @@ export class ProfilePage implements OnInit { } else if (Service === "gabinete-digital" && Object === "despachos-pr") { - this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/despachos-pr',IdObject,'gabinete-digital'])); + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', IdObject, 'gabinete-digital'])); } else if (Service === "accoes" && Object === "accao") { this.zone.run(() => this.router.navigate(['/home/publications', IdObject])); @@ -199,13 +182,13 @@ export class ProfilePage implements OnInit { } else if (Service === "gabinete-digital" && Object === "diplomas-assinar") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar',IdObject,'gabinete-digital'])); + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', IdObject, 'gabinete-digital'])); } else if (Service === "gabinete-digital" && Object === "expedientes-pr") { this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital'])); } - //this.notificationservice.tempClearArray(); + this.notificationservice.tempClearArray(); this.deleteNotification(index); this.eventtrigger.publishSomeData({ notification: "deleted" @@ -215,13 +198,13 @@ export class ProfilePage implements OnInit { } - deleteNotification(index){ + deleteNotification(index) { console.log("Delete notification first stata", this.notificationdata) - this.notificationdata = this.notificationdata.filter(item=>item.index !=index ); + this.notificationdata = this.notificationdata.filter(item => item.index != index); - this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{ - this.storageservice.get("Notifications").then((value) =>{ - console.log("notfication state", value, ) + this.storageservice.store("Notifications", JSON.stringify(this.notificationdata)).then(() => { + this.storageservice.get("Notifications").then((value) => { + console.log("notfication state", value,) }); }); console.log("Delete notification last stata", this.notificationdata) diff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.scss b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.scss index 70b621dbb..5275b7718 100644 --- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.scss +++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.scss @@ -68,7 +68,7 @@ --border-radius: 5px; --box-shadow: none; overflow: auto; - --icon-color:#0d89d1; + --icon-color: var(--font-awesome); } } @@ -120,14 +120,14 @@ } .members-checkbox ion-checkbox{ - --border-color: #0d89d1; - --background-checked:#0d89d1; + --border-color: var(--title-text-color); + --background-checked:var(--title-text-color); float: left; } .item-checkbox ion-checkbox{ - --border-color: #0d89d1; - --background-checked:#0d89d1; + --border-color: var(--title-text-color); + --background-checked:var(--title-text-color); float: left; } @@ -137,7 +137,7 @@ width: 330px; padding-left: 10px; font-size: 15px; - color: #0d89d1; + color: var(--title-text-color); float: left; } .item-checkbox ion-icon, .members-checkbox ion-icon{ diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index 17fabbb62..d97245b37 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -48,7 +48,6 @@ --> -
@@ -124,6 +123,19 @@ --> + + +
- -
diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index cf421056f..7d14e8fcd 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -20,6 +20,9 @@ import { ChatMessageStore } from 'src/app/store/chat/chat-message.service'; import { ChatUserStorage } from 'src/app/store/chat/chat-user.service'; import { environment } from 'src/environments/environment'; import { ThemeService } from 'src/app/services/theme.service' +import { Filesystem, Directory, Encoding } from '@capacitor/filesystem'; +import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder'; +import { Haptics, ImpactStyle } from '@capacitor/haptics'; @Component({ selector: 'app-messages', @@ -44,8 +47,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { members:any; scrollingOnce:boolean = true; - chatMessageStore = ChatMessageStore - chatUserStorage = ChatUserStorage + chatMessageStore = ChatMessageStore; + chatUserStorage = ChatUserStorage; private scrollChangeCallback: () => void; currentPosition: any; @@ -60,6 +63,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { task: ExpedientTaskModalPageNavParamsTask; LoadedDocument:any = null; + recording = false; + storedFileNames = []; + durationDisplay = ''; + duration = 0; + @ViewChild('recordbtn', { read: ElementRef }) recordBtn: ElementRef; + myAudio: any; + constructor( public popoverController: PopoverController, private modalController: ModalController, @@ -75,11 +85,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { private processes: ProcessesService, public ThemeService: ThemeService ) { - /* this.activatedRoute.paramMap.subscribe(params => { - if(params["params"].SerialNumber) { - this.roomId = params["params"].roomId; - } - }); */ this.loggedUser = authService.ValidatedUserChat['data']; this.roomId = this.navParams.get('roomId'); @@ -91,57 +96,110 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { } ngOnInit() { - - /* setInterval(()=>{ */ - this.load(); - /* }, 9000); */ - /* this.el = document.getElementById("scrollToBottom"); - this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop; */ - + this.load(); this.setStatus('online'); - //this.onPressingMessage(); - - /* setInterval(()=>{ - const gesture = this.gestureController.create({ - el: this.rectangle.nativeElement, - gestureName:'my-gesture', - onMove: (detail) => { this.onMove(detail); } - }) - - gesture.enable(); - }, 9000); */ - + this.loadFiles(); + VoiceRecorder.requestAudioRecordingPermission(); } ngAfterViewInit() { this.scrollChangeCallback = () => this.onContentScrolled(event); window.addEventListener('scroll', this.scrollChangeCallback, true); - // const gesture = this.gestureController.create({ - // el: this.rectangle.nativeElement, - // gestureName:'long-press', - // onStart: () => { alert('OP') }, - // /* onMove () => { - // console.log('Move'); - // }, */ - // onEnd: () => { - // console.log('ENNNNNDS'); - // }, - // }) + const longpress = this.gestureController.create({ + el: this.recordBtn.nativeElement, + threshold: 0, + gestureName: 'long-press', + onStart: ev => { + Haptics.impact({ style: ImpactStyle.Light }) + this.startRecording(); + this.calculateDuration(); + }, + onEnd: ev =>{ + Haptics.impact({ style: ImpactStyle.Light }) + this.stopRecording(); + } + }, true); + longpress.enable(); + } + + calculateDuration(){ + if(!this.recording){ + this.duration = 0; + this.durationDisplay = ''; + return; + } + this.duration += 1; + const minutes = Math.floor(this.duration / 60); + const seconds = (this.duration % 60).toString().padStart(2,'0'); + this.durationDisplay = `${minutes}:${seconds}`; + + setTimeout(()=>{ + this.calculateDuration(); + }, 1000) + } + + async loadFiles(){ + Filesystem.readdir({ + path: '', + directory: Directory.Data + }).then(result =>{ + console.log(result); + const temp:any[] = result.files.reverse(); + this.storedFileNames = temp[0]; + console.log(this.storedFileNames); + + }) + } + + startRecording(){ + if(this.recording){ + return; + } + this.recording = true; + VoiceRecorder.startRecording(); + } + + stopRecording(){ + if(!this.recording){ + return; + } + this.recording = false; + VoiceRecorder.stopRecording().then(async (result: RecordingData) =>{ + this.recording = false; + if(result.value && result.value.recordDataBase64){ + const recordData = result.value.recordDataBase64; + console.log(recordData); + this.myAudio = recordData; + const fileName = new Date().getTime() + ".wav"; + await Filesystem.writeFile({ + path: fileName, + directory: Directory.Data, + data: recordData, + }) + } + }) + + } + + async playFile(fileName?:any){ + const audioFile = await Filesystem.readFile({ + path: fileName, + directory: Directory.Data + }) + console.log(audioFile); + const base64sound = audioFile.data; + + const audioRef = new Audio(`data:audio/aac;base64,${base64sound}`) + audioRef.oncanplaythrough = () => audioRef.play(); + audioRef.load(); - // gesture.enable(); } handlePress(id?:string){ this.selectedMsgId = id; this.showMessageOptions = true; - /* if(!this.showMessageOptions){ - this.showMessageOptions = true; - } - else{ - this.showMessageOptions = false; - } */ } handleClick(){ @@ -149,22 +207,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { this.selectedMsgId = ""; } - /* onPressingMessage(){ - const gesture = this.gestureController.create({ - el: this.messageContainer.nativeElement, - gestureName: 'long-press', - onStart: ev =>{ - this.longPressActive = true; - console.log('Pressing'); - }, - onEnd: ev => { - this.longPressActive = false; - console.log('Stop pressing'); - } - }); - gesture.enable(true); - } */ - deleteMessage(msgId:string){ let body = { "roomId": this.roomId, @@ -273,7 +315,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { const roomId = this.roomId; this.chatService.getRoomMessages(this.roomId).subscribe(res => { - /* console.log(res); */ + console.log(res); this.messages = res['messages'].reverse(); this.chatMessageStore.add(roomId, this.messages) console.log(this.messages); @@ -519,7 +561,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { this.messages = res['messages'].reverse(); this.chatMessageStore.add(roomId, this.messages) - console.log(this.messages); + //console.log(this.messages); // Reconnect in one second if(this.route.url != "/home/chat"){ console.log("Timer message stop") @@ -528,7 +570,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { if(document.querySelector('.isMessagesChatOpened')){ await new Promise(resolve => setTimeout(resolve, 5000)); await this.serverLongPull(); - console.log('Timer message running') + //console.log('Timer message running') } } diff --git a/src/app/pages/chat/new-group/contacts/contacts.page.scss b/src/app/pages/chat/new-group/contacts/contacts.page.scss index 54523dbf8..9f66c7eb7 100644 --- a/src/app/pages/chat/new-group/contacts/contacts.page.scss +++ b/src/app/pages/chat/new-group/contacts/contacts.page.scss @@ -69,7 +69,7 @@ --border-radius: 5px; --box-shadow: none; overflow: auto; - --icon-color:#0d89d1; + --icon-color:var(--title-text-color); } } @@ -102,8 +102,8 @@ ion-content{ } .item-checkbox ion-checkbox{ - --border-color: #0d89d1; - --background-checked:#0d89d1; + --border-color: var(--title-text-color); + --background-checked:var(--title-text-color); float: left; } @@ -113,7 +113,7 @@ ion-content{ width: 330px; padding-left: 10px; font-size: 15px; - color: #0d89d1; + color: var(--title-text-color); float: left; } .item-checkbox ion-icon{ diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index bae0452a5..709122a83 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -109,13 +109,13 @@ export class EventsPage implements OnInit { // console.log('Resize event detected'); }); - + window['zipPhoneCallback'] = function (zipphone) { var frame = document.getElementById('home-iframe'); if(frame) { frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }}); } - } + } } @@ -493,12 +493,13 @@ export class EventsPage implements OnInit { } goToExpediente(SerialNumber: any) { - if (this.loggeduser.Profile == 'MDGPR') { + this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); + /* if (this.loggeduser.Profile == 'MDGPR') { this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); } else if (this.loggeduser.Profile == 'PR') { this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']); - } + } */ } viewExpedientListPage() { diff --git a/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.scss b/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.scss index dea8d7000..f10e7a082 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.scss +++ b/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.scss @@ -152,7 +152,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.scss b/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.scss index db1c3b9fe..76990574b 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.scss +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.scss @@ -142,7 +142,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/pages/gabinete-digital/diplomas/diplomas.page.scss b/src/app/pages/gabinete-digital/diplomas/diplomas.page.scss index 0870187c5..129ce6c1f 100644 --- a/src/app/pages/gabinete-digital/diplomas/diplomas.page.scss +++ b/src/app/pages/gabinete-digital/diplomas/diplomas.page.scss @@ -132,7 +132,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html index 461e53b4e..148cb3d61 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html @@ -104,7 +104,7 @@ - +
@@ -118,6 +118,7 @@ +
--> diff --git a/src/app/pages/gabinete-digital/expediente/expediente.page.html b/src/app/pages/gabinete-digital/expediente/expediente.page.html index fe345d4d2..c383d3af7 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente.page.html @@ -34,8 +34,8 @@
@@ -67,13 +67,13 @@
Lista vazia
-
+
diff --git a/src/app/pages/gabinete-digital/expediente/expediente.page.ts b/src/app/pages/gabinete-digital/expediente/expediente.page.ts index 21c9503fb..3f165a4a1 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente.page.ts @@ -25,7 +25,8 @@ export class ExpedientePage implements OnInit { taskslist = []; serialNumber: string; - expedienteGdStore = ExpedienteGdStore + //expedienteGdStore = ExpedienteGdStore; + expedientegbstore = ExpedienteGdStore expedienteTaskPipe = new ExpedienteTaskPipe() onlinecheck: boolean; @@ -60,41 +61,30 @@ export class ExpedientePage implements OnInit { this.backgroundservice.registerBackService('Online', () => { this.LoadList(); }); - } - async LoadList() { + LoadList() { this.processes.GetTaskListExpediente(false).subscribe(async res => { this.skeletonLoader = true + const result = res - try { - const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise() - const result = expediente + this.taskslist = new Array(); + let ress = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active"); - this.taskslist = new Array(); - let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active"); + ress.forEach((element: any) => { - res.forEach((element: any) => { + let task = this.expedienteTaskPipe.transform(element) + this.taskslist.push(task); + this.addProcessTODb(task); + }); + this.listToPresent = this.taskslist + console.log('expediente list', this.listToPresent) - let task = this.expedienteTaskPipe.transform(element) - this.taskslist.push(task); - this.sqliteservice.addProcess(task); - }); - - this.listToPresent = this.taskslist - console.log('expediente list', this.listToPresent) - - } catch (error) { - this.toastService.badRequest('Processo não encontrado') - this.goBack() - } finally { - this.skeletonLoader = false; - } + this.skeletonLoader = false; }, (error) => { this.getEventsFromLocalDb(); }) - } async refreshing() { @@ -119,6 +109,13 @@ export class ExpedientePage implements OnInit { this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']); } + addProcessTODb(task) { + if (this.platform.is('desktop') || this.platform.is('mobileweb')) { + } else { + this.sqliteservice.addProcess(task); + } + } + SqliteAddExpediente(list) { list.forEach((expediente) => { let data = { diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts index f4da1f622..590200750 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts @@ -68,7 +68,7 @@ export class ExpedientesPrPage implements OnInit { LoadList() { this.skeletonLoader = true - + this.processes.GetTaskListExpediente(false).subscribe(result => { console.log(result); this.skeletonLoader = false @@ -99,7 +99,8 @@ export class ExpedientesPrPage implements OnInit { } goToExpediente(serialNumber:any){ - this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']); + //this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']); + this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']); } async viewExpedientDetail(serialNumber:any) { diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss b/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss index 1aab31ea9..ed46e7f05 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss @@ -130,7 +130,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/pages/gabinete-digital/pendentes/pendentes.page.scss b/src/app/pages/gabinete-digital/pendentes/pendentes.page.scss index 921a17f3d..d1de562e8 100644 --- a/src/app/pages/gabinete-digital/pendentes/pendentes.page.scss +++ b/src/app/pages/gabinete-digital/pendentes/pendentes.page.scss @@ -132,7 +132,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/pages/publications/new-publication/new-publication.page.html b/src/app/pages/publications/new-publication/new-publication.page.html index c010cc1ad..8295b9520 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.html +++ b/src/app/pages/publications/new-publication/new-publication.page.html @@ -34,7 +34,9 @@

{{capturedImageTitle}}

- +
+ +
@@ -51,7 +53,6 @@
X
-
diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index a314b4e99..a82247f04 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -9,15 +9,14 @@ import { Image } from 'src/app/models/image'; import { PhotoService } from 'src/app/services/photo.service'; //Capacitor -//Cordova -import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; import { ToastService } from 'src/app/services/toast.service'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { ThemePalette } from '@angular/material/core'; import { formatDate } from 'src/plugin/momentG.js' import { FileLoaderService } from 'src/app/services/file/file-loader.service'; import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service'; -import { ThemeService } from 'src/app/services/theme.service' +import { ThemeService } from 'src/app/services/theme.service'; +import { Camera, CameraResultType, CameraSource, Photo} from '@capacitor/camera'; @Component({ selector: 'app-new-publication', @@ -59,21 +58,21 @@ export class NewPublicationPage implements OnInit { guestPicture:any; - capturedImage:any; + capturedImage:any = ''; capturedImageTitle:any; + public photos: any[] = []; constructor( private modalController: ModalController, public photoService: PhotoService, private navParams: NavParams, private publications: PublicationsService, - private camera: Camera, private toastService: ToastService, private fileLoaderService: FileLoaderService, private fileToBase64Service: FileToBase64Service, public ThemeService: ThemeService ) { - + this.publicationType = this.navParams.get('publicationType'); this.folderId = this.navParams.get('folderId'); this.publicationTitle = 'Nova Publicação'; @@ -81,38 +80,70 @@ export class NewPublicationPage implements OnInit { ngOnInit() { this.setTitle(); - this.clear(); + console.log(this.folderId); + // this.takePicture(); } - takePicture() { - const options: CameraOptions = { - quality: 50, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - } +async takePicture() { + const capturedImage = await Camera.getPhoto({ + quality: 90, + // allowEditing: true, + resultType: CameraResultType.Uri, + source: CameraSource.Camera - this.camera.getPicture(options).then((imageData) => { - // imageData is either a base64 encoded string or a file URI - // If it's base64 (DATA_URL): m - //let base64Image = 'data:image/jpeg;base64,' + imageData; - - this.capturedImage = 'data:image/png;base64,'+imageData; - this.capturedImageTitle = new Date().getTime() + '.jpeg'; - }, (err) => { - /* console.log(err); */ + }); + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath }); + + this.capturedImage = await this.convertBlobToBase64(blob); + this.capturedImageTitle = new Date().getTime() + '.jpeg'; + + //console.log(this.capturedImage); + } + convertBlobToBase64 = (blob: Blob) => new Promise((resolve, reject) => { + const reader = new FileReader; + reader.onerror = reject; + reader.onload = () => { + resolve(reader.result); + }; + reader.readAsDataURL(blob); + }); - laodPicture() { + + async laodPicture() { + const capturedImage = await Camera.getPhoto({ + resultType: CameraResultType.Uri, + source: CameraSource.Photos, + quality: 90, + width: 1080, + height: 720, + }); + + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + + this.capturedImage = await this.convertBlobToBase64(blob); + this.capturedImageTitle = new Date().getTime() + '.jpeg'; + } + + /* laodPicture() { const input = this.fileLoaderService.createInput({ accept: ['image/apng', 'image/jpeg', 'image/png'] }) - + input.onchange = async () => { const file = this.fileLoaderService.getFirstFile(input) @@ -123,29 +154,9 @@ export class NewPublicationPage implements OnInit { console.log(this.capturedImage) }; - } + } */ - getPicture() { - const options: CameraOptions = { - quality: 90, - sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - } - this.camera.getPicture(options).then((imageData) => { - // imageData is either a base64 encoded string or a file URI - // If it's base64 (DATA_URL): - let base64Image = 'data:image/jpeg;base64,' + imageData; - this.capturedImage = imageData; - this.capturedImageTitle = new Date().getTime() + '.jpeg'; - }, (err) => { - /* console.log(err); */ - }); - } runValidation() { this.validateFrom = true @@ -168,20 +179,20 @@ export class NewPublicationPage implements OnInit { ]) }) } - + async save() { - + this.injectValidation() this.runValidation() if(this.Form.invalid) return false - + if(this.publicationType == '3') { console.log(this.navParams.get('publication')); - - if(this.capturedImage != '') { + + if(this.capturedImage != ''){ this.publication = { DateIndex: this.publication.DateIndex, DocumentId:this.publication.DocumentId, @@ -198,13 +209,13 @@ export class NewPublicationPage implements OnInit { try { console.log(this.publication); - + await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() - this.toastService.successMessage("Publicação criado") + this.toastService.successMessage("Publicação editada") this.close(); } catch (error) { - this.toastService.badRequest("Publicação não criado") + this.toastService.badRequest("Publicação não editada") } finally { loader.remove() } @@ -232,7 +243,7 @@ export class NewPublicationPage implements OnInit { console.log(this.publication); await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() this.toastService.successMessage("Publicação criado") - + this.close(); } catch (error) { this.toastService.badRequest("Publicação não criado") @@ -273,7 +284,9 @@ export class NewPublicationPage implements OnInit { else { const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss') - console.log(date) + console.log(date); + console.log(this.folderId); + this.publication = { DateIndex: date, @@ -294,7 +307,7 @@ export class NewPublicationPage implements OnInit { await this.publications.CreatePublication(this.folderId, this.publication).toPromise(); this.close(); this.toastService.successMessage("Publicação criado") - + this.close(); } catch (error) { @@ -312,7 +325,7 @@ export class NewPublicationPage implements OnInit { this.showLoader=true; }); } - + clear() { this.capturedImage = ''; } @@ -352,8 +365,8 @@ export class NewPublicationPage implements OnInit { source: CameraSource.Camera }); console.log(image); - + this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl)); } */ -} \ No newline at end of file +} diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts index 9b53a6c34..ad0095192 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -196,7 +196,7 @@ export class ViewPublicationsPage implements OnInit { component: NewPublicationPage, componentProps: { publicationType: publicationType, - folderId: folderId, + folderId: this.folderId, }, cssClass: 'new-publication modal modal-desktop', backdropDismiss: false diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss index 31d1969c4..bac058200 100644 --- a/src/app/pages/search/search.page.scss +++ b/src/app/pages/search/search.page.scss @@ -88,7 +88,7 @@ ion-slide{ padding: 0px; margin: 0px; font-family: Roboto; - color: #0d89d1; + color: var(--title-text-color);; font-size: 15px; text-align: center; } @@ -154,7 +154,7 @@ ion-slide{ .order-labal{ font-family: Roboto; font-size: 15px; - color: #0d89d1; + color: var(--title-text-color); margin-left: 20px; } } @@ -184,7 +184,7 @@ ion-slide{ width: 100%; font-family: Roboto; font-size: 15px; - color: #0d89d1; + color: var(--title-text-color); line-height: 1.67; } span{ @@ -194,7 +194,7 @@ ion-slide{ color: #797979; } .app-name{ - background: #42b9f2; + background: var(--font-awesome); border-radius: 18px; text-align: center; display: flex; diff --git a/src/app/services/events/events.page.ts b/src/app/services/events/events.page.ts index 0ceb9b85d..079667c84 100644 --- a/src/app/services/events/events.page.ts +++ b/src/app/services/events/events.page.ts @@ -64,7 +64,7 @@ export class EventsPage implements OnInit { // shared data toDayEventStorage = ToDayEventStorage expedienteGdStore = ExpedienteGdStore - + expedienteTaskPipe = new ExpedienteTaskPipe() @Output() openExpedientListPage:EventEmitter = new EventEmitter(); @@ -352,12 +352,13 @@ export class EventsPage implements OnInit { } goToExpediente(SerialNumber:any) { - if(this.loggeduser.Profile == 'MDGPR'){ + this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); + /* if(this.loggeduser.Profile == 'MDGPR'){ this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); } else if(this.loggeduser.Profile == 'PR'){ this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']); - } + } */ } viewExpedientListPage(){ diff --git a/src/app/services/functions/file.service.ts b/src/app/services/functions/file.service.ts index 55483dc5c..040f13324 100644 --- a/src/app/services/functions/file.service.ts +++ b/src/app/services/functions/file.service.ts @@ -2,14 +2,14 @@ import { Injectable } from '@angular/core'; import { FileLoaderService } from '../file/file-loader.service'; import { FileToBase64Service } from '../file/file-to-base64.service'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -//Cordova -import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; + import { ChatService } from '../chat.service'; import { ModalController } from '@ionic/angular'; import { SearchPage } from 'src/app/pages/search/search.page'; import { SearchList } from 'src/app/models/search-document'; import { ProcessesService } from '../processes.service'; import { ToastService } from '../toast.service'; +import { Camera, CameraResultType, CameraSource, Photo} from '@capacitor/camera'; @Injectable({ providedIn: 'root' @@ -22,9 +22,9 @@ export class FileService { showLoader: boolean; files: Set; + photos: any[] = []; constructor( - private camera: Camera, private fileLoaderService: FileLoaderService, private fileToBase64Service: FileToBase64Service, private iab: InAppBrowser, @@ -34,26 +34,25 @@ export class FileService { private toastService: ToastService, ) { } - takePicture() { - const options: CameraOptions = { - quality: 50, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - } + async takePicture() { + const capturedImage = await Camera.getPhoto({ + quality: 90, + // allowEditing: true, + resultType: CameraResultType.Uri, + source: CameraSource.Camera - this.camera.getPicture(options).then((imageData) => { - // imageData is either a base64 encoded string or a file URI - // If it's base64 (DATA_URL): m - //let base64Image = 'data:image/jpeg;base64,' + imageData; - - this.capturedImage = 'data:image/png;base64,'+imageData; - this.capturedImageTitle = new Date().getTime() + '.jpeg'; - }, (err) => { - /* console.log(err); */ }); + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + + this.capturedImage = await this.convertBlobToBase64(blob); + this.capturedImageTitle = new Date().getTime() + '.jpeg'; + let data = { image:this.capturedImage, name: this.capturedImageTitle @@ -62,6 +61,15 @@ export class FileService { return data; } + convertBlobToBase64 = (blob: Blob) => new Promise((resolve, reject) => { + const reader = new FileReader; + reader.onerror = reject; + reader.onload = () => { + resolve(reader.result); + }; + reader.readAsDataURL(blob); + }); + loadPicture() { const input = this.fileLoaderService.createInput({ accept: ['image/apng', 'image/jpeg', 'image/png'] @@ -85,19 +93,24 @@ export class FileService { }; } - addCameraPictureToChat(roomId){ + async addCameraPictureToChat(roomId){ - const options: CameraOptions = { - quality: 50, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - } + const capturedImage = await Camera.getPhoto({ + quality: 90, + // allowEditing: true, + resultType: CameraResultType.Uri, + source: CameraSource.Camera - this.camera.getPicture(options).then((imageData) => { - this.capturedImage = 'data:image/png;base64,'+imageData; + }); + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + + this.capturedImage = await this.convertBlobToBase64(blob); this.capturedImageTitle = new Date().getTime() + '.jpeg'; let body = { @@ -121,29 +134,26 @@ export class FileService { this.toastService.badRequest("Não foi possível adicionar a fotografia!"); }); - }, (err) => { - this.toastService.badRequest("Não foi possível adicionar a fotografia!"); - }); - } - addPictureToChatMobile(roomId) { - alert('Here') + async addPictureToChatMobile(roomId) { - const options: CameraOptions = { + const capturedImage = await Camera.getPhoto({ quality: 90, - sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - correctOrientation: true - } + // allowEditing: true, + resultType: CameraResultType.Uri, + source: CameraSource.Photos - this.camera.getPicture(options).then((imageData) => { - let base64Image = 'data:image/jpeg;base64,' + imageData; - this.capturedImage = imageData; + }); + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + + this.capturedImage = await this.convertBlobToBase64(blob); this.capturedImageTitle = new Date().getTime() + '.jpeg'; //const loader = this.toastService.loading(); @@ -161,21 +171,12 @@ export class FileService { }] } } - - console.log(this.capturedImage) - this.chatService.sendMessage(body).subscribe(res=> { //loader.remove(); //console.log(res); },(error) => { //loader.remove(); }); - - - }, (err) => { - //console.log(err); - }); - } addPictureToChat(roomId) { diff --git a/src/app/services/network-connection.service.ts b/src/app/services/network-connection.service.ts index b9bfb446b..8586451d6 100644 --- a/src/app/services/network-connection.service.ts +++ b/src/app/services/network-connection.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs' import { Platform } from '@ionic/angular' +import { Network } from '@capacitor/network'; @Injectable({ providedIn: 'root' @@ -9,20 +10,19 @@ import { Platform } from '@ionic/angular' export class NetworkConnectionService { online: boolean = true; - constructor(){} - - checkOnline() { - window.addEventListener('online', (on) => { - this.online === true; - console.log('Became online'); + constructor(){ + Network.addListener('networkStatusChange', status => { + console.log('Network status changed', status); }); } + - checkOffline() { - window.addEventListener('offline', (off) => { - this.online === false; - console.log('Became offline') - }); - } + + logCurrentNetworkStatus = async () => { + const status = await Network.getStatus(); + + return status; + + }; } \ No newline at end of file diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 31bbbeb40..50dab7589 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -162,220 +162,59 @@ export class NotificationsService { ); } - - - /* - - async onReceviNotification() { - this.fcm.onNotification().subscribe(data => { - if (data.click_action) { - console.log("Received in background: ", data); - - this.notificatinsRoutes(data) - - } else { - console.log("Received in foreground: ", data); - - console.log(data.Service) - console.log(data.Object) - console.log(data.IdObject) - - this.DataArray.push(data) - console.log("On ReceiveNotification", this.DataArray) - this.storageService.store("Notifications", this.DataArray) - - - }; - }); - } */ - - - ///////////////////////////////////////////////////// - - /* getTokenByUserIdAndId(user, userID) { - const geturl = environment.apiURL + 'notifications/user/' + userID; - - return this.http.get(`${geturl}`); - } - */ - /* getAndpostToken(username) { - - if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - //console.log('Notifications not supported') - } else { - - const geturl = environment.apiURL + 'notifications/token'; - if(window['WLAuthorizationManager']) { - if(window['WLAuthorizationManager'].obtainAccessToken) { - window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( - (token) => { - console.log('Push Notification: Success ' + token); - - window['MFPPush'].initialize( - function (successResponse) { - console.log("Push notification Successfully Service intialized: " + successResponse); - }, - function (failureResponse) { - console.log("Push notification failure Service intialized: " + failureResponse); - } - ); - - window['MFPPush'].registerDevice(null, async (successResponse) => { - console.log("Successfully registered: " + JSON.stringify(successResponse)); - console.log('token: ', successResponse.deviceId) - await this.storageService.store(username, successResponse.deviceId).then((tokennoti) => { - console.log('token store',tokennoti) - }); - await this.storageService.get(username).then(value => { - console.log('STORAGE TOKEN', value) - this.storageService.get(AuthConnstants.USER).then(res => { - console.log('USERID', res); - const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; - const body = { - UserId: res.UserId, - TokenId: successResponse.deviceId, - Status: 1, - Service: 1 - }; - this.http.post(`${geturl}`, body, { headers }).subscribe(data => { - console.log('TOKEN USER MIDLE', data); - }) - }); - - }); - }, - function (failureResponse) { - console.log("Successfully failue: " + JSON.stringify(failureResponse)); - } - ); - }, (error) => { - console.log('Push notification recived: failure ' + error.responseText); - console.log(JSON.stringify(error)); - } - ); - } - } - - } - - } */ - tempClearArray() { this.DataArray = new Array; } - /* async onReceviNotification() { - - if(window['WLAuthorizationManager']) { - if(window['WLAuthorizationManager'].obtainAccessToken) { - window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( - (token) => { - console.log('Push Notification: Success ' + token); - window['MFPPush'].initialize( - function (successResponse) { - console.log("Push notification Successfully intialized: " + successResponse); - window['MFPPush'].registerNotificationsCallback(notificationReceived); - }, - function (failureResponse) { - console.log("Push notification failure intialized: " + failureResponse); - } - ); - var notificationReceived = (message) => { - //this.jsonstore.createCollection('Notifications',message); - this.DataArray.push(message) - console.log("On ReceiveNotification", this.DataArray) - this.storageService.store("Notifications",this.DataArray) - - console.log(message); - this.eventtrigger.publishSomeData({ - notification: "recive" - }) - var data = JSON.parse(message.payload); - - //synchro.$send(data) - - console.log('data.Service', data.Service); // module - console.log('data.IdObject', data.IdObject); // Object id - console.log('data.Object', data.Object); // details - - if(message.actionName){ - this.notificatinsRoutes(data); - } else { - /* this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data); - //this.notificatinsRoutes(data); - console.log(data) - } - - this.callbacks.forEach( e=> { - if(e.type == data.Object || e.type == "any") { - e.funx() - } - }) - - } - }, (error) => { - console.log('Push notification recived: failure ' + error.responseText); - console.log(JSON.stringify(error)); - } - ); - } - } - - - } */ notificatinsRoutes = (notification) => { - if (notification.data.Service === "agenda") { - this.zone.run(() => this.router.navigate(['/home/agenda', notification.data.IdObject, 'agenda'])); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "expediente") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.data.Service === "agenda" && notification.data.Object === "event-list") { - this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.data.IdObject, 'agenda'])); - } else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "despachos") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true })); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "parecer") { + console.log('Push action performed 2222: ' + JSON.stringify(notification.data)); - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.data.IdObject, 'gabinete-digital'])); + if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) { + console.log("Id Lenght", notification.notification.data.IdObject.length) + this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "deferimento") { + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") { + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital'])); + } + else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") { + //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); + this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda'])); - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "despachos-pr") { + } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.data.IdObject, 'gabinete-digital'])); + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true })); } - else if (notification.data.Service === "accoes" && notification.data.Object === "accao") { - this.zone.run(() => this.router.navigate(['/home/publications', notification.data.IdObject])); - } - else if (notification.data.Service === "accoes" && notification.data.Object === "publicacao") { - this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.data.FolderId, notification.data.IdObject])); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "diplomas") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "diplomas-assinar") { - let navigationExtras: NavigationExtras = { - queryParams: { - "serialNumber": notification.data.IdObject, - } - }; - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras)); - } - else if (notification.data.Service === "gabinete-digital" && notification.data.Object === "expedientes-pr") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.data.IdObject, 'gabinete-digital'])); - } - } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") { - platformVerify() { - - if (this.platform.is('cordova')) { - } else { + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") { + + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); + } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") { + + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital'])); + } + else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") { + this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject])); + } + else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") { + this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject])); + } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") { + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital'])); + } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") { + + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital'])); + } + else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") { + this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital'])); + } + } } diff --git a/src/app/shared/chat/messages/messages.page.html b/src/app/shared/chat/messages/messages.page.html index 9f77e4286..53f592363 100644 --- a/src/app/shared/chat/messages/messages.page.html +++ b/src/app/shared/chat/messages/messages.page.html @@ -117,13 +117,13 @@ - + - + diff --git a/src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.scss b/src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.scss index 0d4380ab9..84fb46129 100644 --- a/src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.scss +++ b/src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.scss @@ -136,7 +136,7 @@ ion-item{ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.scss b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.scss index 89ccd421b..27d2cbb71 100644 --- a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.scss +++ b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.scss @@ -121,7 +121,7 @@ font-family: Roboto; font-size: 12pt; font-weight: 700; - color: #0d89d1; + color: var(--title-text-color); padding-left: 3px; .subject{ diff --git a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts index d03699f52..d89169481 100644 --- a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts +++ b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts @@ -97,7 +97,8 @@ export class ExpedientesPrPage implements OnInit { } goToExpediente(serialNumber:any){ - this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']); + /* this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']); */ + this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']); } } diff --git a/src/app/shared/gabinete-digital/expedients/expedients.page.ts b/src/app/shared/gabinete-digital/expedients/expedients.page.ts index 5a45c172b..2f0237c92 100644 --- a/src/app/shared/gabinete-digital/expedients/expedients.page.ts +++ b/src/app/shared/gabinete-digital/expedients/expedients.page.ts @@ -37,7 +37,7 @@ export class ExpedientsPage implements OnInit { //Inicializar segment this.segment = "expedientes"; this.LoadList() - + this.router.events.forEach((event) => { if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?expedientes=true')) { diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html index 5f12d2d70..abe6a5226 100644 --- a/src/app/shared/header/header.page.html +++ b/src/app/shared/header/header.page.html @@ -16,7 +16,7 @@ logo
-
{{this.notificationLength}}
+
{{notificationLength}}
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index ec39b347e..9633211b2 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { AnimationController, ModalController, Platform } from '@ionic/angular'; import { SearchPage } from 'src/app/pages/search/search.page'; import { Router } from '@angular/router'; @@ -10,6 +10,7 @@ import { SessionStore } from 'src/app/store/session.service'; import { environment } from 'src/environments/environment'; import { EventTrigger } from '../../services/eventTrigger.service'; import { ThemeService } from '../../services/theme.service'; +import { interval } from 'rxjs'; @Component({ selector: 'app-header', @@ -26,6 +27,7 @@ export class HeaderPage implements OnInit { DataArray: Array = []; notificationLength: 0; SessionStore = SessionStore + check: boolean; production = environment.production @@ -48,23 +50,23 @@ export class HeaderPage implements OnInit { ngOnInit() { this.hideSearch(); - this.notificationLengthData(); + this.update() + /* this.notificationLengthData(); + this.eventrigger.getObservable().subscribe(async (data) => { + if (data.notification === "delete" || "recive") { + await this.notificationLengthData(); + console.log('Current badge: ', this.notificationLength) + console.log('Deleted notification', data.notification) + } - /* if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - console.log('Notifications not supported') - this.UpdateNotificationCount(); - } else { - this.UpdateNotificationCount(); - } */ + }) */ } - ionViewWillEnter() { - this.eventrigger.getObservable().subscribe((data) => { - if (data.notification == "delete" || "recive") { - this.notificationLengthData(); - console.log('Deleted notification', data) - } - }) + update() { + setInterval(() => { + this.notificationLengthData(); + }, 5000) + } /* UpdateNotificationCount() { @@ -78,15 +80,16 @@ export class HeaderPage implements OnInit { ) } */ - notificationLengthData() { - this.storageservice.get("Notifications").then((value) => { + async notificationLengthData() { + await this.storageservice.get("Notifications").then((value) => { console.log("Init get store", value) /* var data = JSON.parse(value); */ this.notificationLength = value.length; + console.log('Timer badge count 1', this.notificationLength) }) - console.log('Timer badge count') + console.log('Timer badge count2', this.notificationLength) } hideSearch() { diff --git a/src/app/shared/popover/chat-options-popover/chat-options-popover.page.html b/src/app/shared/popover/chat-options-popover/chat-options-popover.page.html index a0042f5a1..e76aaf577 100644 --- a/src/app/shared/popover/chat-options-popover/chat-options-popover.page.html +++ b/src/app/shared/popover/chat-options-popover/chat-options-popover.page.html @@ -6,9 +6,9 @@
- + - +
diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.html b/src/app/shared/popover/opts-expediente/opts-expediente.page.html index dc04af69d..c830407f6 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.html +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.html @@ -14,6 +14,7 @@ +
@@ -22,18 +23,21 @@ +
- + +
- + +
diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts index b1ec24617..f874a9f4d 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts @@ -66,6 +66,10 @@ export class OptsExpedientePage implements OnInit { }; } + openNewGroupPage(){ + + } + close() { if( window.innerWidth < 801) { this.popoverController.dismiss(); diff --git a/src/app/shared/publication/new-publication/new-publication.page.html b/src/app/shared/publication/new-publication/new-publication.page.html index f3d9dcd50..8b2e040d5 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.html +++ b/src/app/shared/publication/new-publication/new-publication.page.html @@ -27,8 +27,6 @@ -
Fotografia Anexada
-
image @@ -40,18 +38,6 @@
X
- -
- -
- -
- -
-
- Anexar Fotografia -
-
@@ -65,7 +51,9 @@

{{capturedImageTitle}}

- +
@@ -82,7 +70,7 @@
- +
@@ -95,7 +83,6 @@ - diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index c6d8c7a96..4d25f3b8f 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -4,11 +4,11 @@ import { PublicationsService } from 'src/app/services/publications.service'; import { Publication } from 'src/app/models/publication'; import { Image } from 'src/app/models/image'; import { PhotoService } from 'src/app/services/photo.service'; -import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; import { ToastService } from 'src/app/services/toast.service'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { FileLoaderService } from 'src/app/services/file/file-loader.service' import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service'; +import { Camera, CameraResultType, CameraSource, Photo} from '@capacitor/camera'; @Component({ selector: 'app-new-publication', templateUrl: './new-publication.page.html', @@ -38,16 +38,16 @@ export class NewPublicationPage implements OnInit { @Output() openPublicationDetails = new EventEmitter(); @Output() goBackToViewPublications = new EventEmitter(); @Output() goBacktoPublicationDetails = new EventEmitter(); - + guestPicture:any; - capturedImage:any; + capturedImage:any = ''; capturedImageTitle:any; + photos: any[] = []; constructor( public photoService: PhotoService, private publications: PublicationsService, - private camera: Camera, private toastService: ToastService, private fileLoaderService: FileLoaderService, private fileToBase64Service: FileToBase64Service @@ -60,11 +60,11 @@ export class NewPublicationPage implements OnInit { this.getPublicationDetail(); } this.setTitle(); - this.clear(); - this.takePicture(); + //this.clear(); + //this.takePicture(); } - getPublicationDetail() { + getPublicationDetail() { this.showLoader = true; //console.log(this.publicationId); /* console.log(this.folderId); */ @@ -88,30 +88,60 @@ export class NewPublicationPage implements OnInit { } - takePicture() { - const options: CameraOptions = { + async takePicture() { + const capturedImage = await Camera.getPhoto({ quality: 90, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, + // allowEditing: true, + resultType: CameraResultType.Uri, + source: CameraSource.Camera + }); + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + this.capturedImage = await this.convertBlobToBase64(blob); + this.capturedImageTitle = new Date().getTime() + '.jpeg'; + //console.log(this.capturedImage); } - this.camera.getPicture(options).then((imageData) => { - - this.capturedImage = imageData; - this.capturedImageTitle = new Date().getTime() + '.jpeg'; - }, (err) => { - console.log(err); + convertBlobToBase64 = (blob: Blob) => new Promise((resolve, reject) => { + const reader = new FileReader; + reader.onerror = reject; + reader.onload = () => { + resolve(reader.result); + }; + reader.readAsDataURL(blob); }); - } - laodPicture() { + async laodPicture() { + const capturedImage = await Camera.getPhoto({ + resultType: CameraResultType.Uri, + source: CameraSource.Photos, + quality: 90, + width: 1080, + height: 720, + }); + + const response = await fetch(capturedImage.webPath!); + const blob = await response.blob(); + + this.photos.unshift({ + filepath: "soon...", + webviewPath: capturedImage.webPath + }); + + this.capturedImage = await this.convertBlobToBase64(blob); + this.capturedImageTitle = new Date().getTime() + '.jpeg'; + } + + /* laodPicture() { const input = this.fileLoaderService.createInput({ accept: ['image/apng', 'image/jpeg', 'image/png'] }) - + input.onchange = async () => { const file = this.fileLoaderService.getFirstFile(input) @@ -119,8 +149,7 @@ export class NewPublicationPage implements OnInit { this.capturedImage = imageData; this.capturedImageTitle = file.name }; - - } + } */ runValidation() { @@ -199,15 +228,16 @@ export class NewPublicationPage implements OnInit { try { console.log(this.publication); await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() + this.toastService._successMessage() - + this.goBack(); } catch (error) { this.toastService._badRequest() } finally { loader.remove() } - + } else { this.publication = { DateIndex: this.publication.DateIndex, @@ -252,7 +282,7 @@ export class NewPublicationPage implements OnInit { FileBase64: this.capturedImage, FileExtension: 'jpeg', } - + const loader = this.toastService.loading() try { @@ -270,34 +300,14 @@ export class NewPublicationPage implements OnInit { } } - getPicture() { - const options: CameraOptions = { - quality: 90, - sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, - destinationType: this.camera.DestinationType.DATA_URL, - encodingType: this.camera.EncodingType.JPEG, - mediaType: this.camera.MediaType.PICTURE, - targetWidth: 720, - targetHeight: 720, - } - - this.camera.getPicture(options).then((imageData) => { - // imageData is either a base64 encoded string or a file URI - // If it's base64 (DATA_URL): - let base64Image = 'data:image/jpeg;base64,' + imageData; - this.capturedImage = imageData; - this.capturedImageTitle = new Date().getTime() + '.jpeg'; - }, (err) => { - /* console.log(err); */ - }); - } - close(){ this.goBack(); } + clear(){ this.capturedImage = ''; } + setTitle(){ if(this.publicationType == '1') { this.publicationTitle = 'Nova Publicação Rápida'; @@ -312,14 +322,14 @@ export class NewPublicationPage implements OnInit { } async goBack(){ - + if(this.publicationType == '2'){ this.goBackToViewPublications.emit(); } else { this.goBackToViewPublications.emit(); //this.goBacktoPublicationDetails.emit(); } - + } }