├── .browserslistrc
├── .editorconfig
├── .env.example
├── .env.production
├── .env.staging
├── .eslintrc.js
├── .gitattributes
├── .github
└── workflows
│ ├── deploy.yml
│ └── linting.yml
├── .gitignore
├── .prettierignore
├── .prettierrc.json
├── .vscode
└── settings.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── .idea
│ ├── compiler.xml
│ ├── jarRepositories.xml
│ └── misc.xml
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── capacitor.build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── getcapacitor
│ │ │ └── myapp
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ │ ├── capacitor.config.json
│ │ │ └── capacitor.plugins.json
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── app
│ │ │ │ └── boilerplate
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable-land-hdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-ldpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-mdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-hdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-ldpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-mdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-xhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-xxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-night-xxxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-xhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-xxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-land-xxxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-night
│ │ │ └── splash.png
│ │ │ ├── drawable-port-hdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-ldpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-mdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-hdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-ldpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-mdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-xhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-xxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-night-xxxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-xhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-xxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-port-xxxhdpi
│ │ │ └── splash.png
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ ├── ic_launcher_background.xml
│ │ │ └── splash.png
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-ldpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ ├── config.xml
│ │ │ └── file_paths.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── getcapacitor
│ │ └── myapp
│ │ └── ExampleUnitTest.java
├── build.gradle
├── capacitor.settings.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── variables.gradle
├── babel.config.js
├── capacitor.config.json
├── docs
└── screenshots
│ ├── components.png
│ ├── home.png
│ ├── login.png
│ └── menu.png
├── ionic.config.json
├── jsconfig.json
├── package-lock.json
├── package.json
├── public
├── assets
│ ├── icon
│ │ ├── favicon.ico
│ │ ├── logo.jpeg
│ │ └── logo.png
│ ├── shapes.svg
│ └── vectors
│ │ ├── 404.svg
│ │ ├── blank.svg
│ │ ├── blog.svg
│ │ ├── cancel.svg
│ │ ├── denied.svg
│ │ ├── email-sent.svg
│ │ ├── join.svg
│ │ └── notify.svg
└── index.html
├── resources
└── logo.png
├── src
├── App.vue
├── api
│ └── index.js
├── components
│ ├── Button.vue
│ ├── Divider.vue
│ ├── ErrorMessage.vue
│ ├── Image.vue
│ ├── Loading.vue
│ ├── Menu.vue
│ ├── NoContent.vue
│ ├── WelcomeText.vue
│ ├── base
│ │ └── BaseLayout.vue
│ ├── inputs
│ │ ├── File.vue
│ │ └── SelectExample.vue
│ └── whatsapp
│ │ ├── NumberWithLink.vue
│ │ └── SendMessage.vue
├── composition
│ ├── login.js
│ ├── redirectToHome.js
│ ├── usePhotoGallery.js
│ └── useToast.js
├── enums
│ ├── HomeRoutesByUser.js
│ └── UserTypes.js
├── main.js
├── pages
│ ├── Contact.vue
│ ├── Error404.vue
│ ├── Login.vue
│ ├── Logout.vue
│ ├── NotAuthorized.vue
│ ├── RecoveryPassword.vue
│ ├── admin
│ │ └── Dashboard.vue
│ ├── client
│ │ └── Home.vue
│ └── home
│ │ ├── Index.vue
│ │ └── examples
│ │ ├── Buttons.vue
│ │ └── Whatsapp.vue
├── plugins
│ └── emitter.js
├── router
│ ├── authenticated
│ │ ├── admin.js
│ │ └── client.js
│ └── index.js
├── store
│ ├── general.js
│ ├── login.js
│ ├── menu.js
│ └── user.js
├── theme
│ ├── core.css
│ ├── index.css
│ ├── reset.css
│ └── variables.css
└── utils
│ └── index.js
└── vue.config.js
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 | not dead
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | end_of_line = lf
6 | charset = utf-8
7 |
8 | [*.{html,css}]
9 | indent_size = 4
10 | [*.{js,vue}]
11 | indent_size = 2
12 |
13 | trim_trailing_whitespace = false
14 | insert_final_newline = false
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | VUE_APP_TITLE="Dev - Ionic Vue Boilerplate"
2 | VUE_APP_PORT="8080"
3 | VUE_APP_API_URL="http://localhost:8000"
4 | VUE_APP_IMAGES_ADDRESS="http://localhost:8080"
5 | VUE_APP_WHATS_TELEPHONE="+559999999999"
6 | VUE_APP_CONTACT_EMAIL="contact@boilerplate.com"
7 | VUE_APP_PUBLIC_PATH="/"
--------------------------------------------------------------------------------
/.env.production:
--------------------------------------------------------------------------------
1 | VUE_APP_TITLE="Ionic Vue Boilerplate"
2 | VUE_APP_API_URL="https://pferreirafabricio.github.io/ionic-vue-boilerplate"
3 | VUE_APP_IMAGES_ADDRESS="https://pferreirafabricio.github.io/ionic-vue-boilerplate"
4 | VUE_APP_WHATS_TELEPHONE="+559999999999"
5 | VUE_APP_CONTACT_EMAIL="pferreirafabricio@gmail.com"
6 | VUE_APP_PUBLIC_PATH="/"
--------------------------------------------------------------------------------
/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV=production
2 | VUE_APP_TITLE="QA - Ionic Vue Boilerplate"
3 | VUE_APP_API_URL="https://qa.api.boilerplate.com"
4 | VUE_APP_IMAGES_ADDRESS="https://qa.boilerplate.com"
5 | VUE_APP_WHATS_TELEPHONE="+559999999999"
6 | VUE_APP_CONTACT_EMAIL="contact@boilerplate.com"
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true,
5 | },
6 | extends: ["eslint:recommended", "plugin:vue/vue3-recommended", "prettier"],
7 | parserOptions: {
8 | ecmaVersion: 2020,
9 | sourceType: "module",
10 | },
11 | rules: {
12 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
13 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
14 | "vue/no-deprecated-slot-attribute": "off",
15 | "no-empty-pattern": "off",
16 | "vue/require-default-prop": "off",
17 | },
18 | overrides: [
19 | {
20 | files: [
21 | "**/__tests__/*.{j,t}s?(x)",
22 | "**/tests/unit/**/*.spec.{j,t}s?(x)",
23 | ],
24 | env: {
25 | jest: true,
26 | },
27 | },
28 | ],
29 | };
30 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | *.md linguist-detectable=true
5 | *.md linguist-documentation=false
6 |
7 | # And ignore those repositories considering them as documentation
8 | docs/** linguist-documentation
9 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Build and Deploy to GitHub Pages
2 | on:
3 | push:
4 | branches:
5 | - main
6 | permissions:
7 | contents: write
8 | jobs:
9 | build-and-deploy:
10 | concurrency: ci-${{ github.ref }}
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout 🛎️
14 | uses: actions/checkout@v3
15 |
16 | - name: Install and Build 🔧
17 | run: |
18 | npm ci
19 | export VUE_APP_PUBLIC_PATH=/ionic-vue-boilerplate/
20 | npm run build
21 |
22 | - name: Deploy 🚀
23 | uses: JamesIves/github-pages-deploy-action@v4
24 | with:
25 | folder: dist
26 |
--------------------------------------------------------------------------------
/.github/workflows/linting.yml:
--------------------------------------------------------------------------------
1 | name: CI Linting
2 |
3 | on:
4 | push:
5 | branches: ["main"]
6 | pull_request:
7 | branches: ["main"]
8 |
9 | jobs:
10 | build:
11 | strategy:
12 | matrix:
13 | os: [ubuntu-latest]
14 | node-version: [18.x]
15 | runs-on: ${{ matrix.os }}
16 |
17 | steps:
18 | - uses: actions/checkout@v3
19 |
20 | - name: Use Node.js ${{ matrix.node-version }}
21 | uses: actions/setup-node@v3
22 | with:
23 | node-version: ${{ matrix.node-version }}
24 |
25 | - name: Cache node_modules
26 | uses: actions/cache@v4
27 | with:
28 | path: node_modules
29 | key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
30 |
31 | - name: Install dependencies
32 | if: steps.cache.outputs.cache-hit != 'true'
33 | run: npm ci
34 |
35 | - name: Run ESLint
36 | run: npm run lint
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | .tmp
7 | *.tmp
8 | *.tmp.*
9 | *.sublime-project
10 | *.sublime-workspace
11 | .DS_Store
12 | Thumbs.db
13 | UserInterfaceState.xcuserstate
14 | $RECYCLE.BIN/
15 |
16 | *.log
17 | log.txt
18 | npm-debug.log*
19 |
20 | /.idea
21 | /.ionic
22 | /.sass-cache
23 | /.sourcemaps
24 | /.versions
25 | /coverage
26 | /dist
27 | /node_modules
28 | /platforms
29 | /plugins
30 | /www
31 |
32 | resources/android/icon
33 | resources/android/splash
34 | resources/ios/icon
35 | resources/ios/splash
36 | resources/windows/icon
37 | resources/windows/splash
38 |
39 | dist*
40 | .env
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | // .prettierignore
2 |
3 | node_modules
4 | *.log*
5 | .cache
6 | .output
7 | .env
8 | dist
9 | android
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.codeActionsOnSave": {
3 | "source.fixAll": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | pferreirafabricio@gmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Fabrício Pinto Ferreira
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | Ionic + Vue + Capacitor = 💖
4 |
5 |
6 |
7 | A simple Ionic app template, using VueJS framework and Capacitor. It brings a simple folder structure and some components.
8 |
9 |
10 | ---
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | ## 👀 Overview
21 |
22 |
28 |
29 |
30 | > [!NOTE]
31 | > Take a look at https://pferreirafabricio.github.io/ionic-vue-boilerplate for a live test. OBS: Don't forget to press F12 and toggle device emulation to view it in mobile view.
32 |
33 | > [!NOTE]
34 | > If you prefer you can download the .apk file on the [releases page](https://github.com/pferreirafabricio/ionic-vue-boilerplate/releases)
35 |
36 | ## 📖 About
37 |
38 | This project is a boilerplate for building mobile applications using Ionic and Vue. It includes a variety of components and features, such as a login screen, a home screen, and some UI components.
39 |
40 | ## 🧱 This project was built with
41 |
42 | - [Ionic](https://ionicframework.com/)
43 | - [Ionic + Vue](https://ionicframework.com/vue)
44 | - [Capacitor](https://capacitorjs.com/)
45 | - [Vue](https://vuejs.org/)
46 | - [Pinia](https://pinia.vuejs.org/)
47 |
48 | ## 🏃🏻♂️ Installing and Running
49 |
50 | 1. Clone this repository `https://github.com/pferreirafabricio/ionic-vue-boilerplate.git`
51 | 2. Enter in the project's folder: `cd ionic-vue-boilerplate`
52 | 3. Run `cp .env.example .env`
53 | 4. Run `npm install`
54 | 5. Run `npm run serve` or `npm run dev`
55 | 6. Access `http://localhost:8080` in your browser and be happy 😃
56 |
57 | ## ♻ Contribute
58 |
59 | 1. Fork this repository
60 | 2. Create a branch with your feature: `git checkout -b my-feature`
61 | 3. Commit your changes: `git commit -m 'feat: My new feature'`
62 | 4. Push your branch: `git push origin my-feature`
63 |
64 | ## 🧾 License
65 |
66 | This project is under the MIT license. Take a look at the [LICENSE](LICENSE) file for more details.
67 |
68 | ## 📚 Learn more
69 |
70 | - Ionic Vue Docs: https://ionicframework.com/docs/vue/overview
71 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
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
102 |
--------------------------------------------------------------------------------
/android/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build/*
2 | !/build/.npmkeep
3 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | namespace "com.app.boilerplate"
5 | compileSdkVersion rootProject.ext.compileSdkVersion
6 | defaultConfig {
7 | applicationId "com.app.boilerplate"
8 | minSdkVersion rootProject.ext.minSdkVersion
9 | targetSdkVersion rootProject.ext.targetSdkVersion
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | aaptOptions {
14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
17 | }
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | }
26 |
27 | repositories {
28 | flatDir{
29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
30 | }
31 | }
32 |
33 | dependencies {
34 | implementation fileTree(include: ['*.jar'], dir: 'libs')
35 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
36 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
37 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
38 | implementation project(':capacitor-android')
39 | testImplementation "junit:junit:$junitVersion"
40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
42 | implementation project(':capacitor-cordova-android-plugins')
43 | }
44 |
45 | apply from: 'capacitor.build.gradle'
46 |
47 | try {
48 | def servicesJSON = file('google-services.json')
49 | if (servicesJSON.text) {
50 | apply plugin: 'com.google.gms.google-services'
51 | }
52 | } catch(Exception e) {
53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
54 | }
55 |
--------------------------------------------------------------------------------
/android/app/capacitor.build.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 |
3 | android {
4 | compileOptions {
5 | sourceCompatibility JavaVersion.VERSION_17
6 | targetCompatibility JavaVersion.VERSION_17
7 | }
8 | }
9 |
10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11 | dependencies {
12 | implementation project(':capacitor-camera')
13 | implementation project(':capacitor-preferences')
14 |
15 | }
16 |
17 |
18 | if (hasProperty('postBuildExtras')) {
19 | postBuildExtras()
20 | }
21 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
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
22 |
--------------------------------------------------------------------------------
/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import android.content.Context;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 | import androidx.test.platform.app.InstrumentationRegistry;
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 |
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
23 |
24 | assertEquals("com.getcapacitor.app", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/android/app/src/main/assets/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "com.app.boilerplate",
3 | "appName": "Ionic Vue Boilerplate",
4 | "webDir": "dist",
5 | "npmClient": "npm",
6 | "cordova": {}
7 | }
8 |
--------------------------------------------------------------------------------
/android/app/src/main/assets/capacitor.plugins.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "pkg": "@capacitor/camera",
4 | "classpath": "com.capacitorjs.plugins.camera.CameraPlugin"
5 | },
6 | {
7 | "pkg": "@capacitor/preferences",
8 | "classpath": "com.capacitorjs.plugins.preferences.PreferencesPlugin"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/app/boilerplate/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.app.boilerplate;
2 |
3 | import com.getcapacitor.BridgeActivity;
4 |
5 | public class MainActivity extends BridgeActivity {}
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-ldpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-ldpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-land-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-night/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-ldpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-ldpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-port-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable-port-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/drawable/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Ionic Vue Boilerplate
4 | Ionic Vue Boilerplate
5 | com.app.boilerplate
6 | com.app.boilerplate
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
17 |
18 |
19 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.Test;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | mavenCentral()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:8.1.2'
11 | classpath 'com.google.gms:google-services:4.3.15'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | apply from: "variables.gradle"
19 |
20 | allprojects {
21 | repositories {
22 | google()
23 | mavenCentral()
24 | }
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/capacitor.settings.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 | include ':capacitor-android'
3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4 |
5 | include ':capacitor-camera'
6 | project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
7 |
8 | include ':capacitor-preferences'
9 | project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android')
10 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
4 | networkTimeout=10000
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147 | # shellcheck disable=SC3045
148 | MAX_FD=$( ulimit -H -n ) ||
149 | warn "Could not query maximum file descriptor limit"
150 | esac
151 | case $MAX_FD in #(
152 | '' | soft) :;; #(
153 | *)
154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155 | # shellcheck disable=SC3045
156 | ulimit -n "$MAX_FD" ||
157 | warn "Could not set maximum file descriptor limit to $MAX_FD"
158 | esac
159 | fi
160 |
161 | # Collect all arguments for the java command, stacking in reverse order:
162 | # * args from the command line
163 | # * the main class name
164 | # * -classpath
165 | # * -D...appname settings
166 | # * --module-path (only if needed)
167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
168 |
169 | # For Cygwin or MSYS, switch paths to Windows format before running java
170 | if "$cygwin" || "$msys" ; then
171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
173 |
174 | JAVACMD=$( cygpath --unix "$JAVACMD" )
175 |
176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
177 | for arg do
178 | if
179 | case $arg in #(
180 | -*) false ;; # don't mess with options #(
181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
182 | [ -e "$t" ] ;; #(
183 | *) false ;;
184 | esac
185 | then
186 | arg=$( cygpath --path --ignore --mixed "$arg" )
187 | fi
188 | # Roll the args list around exactly as many times as the number of
189 | # args, so each arg winds up back in the position where it started, but
190 | # possibly modified.
191 | #
192 | # NB: a `for` loop captures its iteration list before it begins, so
193 | # changing the positional parameters here affects neither the number of
194 | # iterations, nor the values presented in `arg`.
195 | shift # remove old arg
196 | set -- "$@" "$arg" # push replacement arg
197 | done
198 | fi
199 |
200 | # Collect all arguments for the java command;
201 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202 | # shell script including quotes and variable substitutions, so put them in
203 | # double quotes to make sure that they get re-expanded; and
204 | # * put everything else in single quotes, so that it's not re-expanded.
205 |
206 | set -- \
207 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
208 | -classpath "$CLASSPATH" \
209 | org.gradle.wrapper.GradleWrapperMain \
210 | "$@"
211 |
212 | # Stop when "xargs" is not available.
213 | if ! command -v xargs >/dev/null 2>&1
214 | then
215 | die "xargs is not available"
216 | fi
217 |
218 | # Use "xargs" to parse quoted args.
219 | #
220 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
221 | #
222 | # In Bash we could simply go:
223 | #
224 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
225 | # set -- "${ARGS[@]}" "$@"
226 | #
227 | # but POSIX shell has neither arrays nor command substitution, so instead we
228 | # post-process each arg (as a line of input to sed) to backslash-escape any
229 | # character that might be a shell metacharacter, then use eval to reverse
230 | # that process (while maintaining the separation between arguments), and wrap
231 | # the whole thing up as a single "set" statement.
232 | #
233 | # This will of course break if any of these variables contains a newline or
234 | # an unmatched quote.
235 | #
236 |
237 | eval "set -- $(
238 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
239 | xargs -n1 |
240 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
241 | tr '\n' ' '
242 | )" '"$@"'
243 |
244 | exec "$JAVACMD" "$@"
245 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
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 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo.
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48 | echo.
49 | echo Please set the JAVA_HOME variable in your environment to match the
50 | echo location of your Java installation.
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo.
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62 | echo.
63 | echo Please set the JAVA_HOME variable in your environment to match the
64 | echo location of your Java installation.
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':capacitor-cordova-android-plugins'
3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
4 |
5 | apply from: 'capacitor.settings.gradle'
--------------------------------------------------------------------------------
/android/variables.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | minSdkVersion = 22
3 | compileSdkVersion = 33
4 | targetSdkVersion = 33
5 | androidxActivityVersion = '1.7.0'
6 | androidxAppCompatVersion = '1.6.1'
7 | androidxCoordinatorLayoutVersion = '1.2.0'
8 | androidxCoreVersion = '1.10.0'
9 | androidxFragmentVersion = '1.5.6'
10 | coreSplashScreenVersion = '1.0.0'
11 | androidxWebkitVersion = '1.6.1'
12 | junitVersion = '4.13.2'
13 | androidxJunitVersion = '1.1.5'
14 | androidxEspressoCoreVersion = '3.5.1'
15 | cordovaAndroidVersion = '10.1.1'
16 | }
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/cli-plugin-babel/preset"],
3 | };
4 |
--------------------------------------------------------------------------------
/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "com.app.boilerplate",
3 | "appName": "Ionic Vue Boilerplate",
4 | "webDir": "dist",
5 | "npmClient": "npm",
6 | "cordova": {}
7 | }
8 |
--------------------------------------------------------------------------------
/docs/screenshots/components.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/docs/screenshots/components.png
--------------------------------------------------------------------------------
/docs/screenshots/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/docs/screenshots/home.png
--------------------------------------------------------------------------------
/docs/screenshots/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/docs/screenshots/login.png
--------------------------------------------------------------------------------
/docs/screenshots/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/docs/screenshots/menu.png
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "app-boilerplate",
3 | "integrations": {
4 | "capacitor": {}
5 | },
6 | "type": "vue"
7 | }
8 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["./src/**/*"]
3 | }
4 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "app-boilerplate",
3 | "description": "A simple Ionic app structure made with Vue 3, Capacitor, and JavaScript",
4 | "version": "0.0.1",
5 | "private": false,
6 | "license": "MIT",
7 | "author": {
8 | "name": "Fabrício Pinto Ferreira",
9 | "email": "pferreirafabricio@gmail.com",
10 | "url": "https://github.com/pferreirafabricio"
11 | },
12 | "scripts": {
13 | "serve": "vue-cli-service serve",
14 | "dev": "vue-cli-service serve",
15 | "build": "vue-cli-service build && npm run post:build",
16 | "build:qa": "vue-cli-service build --dest dist-qa --mode staging && npm run post-build",
17 | "post:build": "npx cap copy & npx cap sync",
18 | "resources:android": "npx @capacitor/assets generate --android",
19 | "open:android": "npx cap open android",
20 | "run:android": "npx cap run android -l --external",
21 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
22 | "format": "prettier . --write"
23 | },
24 | "dependencies": {
25 | "@capacitor/android": "^5.0.0",
26 | "@capacitor/camera": "^5.0.0",
27 | "@capacitor/core": "^5.0.0",
28 | "@capacitor/preferences": "^5.0.6",
29 | "@ionic-native/core": "^5.36.0",
30 | "@ionic/pwa-elements": "^3.0.2",
31 | "@ionic/vue": "^7.4.3",
32 | "@ionic/vue-router": "^7.4.3",
33 | "@vue/reactivity": "^3.2.6",
34 | "axios": "^1.8.2",
35 | "ionicons": "^5.5.3",
36 | "mitt": "^2.1.0",
37 | "pinia": "^2.1.6",
38 | "vue": "^3.3.4",
39 | "vue-router": "^4.2.5"
40 | },
41 | "devDependencies": {
42 | "@capacitor/assets": "^3.0.1",
43 | "@capacitor/cli": "^5.0.0",
44 | "@vue/cli-plugin-babel": "^5.0.8",
45 | "@vue/cli-plugin-eslint": "^5.0.8",
46 | "@vue/cli-plugin-router": "^5.0.8",
47 | "@vue/cli-service": "^5.0.8",
48 | "@vue/compiler-sfc": "^3.2.6",
49 | "@vue/test-utils": "^2.0.0-rc.13",
50 | "cordova-res": "^0.15.3",
51 | "eslint": "^8.44.0",
52 | "eslint-config-prettier": "^8.8.0",
53 | "eslint-plugin-import": "^2.28.1",
54 | "eslint-plugin-vue": "^7.20.0",
55 | "prettier": "3.0.3"
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/public/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/public/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/public/assets/icon/logo.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/public/assets/icon/logo.jpeg
--------------------------------------------------------------------------------
/public/assets/icon/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/public/assets/icon/logo.png
--------------------------------------------------------------------------------
/public/assets/shapes.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/assets/vectors/blog.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/vectors/cancel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/vectors/denied.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/vectors/email-sent.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/vectors/join.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/vectors/notify.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%= VUE_APP_TITLE %>
6 |
7 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pferreirafabricio/ionic-vue-boilerplate/0988d12a063dae92179c6200125b6266c1b58b06/resources/logo.png
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
18 |
--------------------------------------------------------------------------------
/src/api/index.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { Preferences } from "@capacitor/preferences";
3 |
4 | const baseURL = process.env.VUE_APP_API_URL;
5 |
6 | const api = axios.create({
7 | baseURL,
8 | headers: {
9 | Accept: "application/json",
10 | "Content-Type": "application/json",
11 | },
12 | });
13 |
14 | api.interceptors.request.use(async (config) => {
15 | const token = await Preferences.get({ key: "token" });
16 | config.headers.Authorization = `Bearer ${token.value || null}`;
17 |
18 | return config;
19 | });
20 |
21 | api.interceptors.response.use(
22 | (response) => response,
23 | (error) => {
24 | if (error.response.status === 401) {
25 | window.location = "/logout";
26 | }
27 |
28 | return Promise.reject(error);
29 | },
30 | );
31 |
32 | export default api;
33 |
--------------------------------------------------------------------------------
/src/components/Button.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 | {{
14 | text
15 | }}
16 |
22 |
28 |
29 |
30 |
31 |
32 |
116 |
117 |
124 |
--------------------------------------------------------------------------------
/src/components/Divider.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
35 |
--------------------------------------------------------------------------------
/src/components/ErrorMessage.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ text }}
4 |
5 |
6 |
7 |
18 |
--------------------------------------------------------------------------------
/src/components/Image.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
29 |
--------------------------------------------------------------------------------
/src/components/Loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
27 |
--------------------------------------------------------------------------------
/src/components/Menu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Welcome {{ userName }}
6 |
7 |
8 |
9 |
10 |
11 |
16 |
25 |
26 | {{ menuItem.title }}
27 |
32 |
33 |
36 |
37 |
38 |
43 |
44 |
45 | {{ menuItem.title }}
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
175 |
176 |
281 | ../pages/useEmitter../plugins/emitter
--------------------------------------------------------------------------------
/src/components/NoContent.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
23 |
--------------------------------------------------------------------------------
/src/components/WelcomeText.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome, {{ firstName }}
5 |
6 |
7 |
8 |
9 |
27 |
--------------------------------------------------------------------------------
/src/components/base/BaseLayout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
18 |
19 |
23 | {{ pageTitle }}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
81 |
--------------------------------------------------------------------------------
/src/components/inputs/File.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
20 |
21 |
22 |
23 |
101 |
--------------------------------------------------------------------------------
/src/components/inputs/SelectExample.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {
13 | emit('update:modelValue', fields.value);
14 | errors.value = null;
15 | }
16 | "
17 | >
18 |
23 | {{ item.name }}
24 |
25 |
26 |
35 |
36 |
37 |
38 |
39 |
111 |
112 |
119 |
--------------------------------------------------------------------------------
/src/components/whatsapp/NumberWithLink.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ telephone }}
4 |
5 |
6 |
7 |
8 |
24 |
25 |
34 |
--------------------------------------------------------------------------------
/src/components/whatsapp/SendMessage.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
47 |
48 |
53 |
--------------------------------------------------------------------------------
/src/composition/login.js:
--------------------------------------------------------------------------------
1 | import { useLoginStore } from "../store/login";
2 | import redirectToHome from "./redirectToHome";
3 | import useToast from "./useToast";
4 |
5 | export default function () {
6 | const { openToast } = useToast();
7 | const { redirectTo } = redirectToHome();
8 | const loginStore = useLoginStore();
9 |
10 | async function userLogin(userCredentials) {
11 | const data = {
12 | email: userCredentials.email,
13 | password: userCredentials.password,
14 | };
15 |
16 | loginStore
17 | .login(data)
18 | .then((response) => {
19 | openToast("Logged with success", "success", "top");
20 |
21 | redirectTo(response.data.userType, {
22 | anyCustomParams: response.customParams,
23 | });
24 |
25 | return Promise.resolve();
26 | })
27 | .catch((ex) => {
28 | openToast("Something was wrong on login", "danger", "top");
29 | Promise.reject(ex);
30 | });
31 | }
32 |
33 | return {
34 | userLogin,
35 | openToast,
36 | redirectTo,
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/src/composition/redirectToHome.js:
--------------------------------------------------------------------------------
1 | import { useRouter } from "vue-router";
2 | import HomeRoutesByUser from "../enums/HomeRoutesByUser";
3 |
4 | export default function () {
5 | const router = useRouter();
6 |
7 | /**
8 | * Redirect user by type
9 | * @param {number | string} userTypeId
10 | * @param {object} routeParams
11 | * @param {boolean} reload
12 | * @returns
13 | */
14 | function redirectTo(userTypeId, routeParams, reload = false) {
15 | if (!reload) {
16 | router.push({
17 | name: HomeRoutesByUser[userTypeId] || "logout",
18 | params: routeParams,
19 | });
20 | return;
21 | }
22 |
23 | const redirect = router.resolve({
24 | name: HomeRoutesByUser[userTypeId] || "logout",
25 | params: routeParams,
26 | });
27 |
28 | window.location = redirect.href;
29 | }
30 |
31 | return {
32 | redirectTo,
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/src/composition/usePhotoGallery.js:
--------------------------------------------------------------------------------
1 | import { Camera, CameraResultType, CameraSource } from "@capacitor/camera";
2 |
3 | export default function () {
4 | /**
5 | * Open the camera or gallery to take a photo
6 | * @param {CameraResultType} resultType
7 | * @param {CameraSource} source
8 | * @param {Number} quality
9 | * @param {boolean} allowEditing
10 | * @returns
11 | */
12 | async function takePhoto(
13 | resultType = CameraResultType.DataUrl,
14 | source = CameraSource.Prompt,
15 | quality = 90,
16 | allowEditing = true,
17 | ) {
18 | const cameraPhoto = await Camera.getPhoto({
19 | resultType,
20 | source,
21 | quality,
22 | allowEditing,
23 | });
24 |
25 | if (resultType === CameraResultType.DataUrl) return cameraPhoto.dataUrl;
26 |
27 | if (resultType === CameraResultType.Base64) return cameraPhoto.base64String;
28 |
29 | return cameraPhoto;
30 | }
31 |
32 | return {
33 | takePhoto,
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/src/composition/useToast.js:
--------------------------------------------------------------------------------
1 | import { toastController } from "@ionic/vue";
2 |
3 | export default function () {
4 | /**
5 | * Shows a notification
6 | * @param {string} message
7 | * @param {string} color
8 | * @param {string} position
9 | * @param {number} duration
10 | * @returns
11 | */
12 | async function openToast(message, color, position = "top", duration = 3000) {
13 | const toast = await toastController.create({
14 | message,
15 | position,
16 | color,
17 | duration,
18 | });
19 |
20 | return toast.present();
21 | }
22 |
23 | return {
24 | openToast,
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/src/enums/HomeRoutesByUser.js:
--------------------------------------------------------------------------------
1 | import UserTypes from "./UserTypes";
2 |
3 | /**
4 | * Default routes to redirect the user
5 | */
6 | export default {
7 | [UserTypes.CLIENT]: "client-home",
8 | [UserTypes.ADMINISTRATOR]: "admin-dashboard",
9 | };
10 |
--------------------------------------------------------------------------------
/src/enums/UserTypes.js:
--------------------------------------------------------------------------------
1 | export default {
2 | CLIENT: 1,
3 | ADMINISTRATOR: 2,
4 | };
5 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from "vue";
2 | import { createPinia } from 'pinia'
3 | import { IonicVue } from "@ionic/vue";
4 | import { Preferences } from "@capacitor/preferences";
5 | import { defineCustomElements } from "@ionic/pwa-elements/loader";
6 |
7 | import App from "./App.vue";
8 | import router from "./router";
9 |
10 | import BaseLayout from "./components/base/BaseLayout.vue";
11 | import ErrorMessage from "./components/ErrorMessage.vue";
12 | import Loading from "./components/Loading.vue";
13 |
14 | /* Core CSS required for Ionic components to work properly */
15 | import "@ionic/vue/css/core.css";
16 |
17 | /* Basic CSS for apps built with Ionic */
18 | import "@ionic/vue/css/normalize.css";
19 | import "@ionic/vue/css/structure.css";
20 | import "@ionic/vue/css/typography.css";
21 |
22 | /* Optional CSS utils that can be commented out */
23 | import "@ionic/vue/css/padding.css";
24 | import "@ionic/vue/css/float-elements.css";
25 | import "@ionic/vue/css/text-alignment.css";
26 | import "@ionic/vue/css/text-transformation.css";
27 | import "@ionic/vue/css/flex-utils.css";
28 | import "@ionic/vue/css/display.css";
29 |
30 | /* Theme variables */
31 | import "./theme/index.css";
32 | import HomeRoutesByUser from "./enums/HomeRoutesByUser";
33 |
34 | router.beforeEach(async (to, from, next) => {
35 | const user = await Preferences.get({ key: "user" });
36 | let _userId = 0;
37 | let _userType = 0;
38 |
39 | if (user.value) {
40 | const { userId, userType } = JSON.parse(user.value);
41 | _userId = userId;
42 | _userType = userType;
43 | }
44 |
45 | if (["login", "home", "register"].includes(to.name) && user.value) {
46 | next({ name: HomeRoutesByUser[_userType] });
47 | return;
48 | }
49 |
50 | if (!to.meta.userType) {
51 | next();
52 | return;
53 | }
54 |
55 | if (!user.value) {
56 | next({ name: "logout" });
57 | return;
58 | }
59 |
60 | if (!_userId || !_userType) {
61 | next({ name: "logout" });
62 | return;
63 | }
64 |
65 | to.matched.forEach((route) => {
66 | if (typeof route.meta.userType === "object") {
67 | if (!route.meta.userType.some((type) => type === _userType)) {
68 | next({ name: "not-authorized" });
69 | return;
70 | }
71 | }
72 |
73 | if (!route.meta.userType === _userType) {
74 | next({ name: "not-authorized" });
75 | return;
76 | }
77 |
78 | next();
79 | });
80 | });
81 |
82 | const pinia = createPinia();
83 | const app = createApp(App)
84 | .use(IonicVue)
85 | .use(router)
86 | .use(pinia);
87 |
88 | app.component("BaseLayout", BaseLayout);
89 | app.component("ErrorMessage", ErrorMessage);
90 | app.component("Loading", Loading);
91 |
92 | router
93 | .isReady()
94 | .then(() => {
95 | app.mount("#app");
96 | })
97 | .then(() => defineCustomElements(window));
98 |
--------------------------------------------------------------------------------
/src/pages/Contact.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
16 | {{ getWhatsappTelephone }}
17 |
18 |
19 |
20 |
25 |
26 |
27 | {{ getContactEmail }}
28 |
29 |
30 |
31 |
32 |
36 |
37 |
38 |
48 |
49 |
50 | Social medias
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
96 |
97 |
110 |
--------------------------------------------------------------------------------
/src/pages/Error404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Oops!
7 |
8 |
9 |
10 |
11 | It appears that the screen you are looking for does not exist or is not
12 | currently available. 😔
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
38 |
--------------------------------------------------------------------------------
/src/pages/Login.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
45 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
65 |
66 |
67 |
68 |
69 | Forgot password?
70 |
71 |
72 |
73 |
74 |
75 |
76 |
155 |
156 |
166 | ./useEmitter
--------------------------------------------------------------------------------
/src/pages/Logout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Bye
7 |
8 |
9 |
10 |
11 |
12 |
13 |
39 |
40 |
57 | ./useEmitter../plugins/emitter
--------------------------------------------------------------------------------
/src/pages/NotAuthorized.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | Oops!
10 |
11 |
12 |
13 |
14 | You don't have permission to access this page 😬
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
38 |
--------------------------------------------------------------------------------
/src/pages/RecoveryPassword.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
18 |
19 |
20 |
26 |
27 |
32 |
33 |
34 |
35 |
83 |
--------------------------------------------------------------------------------
/src/pages/admin/Dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 | Admin Dashboard
3 |
4 |
--------------------------------------------------------------------------------
/src/pages/client/Home.vue:
--------------------------------------------------------------------------------
1 |
2 | Home client
3 |
4 |
--------------------------------------------------------------------------------
/src/pages/home/Index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Home
4 |
5 |
6 |
7 |
8 |
13 |
14 | {{
15 | component.label
16 | }}
17 |
18 |
19 |
24 | x
25 |
26 |
31 | ion-img component with default image in case of
32 | errors on loading
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
144 |
145 |
154 |
--------------------------------------------------------------------------------
/src/pages/home/examples/Buttons.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
38 |
--------------------------------------------------------------------------------
/src/pages/home/examples/Whatsapp.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
16 |
--------------------------------------------------------------------------------
/src/plugins/emitter.js:
--------------------------------------------------------------------------------
1 | import mitt from "mitt";
2 | const emitter = mitt();
3 | export default emitter;
4 |
--------------------------------------------------------------------------------
/src/router/authenticated/admin.js:
--------------------------------------------------------------------------------
1 | import UserTypes from "@/enums/UserTypes";
2 |
3 | export default [
4 | {
5 | path: "/admin/dashboard",
6 | name: "admin-dashboard",
7 | component: () => import("@/pages/admin/Dashboard.vue"),
8 | meta: { userType: UserTypes.ADMINISTRATOR },
9 | },
10 | ];
11 |
--------------------------------------------------------------------------------
/src/router/authenticated/client.js:
--------------------------------------------------------------------------------
1 | import UserTypes from "@/enums/UserTypes";
2 |
3 | export default [
4 | {
5 | path: "/client/home",
6 | name: "client-home",
7 | component: () => import("@/pages/client/Home.vue"),
8 | meta: { userType: UserTypes.CLIENT },
9 | },
10 | ];
11 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHistory } from "@ionic/vue-router";
2 |
3 | import client from "./authenticated/client";
4 | import admin from "./authenticated/admin";
5 |
6 | const routes = [
7 | {
8 | path: "/",
9 | redirect: "/home",
10 | },
11 | {
12 | path: "/home",
13 | name: "home",
14 | component: () => import("../pages/home/Index.vue"),
15 | },
16 | ...client,
17 | ...admin,
18 | {
19 | path: "/login",
20 | name: "login",
21 | component: () => import("../pages/Login.vue"),
22 | },
23 | {
24 | path: "/recovery-password",
25 | name: "recovery-password",
26 | component: () => import("../pages/RecoveryPassword.vue"),
27 | },
28 | {
29 | path: "/register",
30 | name: "register",
31 | component: () => import("../pages/Error404.vue"),
32 | },
33 | {
34 | path: "/contact",
35 | name: "contact",
36 | component: () => import("../pages/Contact.vue"),
37 | },
38 | {
39 | path: "/logout",
40 | name: "logout",
41 | component: () => import("../pages/Logout.vue"),
42 | },
43 | {
44 | path: "/not-authorized",
45 | name: "not-authorized",
46 | component: () => import("../pages/NotAuthorized.vue"),
47 | },
48 | {
49 | path: "/:catchAll(.*)",
50 | name: "not-found",
51 | component: () => import("../pages/Error404.vue"),
52 | },
53 | ];
54 |
55 | const router = createRouter({
56 | history: createWebHistory(
57 | process.env.VUE_APP_PUBLIC_PATH || process.env.BASE_URL,
58 | ),
59 | routes,
60 | });
61 |
62 | export default router;
63 |
--------------------------------------------------------------------------------
/src/store/general.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 |
3 | export const useGeneralStore = defineStore('general', {
4 | getters: {
5 | getImagesAddress() {
6 | return process.env.VUE_APP_IMAGES_ADDRESS;
7 | },
8 | getApiUrl() {
9 | return process.env.VUE_APP_API_URL;
10 | },
11 | getWhatsappTelephone() {
12 | return process.env.VUE_APP_WHATS_TELEPHONE;
13 | },
14 | getContactEmail() {
15 | return process.env.VUE_APP_CONTACT_EMAIL;
16 | },
17 | },
18 | })
--------------------------------------------------------------------------------
/src/store/login.js:
--------------------------------------------------------------------------------
1 | import api from "@/api";
2 | import { Preferences } from "@capacitor/preferences";
3 | import { defineStore } from "pinia";
4 | import UserTypes from "../enums/UserTypes";
5 | import { makeString } from "../utils";
6 |
7 | export const useLoginStore = defineStore("login", {
8 | actions: {
9 | async setToken(token) {
10 | await Preferences.set({
11 | key: "token",
12 | value: token,
13 | });
14 | },
15 | async setUserData(userData) {
16 | await Preferences.set({
17 | key: "user",
18 | value: JSON.stringify({
19 | userId: userData.id,
20 | userType: userData.typeUser,
21 | userName: userData.userName,
22 | }),
23 | });
24 | },
25 | async login(userCredentials) {
26 | /**
27 | * This is a fake login, you can remove this if
28 | */
29 | if (
30 | userCredentials.email === "admin" &&
31 | userCredentials.password === "admin"
32 | ) {
33 | return await this.fakeLogin();
34 | }
35 |
36 | return api
37 | .post("/login", userCredentials)
38 | .then(async (response) => {
39 | await this.setToken(response.token);
40 | await this.setUserData(response.data);
41 |
42 | return response.data;
43 | })
44 | .catch((error) => error.response);
45 | },
46 | /**
47 | * This is a fake login, you can remove this method
48 | */
49 | async fakeLogin() {
50 | await this.setToken(makeString(20));
51 | await this.setUserData({
52 | id: 1,
53 | typeUser: UserTypes.ADMINISTRATOR,
54 | userName: "Admin",
55 | });
56 |
57 | return {
58 | data: {
59 | userType: UserTypes.ADMINISTRATOR,
60 | },
61 | };
62 | },
63 | },
64 | });
65 |
--------------------------------------------------------------------------------
/src/store/menu.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 | import {
3 | personAdd,
4 | power,
5 | enter,
6 | call,
7 | home,
8 | alertCircle,
9 | nuclear,
10 | } from 'ionicons/icons';
11 |
12 | import UserTypes from '../enums/UserTypes';
13 |
14 | export const useMenuStore = defineStore('menu', {
15 | state: () => ({
16 | /**
17 | * These items will be shown all the time, whether the user is logged in
18 | * or not
19 | */
20 | publicItems: [
21 | {
22 | title: "Contact",
23 | url: "/contact",
24 | icon: call,
25 | },
26 | {
27 | title: "Not found",
28 | url: "/any-router-that-dont-exists",
29 | icon: alertCircle,
30 | },
31 | {
32 | title: "Not authorized",
33 | url: "/not-authorized",
34 | icon: nuclear,
35 | },
36 | {
37 | title: "Division",
38 | type: 2,
39 | },
40 | ],
41 | /**
42 | * These items will only be shown when the user is not logged in
43 | */
44 | withoutAuth: [
45 | {
46 | title: "Home",
47 | url: "/home",
48 | icon: home,
49 | },
50 | {
51 | title: "Division",
52 | type: 2,
53 | },
54 | {
55 | title: "Login",
56 | url: "/login",
57 | icon: enter,
58 | },
59 | {
60 | title: "Register",
61 | url: "/register",
62 | icon: personAdd,
63 | },
64 | {
65 | title: "Division",
66 | type: 2,
67 | },
68 | ],
69 | /**
70 | * These items will only be shown when the user is logged in
71 | */
72 | needAuth: [
73 | {
74 | title: "Logout",
75 | url: "/logout",
76 | icon: power,
77 | },
78 | ],
79 | /**
80 | * These items will be shown according to the type of user
81 | */
82 | [UserTypes.CLIENT]: [
83 | {
84 | title: "Home",
85 | url: "/client/home",
86 | icon: home,
87 | },
88 | {
89 | title: "Division",
90 | type: 2,
91 | },
92 | ],
93 | [UserTypes.ADMINISTRATOR]: [
94 | {
95 | title: "Dashboard",
96 | url: "/admin/dashboard",
97 | icon: home,
98 | },
99 | {
100 | title: "Division",
101 | type: 2,
102 | },
103 | ],
104 | }),
105 | getters: {
106 | getPublic(state) {
107 | return state.publicItems;
108 | },
109 | getWithoutAuth(state) {
110 | return state.withoutAuth;
111 | },
112 | getNeedAuth(state) {
113 | return state.needAuth;
114 | },
115 | getMenuByUserType: (state) => (userType) => state[userType] || [],
116 | }
117 | })
--------------------------------------------------------------------------------
/src/store/user.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from "pinia";
2 | import { Preferences } from "@capacitor/preferences";
3 | import api from "@/api/index";
4 |
5 | export const useUserStore = defineStore("user", {
6 | state: () => ({
7 | userId: 0,
8 | userType: 0,
9 | }),
10 | getters: {
11 | async getUserId() {
12 | const user = await Preferences.get({ key: "user" });
13 |
14 | if (!user.value) return 0;
15 |
16 | const { userId } = JSON.parse(user.value);
17 |
18 | return userId || 0;
19 | },
20 | async getUserType() {
21 | const user = await Preferences.get({ key: "user" });
22 |
23 | if (!user.value) return 0;
24 |
25 | const { userType } = JSON.parse(user.value);
26 |
27 | return userType || 0;
28 | },
29 | async getUserName() {
30 | const user = await Preferences.get({ key: "user" });
31 |
32 | if (!user.value) return "";
33 |
34 | const { userName } = JSON.parse(user.value);
35 |
36 | return userName || "";
37 | },
38 | },
39 | actions: {
40 | cleanUserData() {
41 | this.setUserId = 0;
42 | this.setUserType = 0;
43 | },
44 | sendRecoveryPasswordEmail(email) {
45 | return api.post("/recover-password", { email });
46 | },
47 | },
48 | });
49 |
--------------------------------------------------------------------------------
/src/theme/core.css:
--------------------------------------------------------------------------------
1 | .fs-10 {
2 | font-size: 0.5em;
3 | }
4 |
5 | .fs-12 {
6 | font-size: 0.75em;
7 | }
8 |
9 | .fs-14 {
10 | font-size: 0.875em;
11 | }
12 |
13 | .fs-16 {
14 | font-size: 1em;
15 | }
16 |
17 | .fs-18 {
18 | font-size: 1.125em;
19 | }
20 |
21 | .fs-20 {
22 | font-size: 1.25em;
23 | }
24 |
25 | .fs-22 {
26 | font-size: 1.375em;
27 | }
28 |
29 | .fs-24 {
30 | font-size: 1.5em;
31 | }
32 |
33 | .fs-26 {
34 | font-size: 1.625em;
35 | }
36 |
37 | .fs-28 {
38 | font-size: 1.75em;
39 | }
40 |
41 | .fs-30 {
42 | font-size: 1.875em;
43 | }
44 |
45 | .fs-32 {
46 | font-size: 2em;
47 | }
48 |
49 | .font-weight-bold {
50 | font-weight: bold;
51 | }
52 |
53 | .w-25 {
54 | width: 25%;
55 | }
56 |
57 | .w-50 {
58 | width: 50%;
59 | }
60 |
61 | .w-75 {
62 | width: 75%;
63 | }
64 |
65 | .w-100 {
66 | width: 100%;
67 | }
68 |
69 | .no-text-decoration {
70 | text-decoration: none;
71 | }
72 |
73 | .alert-radio-group::-webkit-scrollbar,
74 | .alert-checkbox-group::-webkit-scrollbar {
75 | width: 1em;
76 | display: block !important;
77 | }
78 |
79 | .alert-radio-group::-webkit-scrollbar-track,
80 | .alert-checkbox-group::-webkit-scrollbar-track {
81 | -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
82 | }
83 |
84 | .alert-radio-group::-webkit-scrollbar-thumb,
85 | .alert-checkbox-group::-webkit-scrollbar-thumb {
86 | background-color: darkgrey;
87 | outline: 1px solid slategrey;
88 | }
89 |
--------------------------------------------------------------------------------
/src/theme/index.css:
--------------------------------------------------------------------------------
1 | @import "./reset.css";
2 | @import "./core.css";
3 | @import "./variables.css";
4 |
--------------------------------------------------------------------------------
/src/theme/reset.css:
--------------------------------------------------------------------------------
1 | .ios .title-default .hydrated {
2 | padding-inline: 0px;
3 | }
4 |
5 | ion-item {
6 | --inner-padding-end: 0;
7 | --padding-start: 0;
8 | }
9 |
10 | #ForRadioOptions .alert-radio-label.sc-ion-alert-md,
11 | .alert-radio-label.sc-ion-alert-ios {
12 | white-space: normal;
13 | }
14 | .alert-tappable.alert-radio {
15 | height: auto;
16 | contain: content;
17 | }
18 |
19 | #ForCheckbox .alert-checkbox-label.sc-ion-alert-md,
20 | .alert-checkbox-label.sc-ion-alert-ios {
21 | white-space: normal;
22 | }
23 | .alert-tappable.alert-checkbox {
24 | height: auto;
25 | contain: content;
26 | }
27 |
--------------------------------------------------------------------------------
/src/theme/variables.css:
--------------------------------------------------------------------------------
1 | /* Ionic Variables and Theming. For more info, please see:
2 | http://ionicframework.com/docs/theming/ */
3 |
4 | /** Ionic CSS Variables **/
5 | :root {
6 | /** primary **/
7 | --ion-color-primary: #FF7F80;
8 | --ion-color-primary-rgb: rgb(255, 127, 128);
9 | --ion-color-primary-contrast: #ffffff;
10 | --ion-color-primary-contrast-rgb: 0, 0, 0;
11 | --ion-color-primary-shade: #e95a5a;
12 | --ion-color-primary-tint: #f79898;
13 |
14 | /** secondary **/
15 | --ion-color-secondary: #3dc2ff;
16 | --ion-color-secondary-rgb: 61, 194, 255;
17 | --ion-color-secondary-contrast: #ffffff;
18 | --ion-color-secondary-contrast-rgb: 255, 255, 255;
19 | --ion-color-secondary-shade: #36abe0;
20 | --ion-color-secondary-tint: #50c8ff;
21 |
22 | /** tertiary **/
23 | --ion-color-tertiary: #5260ff;
24 | --ion-color-tertiary-rgb: 82, 96, 255;
25 | --ion-color-tertiary-contrast: #ffffff;
26 | --ion-color-tertiary-contrast-rgb: 255, 255, 255;
27 | --ion-color-tertiary-shade: #4854e0;
28 | --ion-color-tertiary-tint: #6370ff;
29 |
30 | /** success **/
31 | --ion-color-success: #2dd36f;
32 | --ion-color-success-rgb: 45, 211, 111;
33 | --ion-color-success-contrast: #ffffff;
34 | --ion-color-success-contrast-rgb: 255, 255, 255;
35 | --ion-color-success-shade: #28ba62;
36 | --ion-color-success-tint: #42d77d;
37 |
38 | /** warning **/
39 | --ion-color-warning: #ffc409;
40 | --ion-color-warning-rgb: 255, 196, 9;
41 | --ion-color-warning-contrast: #000000;
42 | --ion-color-warning-contrast-rgb: 0, 0, 0;
43 | --ion-color-warning-shade: #e0ac08;
44 | --ion-color-warning-tint: #ffca22;
45 |
46 | /** danger **/
47 | --ion-color-danger: #eb445a;
48 | --ion-color-danger-rgb: 235, 68, 90;
49 | --ion-color-danger-contrast: #ffffff;
50 | --ion-color-danger-contrast-rgb: 255, 255, 255;
51 | --ion-color-danger-shade: #cf3c4f;
52 | --ion-color-danger-tint: #ed576b;
53 |
54 | /** dark **/
55 | --ion-color-dark: #222428;
56 | --ion-color-dark-rgb: 34, 36, 40;
57 | --ion-color-dark-contrast: #ffffff;
58 | --ion-color-dark-contrast-rgb: 255, 255, 255;
59 | --ion-color-dark-shade: #1e2023;
60 | --ion-color-dark-tint: #383a3e;
61 |
62 | /** medium **/
63 | --ion-color-medium: #92949c;
64 | --ion-color-medium-rgb: 146, 148, 156;
65 | --ion-color-medium-contrast: #ffffff;
66 | --ion-color-medium-contrast-rgb: 255, 255, 255;
67 | --ion-color-medium-shade: #808289;
68 | --ion-color-medium-tint: #9d9fa6;
69 |
70 | /** light **/
71 | --ion-color-light: #f4f5f8;
72 | --ion-color-light-rgb: 244, 245, 248;
73 | --ion-color-light-contrast: #000000;
74 | --ion-color-light-contrast-rgb: 0, 0, 0;
75 | --ion-color-light-shade: #d7d8da;
76 | --ion-color-light-tint: #f5f6f9;
77 | }
78 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | export function makeString(length) {
2 | let result = "";
3 | const characters =
4 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
5 | const charactersLength = characters.length;
6 | let counter = 0;
7 | while (counter < length) {
8 | result += characters.charAt(Math.floor(Math.random() * charactersLength));
9 | counter += 1;
10 | }
11 | return result;
12 | }
13 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 |
3 | module.exports = {
4 | publicPath: process.env.VUE_APP_PUBLIC_PATH || "/",
5 | devServer: {
6 | port: process.env.VUE_APP_PORT || "8080",
7 | },
8 | lintOnSave: false,
9 | chainWebpack: (config) => {
10 | config.resolve.alias
11 | .set("Api", path.resolve(__dirname, "src/api"))
12 | .set("Components", path.resolve(__dirname, "src/components"))
13 | .set("Enums", path.resolve(__dirname, "src/enums"))
14 | .set("Composition", path.resolve(__dirname, "src/composition"));
15 | },
16 | };
17 |
--------------------------------------------------------------------------------