9 Commits

Autor SHA1 Mensaje Fecha
  Ángel G. Romero Rosario c69eb35d5c some changes hace 2 años
  Ángel G. Romero Rosario ee3f98a2cb Changed app style and changed header button to diferent file hace 2 años
  Ángel G. Romero Rosario 714f860edf merge conflicts with Janthony's branch hace 2 años
  Ángel G. Romero Rosario 5290ac7d2e Changes to flag screen hace 2 años
  Ángel G. Romero Rosario afe407b9d6 Fix typo in moti alt hace 2 años
  Ángel G. Romero Rosario d9374ff107 Added text wraping to cards hace 2 años
  Ángel G. Romero Rosario d486e929f5 Change style file hace 2 años
  Ángel G. Romero Rosario 5d52d6362f Merge with master hace 2 años
  Jantony Velazquez Gauthier 206568b325 Switch Flag.tsx to use Flag.json hace 2 años
Se han modificado 38 ficheros con 270 adiciones y 787 borrados
  1. 2
    1
      .gitignore
  2. 0
    5
      .gitignore 2
  3. 0
    101
      android/.gitignore
  4. 0
    25
      android/.idea/jarRepositories.xml
  5. 0
    53
      android/app/build.gradle
  6. 1
    0
      android/app/capacitor.build.gradle
  7. 0
    21
      android/app/proguard-rules.pro
  8. 0
    42
      android/app/src/main/AndroidManifest.xml
  9. 3
    0
      android/capacitor.settings.gradle
  10. 0
    24
      android/gradle.properties
  11. 0
    89
      android/gradlew.bat
  12. 30
    12
      build/asset-manifest.json
  13. 1
    1
      build/index.html
  14. 1
    1
      build/service-worker.js
  15. 1
    1
      build/service-worker.js.map
  16. 6
    0
      ios/App/App/Info.plist
  17. 1
    0
      ios/App/Podfile
  18. 30
    0
      package-lock.json
  19. 2
    0
      package.json
  20. 1
    1
      src/App.tsx
  21. 39
    0
      src/pages/Flag.json
  22. 48
    273
      src/pages/Flag.tsx
  23. 20
    32
      src/pages/Home.tsx
  24. 5
    6
      src/pages/Info.tsx
  25. 38
    0
      src/pages/components/helpButton.tsx
  26. 14
    0
      src/pages/components/saveMoti.tsx
  27. BIN
      src/pages/generatedMsgs/moti1.jpeg
  28. BIN
      src/pages/images/frases_motivavionales/1 2.png
  29. BIN
      src/pages/images/frases_motivavionales/2 2.png
  30. BIN
      src/pages/images/frases_motivavionales/3 2.png
  31. BIN
      src/pages/images/frases_motivavionales/4 2.png
  32. BIN
      src/pages/images/frases_motivavionales/5 2.png
  33. BIN
      src/pages/images/frases_motivavionales/6 2.png
  34. BIN
      src/pages/images/frases_motivavionales/7 2.png
  35. BIN
      src/pages/images/frases_motivavionales/8 2.png
  36. BIN
      src/pages/images/frases_motivavionales/9 2.png
  37. 21
    3
      src/pages/styles/styles.css
  38. 6
    96
      src/theme/variables.css

+ 2
- 1
.gitignore Ver fichero

@@ -2,4 +2,5 @@ node_modules/
2 2
 public/
3 3
 ios/
4 4
 android/
5
-build/
5
+build/
6
+.vscode/

+ 0
- 5
.gitignore 2 Ver fichero

@@ -1,5 +0,0 @@
1
-node_modules/
2
-public/
3
-ios/
4
-android/
5
-build/

+ 0
- 101
android/.gitignore Ver fichero

@@ -1,101 +0,0 @@
1
-# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
2
-
3
-# Built application files
4
-*.apk
5
-*.aar
6
-*.ap_
7
-*.aab
8
-
9
-# Files for the ART/Dalvik VM
10
-*.dex
11
-
12
-# Java class files
13
-*.class
14
-
15
-# Generated files
16
-bin/
17
-gen/
18
-out/
19
-#  Uncomment the following line in case you need and you don't have the release build type files in your app
20
-# release/
21
-
22
-# Gradle files
23
-.gradle/
24
-build/
25
-
26
-# Local configuration file (sdk path, etc)
27
-local.properties
28
-
29
-# Proguard folder generated by Eclipse
30
-proguard/
31
-
32
-# Log Files
33
-*.log
34
-
35
-# Android Studio Navigation editor temp files
36
-.navigation/
37
-
38
-# Android Studio captures folder
39
-captures/
40
-
41
-# IntelliJ
42
-*.iml
43
-.idea/workspace.xml
44
-.idea/tasks.xml
45
-.idea/gradle.xml
46
-.idea/assetWizardSettings.xml
47
-.idea/dictionaries
48
-.idea/libraries
49
-# Android Studio 3 in .gitignore file.
50
-.idea/caches
51
-.idea/modules.xml
52
-# Comment next line if keeping position of elements in Navigation Editor is relevant for you
53
-.idea/navEditor.xml
54
-
55
-# Keystore files
56
-# Uncomment the following lines if you do not want to check your keystore files in.
57
-#*.jks
58
-#*.keystore
59
-
60
-# External native build folder generated in Android Studio 2.2 and later
61
-.externalNativeBuild
62
-.cxx/
63
-
64
-# Google Services (e.g. APIs or Firebase)
65
-# google-services.json
66
-
67
-# Freeline
68
-freeline.py
69
-freeline/
70
-freeline_project_description.json
71
-
72
-# fastlane
73
-fastlane/report.xml
74
-fastlane/Preview.html
75
-fastlane/screenshots
76
-fastlane/test_output
77
-fastlane/readme.md
78
-
79
-# Version control
80
-vcs.xml
81
-
82
-# lint
83
-lint/intermediates/
84
-lint/generated/
85
-lint/outputs/
86
-lint/tmp/
87
-# lint/reports/
88
-
89
-# Android Profiling
90
-*.hprof
91
-
92
-# Cordova plugins for Capacitor
93
-capacitor-cordova-android-plugins
94
-
95
-# Copied web assets
96
-app/src/main/assets/public
97
-
98
-# Generated Config files
99
-app/src/main/assets/capacitor.config.json
100
-app/src/main/assets/capacitor.plugins.json
101
-app/src/main/res/xml/config.xml

+ 0
- 25
android/.idea/jarRepositories.xml Ver fichero

@@ -1,25 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="RemoteRepositoriesConfiguration">
4
-    <remote-repository>
5
-      <option name="id" value="central" />
6
-      <option name="name" value="Maven Central repository" />
7
-      <option name="url" value="https://repo1.maven.org/maven2" />
8
-    </remote-repository>
9
-    <remote-repository>
10
-      <option name="id" value="jboss.community" />
11
-      <option name="name" value="JBoss Community repository" />
12
-      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
13
-    </remote-repository>
14
-    <remote-repository>
15
-      <option name="id" value="MavenRepo" />
16
-      <option name="name" value="MavenRepo" />
17
-      <option name="url" value="https://repo.maven.apache.org/maven2/" />
18
-    </remote-repository>
19
-    <remote-repository>
20
-      <option name="id" value="Google" />
21
-      <option name="name" value="Google" />
22
-      <option name="url" value="https://dl.google.com/dl/android/maven2/" />
23
-    </remote-repository>
24
-  </component>
25
-</project>

+ 0
- 53
android/app/build.gradle Ver fichero

