├── .commitlintrc.json ├── .eslintrc.json ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── support_question.md ├── renovate.json └── workflows │ ├── build.yml │ ├── publish.yml │ ├── release.yml │ └── update-lock.yml ├── .gitignore ├── .husky ├── .gitignore ├── commit-msg └── pre-commit ├── .release-it.yml ├── LICENSE ├── LICENSE.header ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── img │ └── icons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── android-chrome-maskable-192x192.png │ │ ├── android-chrome-maskable-512x512.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── msapplication-icon-144x144.png │ │ ├── mstile-150x150.png │ │ └── safari-pinned-tab.svg ├── index.html └── robots.txt ├── src ├── App.vue ├── assets │ ├── bg-chat.png │ ├── css │ │ └── app.css │ ├── ic_download_chat.svg │ ├── ic_loader_chat.svg │ ├── loading.gif │ ├── login-v2.72cd8a26.svg │ └── logo.png ├── components │ ├── AudioComponent.vue │ ├── ConversasComponent.vue │ ├── ImageModal.vue │ ├── MessageComponent.vue │ ├── Sidebar.vue │ ├── SidebarGroupsMenu.vue │ └── SidebarSettingsMenu.vue ├── config.js ├── main.js ├── pages │ ├── Chat.vue │ ├── Configs.vue │ ├── Configs_Buttons.vue │ ├── Configs_Lists.vue │ ├── Contacts.vue │ ├── Groups.vue │ ├── Login.vue │ └── Profile.vue ├── registerServiceWorker.js ├── router │ └── index.js ├── services │ ├── api.js │ ├── auth.js │ ├── language.js │ ├── settings.js │ ├── settings_buttons.js │ └── settings_lists.js ├── stores │ └── dataStore.js └── util │ └── sessionHeader.js ├── vue.config.js └── yarn.lock /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/commitlintrc.json", 3 | "extends": ["@commitlint/config-conventional"], 4 | "rules": { 5 | "body-max-line-length": [0, "always", 100], 6 | "header-max-length": [2, "always", 120], 7 | "subject-case": [1, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]] 8 | } 9 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "es6": true, 5 | "node": true 6 | }, 7 | "parser": "@babel/eslint-parser", 8 | "plugins": ["@babel"], 9 | "extends": ["eslint:recommended", "plugin:prettier/recommended"], 10 | "rules": { 11 | "no-empty": ["error", { "allowEmptyCatch": true }], 12 | "no-unused-vars": "warn", 13 | "no-undef": [ 14 | "warn" 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | issuehunt: wppconnect-team 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | labels: 'bug, needs triage' 5 | --- 6 | 7 | ## Description 8 | 9 | [Description of the bug, When Issue Happens] 10 | 11 | ## Environment 12 | 13 | - **Wppconnect-server version(s):** [e.g. 2.0.27, 2.2.1] 14 | - **Browser:** [e.g. Chrome 87, Chromium 85] 15 | - **OS:** [e.g. OSX 10.13.4, Windows 10] 16 | - **Node version:** [e.g. Node 8, Node 14] 17 | - **WhatsApp version:** [e.g. 2.2126.14] 18 | - **MultiDevice (BETA):** yes/no 19 | - **config.json:** [Your src/config.json file content] 20 | 21 | ## Steps to Reproduce 22 | 23 | 1. [First Step] 24 | 2. [Second Step] 25 | 3. [and so on...] 26 | 27 | ## Log Output 28 | 29 | ``` 30 | If relevant, paste all of your Log Output 31 | ``` 32 | 33 | ## Your Code 34 | 35 | ``` 36 | If relevant, paste all of your challenge code in here 37 | ``` 38 | 39 | ## Additional context / Screenshot 40 | 41 | Add any other context about the problem here. If applicable, add screenshots to help explain. 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: "I have a suggestion (and may want to implement it \U0001F642)!" 4 | labels: 'enhancement, needs triage' 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/support_question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Support Question 3 | about: 'If you have a question, please check out our Documentation or Discord!' 4 | labels: 'question, needs triage' 5 | --- 6 | 7 | **Before adding this issue, make sure you do the following to make sure this is not a duplicate:** 8 | 9 | 1. Search through the repo's previous issues 10 | 2. Read through the readme at least once 11 | 3. Search the docs for the feature you're looking for 12 | 13 | We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below. Thanks! 😁. 14 | 15 | --- 16 | 17 | - Discord: https://discord.gg/qCJ95FVbzR 18 | - WhatsApp Group: [https://chat.whatsapp.com/EGLVbeFGgt40OkbOCX8Sei] 19 | - Also have a look at the readme for more information on how to get support: 20 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | ":prHourlyLimitNone", 6 | ":prNotPending", 7 | ":semanticCommits" 8 | ], 9 | "prConcurrentLimit": 3, 10 | "lockFileMaintenance": { 11 | "enabled": true, 12 | "automerge": true 13 | }, 14 | "packageRules": [ 15 | { 16 | "description": "Use bump strategy", 17 | "matchPackagePatterns": ["*"], 18 | "rangeStrategy": "bump", 19 | "semanticCommitType": "build", 20 | "labels": ["dependencies"] 21 | }, 22 | { 23 | "matchManagers": ["github-actions"], 24 | "semanticCommitType": "ci", 25 | "addLabels": ["github_actions"] 26 | }, 27 | { 28 | "matchManagers": ["npm"], 29 | "addLabels": ["javascript"] 30 | }, 31 | { 32 | "matchDepTypes": ["devDependencies"], 33 | "semanticCommitScope": "deps-dev" 34 | }, 35 | { 36 | "description": "Show in changelog package updates", 37 | "matchPackagePatterns": ["^@wppconnect/", "^@wppconnect-team/"], 38 | "semanticCommitType": "fix" 39 | }, 40 | { 41 | "description": "Automatically merge minor and patch-level updates", 42 | "matchUpdateTypes": ["minor", "patch", "pin", "digest"], 43 | "automerge": true, 44 | "automergeStrategy": "squash", 45 | "automergeType": "pr" 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*' 7 | pull_request: 8 | branches: 9 | - '*' 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | 18 | - name: Setup Node 19 | uses: actions/setup-node@v3.3.0 20 | with: 21 | node-version: 16.x 22 | 23 | - name: Get yarn cache directory 24 | id: yarn-cache 25 | run: | 26 | echo "::set-output name=dir::$(yarn cache dir)" 27 | 28 | - name: Setup yarn cache 29 | uses: actions/cache@v3 30 | with: 31 | path: ${{ steps.yarn-cache.outputs.dir }} 32 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 33 | restore-keys: | 34 | ${{ runner.os }}-yarn- 35 | 36 | - name: Install Dependencies 37 | run: yarn install 38 | 39 | - name: Build source 40 | run: yarn build 41 | 42 | lint: 43 | runs-on: ubuntu-latest 44 | steps: 45 | - name: Checkout 46 | uses: actions/checkout@v3 47 | 48 | - name: Setup Node 49 | uses: actions/setup-node@v3.3.0 50 | with: 51 | node-version: 16.x 52 | 53 | - name: Get yarn cache directory 54 | id: yarn-cache 55 | run: | 56 | echo "::set-output name=dir::$(yarn cache dir)" 57 | 58 | - name: Setup yarn cache 59 | uses: actions/cache@v3 60 | with: 61 | path: ${{ steps.yarn-cache.outputs.dir }} 62 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 63 | restore-keys: | 64 | ${{ runner.os }}-yarn- 65 | 66 | - name: Install Dependencies 67 | run: yarn install 68 | 69 | - name: Lint source 70 | run: yarn lint 71 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v3 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Fetching tags 18 | run: git fetch --tags -f || true 19 | 20 | - name: Setup Node 21 | uses: actions/setup-node@v3.3.0 22 | with: 23 | node-version: 16.x 24 | registry-url: 'https://registry.npmjs.org' 25 | env: 26 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 27 | 28 | - name: Get yarn cache directory 29 | id: yarn-cache 30 | run: | 31 | echo "::set-output name=dir::$(yarn cache dir)" 32 | - name: Setup yarn cache 33 | uses: actions/cache@v3 34 | with: 35 | path: ${{ steps.yarn-cache.outputs.dir }} 36 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 37 | restore-keys: | 38 | ${{ runner.os }}-yarn- 39 | - name: Install Dependencies 40 | run: yarn install 41 | env: 42 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 43 | 44 | - name: Build 45 | run: yarn build 46 | 47 | - name: Generate Changelog 48 | id: generate_changelog 49 | run: | 50 | changelog=$(npm run changelog:last --silent) 51 | changelog="${changelog//$'\n'/'%0A'}" 52 | changelog="${changelog//$'\r'/'%0D'}" 53 | echo -e "set-output name=changelog::${changelog-}\n" 54 | echo -e "::set-output name=changelog::${changelog}\n" 55 | - name: Create Release 56 | id: create_release 57 | uses: actions/create-release@v1 58 | env: 59 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 60 | with: 61 | tag_name: ${{ github.ref }} 62 | release_name: ${{ github.ref }} 63 | body: ${{ steps.generate_changelog.outputs.changelog }} 64 | draft: false 65 | prerelease: false 66 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | increment: 7 | description: 'Tipo de incremento: patch, minor, major ou pre*' 8 | required: true 9 | default: 'patch' 10 | 11 | jobs: 12 | release: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | with: 18 | token: ${{ secrets.PERSONAL_TOKEN }} 19 | 20 | - name: Setup GIT 21 | run: | 22 | git config --global user.name "github-actions[bot]" 23 | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" 24 | 25 | - name: Setup Node 26 | uses: actions/setup-node@v3.3.0 27 | with: 28 | node-version: 14.x 29 | 30 | - name: Get yarn cache directory 31 | id: yarn-cache 32 | run: | 33 | echo "::set-output name=dir::$(yarn cache dir)" 34 | 35 | - name: Setup yarn cache 36 | uses: actions/cache@v3 37 | with: 38 | path: ${{ steps.yarn-cache.outputs.dir }} 39 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 40 | restore-keys: | 41 | ${{ runner.os }}-yarn- 42 | 43 | - name: Install Dependencies 44 | run: yarn install 45 | 46 | - name: Release 47 | run: 'npx release-it --increment ${{ github.event.inputs.increment }}' 48 | -------------------------------------------------------------------------------- /.github/workflows/update-lock.yml: -------------------------------------------------------------------------------- 1 | name: update-lock 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'main' 7 | 8 | jobs: 9 | update-lock: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v3 14 | 15 | - name: Setup Node 16 | uses: actions/setup-node@v3.3.0 17 | with: 18 | node-version: 16.x 19 | 20 | - name: Get yarn cache directory 21 | id: yarn-cache 22 | run: | 23 | echo "::set-output name=dir::$(yarn cache dir)" 24 | 25 | - name: Setup yarn cache 26 | uses: actions/cache@v3 27 | with: 28 | path: ${{ steps.yarn-cache.outputs.dir }} 29 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 30 | restore-keys: | 31 | ${{ runner.os }}-yarn- 32 | 33 | - name: Install Dependencies 34 | run: yarn install 35 | 36 | - uses: stefanzweifel/git-auto-commit-action@v4 37 | with: 38 | commit_message: 'chore: Updated yarn.lock' 39 | file_pattern: yarn.lock 40 | commit_user_name: github-actions[bot] 41 | commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #. "$(dirname "$0")/_/husky.sh" 3 | 4 | #npx --no-install commitlint --edit $1 -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #. "$(dirname "$0")/_/husky.sh" 3 | 4 | #npx --no-install pretty-quick --staged -------------------------------------------------------------------------------- /.release-it.yml: -------------------------------------------------------------------------------- 1 | git: 2 | commitMessage: 'chore(release): v${version}' 3 | tagAnnotation: 'chore(release): v${version}' 4 | tagName: 'v${version}' 5 | 6 | hooks: 7 | after:bump: 8 | - 'npm run changelog:update' 9 | 10 | # automatic publish from github workflow 11 | npm: 12 | publish: false 13 | private: true 14 | registry: 'OMITTED' -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | Copyright 2021 WPPConnect Team 179 | 180 | Licensed under the Apache License, Version 2.0 (the "License"); 181 | you may not use this file except in compliance with the License. 182 | You may obtain a copy of the License at 183 | 184 | http://www.apache.org/licenses/LICENSE-2.0 185 | 186 | Unless required by applicable law or agreed to in writing, software 187 | distributed under the License is distributed on an "AS IS" BASIS, 188 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 | See the License for the specific language governing permissions and 190 | limitations under the License. -------------------------------------------------------------------------------- /LICENSE.header: -------------------------------------------------------------------------------- 1 | Copyright 2022 WPPConnect Team 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WPPConnect FrontEnd VueJS 2 | ---- 3 | 4 | **The project is in Beta, in DEVELOPMENT, this is not working yet, and bugs may occur** 5 | 6 | 7 | 8 | > The repository has been without maintenance for quite some time now, and it's likely not functioning properly. 9 | 10 | ## Our online channels 11 | 12 | [![Discord](https://img.shields.io/discord/844351092758413353?color=blueviolet&label=Discord&logo=discord&style=flat)](https://discord.gg/JU5JGGKGNG) 13 | [![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/wppconnect) 14 | [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K) 15 | [![YouTube](https://img.shields.io/youtube/channel/subscribers/UCD7J9LG08PmGQrF5IS7Yv9A?label=YouTube)](https://www.youtube.com/c/wppconnect) 16 | 17 | ## Installation 18 | 19 | WPPConnect FrontEnd has been designed to demonstrate how multi-session works dynamically. **The project was developed in VueJS** 20 | 21 | 22 | ## Change port backend 23 | 24 | To change host and port, just access [config.js](/src/config.js). 25 | 26 | And change the value of **IP_SERVER** & **IP_SOCKET_IO** 27 | 28 | ## Get Started 29 | To run the project is very simple, just follow the steps below. 30 | 31 | Clone the repository and open the unzipped project and run the following command in the terminal: 32 | 33 | 34 | **Installing** 35 | 36 | ```jsx 37 | yarn install 38 | // or 39 | npm install 40 | ``` 41 | 42 | **Running** 43 | 44 | ### Compiles and hot-reloads for development 45 | ``` 46 | npm run serve 47 | ``` 48 | 49 | ### Compiles and minifies for production 50 | ``` 51 | npm run build 52 | ``` 53 | ### To run, go to 'dist' folder 54 | ```jsx 55 | serve 56 | ``` 57 | ## Features 58 | 59 | - [x] Chat 60 | - [x] Multisession 61 | - [x] Receiving messages (real time) 62 | - [x] Send audio, messages, documents, images, videos, etc 63 | - [x] Receive messages, images, audio, sticker, documents, etc 64 | - [x] Reject call or/and with messages 65 | - [x] Send attandant name 66 | - [x] Send buttons List 67 | - [x] Send List sections 68 | 69 | ## API 70 | 71 | This site uses [wppconnect-server](https://github.com/wppconnect-team/wppconnect-server/) to populate the data. Then you will need something similar to run the project successfully. 72 | 73 | ## Demo 74 | ![Peek 2021-05-29 00-05](https://user-images.githubusercontent.com/40338524/120056309-aa5b0180-c011-11eb-848b-94569c32a8c6.gif) 75 | 76 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wppconnect-front-vue", 3 | "version": "1.0.1", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "changelog:last": "conventional-changelog -p angular -r 2", 9 | "changelog:preview": "conventional-changelog -p angular -u", 10 | "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s", 11 | "commit": "git-cz", 12 | "license:add": "license-check-and-add add", 13 | "license:check": "license-check-and-add check", 14 | "lint": "eslint --ext .js src", 15 | "prepare": "husky install", 16 | "release": "release-it" 17 | }, 18 | "dependencies": { 19 | "axios": "^0.27.2", 20 | "core-js": "^3.8.3", 21 | "emoji-mart-vue-fast": "^10.2.2", 22 | "mic-recorder-to-mp3": "^2.2.2", 23 | "pinia": "^2.0.14", 24 | "register-service-worker": "^1.7.2", 25 | "socket.io-client": "^4.5.1", 26 | "vue": "^3.2.13", 27 | "vue-router": "^4.0.3", 28 | "vue-sweetalert2": "^5.0.5" 29 | }, 30 | "devDependencies": { 31 | "@babel/cli": "^7.17.10", 32 | "@babel/core": "^7.18.5", 33 | "@babel/eslint-parser": "^7.18.2", 34 | "@babel/eslint-plugin": "^7.17.7", 35 | "@commitlint/cli": "^17.0.2", 36 | "@commitlint/config-conventional": "^17.0.2", 37 | "@commitlint/cz-commitlint": "^17.0.0", 38 | "@vue/cli-plugin-babel": "~5.0.0", 39 | "@vue/cli-plugin-pwa": "~5.0.0", 40 | "@vue/cli-plugin-router": "~5.0.0", 41 | "@vue/cli-service": "~5.0.0", 42 | "conventional-changelog-cli": "^2.2.2", 43 | "eslint": "^8.18.0", 44 | "eslint-config-prettier": "^8.5.0", 45 | "eslint-plugin-prettier": "^4.0.0", 46 | "husky": "^8.0.1", 47 | "license-check-and-add": "^4.0.5", 48 | "prettier": "^2.7.1" 49 | }, 50 | "browserslist": [ 51 | "> 1%", 52 | "last 2 versions", 53 | "not dead", 54 | "not ie 11" 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/favicon.ico -------------------------------------------------------------------------------- /public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | WPPConnect - Automatize o seu WhatsApp 19 | 20 | 21 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/bg-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/src/assets/bg-chat.png -------------------------------------------------------------------------------- /src/assets/css/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | :root { 17 | --background: #fff; 18 | --primary: #F7007E; 19 | --secondary: #606BD6; 20 | --blue: #79C8F8; 21 | --black: #000; 22 | --white: #fff; 23 | --gray: #666; 24 | } 25 | 26 | * { 27 | margin: 0; 28 | padding: 0; 29 | box-sizing: border-box; 30 | font-family: "Jost", sans-serif; 31 | } 32 | 33 | html { 34 | font-size: 14px; 35 | 36 | -webkit-appearance: none; 37 | -moz-appearance: none; 38 | appearance: none; 39 | } 40 | 41 | body { 42 | height: 100vh; 43 | background: var(--background); 44 | } 45 | 46 | #root { 47 | min-height: 100vh; 48 | } 49 | 50 | .saida-bottom-top { 51 | animation: saida-bottom 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both; 52 | } 53 | 54 | @keyframes saida-bottom { 55 | 0% { 56 | transform: scaleY(1); 57 | transform-origin: 100% 0%; 58 | opacity: 1; 59 | } 60 | 100% { 61 | transform: scaleY(0); 62 | transform-origin: 100% 0%; 63 | opacity: 1; 64 | } 65 | } 66 | 67 | .noselect { 68 | -webkit-touch-callout: none; /* iOS Safari */ 69 | -webkit-user-select: none; /* Safari */ 70 | -khtml-user-select: none; /* Konqueror HTML */ 71 | -moz-user-select: none; /* Old versions of Firefox */ 72 | -ms-user-select: none; /* Internet Explorer/Edge */ 73 | user-select: none; 74 | /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */ 75 | } -------------------------------------------------------------------------------- /src/assets/ic_download_chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/ic_loader_chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | chat (2) 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/src/assets/loading.gif -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wppconnect-team/wppconnect-frontend-vue/5a1c94f3afa9ae0a52a30135bb0823abf2ddfe2c/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/AudioComponent.vue: -------------------------------------------------------------------------------- 1 | 31 | 151 | 384 | 385 | -------------------------------------------------------------------------------- /src/components/ConversasComponent.vue: -------------------------------------------------------------------------------- 1 | 28 | 118 | 272 | 273 | -------------------------------------------------------------------------------- /src/components/ImageModal.vue: -------------------------------------------------------------------------------- 1 | 32 | 67 | 139 | 140 | -------------------------------------------------------------------------------- /src/components/MessageComponent.vue: -------------------------------------------------------------------------------- 1 | 59 | 204 | 365 | 366 | -------------------------------------------------------------------------------- /src/components/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 53 | 107 | -------------------------------------------------------------------------------- /src/components/SidebarGroupsMenu.vue: -------------------------------------------------------------------------------- 1 | 56 | 96 | -------------------------------------------------------------------------------- /src/components/SidebarSettingsMenu.vue: -------------------------------------------------------------------------------- 1 | 79 | 119 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | IP_SERVER: "http://localhost:21465/api/", 3 | IP_SOCKET_IO: "http://localhost:21465/", 4 | TOKEN_KEY: "@WPPConnect-Token", 5 | LANGUAGE: "en-US", // Available: en-US, pt-BR, 6 | }; 7 | export default config; 8 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue"; 2 | import { createPinia } from "pinia"; 3 | import App from "./App.vue"; 4 | import "./registerServiceWorker"; 5 | import router from "./router"; 6 | import VueSweetalert2 from "vue-sweetalert2"; 7 | import "sweetalert2/dist/sweetalert2.min.css"; 8 | 9 | require("./assets/css/app.css"); 10 | 11 | const app = createApp(App); 12 | 13 | // Components 14 | 15 | const pinia = createPinia(); 16 | app.use(pinia); 17 | app.use(VueSweetalert2); 18 | 19 | app.use(router).mount("#app"); 20 | -------------------------------------------------------------------------------- /src/pages/Chat.vue: -------------------------------------------------------------------------------- 1 | 68 | 118 | -------------------------------------------------------------------------------- /src/pages/Configs_Buttons.vue: -------------------------------------------------------------------------------- 1 | 113 | 201 | -------------------------------------------------------------------------------- /src/pages/Configs_Lists.vue: -------------------------------------------------------------------------------- 1 | 108 | 200 | -------------------------------------------------------------------------------- /src/pages/Contacts.vue: -------------------------------------------------------------------------------- 1 | 35 | 87 | -------------------------------------------------------------------------------- /src/pages/Groups.vue: -------------------------------------------------------------------------------- 1 | 39 | 119 | -------------------------------------------------------------------------------- /src/pages/Login.vue: -------------------------------------------------------------------------------- 1 | 45 | 154 | -------------------------------------------------------------------------------- /src/pages/Profile.vue: -------------------------------------------------------------------------------- 1 | 45 | 127 | -------------------------------------------------------------------------------- /src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from "register-service-worker"; 4 | 5 | if (process.env.NODE_ENV === "production") { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready() { 8 | console.log( 9 | "App is being served from cache by a service worker.\n" + 10 | "For more details, visit https://goo.gl/AFskqB" 11 | ); 12 | }, 13 | registered() { 14 | console.log("Service worker has been registered."); 15 | }, 16 | cached() { 17 | console.log("Content has been cached for offline use."); 18 | }, 19 | updatefound() { 20 | console.log("New content is downloading."); 21 | }, 22 | updated() { 23 | console.log("New content is available; please refresh."); 24 | }, 25 | offline() { 26 | console.log( 27 | "No internet connection found. App is running in offline mode." 28 | ); 29 | }, 30 | error(error) { 31 | console.error("Error during service worker registration:", error); 32 | }, 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from "vue-router"; 2 | import config from "../config.js"; 3 | const Login = () => import("../pages/Login"); 4 | const Chat = () => import("../pages/Chat"); 5 | const Contacts = () => import("../pages/Contacts"); 6 | const Groups = () => import("../pages/Groups"); 7 | const Configs = () => import("../pages/Configs"); 8 | const Profile = () => import("../pages/Profile.vue"); 9 | const Configs_Buttons = () => import("../pages/Configs_Buttons.vue"); 10 | const Configs_Lists = () => import("../pages/Configs_Lists.vue"); 11 | 12 | const routes = [ 13 | { 14 | path: "/login", 15 | name: "login", 16 | component: Login, 17 | }, 18 | { 19 | path: "/", 20 | name: "index", 21 | component: Chat, 22 | meta: { 23 | requiresAuth: true, 24 | }, 25 | }, 26 | { 27 | path: "/chat", 28 | name: "chat", 29 | component: Chat, 30 | meta: { 31 | requiresAuth: true, 32 | }, 33 | }, 34 | { 35 | path: "/contacts", 36 | name: "contacts", 37 | component: Contacts, 38 | meta: { 39 | requiresAuth: true, 40 | }, 41 | }, 42 | { 43 | path: "/groups", 44 | name: "groups", 45 | component: Groups, 46 | meta: { 47 | requiresAuth: true, 48 | }, 49 | }, 50 | { 51 | path: "/settings", 52 | name: "settings", 53 | component: Configs, 54 | meta: { 55 | requiresAuth: true, 56 | }, 57 | }, 58 | { 59 | path: "/profile", 60 | name: "profile", 61 | component: Profile, 62 | meta: { 63 | requiresAuth: true, 64 | }, 65 | }, 66 | { 67 | path: "/settings/buttons", 68 | name: "settings-buttons", 69 | component: Configs_Buttons, 70 | meta: { 71 | requiresAuth: true, 72 | }, 73 | }, 74 | { 75 | path: "/settings/lists,", 76 | name: "settings-lists", 77 | component: Configs_Lists, 78 | meta: { 79 | requiresAuth: true, 80 | }, 81 | }, 82 | ]; 83 | 84 | const router = createRouter({ 85 | history: createWebHistory(), 86 | linkActiveClass: "active", 87 | routes, 88 | }); 89 | export default router; 90 | 91 | // Meta Handling 92 | router.beforeEach(async (to, from, next) => { 93 | if (to.matched.some((record) => record.meta.requiresAuth)) { 94 | if (localStorage.getItem(config.TOKEN_KEY) == null) { 95 | next({ 96 | path: "/login", 97 | params: { nextUrl: to.fullPath }, 98 | }); 99 | } else { 100 | next(); 101 | } 102 | } else { 103 | if (to.path == "/login") { 104 | if (localStorage.getItem(config.TOKEN_KEY) != null) { 105 | next({ 106 | path: "/chat", 107 | }); 108 | } else { 109 | next(); 110 | } 111 | } 112 | next(); 113 | } 114 | }); 115 | -------------------------------------------------------------------------------- /src/services/api.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import axios from "axios"; 17 | import { io } from "socket.io-client"; 18 | import config from "../config.js"; 19 | 20 | const ip = config.IP_SERVER; 21 | 22 | export const socket = io(config.IP_SOCKET_IO); 23 | export const api = axios.create({ baseURL: ip }); 24 | export default api; 25 | -------------------------------------------------------------------------------- /src/services/auth.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import config from "../config.js"; 17 | export const TOKEN_KEY = config.TOKEN_KEY; 18 | 19 | export const defaultKey = () => localStorage.getItem(TOKEN_KEY); 20 | 21 | export const login = (token) => { 22 | localStorage.setItem(TOKEN_KEY, token); 23 | }; 24 | 25 | export const logout = () => { 26 | localStorage.removeItem(TOKEN_KEY); 27 | }; 28 | 29 | export const getSession = () => { 30 | if (defaultKey() != null) { 31 | const { session } = JSON.parse(defaultKey()); 32 | return session; 33 | } 34 | }; 35 | 36 | export const getToken = () => { 37 | if (defaultKey() !== null) { 38 | const { token } = JSON.parse(defaultKey()); 39 | return token; 40 | } 41 | }; 42 | 43 | export const getDefaultImage = () => { 44 | return "https://www.promoview.com.br/uploads/images/unnamed%2819%29.png"; 45 | }; 46 | -------------------------------------------------------------------------------- /src/services/language.js: -------------------------------------------------------------------------------- 1 | import config from "../config"; 2 | 3 | export const language = () => { 4 | return getLanguage(config.LANGUAGE); 5 | }; 6 | /** 7 | * Função que busca todas as traduções disponiveis e retorna 8 | * @param {pt-BR ou en-US} lang 9 | * @returns 10 | */ 11 | export function getLanguage(lang) { 12 | if (lang == "pt-BR") { 13 | return { 14 | chooseContact: "Escolha um contato para iniciar uma conversa", 15 | contacts: "Contatos", 16 | searchContacts: "Buscar contatos", 17 | name: "Nome", 18 | phone: "Telefone", 19 | participants: "Membros", 20 | groups: "Grupos", 21 | searchGroup: "Procurar grupos...", 22 | inviteParticipants: "Convidar membros", 23 | inviteParticipantsText: "Convide membros para seus grupos rapidamente", 24 | pleaseWait: "Por favor, aguarde...", 25 | allGroups: "Grupos", 26 | allGroupsText: "Gerencie todos os seus grupos.", 27 | createGroup: "Criar grupo", 28 | createGroupText: "Crie grupos do whatsapp de uma forma rápida.", 29 | }; 30 | } 31 | if (lang == "en-US") { 32 | return { 33 | chooseContact: "Choose a contact to start a conversation", 34 | contacts: "Contacts", 35 | searchContacts: "Search contacts", 36 | name: "Name", 37 | phone: "Phone", 38 | participants: "Partcipants", 39 | groups: "Groups", 40 | searchGroup: "Search groups...", 41 | inviteParticipants: "Invite partcipants", 42 | inviteParticipantsText: "Invite participants to your groups quickly.", 43 | pleaseWait: "Please, wait...", 44 | allGroups: "All Groups", 45 | allGroupsText: "Manage all your groups.", 46 | createGroup: "Create Group", 47 | createGroupText: "Create a WhatsApp group in an automated way.", 48 | settings: "Settings", 49 | general: "General", 50 | generalText: "General system settings", 51 | buttons: "Buttons", 52 | buttonsText: "Configure buttons to send to your contacts", 53 | list: "Lists", 54 | listText: "Configure list sections to send to your contacts", 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/services/settings.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import config from "../config.js"; 17 | export const TOKEN_KEY = config.TOKEN_KEY; 18 | 19 | export const defaultKey = () => localStorage.getItem("settings_" + TOKEN_KEY); 20 | 21 | export const setConfigs = (configs) => { 22 | console.log(configs); 23 | localStorage.setItem("settings_" + TOKEN_KEY, JSON.stringify(configs)); 24 | }; 25 | 26 | export const deleteConfigs = () => { 27 | localStorage.removeItem("settings_" + TOKEN_KEY); 28 | }; 29 | 30 | export const getConfigs = () => { 31 | if (defaultKey() !== null) { 32 | return JSON.parse(defaultKey()); 33 | } else { 34 | return { 35 | sendSeen: true, 36 | rejectCall: false, 37 | notifySound: true, 38 | msgRejectCall: "", 39 | msgWelcome: "", 40 | attendantName: "", 41 | }; 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /src/services/settings_buttons.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import config from "../config.js"; 17 | export const TOKEN_KEY = config.TOKEN_KEY; 18 | 19 | export const defaultKey = () => localStorage.getItem("buttons_" + TOKEN_KEY); 20 | 21 | export const setButtons = (buttons) => { 22 | localStorage.setItem("buttons_" + TOKEN_KEY, JSON.stringify(buttons)); 23 | }; 24 | 25 | export const deleteButtons = () => { 26 | localStorage.removeItem("buttons_" + TOKEN_KEY); 27 | }; 28 | 29 | export const getButtons = () => { 30 | if (defaultKey() !== null) { 31 | return JSON.parse(defaultKey()); 32 | } else { 33 | return {}; 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /src/services/settings_lists.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import config from "../config.js"; 17 | export const TOKEN_KEY = config.TOKEN_KEY; 18 | 19 | export const defaultKey = () => localStorage.getItem("lists_" + TOKEN_KEY); 20 | 21 | export const setLists = (lists) => { 22 | localStorage.setItem("lists_" + TOKEN_KEY, JSON.stringify(lists)); 23 | }; 24 | 25 | export const deleteLists = () => { 26 | localStorage.removeItem("lists_" + TOKEN_KEY); 27 | }; 28 | 29 | export const getLists = () => { 30 | if (defaultKey() !== null) { 31 | return JSON.parse(defaultKey()); 32 | } else { 33 | return {}; 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /src/stores/dataStore.js: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | 3 | export const useStore = defineStore("data", { 4 | state: () => ({ 5 | readyConnection: true, 6 | darkMode: false, 7 | 8 | chats: [], 9 | contacts: [], 10 | config: [], 11 | 12 | message: "", 13 | }), 14 | 15 | actions: { 16 | async getAllContacts() {}, 17 | }, 18 | getters: {}, 19 | }); 20 | -------------------------------------------------------------------------------- /src/util/sessionHeader.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 WPPConnect Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import { defaultKey, getToken } from "../services/auth"; 17 | 18 | const key = JSON.parse(defaultKey()); 19 | 20 | const configHeader = () => { 21 | if (key !== null) { 22 | return { headers: { Authorization: `Bearer ${getToken()}` } }; 23 | } 24 | }; 25 | 26 | export default configHeader; 27 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service') 2 | module.exports = defineConfig({ 3 | transpileDependencies: true 4 | }) 5 | --------------------------------------------------------------------------------