@@ -1,53 +0,0 @@
1
-apply plugin: 'com.android.application'
2
-
3
-android {
4
-    compileSdkVersion rootProject.ext.compileSdkVersion
5
-    defaultConfig {
6
-        applicationId "io.ionic.starter"
7
-        minSdkVersion rootProject.ext.minSdkVersion
8
-        targetSdkVersion rootProject.ext.targetSdkVersion
9
-        versionCode 1
10
-        versionName "1.0"
11
-        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12
-        aaptOptions {
13
-             // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
14
-             // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
15
-            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
16
-        }
17
-    }
18
-    buildTypes {
19
-        release {
20
-            minifyEnabled false
21
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22
-        }
23
-    }
24
-}
25
-
26
-repositories {
27
-    flatDir{
28
-        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
29
-    }
30
-}
31
-
32
-dependencies {
33
-    implementation fileTree(include: ['*.jar'], dir: 'libs')
34
-    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
35
-    implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
36
-    implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
37
-    implementation project(':capacitor-android')
38
-    testImplementation "junit:junit:$junitVersion"
39
-    androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
40
-    androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
41
-    implementation project(':capacitor-cordova-android-plugins')
42
-}
43
-
44
-apply from: 'capacitor.build.gradle'
45
-
46
-try {
47
-    def servicesJSON = file('google-services.json')
48
-    if (servicesJSON.text) {
49
-        apply plugin: 'com.google.gms.google-services'
50
-    }
51
-} catch(Exception e) {
52
-    logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
53
-}

+ 1
- 0
android/app/capacitor.build.gradle Ver fichero

@@ -10,6 +10,7 @@ android {
10 10
 apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11 11
 dependencies {
12 12
     implementation project(':capacitor-app')
13
+    implementation project(':capacitor-camera')
13 14
     implementation project(':capacitor-haptics')
14 15
     implementation project(':capacitor-keyboard')
15 16
     implementation project(':capacitor-status-bar')

+ 0
- 21
android/app/proguard-rules.pro Ver fichero

@@ -1,21 +0,0 @@
1
-# Add project specific ProGuard rules here.
2
-# You can control the set of applied configuration files using the
3
-# proguardFiles setting in build.gradle.
4
-#
5
-# For more details, see
6
-#   http://developer.android.com/guide/developing/tools/proguard.html
7
-
8
-# If your project uses WebView with JS, uncomment the following
9
-# and specify the fully qualified class name to the JavaScript interface
10
-# class:
11
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
-#   public *;
13
-#}
14
-
15
-# Uncomment this to preserve the line number information for
16
-# debugging stack traces.
17
-#-keepattributes SourceFile,LineNumberTable
18
-
19
-# If you keep the line number information, uncomment this to
20
-# hide the original source file name.
21
-#-renamesourcefileattribute SourceFile

+ 0
- 42
android/app/src/main/AndroidManifest.xml Ver fichero

@@ -1,42 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
-    package="io.ionic.starter">
4
-
5
-    <application
6
-        android:allowBackup="true"
7
-        android:icon="@mipmap/ic_launcher"
8
-        android:label="@string/app_name"
9
-        android:roundIcon="@mipmap/ic_launcher_round"
10
-        android:supportsRtl="true"
11
-        android:theme="@style/AppTheme">
12
-
13
-        <activity
14
-            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
15
-            android:name="io.ionic.starter.MainActivity"
16
-            android:label="@string/title_activity_main"
17
-            android:theme="@style/AppTheme.NoActionBarLaunch"
18
-            android:launchMode="singleTask"
19
-            android:exported="true">
20
-
21
-            <intent-filter>
22
-                <action android:name="android.intent.action.MAIN" />
23
-                <category android:name="android.intent.category.LAUNCHER" />
24
-            </intent-filter>
25
-
26
-        </activity>
27
-
28
-        <provider
29
-            android:name="androidx.core.content.FileProvider"
30
-            android:authorities="${applicationId}.fileprovider"
31
-            android:exported="false"
32
-            android:grantUriPermissions="true">
33
-            <meta-data
34
-                android:name="android.support.FILE_PROVIDER_PATHS"
35
-                android:resource="@xml/file_paths"></meta-data>
36
-        </provider>
37
-    </application>
38
-
39
-    <!-- Permissions -->
40
-
41
-    <uses-permission android:name="android.permission.INTERNET" />
42
-</manifest>

+ 3
- 0
android/capacitor.settings.gradle Ver fichero

@@ -5,6 +5,9 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/
5 5
 include ':capacitor-app'
6 6
 project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
7 7
 
8
+include ':capacitor-camera'
9
+project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
10
+
8 11
 include ':capacitor-haptics'
9 12
 project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
10 13
 

+ 0
- 24
android/gradle.properties Ver fichero

@@ -1,24 +0,0 @@
1
-# Project-wide Gradle settings.
2
-
3
-# IDE (e.g. Android Studio) users:
4
-# Gradle settings configured through the IDE *will override*
5
-# any settings specified in this file.
6
-
7
-# For more details on how to configure your build environment visit
8
-# http://www.gradle.org/docs/current/userguide/build_environment.html
9
-
10
-# Specifies the JVM arguments used for the daemon process.
11
-# The setting is particularly useful for tweaking memory settings.
12
-org.gradle.jvmargs=-Xmx1536m
13
-
14
-# When configured, Gradle will run in incubating parallel mode.
15
-# This option should only be used with decoupled projects. More details, visit
16
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
-# org.gradle.parallel=true
18
-
19
-# AndroidX package structure to make it clearer which packages are bundled with the
20
-# Android operating system, and which are packaged with your app's APK
21
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
22
-android.useAndroidX=true
23
-# Automatically convert third-party libraries to use AndroidX
24
-android.enableJetifier=true

+ 0
- 89
android/gradlew.bat Ver fichero

@@ -1,89 +0,0 @@
1
-@rem
2
-@rem Copyright 2015 the original author or authors.
3
-@rem
4
-@rem Licensed under the Apache License, Version 2.0 (the "License");
5
-@rem you may not use this file except in compliance with the License.
6
-@rem You may obtain a copy of the License at
7
-@rem
8
-@rem      https://www.apache.org/licenses/LICENSE-2.0
9
-@rem
10
-@rem Unless required by applicable law or agreed to in writing, software
11
-@rem distributed under the License is distributed on an "AS IS" BASIS,
12
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
-@rem See the License for the specific language governing permissions and
14
-@rem limitations under the License.
15
-@rem
16
-
17
-@if "%DEBUG%" == "" @echo off
18
-@rem ##########################################################################
19
-@rem
20
-@rem  Gradle startup script for Windows
21
-@rem
22
-@rem ##########################################################################
23
-
24
-@rem Set local scope for the variables with windows NT shell
25
-if "%OS%"=="Windows_NT" setlocal
26
-
27
-set DIRNAME=%~dp0
28
-if "%DIRNAME%" == "" set DIRNAME=.
29
-set APP_BASE_NAME=%~n0
30
-set APP_HOME=%DIRNAME%
31
-
32
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
-
35
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
-
38
-@rem Find java.exe
39
-if defined JAVA_HOME goto findJavaFromJavaHome
40
-
41
-set JAVA_EXE=java.exe
42
-%JAVA_EXE% -version >NUL 2>&1
43
-if "%ERRORLEVEL%" == "0" goto execute
44
-
45
-echo.
46
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
-echo.
48
-echo Please set the JAVA_HOME variable in your environment to match the
49
-echo location of your Java installation.
50
-
51
-goto fail
52
-
53
-:findJavaFromJavaHome
54
-set JAVA_HOME=%JAVA_HOME:"=%
55
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
-
57
-if exist "%JAVA_EXE%" goto execute
58
-
59
-echo.
60
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
-echo.
62
-echo Please set the JAVA_HOME variable in your environment to match the
63
-echo location of your Java installation.
64
-
65
-goto fail
66
-
67
-:execute
68
-@rem Setup the command line
69
-
70
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
-
72
-
73
-@rem Execute Gradle
74
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
-
76
-:end
77
-@rem End local scope for the variables with windows NT shell
78
-if "%ERRORLEVEL%"=="0" goto mainEnd
79
-
80
-:fail
81
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
-rem the _cmd.exe /c_ return code!
83
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
-exit /b 1
85
-
86
-:mainEnd
87
-if "%OS%"=="Windows_NT" endlocal
88
-
89
-:omega

+ 30
- 12
build/asset-manifest.json Ver fichero

@@ -1,32 +1,50 @@
1 1
 {
2 2
   "files": {
3
-    "main.css": "/static/css/main.30c9193e.css",
4
-    "main.js": "/static/js/main.a0b94822.js",
5
-    "static/js/738.aba3ba7d.chunk.js": "/static/js/738.aba3ba7d.chunk.js",
3
+    "main.css": "/static/css/main.57f71c13.css",
4
+    "main.js": "/static/js/main.5c91e17d.js",
5
+    "static/js/738.23d458d2.chunk.js": "/static/js/738.23d458d2.chunk.js",
6 6
     "static/js/372.1940d375.chunk.js": "/static/js/372.1940d375.chunk.js",
7 7
     "static/js/856.c55f21fe.chunk.js": "/static/js/856.c55f21fe.chunk.js",
8
-    "static/js/851.7ada53df.chunk.js": "/static/js/851.7ada53df.chunk.js",
8
+    "static/js/851.b02dec88.chunk.js": "/static/js/851.b02dec88.chunk.js",
9 9
     "static/js/22.7ec1dda8.chunk.js": "/static/js/22.7ec1dda8.chunk.js",
10 10
     "static/js/272.fc222ae9.chunk.js": "/static/js/272.fc222ae9.chunk.js",
11 11
     "static/js/841.bef26980.chunk.js": "/static/js/841.bef26980.chunk.js",
12
-    "static/js/186.09c3ea27.chunk.js": "/static/js/186.09c3ea27.chunk.js",
12
+    "static/js/186.a076517b.chunk.js": "/static/js/186.a076517b.chunk.js",
13 13
     "static/js/377.31684c30.chunk.js": "/static/js/377.31684c30.chunk.js",
14
+    "static/media/9 2.png": "/static/media/9 2.3703b887cbdd492a6f66.png",
15
+    "static/media/9.png": "/static/media/9.3703b887cbdd492a6f66.png",
16
+    "static/media/8 2.png": "/static/media/8 2.3f6cd91d6ef70858b113.png",
17
+    "static/media/8.png": "/static/media/8.3f6cd91d6ef70858b113.png",
18
+    "static/media/7 2.png": "/static/media/7 2.e0245648655da2db113d.png",
19
+    "static/media/7.png": "/static/media/7.e0245648655da2db113d.png",
20
+    "static/media/5 2.png": "/static/media/5 2.0a70de4a6953fe2358b6.png",
21
+    "static/media/5.png": "/static/media/5.0a70de4a6953fe2358b6.png",
22
+    "static/media/6 2.png": "/static/media/6 2.7577bce6bb05b2b844a5.png",
23
+    "static/media/6.png": "/static/media/6.7577bce6bb05b2b844a5.png",
24
+    "static/media/3 2.png": "/static/media/3 2.f7991a06ad032687f02b.png",
25
+    "static/media/3.png": "/static/media/3.f7991a06ad032687f02b.png",
26
+    "static/media/4 2.png": "/static/media/4 2.17c13979ca7e0a0907dc.png",
27
+    "static/media/4.png": "/static/media/4.17c13979ca7e0a0907dc.png",
28
+    "static/media/2 2.png": "/static/media/2 2.fbbc9f16a9decddcee56.png",
29
+    "static/media/2.png": "/static/media/2.fbbc9f16a9decddcee56.png",
30
+    "static/media/1 2.png": "/static/media/1 2.a51ecd8ad682ea72b959.png",
31
+    "static/media/1.png": "/static/media/1.a51ecd8ad682ea72b959.png",
14 32
     "service-worker.js": "/service-worker.js",
15 33
     "index.html": "/index.html",
16
-    "main.30c9193e.css.map": "/static/css/main.30c9193e.css.map",
17
-    "main.a0b94822.js.map": "/static/js/main.a0b94822.js.map",
18
-    "738.aba3ba7d.chunk.js.map": "/static/js/738.aba3ba7d.chunk.js.map",
34
+    "main.57f71c13.css.map": "/static/css/main.57f71c13.css.map",
35
+    "main.5c91e17d.js.map": "/static/js/main.5c91e17d.js.map",
36
+    "738.23d458d2.chunk.js.map": "/static/js/738.23d458d2.chunk.js.map",
19 37
     "372.1940d375.chunk.js.map": "/static/js/372.1940d375.chunk.js.map",
20 38
     "856.c55f21fe.chunk.js.map": "/static/js/856.c55f21fe.chunk.js.map",
21
-    "851.7ada53df.chunk.js.map": "/static/js/851.7ada53df.chunk.js.map",
39
+    "851.b02dec88.chunk.js.map": "/static/js/851.b02dec88.chunk.js.map",
22 40
     "22.7ec1dda8.chunk.js.map": "/static/js/22.7ec1dda8.chunk.js.map",
23 41
     "272.fc222ae9.chunk.js.map": "/static/js/272.fc222ae9.chunk.js.map",
24 42
     "841.bef26980.chunk.js.map": "/static/js/841.bef26980.chunk.js.map",
25
-    "186.09c3ea27.chunk.js.map": "/static/js/186.09c3ea27.chunk.js.map",
43
+    "186.a076517b.chunk.js.map": "/static/js/186.a076517b.chunk.js.map",
26 44
     "377.31684c30.chunk.js.map": "/static/js/377.31684c30.chunk.js.map"
27 45
   },
28 46
   "entrypoints": [
29
-    "static/css/main.30c9193e.css",
30
-    "static/js/main.a0b94822.js"
47
+    "static/css/main.57f71c13.css",
48
+    "static/js/main.5c91e17d.js"
31 49
   ]
32 50
 }

+ 1
- 1
build/index.html Ver fichero

@@ -1 +1 @@
1
-<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Ionic App</title><base href="/"/><meta name="color-scheme" content="light dark"/><meta name="viewport" content="viewport-fit=cover,width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/><meta name="format-detection" content="telephone=no"/><meta name="msapplication-tap-highlight" content="no"/><link rel="manifest" href="/manifest.json"/><link rel="shortcut icon" type="image/png" href="/assets/icon/favicon.png"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ionic App"/><meta name="apple-mobile-web-app-status-bar-style" content="black"/><script defer="defer" src="/static/js/main.a0b94822.js"></script><link href="/static/css/main.30c9193e.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Ionic App</title><base href="/"/><meta name="color-scheme" content="light dark"/><meta name="viewport" content="viewport-fit=cover,width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/><meta name="format-detection" content="telephone=no"/><meta name="msapplication-tap-highlight" content="no"/><link rel="manifest" href="/manifest.json"/><link rel="shortcut icon" type="image/png" href="/assets/icon/favicon.png"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ionic App"/><meta name="apple-mobile-web-app-status-bar-style" content="black"/><script defer="defer" src="/static/js/main.5c91e17d.js"></script><link href="/static/css/main.57f71c13.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

+ 1
- 1
build/service-worker.js
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1
- 1
build/service-worker.js.map
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 6
- 0
ios/App/App/Info.plist Ver fichero

@@ -45,5 +45,11 @@
45 45
 	</array>
46 46
 	<key>UIViewControllerBasedStatusBarAppearance</key>
47 47
 	<true/>
48
+	<key>NSCameraUsageDescription</key>
49
+	<string>To capture images</string>
50
+	<key>NSPhotoLibraryAddUsageDescription</key>
51
+	<string>To add images</string>
52
+	<key>NSPhotoLibraryUsageDescription</key>
53
+	<string>To store images</string>
48 54
 </dict>
49 55
 </plist>

+ 1
- 0
ios/App/Podfile Ver fichero

@@ -12,6 +12,7 @@ def capacitor_pods
12 12
   pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
13 13
   pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
14 14
   pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
15
+  pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
15 16
   pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
16 17
   pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
17 18
   pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'

+ 30
- 0
package-lock.json Ver fichero

@@ -10,7 +10,9 @@
10 10
       "dependencies": {
11 11
         "@capacitor/android": "4.5.0",
12 12
         "@capacitor/app": "4.1.1",
13
+        "@capacitor/camera": "^4.1.4",
13 14
         "@capacitor/core": "4.5.0",
15
+        "@capacitor/filesystem": "^4.1.4",
14 16
         "@capacitor/haptics": "4.1.0",
15 17
         "@capacitor/ios": "4.5.0",
16 18
         "@capacitor/keyboard": "4.1.0",
@@ -2098,6 +2100,14 @@
2098 2100
         "@capacitor/core": "^4.0.0"
2099 2101
       }
2100 2102
     },
2103
+    "node_modules/@capacitor/camera": {
2104
+      "version": "4.1.4",
2105
+      "resolved": "https://registry.npmjs.org/@capacitor/camera/-/camera-4.1.4.tgz",
2106
+      "integrity": "sha512-7f4n7PlnstYsdGyxc0Kc4hIyS6csFLOjXvffm7pJsuy9pSo+kfdOPdYgGg360QwbUAmA+Yv+J1ZW1eFIwgvWrQ==",
2107
+      "peerDependencies": {
2108
+        "@capacitor/core": "^4.0.0"
2109
+      }
2110
+    },
2101 2111
     "node_modules/@capacitor/cli": {
2102 2112
       "version": "4.5.0",
2103 2113
       "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-4.5.0.tgz",
@@ -2156,6 +2166,14 @@
2156 2166
         "tslib": "^2.1.0"
2157 2167
       }
2158 2168
     },
2169
+    "node_modules/@capacitor/filesystem": {
2170
+      "version": "4.1.4",
2171
+      "resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-4.1.4.tgz",
2172
+      "integrity": "sha512-ivko1RNK4hq63xhMacq8D6D97N5/SAafTsrmY/pghYrG6Cl2SEY0+IgRu7V9/VWeN3FSplyUPucjUTAFQxXN5g==",
2173
+      "peerDependencies": {
2174
+        "@capacitor/core": "^4.0.0"
2175
+      }
2176
+    },
2159 2177
     "node_modules/@capacitor/haptics": {
2160 2178
       "version": "4.1.0",
2161 2179
       "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-4.1.0.tgz",
@@ -18922,6 +18940,12 @@
18922 18940
       "integrity": "sha512-SJcJA1rhFQyeH6eLfUEbdKkHzAwzahJNVPNXmU88fdmXpMgM2dJGzZj1vrm6e21aQq+Z4aBVLJ2RCdj92zD7wg==",
18923 18941
       "requires": {}
18924 18942
     },
18943
+    "@capacitor/camera": {
18944
+      "version": "4.1.4",
18945
+      "resolved": "https://registry.npmjs.org/@capacitor/camera/-/camera-4.1.4.tgz",
18946
+      "integrity": "sha512-7f4n7PlnstYsdGyxc0Kc4hIyS6csFLOjXvffm7pJsuy9pSo+kfdOPdYgGg360QwbUAmA+Yv+J1ZW1eFIwgvWrQ==",
18947
+      "requires": {}
18948
+    },
18925 18949
     "@capacitor/cli": {
18926 18950
       "version": "4.5.0",
18927 18951
       "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-4.5.0.tgz",
@@ -18969,6 +18993,12 @@
18969 18993
         "tslib": "^2.1.0"
18970 18994
       }
18971 18995
     },
18996
+    "@capacitor/filesystem": {
18997
+      "version": "4.1.4",
18998
+      "resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-4.1.4.tgz",
18999
+      "integrity": "sha512-ivko1RNK4hq63xhMacq8D6D97N5/SAafTsrmY/pghYrG6Cl2SEY0+IgRu7V9/VWeN3FSplyUPucjUTAFQxXN5g==",
19000
+      "requires": {}
19001
+    },
18972 19002
     "@capacitor/haptics": {
18973 19003
       "version": "4.1.0",
18974 19004
       "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-4.1.0.tgz",

+ 2
- 0
package.json Ver fichero

@@ -5,7 +5,9 @@
5 5
   "dependencies": {
6 6
     "@capacitor/android": "4.5.0",
7 7
     "@capacitor/app": "4.1.1",
8
+    "@capacitor/camera": "^4.1.4",
8 9
     "@capacitor/core": "4.5.0",
10
+    "@capacitor/filesystem": "^4.1.4",
9 11
     "@capacitor/haptics": "4.1.0",
10 12
     "@capacitor/ios": "4.5.0",
11 13
     "@capacitor/keyboard": "4.1.0",

+ 1
- 1
src/App.tsx Ver fichero

@@ -55,7 +55,7 @@ const App: React.FC = () => (
55 55
           </Route>
56 56
         </IonRouterOutlet>
57 57
         
58
-        <IonTabBar color="light" slot="bottom">
58
+        <IonTabBar slot="bottom">
59 59
           <IonTabButton tab="home" href="/home">
60 60
             <IonIcon color="primary" icon={home} />
61 61
             <IonLabel color="primary">Home</IonLabel>

+ 39
- 0
src/pages/Flag.json Ver fichero

@@ -0,0 +1,39 @@
1
+ [{"title" : "Amenazas",
2
+  "content" : ["Asustarla con amenazas de hacerle mal.",
3
+              "Amenazarla con dejarla, con el suicidio o con denunciarla falsamente a la autoridad.",
4
+              "Obligarla a retirar los cargos presentados contra él.",
5
+               "Obligarla a cometer actos ilegales."]},
6
+ {"title" : "Intimidación",
7
+  "content" : ["Provocándole miedo a través de sus miradas, acciones y gestos.",
8
+               "Destrozar objetos.",
9
+               "Intimidarla rompiéndole sus cosas, maltratando a los animales domésticos, mostrándole armas."]},
10
+  {"title" : "Abuso Emocional",
11
+   "content" : ["Hacerla sentir inferior.",
12
+                "Hacerla sentir mal.",
13
+                "Insultarle con nombres ofensivos.",
14
+                "Hacerla pensar que está loca.",
15
+                "Confundirla a propósito.",
16
+                "Humillarla.",
17
+                "Hacerla sentir culpable."]},
18
+  {"title": "Aislamiento",
19
+   "content" : ["Controlar lo que hace, a quién puede ver, con quién puede hablar, lo que puede leer y dónde va.",
20
+                "Limitarle su vida social utilizando los celos para justificar sus actos"]},
21
+  {"title" : "Desvalorizar, Negar, Culpar",
22
+   "content" : ["No tomar seriamente preocupación que ella tiene sobre el abuso.",
23
+                "Negar que uso hacerla sentir responsable de la conducta abusiva.",
24
+                "Decirle que ella lo provocó."]},
25
+  {"title" : "Manipulación de los Niño(a)s",
26
+   "content" : ["Hacerla sentir culpable por el comportamiento de los niño(a) como intermediarios y mantener así el control.",
27
+                "Usar las visitas con los niño(a)s para molestarla o amenazarla.",
28
+                "Amenazarla con quitarle los niño(a)s."]},
29
+  {"title" : "Abuso Económico",
30
+   "content" : ["No dejarla trabajar o impedirle que mantenga su empleo.",
31
+                "Obligarala a que le pida dinero.",
32
+                "Darle una mensualidad.",
33
+                "Quitarle el dinero.",
34
+                "No informarle acerca de los ingresos familiares o no permitirle disponer de los ingresos."]},
35
+  {"title" : "Privilegio Masculino",
36
+   "content": ["Tratarla como una sirvienta.",
37
+               "No dejarla tomar decisiones importantes.",
38
+               "Actuar como el rey de la casa.",
39
+               "Definir las partes del hombre y de la mujer."]}]

+ 48
- 273
src/pages/Flag.tsx Ver fichero

@@ -1,286 +1,61 @@
1
-// Created by Cynthia 
2
-// Edited by Angel Romero 
1
+import {
2
+  IonAccordion,
3
+  IonAccordionGroup,
4
+  IonCard,
5
+  IonContent,
6
+  IonItem,
7
+  IonLabel,
8
+  IonPage,
9
+} from '@ionic/react';
10
+import { HelpBtn } from './components/helpButton';
3 11
 
4
-import React, { useRef } from 'react';
5
-import { IonButton, IonButtons, IonCard, IonCol, IonContent, IonGrid, IonHeader, IonModal, IonPage, IonRow, IonTitle, IonToolbar } from '@ionic/react';
6 12
 import './styles/styles.css';
7 13
 
14
+// generate single accordion item given a title and points of info
15
+const AccordionItem = (title: string, content: string[]) => {
16
+  return (
17
+    <IonAccordion value={title}>
18
+      <IonItem slot="header" color="light">
19
+        <IonLabel class="ion-text-center">{title}</IonLabel>
20
+      </IonItem>
21
+      <div slot="content">
22
+        {
23
+          // generate each point in content
24
+          // We need to add some color to the cards, preferably white
25
+          content.map((text: string) =>{
26
+            return (
27
+              <IonCard>
28
+                <IonItem color="light">
29
+                  <IonLabel text-wrap class="ion-text-center">{text}</IonLabel>
30
+                </IonItem>
31
+              </IonCard>
32
+            );
33
+          })
34
+        }
35
+      </div>
36
+    </IonAccordion>)
37
+}
8 38
 
9
-// Create all the modal elements for each card element on the flag screen
10 39
 const Flag: React.FC = () => {
11
-  const amenazas = useRef<HTMLIonModalElement>(null);
12
-  const intimidacion = useRef<HTMLIonModalElement>(null);
13
-  const abusoEmo = useRef<HTMLIonModalElement>(null);
14
-  const aislamiento = useRef<HTMLIonModalElement>(null);
15
-  const desvalorizar = useRef<HTMLIonModalElement>(null);
16
-  const manipulacion = useRef<HTMLIonModalElement>(null);
17
-  const abusoEco = useRef<HTMLIonModalElement>(null);
18
-  const privMasc = useRef<HTMLIonModalElement>(null);
19
-
40
+  // Load Flag.json which has format of Object[],
41
+  // where each object has a title and content field.
42
+  let content = require("./Flag.json")
20 43
   return (
21 44
     <IonPage>
22
-      
23
-      {/* With the condense property, the app header will stay on screen after srcolling down the page */}
24
-      <IonHeader>
25
-        <IonToolbar class="app-toolbar">
26
-          <IonTitle class="ion-text-center screen-titles">TPC ❤️</IonTitle>
27
-        </IonToolbar>
28
-      </IonHeader>
29
-
30
-      <IonContent fullscreen>
31
-        <IonTitle class="ion-text-center screen-h2" color="light">Pendiente a...</IonTitle>
45
+      {/* This is the title with the button to ask for help */}
46
+      <HelpBtn />      
32 47
 
33
-        {/* Here goes the body containing the cards */}
34
-        <IonGrid>
35
-          <IonRow>
36
-            {/* Amenazas card */}
37
-            <IonCol>
38
-              <IonButton id="open-amenazas" color="light" expand="block">
39
-                Amenazas
40
-              </IonButton>
41
-              <IonModal ref={amenazas} trigger="open-amenazas">
42
-                <IonHeader>
43
-                  <IonToolbar>
44
-                    <IonTitle>Amenazas</IonTitle>
45
-                    <IonButtons slot="end">
46
-                      <IonButton color="light" onClick={() => amenazas.current?.dismiss()}>Cerrar</IonButton>
47
-                    </IonButtons>
48
-                  </IonToolbar>
49
-                </IonHeader>
50
-                <IonContent className="ion-padding">
51
-                  <IonCard color="light">
52
-                    <p>Asustarla con amenazas de hacerle mal.</p>
53
-                  </IonCard>
54
-                  <IonCard color="light">
55
-                    <p>Amenazarla con dejarla, con el suicidio o con denunciarla falsamente a la autoridad.</p>
56
-                  </IonCard>
57
-                  <IonCard color="light">
58
-                    <p>Obligarla a retirar los cargos presentados contra él.</p>
59
-                  </IonCard>
60
-                  <IonCard color="light">
61
-                    <p>Obligarla a cometer actos ilegales.</p>
62
-                  </IonCard>
63
-                </IonContent>
64
-              </IonModal>
65
-            </IonCol>
66
-            {/* Intimidacion card */}
67
-            <IonCol>
68
-              <IonButton id="open-intimidacion" color="light" expand="block" >
69
-                Intimidación
70
-              </IonButton>
71
-              <IonModal ref={intimidacion} trigger="open-intimidacion">
72
-                <IonHeader>
73
-                  <IonToolbar>
74
-                    <IonTitle>Intimidación</IonTitle>
75
-                    <IonButtons slot="end">
76
-                      <IonButton color="light" onClick={() => intimidacion.current?.dismiss()}>Cerrar</IonButton>
77
-                    </IonButtons>
78
-                  </IonToolbar>
79
-                </IonHeader>
80
-                <IonContent className="ion-padding">
81
-                  <IonCard color="light">
82
-                    <p>Provocándole miedo a través de sus miradas, acciones y gestos.</p>
83
-                  </IonCard>
84
-                  <IonCard color="light">
85
-                    <p>Destrozar objetos.</p>
86
-                  </IonCard>
87
-                  <IonCard color="light">
88
-                    <p>Intimidarla rompiéndole sus cosas, maltratando a los animales domésticos, mostrándole armas.</p>
89
-                  </IonCard>
90
-                </IonContent>
91
-              </IonModal>
92
-            </IonCol>
93
-          </IonRow>
94
-          <IonRow>
95
-            {/* Abuso emocional card */}
96
-            <IonCol>
97
-              <IonButton id="open-abuso-emocional" color="light" expand="block">
98
-                Abuso Emocional
99
-              </IonButton>
100
-              <IonModal ref={abusoEmo} trigger="open-abuso-emocional">
101
-                <IonHeader>
102
-                  <IonToolbar>
103
-                    <IonTitle>Abuso Emocional</IonTitle>
104
-                    <IonButtons slot="end">
105
-                      <IonButton color="light" onClick={() => abusoEmo.current?.dismiss()}>Cerrar</IonButton>
106
-                    </IonButtons>
107
-                  </IonToolbar>
108
-                </IonHeader>
109
-                <IonContent className="ion-padding">
110
-                  <IonCard color="light">
111
-                    <p>Hacerla sentir inferior.</p>
112
-                  </IonCard>
113
-                  <IonCard color="light">
114
-                    <p>Hacerla sentir mal.</p>
115
-                  </IonCard>
116
-                  <IonCard color="light">
117
-                    <p>Insultarle con nombres ofensivos.</p>
118
-                  </IonCard>
119
-                  <IonCard color="light">
120
-                    <p>Hacerla pensar que está loca.</p>
121
-                  </IonCard>
122
-                  <IonCard color="light">
123
-                    <p>Confundirla a propósito.</p>
124
-                  </IonCard>
125
-                  <IonCard color="light">
126
-                    <p>Humillarla.</p>
127
-                  </IonCard>
128
-                  <IonCard color="light">
129
-                    <p>Hacerla sentir culpable.</p>
130
-                  </IonCard>
131
-                </IonContent>
132
-              </IonModal>
133
-            </IonCol>
134
-            {/* Aislamiento card */}
135
-            <IonCol>
136
-              <IonButton id="open-aislamiento" color="light" expand="block">
137
-                Aislamiento
138
-              </IonButton>
139
-              <IonModal ref={aislamiento} trigger="open-aislamiento">
140
-                <IonHeader>
141
-                  <IonToolbar>
142
-                    <IonTitle>Aislamiento</IonTitle>
143
-                    <IonButtons slot="end">
144
-                      <IonButton color="light" onClick={() => aislamiento.current?.dismiss()}>Cerrar</IonButton>
145
-                    </IonButtons>
146
-                  </IonToolbar>
147
-                </IonHeader>
148
-                <IonContent className="ion-padding">
149
-                  <IonCard color="light">
150
-                    <p>Controlar lo que hace, a quién puede ver, con quién puede hablar, lo que puede leer y dónde va.</p>
151
-                  </IonCard>
152
-                  <IonCard color="light">
153
-                    <p>Limitarle su vida social utilizando los celos para justificar sus actos</p>
154
-                  </IonCard>
155
-                </IonContent>
156
-              </IonModal>
157
-            </IonCol>
158
-          </IonRow>
159
-          <IonRow>
160
-            {/* Desvalorizar card */}
161
-            <IonCol>
162
-              <IonButton id="open-des-neg-cul" color="light" expand="block">
163
-                Desvalorizar, Negar, Culpar
164
-              </IonButton>
165
-              <IonModal ref={desvalorizar} trigger="open-des-neg-cul">
166
-                <IonHeader>
167
-                  <IonToolbar>
168
-                    <IonTitle>Desvalorizar, Negar, Culpar</IonTitle>
169
-                    <IonButtons slot="end">
170
-                      <IonButton color="light" onClick={() => desvalorizar.current?.dismiss()}>Cerrar</IonButton>
171
-                    </IonButtons>
172
-                  </IonToolbar>
173
-                </IonHeader>
174
-                <IonContent className="ion-padding">
175
-                  <IonCard color="light">
176
-                    <p>No tomar seriamente preocupación que ella tiene sobre el abuso.</p>
177
-                  </IonCard>
178
-                  <IonCard color="light">
179
-                    <p>Negar que uso hacerla sentir responsable de la conducta abusiva.</p>
180
-                  </IonCard>
181
-                  <IonCard color="light">
182
-                    <p>Decirle que ella lo provocó.</p>
183
-                  </IonCard>
184
-                </IonContent>
185
-              </IonModal>
186
-            </IonCol>
187
-            {/* Manipulacion card */}
188
-            <IonCol>
189
-              <IonButton id="open-manipulacion" color="light" expand="block">
190
-                Manipulación de los Niño(a)s
191
-              </IonButton>
192
-              <IonModal ref={manipulacion} trigger="open-manipulacion">
193
-                <IonHeader>
194
-                  <IonToolbar>
195
-                    <IonTitle>Manipulación de los Niño(a)s</IonTitle>
196
-                    <IonButtons slot="end">
197
-                      <IonButton color="light" onClick={() => manipulacion.current?.dismiss()}>Cerrar</IonButton>
198
-                    </IonButtons>
199
-                  </IonToolbar>
200
-                </IonHeader>
201
-                <IonContent className="ion-padding">
202
-                  <IonCard color="light">
203
-                    <p>Hacerla sentir culpable por el comportamiento de los niño(a) como intermediarios y mantener así el control.</p>
204
-                  </IonCard>
205
-                  <IonCard color="light">
206
-                    <p>Usar las visitas con los niño(a)s para molestarla o amenazarla.</p>
207
-                  </IonCard>
208
-                  <IonCard color="light">
209
-                    <p>Amenazarla con quitarle los niño(a)s.</p>
210
-                  </IonCard>
211
-                </IonContent>
212
-              </IonModal>
213
-            </IonCol>
214
-          </IonRow>
215
-          <IonRow>
216
-            {/* Abuso economico card */}
217
-            <IonCol>
218
-              <IonButton id="open-abuso-economico" color="light" expand="block">
219
-                Abuso Económico
220
-              </IonButton>
221
-              <IonModal ref={abusoEco} trigger="open-abuso-economico">
222
-                <IonHeader>
223
-                  <IonToolbar>
224
-                    <IonTitle>Abuso Económico</IonTitle>
225
-                    <IonButtons slot="end">
226
-                      <IonButton color="light" onClick={() => abusoEco.current?.dismiss()}>Cerrar</IonButton>
227
-                    </IonButtons>
228
-                  </IonToolbar>
229
-                </IonHeader>
230
-                <IonContent className="ion-padding">
231
-                  <IonCard color="light">
232
-                    <p>No dejarla trabajar o impedirle que mantenga su empleo.</p>
233
-                  </IonCard>
234
-                  <IonCard color="light">
235
-                    <p>Obligarala a que le pida dinero.</p>
236
-                  </IonCard>
237
-                  <IonCard color="light">
238
-                    <p>Darle una mensualidad.</p>
239
-                  </IonCard>
240
-                  <IonCard color="light">
241
-                    <p>Quitarle el dinero.</p>
242
-                  </IonCard>
243
-                  <IonCard color="light">
244
-                    <p>No informarle acerca de los ingresos familiares o no permitirle disponer de los ingresos.</p>
245
-                  </IonCard>
246
-                </IonContent>
247
-              </IonModal>
248
-            </IonCol>
249
-            {/* Privilegio masculino card */}
250
-            <IonCol>
251
-              <IonButton id="open-priv-masculino" color="light" expand="block">
252
-                Privilegio Masculino
253
-              </IonButton>
254
-              <IonModal ref={privMasc} trigger="open-priv-masculino">
255
-                <IonHeader>
256
-                  <IonToolbar>
257
-                    <IonTitle>Privilegio Masculino</IonTitle>
258
-                    <IonButtons slot="end">
259
-                      <IonButton color="light" onClick={() => privMasc.current?.dismiss()}>Cerrar</IonButton>
260
-                    </IonButtons>
261
-                  </IonToolbar>
262
-                </IonHeader>
263
-                <IonContent className="ion-padding">
264
-                  <IonCard color="light">
265
-                    <p>Tratarla como una sirvienta.</p>
266
-                  </IonCard>
267
-                  <IonCard color="light">
268
-                    <p>No dejarla tomar decisiones importantes.</p>
269
-                  </IonCard>
270
-                  <IonCard color="light">
271
-                    <p>Actuar como el rey de la casa.</p>
272
-                  </IonCard>
273
-                  <IonCard color="light">
274
-                    <p>Definir las partes del hombre y de la mujer.</p>
275
-                  </IonCard>
276
-                </IonContent>
277
-              </IonModal>
278
-            </IonCol>
279
-          </IonRow>
280
-        </IonGrid>
48
+      <IonContent>
49
+        {/* Changed the behavior so it has only one flag open at a time */}
50
+        <IonAccordionGroup multiple={false}>
51
+          {
52
+            // generate an accordion item for each object in Flag.json
53
+            content.map((obj: any) => AccordionItem(obj.title, obj.content))
54
+          }
55
+        </IonAccordionGroup>
281 56
       </IonContent>
282 57
     </IonPage>
283 58
   );
284
-};
59
+}
285 60
 
286 61
 export default Flag;

+ 20
- 32
src/pages/Home.tsx Ver fichero

@@ -1,65 +1,53 @@
1
-import { IonContent, IonHeader,IonImg, IonCard, IonCardHeader, IonCardTitle, IonPage, IonTitle, IonToolbar, IonButton, IonIcon, IonText } from '@ionic/react';
2
-import { arrowDownCircle, heart } from 'ionicons/icons';
3
-import { isPlatform } from '@ionic/react';
1
+import { IonContent, IonImg, IonCard, IonCardHeader, IonCardTitle, IonPage, IonButton, IonIcon } from '@ionic/react';
2
+import { arrowDownCircle } from 'ionicons/icons';
3
+import { HelpBtn } from "./components/helpButton"
4 4
 
5 5
 import './styles/styles.css';
6 6
 import * as math from 'mathjs';
7 7
 
8
-// This is the date that is going to appear on the
9
-// card with the Motivational message
8
+// These are the random numbers for selecting the images
10 9
 let value = math.randomInt(1,10);
11 10
 let num = value.toString();
12 11
 
13
-console.log(value);
12
+// This is the date that is going to appear on the
13
+// card with the Motivational message
14 14
 const current = new Date();
15 15
 const date = `${current.toLocaleString('default', {month: 'long'}) } ${current.getDate()}`;
16 16
 
17
-// Determine which platform the app is running (ios or android)
18
-// Compose message that will be opened with the click of a button
19
-const separator = isPlatform('ios') === false ? '&' : '?'
20
-const phoneNumber = '7877101934'
21
-const message = 'Hola. Tengo una emergencia, mi ubicación es esta:'
22
-
23
-const finalMessage = "sms:" + phoneNumber + separator + "body=" + message;
24
-
25
-
26 17
 const Home: React.FC = () => {
27 18
 
28 19
   return (
29 20
     
30 21
     <IonPage>
31
-      <IonHeader>
32
-        <IonToolbar>
33
-          <IonTitle class="ion-text-center screen-titles">
34
-            <IonText>TPC</IonText> 
35
-            <IonButton href={finalMessage}> <IonIcon slot="icon-only" icon={heart}class="moti-download"></IonIcon></IonButton> 
36
-          </IonTitle>
37
-        </IonToolbar>
38
-      </IonHeader>
22
+      {/* This is the title with the button to ask for help */}
23
+      <HelpBtn/>
39 24
       <IonContent fullscreen>
40 25
         
41
-
42 26
         {/* Card 1 */}
43
-        <IonCard class="moti-card">
27
+        <IonCard class="moti-card" color="light">
44 28
           <IonCardHeader class="card-header">
45 29
             <IonCardTitle class="card-date">
46 30
               {date}
47
-              <IonButton fill="clear"> <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon></IonButton> 
31
+              <IonButton fill="clear"> 
32
+                <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon>
33
+              </IonButton> 
48 34
             </IonCardTitle>
49 35
           </IonCardHeader>
50
-          <IonImg class="moti-img" alt="Motivational messa ge" src={require("./images/frases_motivavionales/"+num+".png")}></IonImg>
36
+          <IonImg class="moti-img" alt="Motivational message" src={require("./images/frases_motivavionales/"+num+".png")}></IonImg>
51 37
         </IonCard>
52 38
 
53
-        {/* Card 2
54
-        <IonCard class="moti-card">
39
+        {/* Card 2 */}
40
+        <IonCard class="moti-card" color="light">
55 41
           <IonCardHeader class="card-header">
56 42
             <IonCardTitle class="card-date">
57 43
               {date}
58
-              <IonButton fill="clear"> <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon></IonButton>
44
+              <IonButton fill="clear">
45
+                <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon>
46
+              </IonButton>
59 47
             </IonCardTitle>
60 48
           </IonCardHeader>
61
-          <IonImg class="moti-img" alt="Motivational messa ge" src={require("./images/frases_motivavionales/2.png")}></IonImg> 
62
-        </IonCard> */}
49
+          <IonImg class="moti-img" alt="Motivational message" src={require("./images/frases_motivavionales/" + num + ".png")}></IonImg>
50
+        </IonCard>
63 51
       </IonContent>
64 52
     </IonPage>
65 53
   );

+ 5
- 6
src/pages/Info.tsx Ver fichero

@@ -1,14 +1,13 @@
1
-import { IonCard, IonContent, IonHeader, IonPage, IonText, IonTitle, IonToolbar } from '@ionic/react';
1
+import { IonCard, IonContent, IonPage, IonText } from '@ionic/react';
2
+import { HelpBtn } from './components/helpButton';
2 3
 import './styles/styles.css';
3 4
 
4 5
 const Info: React.FC = () => {
5 6
   return (
6 7
     <IonPage>
7
-      <IonHeader>
8
-        <IonToolbar>
9
-        <IonTitle class="ion-text-center screen-titles">TPC ❤️</IonTitle>
10
-        </IonToolbar>
11
-      </IonHeader>
8
+      {/* This is the title with the button to ask for help */}
9
+      <HelpBtn />
10
+
12 11
       <IonContent fullscreen>
13 12
 
14 13
         <IonCard class="info-card" color="light">

+ 38
- 0
src/pages/components/helpButton.tsx Ver fichero

@@ -0,0 +1,38 @@
1
+
2
+import { IonButton, IonCol, IonGrid, IonHeader, IonIcon, IonRow, IonText, IonTitle, IonToolbar, isPlatform } from '@ionic/react';
3
+import { heart } from 'ionicons/icons';
4
+
5
+import '../styles/styles.css';
6
+
7
+// Determine which platform the app is running (ios or android)
8
+// Compose message that will be opened with the click of a button
9
+const separator = isPlatform('ios') === false ? '&' : '?'
10
+const phoneNumber = '7877101934'
11
+const message = 'Hola. Tengo una emergencia, mi ubicación es esta:'
12
+
13
+const finalMessage = "sms:" + phoneNumber + separator + "body=" + message;
14
+
15
+
16
+export function HelpBtn() {
17
+    return (
18
+        <IonHeader>
19
+            <IonToolbar>
20
+                <IonGrid>
21
+                    <IonRow>
22
+                        <IonCol class="title-col">
23
+                            <IonTitle class="screen-titles">
24
+                                <IonText>TPC</IonText>
25
+                            </IonTitle>
26
+                        </IonCol>
27
+                        <IonCol>
28
+                            <IonButton class="ion-btn-download" fill="clear" href={finalMessage}>
29
+                                <IonIcon slot="icon-only" icon={heart} class="msg-button"></IonIcon>
30
+                            </IonButton>
31
+                        </IonCol>
32
+                    </IonRow>
33
+                </IonGrid>
34
+            </IonToolbar>
35
+        </IonHeader>
36
+        
37
+    );
38
+}

+ 14
- 0
src/pages/components/saveMoti.tsx Ver fichero

@@ -0,0 +1,14 @@
1
+import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera';
2
+
3
+
4
+import '../styles/styles.css';
5
+
6
+const Image_Dir = 'stored-images';
7
+
8
+
9
+export class saveMoti {
10
+    
11
+    async selectImage(){
12
+        const image = await Camera.getPhoto()
13
+    }
14
+}

BIN
src/pages/generatedMsgs/moti1.jpeg Ver fichero


BIN
src/pages/images/frases_motivavionales/1 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/2 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/3 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/4 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/5 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/6 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/7 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/8 2.png Ver fichero


BIN
src/pages/images/frases_motivavionales/9 2.png Ver fichero


+ 21
- 3
src/pages/styles/styles.css Ver fichero

@@ -2,12 +2,19 @@
2 2
 /* As a good practice don't edit React Components, create classes and apply those classes to 
3 3
    the specific component you are trying to change */
4 4
 
5
-  
5
+ion-grid {
6
+    padding: 0;
7
+}
8
+
9
+.title-col {
10
+    display: flex;
11
+    align-content: center
12
+}
6 13
 .screen-titles{
7 14
     color: #ffffff;
8 15
     font-size: 30px;
9
-    display: flex;
10
-    align-items: center;
16
+    text-align: right;
17
+    padding-right: 0;
11 18
 }
12 19
 
13 20
 .screen-h2 {
@@ -31,6 +38,16 @@
31 38
     padding-right: 5px;
32 39
 }
33 40
 
41
+.ion-btn-download {
42
+    width:40px;
43
+}
44
+
45
+.msg-button {
46
+    position: absolute;
47
+    color: red;
48
+    font-size: 45px;
49
+}
50
+
34 51
 .moti-download {
35 52
     font-size: 40px;
36 53
 }
@@ -53,5 +70,6 @@
53 70
     align-items: center;
54 71
 }
55 72
 
73
+/* Styles for the flag screen */
56 74
 
57 75
 

+ 6
- 96
src/theme/variables.css Ver fichero

@@ -4,106 +4,16 @@ http://ionicframework.com/docs/theming/ */
4 4
 /** Ionic CSS Variables **/
5 5
 :root {
6 6
   /* Background-color */
7
-  --ion-background-color: #8f00ff;
8
-  
9
-  --ion-color-primary: #8f00ff;
10
-	--ion-color-primary-rgb: 143,0,255;
11
-	--ion-color-primary-contrast: #ffffff;
12
-	--ion-color-primary-contrast-rgb: 255,255,255;
13
-	--ion-color-primary-shade: #7e00e0;
14
-	--ion-color-primary-tint: #9a1aff;
15
-
16
-	--ion-color-secondary: #000766;
17
-	--ion-color-secondary-rgb: 0,7,102;
18
-	--ion-color-secondary-contrast: #ffffff;
19
-	--ion-color-secondary-contrast-rgb: 255,255,255;
20
-	--ion-color-secondary-shade: #00065a;
21
-	--ion-color-secondary-tint: #1a2075;
22
-
23
-	--ion-color-tertiary: #ff8800;
24
-	--ion-color-tertiary-rgb: 255,136,0;
25
-	--ion-color-tertiary-contrast: #000000;
26
-	--ion-color-tertiary-contrast-rgb: 0,0,0;
27
-	--ion-color-tertiary-shade: #e07800;
28
-	--ion-color-tertiary-tint: #ff941a;
29
-}
30
-
31
-@media (prefers-color-scheme: light) {
7
+  	--ion-tab-bar-background:#F7F7F7;
8
+	--ion-toolbar-background:#8f00ff;
9
+	--ion-background-color: linear-gradient(180deg, rgba(142,45,226,1) 0%, rgba(74,0,224,1) 100%);;
10
+	
32 11
 
33
-  body {
34
-      /* Background-color */
35
-  --ion-background-color: #8f00ff;
36
-  
37
-  --ion-color-primary: #8f00ff;
12
+	--ion-color-primary: #8f00ff;
38 13
 	--ion-color-primary-rgb: 143,0,255;
39 14
 	--ion-color-primary-contrast: #ffffff;
40 15
 	--ion-color-primary-contrast-rgb: 255,255,255;
41 16
 	--ion-color-primary-shade: #7e00e0;
42 17
 	--ion-color-primary-tint: #9a1aff;
43 18
 
44
-	--ion-color-secondary: #000766;
45
-	--ion-color-secondary-rgb: 0,7,102;
46
-	--ion-color-secondary-contrast: #ffffff;
47
-	--ion-color-secondary-contrast-rgb: 255,255,255;
48
-	--ion-color-secondary-shade: #00065a;
49
-	--ion-color-secondary-tint: #1a2075;
50
-
51
-	--ion-color-tertiary: #ff8800;
52
-	--ion-color-tertiary-rgb: 255,136,0;
53
-	--ion-color-tertiary-contrast: #000000;
54
-	--ion-color-tertiary-contrast-rgb: 0,0,0;
55
-	--ion-color-tertiary-shade: #e07800;
56
-	--ion-color-tertiary-tint: #ff941a;
57
-  }
58
-
59
-  .ios body {
60
-    --ion-background-color: #8f00ff;
61
-  
62
-  /** primary **/
63
-    --ion-color-primary: #8f00ff;
64
-    --ion-color-primary-rgb: 143,0,255;
65
-    --ion-color-primary-contrast: #ffffff;
66
-    --ion-color-primary-contrast-rgb: 255,255,255;
67
-    --ion-color-primary-shade: #7e00e0;
68
-    --ion-color-primary-tint: #9a1aff;
69
-
70
-    --ion-color-secondary: #000766;
71
-    --ion-color-secondary-rgb: 0,7,102;
72
-    --ion-color-secondary-contrast: #ffffff;
73
-    --ion-color-secondary-contrast-rgb: 255,255,255;
74
-    --ion-color-secondary-shade: #00065a;
75
-    --ion-color-secondary-tint: #1a2075;
76
-
77
-    --ion-color-tertiary: #ff8800;
78
-    --ion-color-tertiary-rgb: 255,136,0;
79
-    --ion-color-tertiary-contrast: #000000;
80
-    --ion-color-tertiary-contrast-rgb: 0,0,0;
81
-    --ion-color-tertiary-shade: #e07800;
82
-    --ion-color-tertiary-tint: #ff941a;
83
-  }
84
-
85
-  .md body {
86
-    --ion-background-color: #8f00ff;
87
-  
88
-    --ion-color-primary: #8f00ff;
89
-    --ion-color-primary-rgb: 143,0,255;
90
-    --ion-color-primary-contrast: #ffffff;
91
-    --ion-color-primary-contrast-rgb: 255,255,255;
92
-    --ion-color-primary-shade: #7e00e0;
93
-    --ion-color-primary-tint: #9a1aff;
94
-
95
-    --ion-color-secondary: #000766;
96
-    --ion-color-secondary-rgb: 0,7,102;
97
-    --ion-color-secondary-contrast: #ffffff;
98
-    --ion-color-secondary-contrast-rgb: 255,255,255;
99
-    --ion-color-secondary-shade: #00065a;
100
-    --ion-color-secondary-tint: #1a2075;
101
-
102
-    --ion-color-tertiary: #ff8800;
103
-    --ion-color-tertiary-rgb: 255,136,0;
104
-    --ion-color-tertiary-contrast: #000000;
105
-    --ion-color-tertiary-contrast-rgb: 0,0,0;
106
-    --ion-color-tertiary-shade: #e07800;
107
-    --ion-color-tertiary-tint: #ff941a;
108
-  }
109
-}
19
+}