Compare commits
159 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08bb47da1d | ||
|
|
4fad3808a2 | ||
|
|
f05a875a05 | ||
|
|
4f7f2ba361 | ||
|
|
0cfe87e65c | ||
|
|
5ec9944f2a | ||
|
|
fa339a5183 | ||
|
|
5936a06ad1 | ||
|
|
c21bbf1022 | ||
|
|
00fa17b31f | ||
|
|
6e03c8d236 | ||
|
|
7022ef5f7e | ||
|
|
54d590765f | ||
|
|
d24c572d7f | ||
|
|
010be95ed5 | ||
|
|
59ca8cb2c6 | ||
|
|
15dc0ad9ac | ||
|
|
f690ea01c4 | ||
|
|
9c09a8128a | ||
|
|
16779d496e | ||
|
|
3ab7318b25 | ||
|
|
a2b7e039d5 | ||
|
|
a68e88826f | ||
|
|
7c8545c21b | ||
|
|
d17c3b4aa3 | ||
|
|
a0529b1cdd | ||
|
|
1f0c77c3bf | ||
|
|
56acfab2b2 | ||
|
|
256cef9047 | ||
|
|
7d3750e54c | ||
|
|
f021d080af | ||
|
|
293400fd76 | ||
|
|
c495ca5256 | ||
|
|
956c7bf93a | ||
|
|
219d88851e | ||
|
|
9b9fb62596 | ||
|
|
f636e7dbd4 | ||
|
|
33f2341f7f | ||
|
|
f5bbcb2777 | ||
|
|
5a56081a29 | ||
|
|
d2b73a8942 | ||
|
|
09a35cf10a | ||
|
|
eb7ac7bfc4 | ||
|
|
a98636ed39 | ||
|
|
73a2a0a127 | ||
|
|
494dc72eb9 | ||
|
|
4665dbc372 | ||
|
|
0b6671d538 | ||
|
|
392c97f35f | ||
|
|
8629eda6d4 | ||
|
|
8507f11175 | ||
|
|
ae6d33febd | ||
|
|
54e11170fb | ||
|
|
66eecf5e37 | ||
|
|
f7b1e876ad | ||
|
|
ccff68ad18 | ||
|
|
112c140ce7 | ||
|
|
c2cd9f0865 | ||
|
|
749e89e362 | ||
|
|
7241bbbb6d | ||
|
|
edb7bef5a3 | ||
|
|
436de528e9 | ||
|
|
7f0f932aca | ||
|
|
73d2d58da9 | ||
|
|
777b201c1f | ||
|
|
11ff85c56c | ||
|
|
a9ed1c0fe8 | ||
|
|
9a06b19288 | ||
|
|
516610a820 | ||
|
|
8b989924a4 | ||
|
|
bd3e1b7592 | ||
|
|
af18b95ffa | ||
|
|
9ecec8ce17 | ||
|
|
f2f097bb7e | ||
|
|
27da1c8e49 | ||
|
|
015fd24e03 | ||
|
|
1306b78f63 | ||
|
|
ad0b342d89 | ||
|
|
6d463dcfef | ||
|
|
965923116d | ||
|
|
3281adce65 | ||
|
|
74f6be6123 | ||
|
|
74b997ba49 | ||
|
|
b7c6f3e2bb | ||
|
|
8506275f90 | ||
|
|
64c3a82189 | ||
|
|
23b1d94808 | ||
|
|
0a9712d227 | ||
|
|
6575d03f45 | ||
|
|
6037daedcd | ||
|
|
a351abd5d9 | ||
|
|
8b00bb59de | ||
|
|
910c20bd00 | ||
|
|
885318623f | ||
|
|
e1df6105ed | ||
|
|
c4879d598b | ||
|
|
cc9cfa53fa | ||
|
|
996bb206c6 | ||
|
|
df0ac3b7c8 | ||
|
|
df68f9ac25 | ||
|
|
a639ee63dd | ||
|
|
04feb3cdbe | ||
|
|
f77f0a59ec | ||
|
|
fdc5695fb4 | ||
|
|
f24477e7b4 | ||
|
|
0e561e7bc2 | ||
|
|
257cb5141b | ||
|
|
89312347d1 | ||
|
|
f1e752892d | ||
|
|
6a13b8c3c5 | ||
|
|
c43a864480 | ||
|
|
06d58547c8 | ||
|
|
173e3a3fc0 | ||
|
|
d0cf780ea2 | ||
|
|
493538ae70 | ||
|
|
955bb5c99d | ||
|
|
88fc45975f | ||
|
|
09a88b4a97 | ||
|
|
67e98ef46b | ||
|
|
85c5f16e93 | ||
|
|
7cf5345c5a | ||
|
|
4c62baa577 | ||
|
|
0f55b8ee8a | ||
|
|
ad041a5cf1 | ||
|
|
3bd22f6b78 | ||
|
|
fa15457ce4 | ||
|
|
ef434ca804 | ||
|
|
2b165a065c | ||
|
|
12b7e22c31 | ||
|
|
d77e3745bb | ||
|
|
5429e493ea | ||
|
|
b05cd2e6e4 | ||
|
|
a9564086b0 | ||
|
|
c32c6e0363 | ||
|
|
f9008df1c6 | ||
|
|
9a2fa9e2c7 | ||
|
|
dd8f7d078b | ||
|
|
b40d5a75f2 | ||
|
|
01e41ba1b2 | ||
|
|
1ed28a717c | ||
|
|
1d6d8af748 | ||
|
|
f80c5d6a46 | ||
|
|
6c7643a4c3 | ||
|
|
563ac1d2fb | ||
|
|
91511c09f3 | ||
|
|
82180a54f1 | ||
|
|
aee2863caf | ||
|
|
ac705a6900 | ||
|
|
5b4f3f5b67 | ||
|
|
94c2440832 | ||
|
|
5d2ba22988 | ||
|
|
cf9fe0c02c | ||
|
|
4c57139cdc | ||
|
|
2c0b8b5f8e | ||
|
|
2634eb10be | ||
|
|
d35d3061e5 | ||
|
|
aca53be909 | ||
|
|
e3221aedaa | ||
|
|
363902a588 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -98,3 +98,9 @@ sw.*
|
|||||||
|
|
||||||
# File explorer
|
# File explorer
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
|
# Tests screenshots
|
||||||
|
tests/*/screenshots
|
||||||
|
|
||||||
|
# Tests videos
|
||||||
|
tests/*/videos
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ install:
|
|||||||
- "npm install"
|
- "npm install"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
- "npm run build" # use nuxt build and start to run tests
|
||||||
- "npm run test"
|
- "npm run test"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|||||||
308
CHANGELOG.md
308
CHANGELOG.md
@@ -1,5 +1,158 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v1.9.0](https://github.com/liyasthomas/postwoman/tree/v1.9.0) (2020-02-24)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/v1.8.0...v1.9.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Disable SSL cert for websockets [\#557](https://github.com/liyasthomas/postwoman/issues/557)
|
||||||
|
- Feature request: Keyboard shortcuts for folder creation [\#539](https://github.com/liyasthomas/postwoman/issues/539)
|
||||||
|
- Friendly minded GraphQL [\#468](https://github.com/liyasthomas/postwoman/issues/468)
|
||||||
|
- multipart/form-data support [\#434](https://github.com/liyasthomas/postwoman/issues/434)
|
||||||
|
- Implement pre-request and post-request scripts \(and request chaining\) [\#218](https://github.com/liyasthomas/postwoman/issues/218)
|
||||||
|
- Environment management and configuration [\#147](https://github.com/liyasthomas/postwoman/issues/147)
|
||||||
|
- POST request body editor reacts to the content type [\#594](https://github.com/liyasthomas/postwoman/pull/594) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Environment Mangement [\#591](https://github.com/liyasthomas/postwoman/pull/591) ([JacobAnavisca](https://github.com/JacobAnavisca))
|
||||||
|
- GraphQL Query Autocompletion [\#590](https://github.com/liyasthomas/postwoman/pull/590) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Postman collection parsing [\#574](https://github.com/liyasthomas/postwoman/pull/574) ([JacobAnavisca](https://github.com/JacobAnavisca))
|
||||||
|
- Added toggle to decide whether extensions should be used [\#551](https://github.com/liyasthomas/postwoman/pull/551) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Show Ctrl instead of Command for shortcuts non-Apple platforms [\#549](https://github.com/liyasthomas/postwoman/pull/549) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Updated GraphQL Query Variable Editor [\#534](https://github.com/liyasthomas/postwoman/pull/534) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Auto Theme Selection is kinda difficult to see [\#563](https://github.com/liyasthomas/postwoman/issues/563)
|
||||||
|
- Can't send request to localhost via Chrome extention [\#560](https://github.com/liyasthomas/postwoman/issues/560)
|
||||||
|
- Validation for duplicate collection ignores letter case [\#547](https://github.com/liyasthomas/postwoman/issues/547)
|
||||||
|
- Build failed [\#327](https://github.com/liyasthomas/postwoman/issues/327)
|
||||||
|
- Fixed typo in translation file for Auto theme [\#556](https://github.com/liyasthomas/postwoman/pull/556) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- don't run [\#577](https://github.com/liyasthomas/postwoman/issues/577)
|
||||||
|
- Get correct response data but occurs with error "Cannot read property 'value' of undefined" [\#575](https://github.com/liyasthomas/postwoman/issues/575)
|
||||||
|
- firebase\_app\_\_WEBPACK\_IMPORTED\_MODULE\_2\_\_\_default.a.firestore is not a function [\#558](https://github.com/liyasthomas/postwoman/issues/558)
|
||||||
|
- relative module not found during start [\#552](https://github.com/liyasthomas/postwoman/issues/552)
|
||||||
|
- Feature Request: Subfolders [\#540](https://github.com/liyasthomas/postwoman/issues/540)
|
||||||
|
- Add max-height and overflow: auto to "parameter list" textarea [\#532](https://github.com/liyasthomas/postwoman/issues/532)
|
||||||
|
- IE Support [\#386](https://github.com/liyasthomas/postwoman/issues/386)
|
||||||
|
- ⏬ Import a Postman's Collection [\#333](https://github.com/liyasthomas/postwoman/issues/333)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix variablesJSONString store default for GraphQL page [\#593](https://github.com/liyasthomas/postwoman/pull/593) ([dmitryyankowski](https://github.com/dmitryyankowski))
|
||||||
|
- Refactor/lint [\#589](https://github.com/liyasthomas/postwoman/pull/589) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Even [\#588](https://github.com/liyasthomas/postwoman/pull/588) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump firebase from 7.9.0 to 7.9.1 [\#587](https://github.com/liyasthomas/postwoman/pull/587) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Even [\#586](https://github.com/liyasthomas/postwoman/pull/586) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump firebase from 7.8.2 to 7.9.0 [\#585](https://github.com/liyasthomas/postwoman/pull/585) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump vue-virtual-scroll-list from 1.4.5 to 1.4.6 [\#584](https://github.com/liyasthomas/postwoman/pull/584) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Adapt extension check to new extensions [\#583](https://github.com/liyasthomas/postwoman/pull/583) ([levrik](https://github.com/levrik))
|
||||||
|
- Update link to extension repo in README [\#582](https://github.com/liyasthomas/postwoman/pull/582) ([levrik](https://github.com/levrik))
|
||||||
|
- Even [\#579](https://github.com/liyasthomas/postwoman/pull/579) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Refactor/lint [\#578](https://github.com/liyasthomas/postwoman/pull/578) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump vue-virtual-scroll-list from 1.4.4 to 1.4.5 [\#576](https://github.com/liyasthomas/postwoman/pull/576) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Unify Chrome and Firefox extensions [\#573](https://github.com/liyasthomas/postwoman/pull/573) ([levrik](https://github.com/levrik))
|
||||||
|
- fix: drop the toast which doesn't show up [\#572](https://github.com/liyasthomas/postwoman/pull/572) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- :sparkles: Native share + updated meta description [\#571](https://github.com/liyasthomas/postwoman/pull/571) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump firebase from 7.8.1 to 7.8.2 [\#570](https://github.com/liyasthomas/postwoman/pull/570) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps-dev\): bump cypress from 4.0.1 to 4.0.2 [\#569](https://github.com/liyasthomas/postwoman/pull/569) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Added create collection and save request syncs [\#568](https://github.com/liyasthomas/postwoman/pull/568) ([JacobAnavisca](https://github.com/JacobAnavisca))
|
||||||
|
- Moved common headers to a separate file [\#566](https://github.com/liyasthomas/postwoman/pull/566) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- chore\(deps-dev\): bump cypress from 4.0.0 to 4.0.1 [\#565](https://github.com/liyasthomas/postwoman/pull/565) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump yargs-parser from 16.1.0 to 17.0.0 [\#564](https://github.com/liyasthomas/postwoman/pull/564) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps-dev\): bump cypress from 3.8.3 to 4.0.0 [\#562](https://github.com/liyasthomas/postwoman/pull/562) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump firebase from 7.8.0 to 7.8.1 [\#561](https://github.com/liyasthomas/postwoman/pull/561) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore: use typeof as an operator and make use of localizable strings [\#559](https://github.com/liyasthomas/postwoman/pull/559) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Support for Formdata [\#555](https://github.com/liyasthomas/postwoman/pull/555) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump @nuxtjs/pwa from 3.0.0-beta.19 to 3.0.0-beta.20 [\#554](https://github.com/liyasthomas/postwoman/pull/554) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump @nuxtjs/axios from 5.9.4 to 5.9.5 [\#553](https://github.com/liyasthomas/postwoman/pull/553) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- fix\(chore\): Take letter casing into account while checking for duplicate collection [\#548](https://github.com/liyasthomas/postwoman/pull/548) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- update e2e tests [\#546](https://github.com/liyasthomas/postwoman/pull/546) ([yubathom](https://github.com/yubathom))
|
||||||
|
- chore\(deps\): bump @nuxtjs/axios from 5.9.3 to 5.9.4 [\#545](https://github.com/liyasthomas/postwoman/pull/545) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Refactor [\#543](https://github.com/liyasthomas/postwoman/pull/543) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump firebase from 7.7.0 to 7.8.0 [\#542](https://github.com/liyasthomas/postwoman/pull/542) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump graphql from 14.5.8 to 14.6.0 [\#541](https://github.com/liyasthomas/postwoman/pull/541) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- i18n [\#538](https://github.com/liyasthomas/postwoman/pull/538) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Modification of French translations [\#537](https://github.com/liyasthomas/postwoman/pull/537) ([thomasbnt](https://github.com/thomasbnt))
|
||||||
|
- Even [\#535](https://github.com/liyasthomas/postwoman/pull/535) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Updating spanish translation [\#529](https://github.com/liyasthomas/postwoman/pull/529) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump nuxt-i18n from 6.4.1 to 6.5.0 [\#522](https://github.com/liyasthomas/postwoman/pull/522) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
|
||||||
|
## [v1.8.0](https://github.com/liyasthomas/postwoman/tree/v1.8.0) (2020-01-28)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/v1.5.0...v1.8.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Sync collection with a cloud storage \(e.g: Google drive\) [\#507](https://github.com/liyasthomas/postwoman/issues/507)
|
||||||
|
- Application contains many hard-coded strings that aren't translatable [\#488](https://github.com/liyasthomas/postwoman/issues/488)
|
||||||
|
- ULR parsing and var auto creation [\#469](https://github.com/liyasthomas/postwoman/issues/469)
|
||||||
|
- What about additional loaders: + Pug, TypeScript, SASS, material-vue ? [\#467](https://github.com/liyasthomas/postwoman/issues/467)
|
||||||
|
- \[suggestion\] - Tests tab [\#465](https://github.com/liyasthomas/postwoman/issues/465)
|
||||||
|
- cookie not found support [\#443](https://github.com/liyasthomas/postwoman/issues/443)
|
||||||
|
- Feature Request: Consumer Driven Contract Testing [\#420](https://github.com/liyasthomas/postwoman/issues/420)
|
||||||
|
- Feature Request: Support OAuth2/OIDC [\#337](https://github.com/liyasthomas/postwoman/issues/337)
|
||||||
|
- Add DB cache [\#26](https://github.com/liyasthomas/postwoman/issues/26)
|
||||||
|
- Update asset/\*. js to asset/\*. ts. [\#517](https://github.com/liyasthomas/postwoman/pull/517) ([Sn005](https://github.com/Sn005))
|
||||||
|
- Auth [\#513](https://github.com/liyasthomas/postwoman/pull/513) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Support for Google Chrome Extension [\#512](https://github.com/liyasthomas/postwoman/pull/512) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- GraphQL query validation based on schema [\#508](https://github.com/liyasthomas/postwoman/pull/508) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Syntax Error marking in GraphQL query editor [\#505](https://github.com/liyasthomas/postwoman/pull/505) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Refactoring proxy handling to be done in strategies [\#500](https://github.com/liyasthomas/postwoman/pull/500) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Firefox Extension compatibility [\#494](https://github.com/liyasthomas/postwoman/pull/494) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Network Strategies [\#487](https://github.com/liyasthomas/postwoman/pull/487) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- chore\(oauth\): Added method signatures as per JSDoc conventions [\#486](https://github.com/liyasthomas/postwoman/pull/486) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- GraphQL Type Highlight and Links [\#479](https://github.com/liyasthomas/postwoman/pull/479) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Warn the user if name field was left blank while creating a new collection [\#515](https://github.com/liyasthomas/postwoman/issues/515)
|
||||||
|
- Multiple collections with the same name shouldn't exist [\#509](https://github.com/liyasthomas/postwoman/issues/509)
|
||||||
|
- GraphQL String variables are null [\#497](https://github.com/liyasthomas/postwoman/issues/497)
|
||||||
|
- Post request body is empty [\#473](https://github.com/liyasthomas/postwoman/issues/473)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Allow importing Postman collections [\#524](https://github.com/liyasthomas/postwoman/issues/524)
|
||||||
|
- Request descriptions [\#511](https://github.com/liyasthomas/postwoman/issues/511)
|
||||||
|
- Ability to run all requests of a folder/collection [\#498](https://github.com/liyasthomas/postwoman/issues/498)
|
||||||
|
- Change import/export collection on requests page icon [\#495](https://github.com/liyasthomas/postwoman/issues/495)
|
||||||
|
- import cURL error [\#477](https://github.com/liyasthomas/postwoman/issues/477)
|
||||||
|
- move to postwoman org [\#475](https://github.com/liyasthomas/postwoman/issues/475)
|
||||||
|
- Create standalone vue components of the request builder. [\#474](https://github.com/liyasthomas/postwoman/issues/474)
|
||||||
|
- Enable running proxy as a backend for Request Capture [\#325](https://github.com/liyasthomas/postwoman/issues/325)
|
||||||
|
- Label doesn't change when switching between collection requests [\#291](https://github.com/liyasthomas/postwoman/issues/291)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Enhancements [\#531](https://github.com/liyasthomas/postwoman/pull/531) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Merge pull request \#530 from liyasthomas/feature/post-request-tests [\#530](https://github.com/liyasthomas/postwoman/pull/530) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- even merge [\#528](https://github.com/liyasthomas/postwoman/pull/528) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Refactor [\#523](https://github.com/liyasthomas/postwoman/pull/523) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore\(deps\): bump v-tooltip from 2.0.2 to 2.0.3 [\#521](https://github.com/liyasthomas/postwoman/pull/521) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps-dev\): bump cypress from 3.8.2 to 3.8.3 [\#520](https://github.com/liyasthomas/postwoman/pull/520) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Feature/post request tests [\#518](https://github.com/liyasthomas/postwoman/pull/518) ([nickpalenchar](https://github.com/nickpalenchar))
|
||||||
|
- Validations for edit and create collections activity [\#516](https://github.com/liyasthomas/postwoman/pull/516) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Validate duplicate collections [\#510](https://github.com/liyasthomas/postwoman/pull/510) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Lint and refactor [\#506](https://github.com/liyasthomas/postwoman/pull/506) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Merge pull request \#504 from liyasthomas/dependabot/npm\_and\_yarn/node-sass-4.13.1 [\#504](https://github.com/liyasthomas/postwoman/pull/504) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump @nuxtjs/axios from 5.9.2 to 5.9.3 [\#503](https://github.com/liyasthomas/postwoman/pull/503) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps-dev\): bump sass-loader from 8.0.1 to 8.0.2 [\#502](https://github.com/liyasthomas/postwoman/pull/502) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- chore\(deps\): bump ace-builds from 1.4.7 to 1.4.8 [\#501](https://github.com/liyasthomas/postwoman/pull/501) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- 💚 Fixed \#497 [\#499](https://github.com/liyasthomas/postwoman/pull/499) ([pushrbx](https://github.com/pushrbx))
|
||||||
|
- Feat/firefox strategy [\#496](https://github.com/liyasthomas/postwoman/pull/496) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- i18n Japanese: Added new translations [\#492](https://github.com/liyasthomas/postwoman/pull/492) ([reefqi037](https://github.com/reefqi037))
|
||||||
|
- Merge pull request \#491 from liyasthomas/i18n [\#491](https://github.com/liyasthomas/postwoman/pull/491) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- Replaced hard-coded strings with localizable strings [\#490](https://github.com/liyasthomas/postwoman/pull/490) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- chore: Minor tweaks [\#485](https://github.com/liyasthomas/postwoman/pull/485) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Porting \(most of\) code to typescript [\#484](https://github.com/liyasthomas/postwoman/pull/484) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- ⬆️ Bump cypress from 3.8.1 to 3.8.2 [\#483](https://github.com/liyasthomas/postwoman/pull/483) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump sass-loader from 8.0.0 to 8.0.1 [\#482](https://github.com/liyasthomas/postwoman/pull/482) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump @nuxtjs/google-analytics from 2.2.2 to 2.2.3 [\#481](https://github.com/liyasthomas/postwoman/pull/481) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- OAuth 2.0/OIDC Access Token Retrieval Support [\#476](https://github.com/liyasthomas/postwoman/pull/476) ([reefqi037](https://github.com/reefqi037))
|
||||||
|
|
||||||
## [v1.5.0](https://github.com/liyasthomas/postwoman/tree/v1.5.0) (2020-01-04)
|
## [v1.5.0](https://github.com/liyasthomas/postwoman/tree/v1.5.0) (2020-01-04)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/v1.0.0...v1.5.0)
|
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/v1.0.0...v1.5.0)
|
||||||
@@ -29,6 +182,7 @@
|
|||||||
- Missing Focus on Inputs [\#279](https://github.com/liyasthomas/postwoman/issues/279)
|
- Missing Focus on Inputs [\#279](https://github.com/liyasthomas/postwoman/issues/279)
|
||||||
- Download the request result into a file. [\#278](https://github.com/liyasthomas/postwoman/issues/278)
|
- Download the request result into a file. [\#278](https://github.com/liyasthomas/postwoman/issues/278)
|
||||||
- Improve UI Contrast [\#277](https://github.com/liyasthomas/postwoman/issues/277)
|
- Improve UI Contrast [\#277](https://github.com/liyasthomas/postwoman/issues/277)
|
||||||
|
- \[UI\] \[UX\] Allow app to take width of browser [\#236](https://github.com/liyasthomas/postwoman/issues/236)
|
||||||
- Extend syntax highlighting with ACE for pre-request script textarea [\#235](https://github.com/liyasthomas/postwoman/issues/235)
|
- Extend syntax highlighting with ACE for pre-request script textarea [\#235](https://github.com/liyasthomas/postwoman/issues/235)
|
||||||
- Store pre-request scripts in history [\#233](https://github.com/liyasthomas/postwoman/issues/233)
|
- Store pre-request scripts in history [\#233](https://github.com/liyasthomas/postwoman/issues/233)
|
||||||
- Store the time spent on fetching a response [\#225](https://github.com/liyasthomas/postwoman/issues/225)
|
- Store the time spent on fetching a response [\#225](https://github.com/liyasthomas/postwoman/issues/225)
|
||||||
@@ -39,7 +193,6 @@
|
|||||||
- Two Way Data Binding \(v-model\) to Ace Editor component [\#379](https://github.com/liyasthomas/postwoman/pull/379) ([AndrewBastin](https://github.com/AndrewBastin))
|
- Two Way Data Binding \(v-model\) to Ace Editor component [\#379](https://github.com/liyasthomas/postwoman/pull/379) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
- Basic i18n support [\#351](https://github.com/liyasthomas/postwoman/pull/351) ([liyasthomas](https://github.com/liyasthomas))
|
- Basic i18n support [\#351](https://github.com/liyasthomas/postwoman/pull/351) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
- Undo header/param/body param deletion [\#350](https://github.com/liyasthomas/postwoman/pull/350) ([AndrewBastin](https://github.com/AndrewBastin))
|
- Undo header/param/body param deletion [\#350](https://github.com/liyasthomas/postwoman/pull/350) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
- Added ability to run GraphQL queries [\#346](https://github.com/liyasthomas/postwoman/pull/346) ([AndrewBastin](https://github.com/AndrewBastin))
|
|
||||||
- refactor: minor improvements [\#343](https://github.com/liyasthomas/postwoman/pull/343) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
- refactor: minor improvements [\#343](https://github.com/liyasthomas/postwoman/pull/343) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
@@ -86,7 +239,6 @@
|
|||||||
- Intent to translate [\#367](https://github.com/liyasthomas/postwoman/issues/367)
|
- Intent to translate [\#367](https://github.com/liyasthomas/postwoman/issues/367)
|
||||||
- Static builds on releases [\#352](https://github.com/liyasthomas/postwoman/issues/352)
|
- Static builds on releases [\#352](https://github.com/liyasthomas/postwoman/issues/352)
|
||||||
- fix:SSE onclose handle [\#349](https://github.com/liyasthomas/postwoman/issues/349)
|
- fix:SSE onclose handle [\#349](https://github.com/liyasthomas/postwoman/issues/349)
|
||||||
- ⏬ Import a Postman's Collection [\#333](https://github.com/liyasthomas/postwoman/issues/333)
|
|
||||||
- \[Request\] Use responses for next request? [\#324](https://github.com/liyasthomas/postwoman/issues/324)
|
- \[Request\] Use responses for next request? [\#324](https://github.com/liyasthomas/postwoman/issues/324)
|
||||||
- Make response body area expandable [\#294](https://github.com/liyasthomas/postwoman/issues/294)
|
- Make response body area expandable [\#294](https://github.com/liyasthomas/postwoman/issues/294)
|
||||||
- Mobile can't see console for request errors [\#283](https://github.com/liyasthomas/postwoman/issues/283)
|
- Mobile can't see console for request errors [\#283](https://github.com/liyasthomas/postwoman/issues/283)
|
||||||
@@ -148,6 +300,158 @@
|
|||||||
- Adding french language basic [\#355](https://github.com/liyasthomas/postwoman/pull/355) ([thomasbnt](https://github.com/thomasbnt))
|
- Adding french language basic [\#355](https://github.com/liyasthomas/postwoman/pull/355) ([thomasbnt](https://github.com/thomasbnt))
|
||||||
- Add Proxy URL option [\#345](https://github.com/liyasthomas/postwoman/pull/345) ([NBTX](https://github.com/NBTX))
|
- Add Proxy URL option [\#345](https://github.com/liyasthomas/postwoman/pull/345) ([NBTX](https://github.com/NBTX))
|
||||||
|
|
||||||
|
## [v1.0.0](https://github.com/liyasthomas/postwoman/tree/v1.0.0) (2019-11-04)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/v0.1.0...v1.0.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Chain requests. Execute a bunch of requests one by one and produce results [\#196](https://github.com/liyasthomas/postwoman/issues/196)
|
||||||
|
- Allow User to Choose Whether to Include Authentication in Permalink [\#178](https://github.com/liyasthomas/postwoman/issues/178)
|
||||||
|
- Allow HTTP \(not HTTPS\) on postwoman.io [\#175](https://github.com/liyasthomas/postwoman/issues/175)
|
||||||
|
- Docker-compose in development [\#168](https://github.com/liyasthomas/postwoman/issues/168)
|
||||||
|
- Add Docker [\#164](https://github.com/liyasthomas/postwoman/issues/164)
|
||||||
|
- Clear Input [\#155](https://github.com/liyasthomas/postwoman/issues/155)
|
||||||
|
- introduce some script language to parse the response and pass environment variable as request parameter [\#139](https://github.com/liyasthomas/postwoman/issues/139)
|
||||||
|
- Add links to the footer version and commit sha [\#134](https://github.com/liyasthomas/postwoman/issues/134)
|
||||||
|
- Please add a label for each request. It will be helpful. [\#133](https://github.com/liyasthomas/postwoman/issues/133)
|
||||||
|
- Use 'icon buttons' instead of 'text buttons' [\#130](https://github.com/liyasthomas/postwoman/issues/130)
|
||||||
|
- Change .editorconfig [\#115](https://github.com/liyasthomas/postwoman/issues/115)
|
||||||
|
- \[UX\] Provide Focus State for Buttons, etc. [\#112](https://github.com/liyasthomas/postwoman/issues/112)
|
||||||
|
- Add linter semistandard [\#98](https://github.com/liyasthomas/postwoman/issues/98)
|
||||||
|
- Show "Send" button all over the page or enable hotkeys [\#94](https://github.com/liyasthomas/postwoman/issues/94)
|
||||||
|
- Import request from cURL [\#93](https://github.com/liyasthomas/postwoman/issues/93)
|
||||||
|
- Search on History [\#92](https://github.com/liyasthomas/postwoman/issues/92)
|
||||||
|
- Add support for "application/hal+json" Content-Type [\#88](https://github.com/liyasthomas/postwoman/issues/88)
|
||||||
|
- The query string is built incorrectly when the path contains a parameter [\#87](https://github.com/liyasthomas/postwoman/issues/87)
|
||||||
|
- Option to Copy request as Fetch or XHR Or CURL [\#76](https://github.com/liyasthomas/postwoman/issues/76)
|
||||||
|
- Add Tests [\#65](https://github.com/liyasthomas/postwoman/issues/65)
|
||||||
|
- Request Headers [\#57](https://github.com/liyasthomas/postwoman/issues/57)
|
||||||
|
- Colored response codes based on status code [\#46](https://github.com/liyasthomas/postwoman/issues/46)
|
||||||
|
- Improve SEO [\#45](https://github.com/liyasthomas/postwoman/issues/45)
|
||||||
|
- Add html preview to response section [\#41](https://github.com/liyasthomas/postwoman/issues/41)
|
||||||
|
- websocket support [\#40](https://github.com/liyasthomas/postwoman/issues/40)
|
||||||
|
- Raw request body for POST requests and Authorization key/value in Header [\#36](https://github.com/liyasthomas/postwoman/issues/36)
|
||||||
|
- Code highlight on response body [\#33](https://github.com/liyasthomas/postwoman/issues/33)
|
||||||
|
- Template selector [\#32](https://github.com/liyasthomas/postwoman/issues/32)
|
||||||
|
- Vue template [\#31](https://github.com/liyasthomas/postwoman/issues/31)
|
||||||
|
- Add copy response to clipboard button [\#30](https://github.com/liyasthomas/postwoman/issues/30)
|
||||||
|
- Ability to store/share/create collections [\#29](https://github.com/liyasthomas/postwoman/issues/29)
|
||||||
|
- Send request on Enter Key press [\#17](https://github.com/liyasthomas/postwoman/issues/17)
|
||||||
|
- Readable [\#5](https://github.com/liyasthomas/postwoman/issues/5)
|
||||||
|
- Serialize a request into JSON? [\#4](https://github.com/liyasthomas/postwoman/issues/4)
|
||||||
|
- Add brand new logo to the project [\#244](https://github.com/liyasthomas/postwoman/pull/244) ([caneco](https://github.com/caneco))
|
||||||
|
- Feature/pre request script [\#231](https://github.com/liyasthomas/postwoman/pull/231) ([nickpalenchar](https://github.com/nickpalenchar))
|
||||||
|
- Add the ApolloTV proxy server [\#217](https://github.com/liyasthomas/postwoman/pull/217) ([NBTX](https://github.com/NBTX))
|
||||||
|
- bug: keeping information on page change [\#211](https://github.com/liyasthomas/postwoman/pull/211) ([breno-pereira](https://github.com/breno-pereira))
|
||||||
|
- Work in Progress: feature/allow-collections-importing [\#209](https://github.com/liyasthomas/postwoman/pull/209) ([vlad0337187](https://github.com/vlad0337187))
|
||||||
|
- Feature/log errors [\#207](https://github.com/liyasthomas/postwoman/pull/207) ([nickpalenchar](https://github.com/nickpalenchar))
|
||||||
|
- Use returned value from toggle component on change event [\#205](https://github.com/liyasthomas/postwoman/pull/205) ([hosseinnedaee](https://github.com/hosseinnedaee))
|
||||||
|
- Fix CORS and mixed content issue [\#199](https://github.com/liyasthomas/postwoman/pull/199) ([hosseinnedaee](https://github.com/hosseinnedaee))
|
||||||
|
- Added Tooltips [\#197](https://github.com/liyasthomas/postwoman/pull/197) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Added auto theme [\#185](https://github.com/liyasthomas/postwoman/pull/185) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
- Add Request name label for every requests [\#184](https://github.com/liyasthomas/postwoman/pull/184) ([sharath2106](https://github.com/sharath2106))
|
||||||
|
- Collections [\#176](https://github.com/liyasthomas/postwoman/pull/176) ([TheHollidayInn](https://github.com/TheHollidayInn))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Bearer Token value still left even after being cleared [\#212](https://github.com/liyasthomas/postwoman/issues/212)
|
||||||
|
- All changes in input fields lost when you switch to another page [\#203](https://github.com/liyasthomas/postwoman/issues/203)
|
||||||
|
- POST request json bodies aren't sent [\#180](https://github.com/liyasthomas/postwoman/issues/180)
|
||||||
|
- Headers turn into 0 : \[Object object\] [\#166](https://github.com/liyasthomas/postwoman/issues/166)
|
||||||
|
- Send Again Button Constantly Flickering [\#157](https://github.com/liyasthomas/postwoman/issues/157)
|
||||||
|
- There are cross-domain problems [\#128](https://github.com/liyasthomas/postwoman/issues/128)
|
||||||
|
- Raw requests are not being sent [\#124](https://github.com/liyasthomas/postwoman/issues/124)
|
||||||
|
- Request Body Is Not Sent [\#113](https://github.com/liyasthomas/postwoman/issues/113)
|
||||||
|
- default menu option - 'Http' is not highlighted when launched from installed pwa app \(UI bug\) [\#100](https://github.com/liyasthomas/postwoman/issues/100)
|
||||||
|
- App is broken with old history in localStorage [\#74](https://github.com/liyasthomas/postwoman/issues/74)
|
||||||
|
- Last added history entry is removed automatically after refresh [\#66](https://github.com/liyasthomas/postwoman/issues/66)
|
||||||
|
- Cannot use localhost as base url [\#56](https://github.com/liyasthomas/postwoman/issues/56)
|
||||||
|
- \[CORS\] No 'Access-Control-Allow-Origin' header is present on the requested resource [\#2](https://github.com/liyasthomas/postwoman/issues/2)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Section labels don't display properly in Firefox [\#237](https://github.com/liyasthomas/postwoman/issues/237)
|
||||||
|
- Unsupported URLs \[BUG\]? [\#229](https://github.com/liyasthomas/postwoman/issues/229)
|
||||||
|
- Credentials are still being included in Permalink even when "Include in URL" is turned off [\#227](https://github.com/liyasthomas/postwoman/issues/227)
|
||||||
|
- Display sendRequest runtime errors in the console [\#206](https://github.com/liyasthomas/postwoman/issues/206)
|
||||||
|
- Missing "Landing/start page" [\#162](https://github.com/liyasthomas/postwoman/issues/162)
|
||||||
|
- Response with content-type "application/hal+json" shows as \[Object object\] [\#158](https://github.com/liyasthomas/postwoman/issues/158)
|
||||||
|
- A place to discuss [\#149](https://github.com/liyasthomas/postwoman/issues/149)
|
||||||
|
- Inconsistent version name [\#141](https://github.com/liyasthomas/postwoman/issues/141)
|
||||||
|
- Autoresize the textarea [\#102](https://github.com/liyasthomas/postwoman/issues/102)
|
||||||
|
- Content-Type revamping [\#99](https://github.com/liyasthomas/postwoman/issues/99)
|
||||||
|
- Add version number in footer [\#97](https://github.com/liyasthomas/postwoman/issues/97)
|
||||||
|
- The history doesn't show a date with the timestamp. [\#81](https://github.com/liyasthomas/postwoman/issues/81)
|
||||||
|
- Not working on Brave Browser anymore [\#71](https://github.com/liyasthomas/postwoman/issues/71)
|
||||||
|
- Why da fuq is your name plastered all over the README? [\#70](https://github.com/liyasthomas/postwoman/issues/70)
|
||||||
|
- Comparison with Postman is missing [\#69](https://github.com/liyasthomas/postwoman/issues/69)
|
||||||
|
- HTTP request with different library [\#61](https://github.com/liyasthomas/postwoman/issues/61)
|
||||||
|
- Editorconfig file [\#60](https://github.com/liyasthomas/postwoman/issues/60)
|
||||||
|
- 500 this.isValidURL is not a function [\#58](https://github.com/liyasthomas/postwoman/issues/58)
|
||||||
|
- Styling with Tailwindcss [\#38](https://github.com/liyasthomas/postwoman/issues/38)
|
||||||
|
- Not Working in IE 11 [\#37](https://github.com/liyasthomas/postwoman/issues/37)
|
||||||
|
- PWA not installable [\#19](https://github.com/liyasthomas/postwoman/issues/19)
|
||||||
|
- Simple Misspelling [\#8](https://github.com/liyasthomas/postwoman/issues/8)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- docs: add liyasthomas as a contributor [\#264](https://github.com/liyasthomas/postwoman/pull/264) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add jamesgeorge007 as a contributor [\#263](https://github.com/liyasthomas/postwoman/pull/263) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add NBTX as a contributor [\#262](https://github.com/liyasthomas/postwoman/pull/262) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- Fix .all-contributorsrc badge template. [\#260](https://github.com/liyasthomas/postwoman/pull/260) ([NBTX](https://github.com/NBTX))
|
||||||
|
- docs: add hosseinnedaee as a contributor [\#259](https://github.com/liyasthomas/postwoman/pull/259) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add nityanandagohain as a contributor [\#257](https://github.com/liyasthomas/postwoman/pull/257) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add JacobAnavisca as a contributor [\#256](https://github.com/liyasthomas/postwoman/pull/256) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add izerozlu as a contributor [\#255](https://github.com/liyasthomas/postwoman/pull/255) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add vlad0337187 as a contributor [\#254](https://github.com/liyasthomas/postwoman/pull/254) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add AndrewBastin as a contributor [\#253](https://github.com/liyasthomas/postwoman/pull/253) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add terranblake as a contributor [\#252](https://github.com/liyasthomas/postwoman/pull/252) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add nickpalenchar as a contributor [\#251](https://github.com/liyasthomas/postwoman/pull/251) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add yubathom as a contributor [\#250](https://github.com/liyasthomas/postwoman/pull/250) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add larouxn as a contributor [\#249](https://github.com/liyasthomas/postwoman/pull/249) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add NBTX as a contributor [\#248](https://github.com/liyasthomas/postwoman/pull/248) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- docs: add liyasthomas as a contributor [\#247](https://github.com/liyasthomas/postwoman/pull/247) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- Make page changes more fluid [\#246](https://github.com/liyasthomas/postwoman/pull/246) ([NBTX](https://github.com/NBTX))
|
||||||
|
- Minor tweaks [\#245](https://github.com/liyasthomas/postwoman/pull/245) ([liyasthomas](https://github.com/liyasthomas))
|
||||||
|
- ⬆️ Bump @nuxtjs/google-tag-manager from 2.3.0 to 2.3.1 [\#243](https://github.com/liyasthomas/postwoman/pull/243) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump yargs-parser from 15.0.0 to 16.1.0 [\#242](https://github.com/liyasthomas/postwoman/pull/242) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump @nuxtjs/toast from 3.2.1 to 3.3.0 [\#241](https://github.com/liyasthomas/postwoman/pull/241) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump highlight.js from 9.15.10 to 9.16.2 [\#240](https://github.com/liyasthomas/postwoman/pull/240) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump cypress from 3.5.0 to 3.6.0 [\#239](https://github.com/liyasthomas/postwoman/pull/239) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Fix legend labels in Firefox, fix colored labels slider [\#238](https://github.com/liyasthomas/postwoman/pull/238) ([NBTX](https://github.com/NBTX))
|
||||||
|
- Documentation Cleanup [\#230](https://github.com/liyasthomas/postwoman/pull/230) ([amitdash291](https://github.com/amitdash291))
|
||||||
|
- Fix \#227 Exclude credentials from permalink [\#228](https://github.com/liyasthomas/postwoman/pull/228) ([reefqi037](https://github.com/reefqi037))
|
||||||
|
- ⬆️ Bump cypress from 3.4.1 to 3.5.0 [\#224](https://github.com/liyasthomas/postwoman/pull/224) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump @nuxtjs/axios from 5.6.0 to 5.8.0 [\#223](https://github.com/liyasthomas/postwoman/pull/223) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump node-sass from 4.12.0 to 4.13.0 [\#222](https://github.com/liyasthomas/postwoman/pull/222) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump nuxt from 2.10.1 to 2.10.2 [\#221](https://github.com/liyasthomas/postwoman/pull/221) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump @nuxtjs/google-analytics from 2.2.0 to 2.2.1 [\#220](https://github.com/liyasthomas/postwoman/pull/220) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump vuex-persist from 2.1.0 to 2.1.1 [\#219](https://github.com/liyasthomas/postwoman/pull/219) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Fixed frame colors toggle [\#216](https://github.com/liyasthomas/postwoman/pull/216) ([mateusppereira](https://github.com/mateusppereira))
|
||||||
|
- Re-order sections and add toggle for including authentication in URL [\#215](https://github.com/liyasthomas/postwoman/pull/215) ([NBTX](https://github.com/NBTX))
|
||||||
|
- chore: minor code refactor [\#214](https://github.com/liyasthomas/postwoman/pull/214) ([jamesgeorge007](https://github.com/jamesgeorge007))
|
||||||
|
- Fix \#212 Clear bearer token value [\#213](https://github.com/liyasthomas/postwoman/pull/213) ([reefqi037](https://github.com/reefqi037))
|
||||||
|
- fix: don't display 'Collection is empty' label if collection has any … [\#208](https://github.com/liyasthomas/postwoman/pull/208) ([vlad0337187](https://github.com/vlad0337187))
|
||||||
|
- Fix proxy URL [\#201](https://github.com/liyasthomas/postwoman/pull/201) ([NBTX](https://github.com/NBTX))
|
||||||
|
- Fix CORS and Mixed-Content issue & Bug Fixes [\#200](https://github.com/liyasthomas/postwoman/pull/200) ([NBTX](https://github.com/NBTX))
|
||||||
|
- ⬆️ Bump start-server-and-test from 1.10.5 to 1.10.6 [\#198](https://github.com/liyasthomas/postwoman/pull/198) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump start-server-and-test from 1.10.3 to 1.10.5 [\#194](https://github.com/liyasthomas/postwoman/pull/194) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump @nuxtjs/google-tag-manager from 2.2.1 to 2.3.0 [\#193](https://github.com/liyasthomas/postwoman/pull/193) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump nuxt from 2.10.0 to 2.10.1 [\#192](https://github.com/liyasthomas/postwoman/pull/192) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- ⬆️ Bump yargs-parser from 14.0.0 to 15.0.0 [\#191](https://github.com/liyasthomas/postwoman/pull/191) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- Add quotation marks for generated code [\#187](https://github.com/liyasthomas/postwoman/pull/187) ([johnhenry](https://github.com/johnhenry))
|
||||||
|
- updated threshold and rootMargin for IntersectionObserver [\#182](https://github.com/liyasthomas/postwoman/pull/182) ([edisonaugusthy](https://github.com/edisonaugusthy))
|
||||||
|
- Add basic e2e tests [\#181](https://github.com/liyasthomas/postwoman/pull/181) ([yubathom](https://github.com/yubathom))
|
||||||
|
- ⬆️ Bump nuxt from 2.9.2 to 2.10.0 [\#179](https://github.com/liyasthomas/postwoman/pull/179) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||||
|
- 🐛 Fixed sitemap configuration [\#177](https://github.com/liyasthomas/postwoman/pull/177) ([NicoPennec](https://github.com/NicoPennec))
|
||||||
|
- Code Refactoring [\#173](https://github.com/liyasthomas/postwoman/pull/173) ([edisonaugusthy](https://github.com/edisonaugusthy))
|
||||||
|
- Added Black Theme [\#172](https://github.com/liyasthomas/postwoman/pull/172) ([AndrewBastin](https://github.com/AndrewBastin))
|
||||||
|
|
||||||
|
## [v0.1.0](https://github.com/liyasthomas/postwoman/tree/v0.1.0) (2019-08-22)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/liyasthomas/postwoman/compare/91c08a5e6305cc95a0df46a33fdd0013bf7339b4...v0.1.0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
<b>A free, fast & beautiful API request builder</b>
|
<b>A free, fast and beautiful API request builder</b>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<i>Web alternative to Postman - Helps you create requests faster, saving precious time on development - <a href="https://postwoman.launchaco.com">Subscribe</a></i>
|
<i>Web alternative to Postman - Helps you create requests faster, saving precious time on development - <a href="https://postwoman.launchaco.com">Subscribe</a></i>
|
||||||
@@ -204,7 +204,7 @@ _**All `i18n` contributions are welcome to `i18n` [branch](https://github.com/li
|
|||||||
- **[CLI β](https://github.com/postwoman-io/postwoman-cli)** - A CLI solution for Postwoman
|
- **[CLI β](https://github.com/postwoman-io/postwoman-cli)** - A CLI solution for Postwoman
|
||||||
- **Browser Extensions** - Browser extensions that simplifies access to Postwoman
|
- **Browser Extensions** - Browser extensions that simplifies access to Postwoman
|
||||||
|
|
||||||
[ **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/postwoman) ([GitHub](https://github.com/AndrewBastin/postwoman-firefox)) | [ **Chrome**](https://chrome.google.com/webstore/detail/postwoman-extension-for-c/amknoiejhlmhancpahfcfcfhllgkpbld) ([GitHub](https://github.com/AndrewBastin/postwoman-chrome))
|
[ **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/postwoman) | [ **Chrome**](https://chrome.google.com/webstore/detail/postwoman-extension-for-c/amknoiejhlmhancpahfcfcfhllgkpbld) ([GitHub](https://github.com/AndrewBastin/postwoman-extension))
|
||||||
|
|
||||||
>**Extensions fixes `CORS` issues.**
|
>**Extensions fixes `CORS` issues.**
|
||||||
|
|
||||||
@@ -315,7 +315,10 @@ See the [CHANGELOG](CHANGELOG.md) file for details.
|
|||||||
### Lead Developers
|
### Lead Developers
|
||||||
|
|
||||||
* **[Liyas Thomas](https://github.com/liyasthomas)** - *Author*
|
* **[Liyas Thomas](https://github.com/liyasthomas)** - *Author*
|
||||||
* **[Caneco](https://twitter.com/caneco)** - *Designer*
|
* **[John Harker](https://github.com/NBTX)** - *Lead developer*
|
||||||
|
* **[Andrew Bastin](https://github.com/andrewbastin)** - *Lead developer*
|
||||||
|
* **[James George](https://github.com/jamesgeorge007)** - *Lead maintainer*
|
||||||
|
* **[Caneco](https://twitter.com/caneco)** - *Logo and banner designer*
|
||||||
|
|
||||||
### Testing and Debugging
|
### Testing and Debugging
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,11 @@ $responsiveWidth: 768px;
|
|||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
border-radius: 4px;
|
background-color: var(--bg-dark-color);
|
||||||
background-color: var(--bg-light-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background-color: var(--fg-light-color);
|
background-color: var(--fg-light-color);
|
||||||
border-radius: 8px;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--fg-color);
|
background-color: var(--fg-color);
|
||||||
@@ -60,9 +58,9 @@ body {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make theme transition smoother.
|
|
||||||
body.afterLoad {
|
body.afterLoad {
|
||||||
transition: background-color 0.2s ease-in-out;
|
transition: background-color 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
@@ -76,6 +74,10 @@ a {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
|
&.link {
|
||||||
|
color: var(--ac-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header,
|
header,
|
||||||
@@ -92,7 +94,7 @@ footer {
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-flow: column nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper .page {
|
.wrapper .page {
|
||||||
@@ -146,7 +148,8 @@ footer {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
background-color: var(--bg-light-color);
|
background-color: var(--bg-dark-color);
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
@@ -173,6 +176,7 @@ nav.primary-nav {
|
|||||||
|
|
||||||
svg {
|
svg {
|
||||||
fill: var(--fg-light-color);
|
fill: var(--fg-light-color);
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -186,7 +190,6 @@ nav.primary-nav {
|
|||||||
color: var(--fg-light-color);
|
color: var(--fg-light-color);
|
||||||
fill: var(--fg-light-color);
|
fill: var(--fg-light-color);
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
@@ -246,7 +249,7 @@ nav.secondary-nav {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
flex-direction: column;
|
flex-flow: column nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
@@ -263,11 +266,16 @@ hr {
|
|||||||
border-bottom: 1px dashed var(--brd-color);
|
border-bottom: 1px dashed var(--brd-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
$bgcolor: var(--tt-color);
|
$bgcolor: var(--tt-color);
|
||||||
$fgcolor: var(--fg-color);
|
$fgcolor: var(--fg-color);
|
||||||
display: block !important;
|
display: block !important;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
background: $bgcolor;
|
background: $bgcolor;
|
||||||
@@ -422,7 +430,6 @@ button {
|
|||||||
color: var(--act-color);
|
color: var(--act-color);
|
||||||
fill: var(--act-color);
|
fill: var(--act-color);
|
||||||
box-shadow: inset 0 0 0 2px var(--fg-color);
|
box-shadow: inset 0 0 0 2px var(--fg-color);
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.icon {
|
&.icon {
|
||||||
@@ -437,7 +444,6 @@ button {
|
|||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
fill: var(--fg-color);
|
fill: var(--fg-color);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,8 +478,19 @@ button {
|
|||||||
fieldset {
|
fieldset {
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
background-color: var(--bg-dark-color);
|
background-color: var(--bg-dark-color);
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset:target,
|
||||||
|
section:target {
|
||||||
|
animation: highlight 2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes highlight {
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 0 2px var(--ac-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
@@ -483,6 +500,7 @@ legend {
|
|||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -538,6 +556,7 @@ input[type="radio"],
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.method,
|
||||||
kbd,
|
kbd,
|
||||||
select,
|
select,
|
||||||
input,
|
input,
|
||||||
@@ -564,7 +583,16 @@ code {
|
|||||||
&:not([readonly]):not(.ace_editor):active,
|
&:not([readonly]):not(.ace_editor):active,
|
||||||
&:not([readonly]):not(.ace_editor):focus {
|
&:not([readonly]):not(.ace_editor):focus {
|
||||||
box-shadow: inset 0 0 0 2px var(--fg-light-color);
|
box-shadow: inset 0 0 0 2px var(--fg-light-color);
|
||||||
transition: all 0.2s ease-in-out;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.method {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
|
box-shadow: inset 0 0 0 2px var(--fg-light-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -587,6 +615,14 @@ pre {
|
|||||||
.select-wrapper {
|
.select-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
input {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trigger {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -661,6 +697,7 @@ input[type="checkbox"] {
|
|||||||
label {
|
label {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: var(--fg-light-color);
|
color: var(--fg-light-color);
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
@@ -679,7 +716,7 @@ ol {
|
|||||||
ul li,
|
ul li,
|
||||||
ol li {
|
ol li {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-flow: column nowrap;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@@ -693,7 +730,7 @@ ol li {
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-flow: row wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@@ -773,27 +810,19 @@ ol li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#send {
|
#send {
|
||||||
// #hidden-message {
|
|
||||||
// display: none;
|
|
||||||
// }
|
|
||||||
|
|
||||||
&.show {
|
&.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
||||||
// #hidden-message {
|
|
||||||
// display: block;
|
|
||||||
// margin-left: 4px;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
@@ -873,18 +902,19 @@ input[type="radio"]:checked + label + .tab {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.45);
|
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.45);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.primary-nav {
|
nav.primary-nav {
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
|
background-color: var(--bg-dark-color);
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
&.nuxt-link-exact-active {
|
&.nuxt-link-exact-active {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@@ -908,7 +938,7 @@ input[type="radio"]:checked + label + .tab {
|
|||||||
|
|
||||||
ul,
|
ul,
|
||||||
ol {
|
ol {
|
||||||
flex-direction: column;
|
flex-flow: column nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul li,
|
ul li,
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export default {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const editor = ace.edit(this.$refs.editor, {
|
const editor = ace.edit(this.$refs.editor, {
|
||||||
theme: "ace/theme/" + this.defineTheme(),
|
theme: `ace/theme/${this.defineTheme()}`,
|
||||||
mode: "ace/mode/" + this.lang,
|
mode: `ace/mode/${this.lang}`,
|
||||||
...this.options
|
...this.options
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -76,12 +76,11 @@ export default {
|
|||||||
defineTheme() {
|
defineTheme() {
|
||||||
if (this.theme) {
|
if (this.theme) {
|
||||||
return this.theme;
|
return this.theme;
|
||||||
} else {
|
}
|
||||||
return (
|
return (
|
||||||
this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
|
this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="$t('my_new_collection')"
|
:placeholder="$t('my_new_collection')"
|
||||||
|
@keyup.enter="addNewCollection"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -42,6 +43,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
show: Boolean
|
show: Boolean
|
||||||
@@ -55,15 +58,25 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
syncCollections() {
|
||||||
|
if (fb.currentUser !== null) {
|
||||||
|
if (fb.currentSettings[0].value) {
|
||||||
|
fb.writeCollections(
|
||||||
|
JSON.parse(JSON.stringify(this.$store.state.postwoman.collections))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
addNewCollection() {
|
addNewCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info("Please provide a valid name for the collection");
|
this.$toast.info($t("invalid_collection_name"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$store.commit("postwoman/addNewCollection", {
|
this.$store.commit("postwoman/addNewCollection", {
|
||||||
name: this.$data.name
|
name: this.$data.name
|
||||||
});
|
});
|
||||||
this.$emit("hide-modal");
|
this.$emit("hide-modal");
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit("hide-modal");
|
this.$emit("hide-modal");
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="$t('my_new_folder')"
|
:placeholder="$t('my_new_folder')"
|
||||||
|
@keyup.enter="addNewFolder"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
saveCollection() {
|
saveCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info("Please provide a valid name for the collection");
|
this.$toast.info($t("invalid_collection_name"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const collectionUpdated = {
|
const collectionUpdated = {
|
||||||
|
|||||||
@@ -120,20 +120,54 @@ export default {
|
|||||||
reader.onload = event => {
|
reader.onload = event => {
|
||||||
let content = event.target.result;
|
let content = event.target.result;
|
||||||
let collections = JSON.parse(content);
|
let collections = JSON.parse(content);
|
||||||
this.$store.commit("postwoman/replaceCollections", collections);
|
if (collections[0]) {
|
||||||
|
let [name, folders, requests] = Object.keys(collections[0]);
|
||||||
|
if (
|
||||||
|
name === "name" &&
|
||||||
|
folders === "folders" &&
|
||||||
|
requests === "requests"
|
||||||
|
) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
collections.info &&
|
||||||
|
collections.info.schema.includes("v2.1.0")
|
||||||
|
) {
|
||||||
|
collections = this.parsePostmanCollection(collections);
|
||||||
|
} else {
|
||||||
|
return this.failedImport();
|
||||||
|
}
|
||||||
|
this.$store.commit("postwoman/importCollections", collections);
|
||||||
|
this.fileImported();
|
||||||
};
|
};
|
||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
||||||
this.fileImported();
|
|
||||||
},
|
},
|
||||||
importFromJSON() {
|
importFromJSON() {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
reader.onload = event => {
|
reader.onload = event => {
|
||||||
let content = event.target.result;
|
let content = event.target.result;
|
||||||
let collections = JSON.parse(content);
|
let collections = JSON.parse(content);
|
||||||
|
if (collections[0]) {
|
||||||
|
let [name, folders, requests] = Object.keys(collections[0]);
|
||||||
|
if (
|
||||||
|
name === "name" &&
|
||||||
|
folders === "folders" &&
|
||||||
|
requests === "requests"
|
||||||
|
) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
collections.info &&
|
||||||
|
collections.info.schema.includes("v2.1.0")
|
||||||
|
) {
|
||||||
|
collections = this.parsePostmanCollection(collections);
|
||||||
|
} else {
|
||||||
|
return this.failedImport();
|
||||||
|
}
|
||||||
this.$store.commit("postwoman/importCollections", collections);
|
this.$store.commit("postwoman/importCollections", collections);
|
||||||
|
this.fileImported();
|
||||||
};
|
};
|
||||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
||||||
this.fileImported();
|
|
||||||
},
|
},
|
||||||
exportJSON() {
|
exportJSON() {
|
||||||
let text = this.collectionJson;
|
let text = this.collectionJson;
|
||||||
@@ -161,6 +195,129 @@ export default {
|
|||||||
this.$toast.info(this.$t("file_imported"), {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: "folder_shared"
|
icon: "folder_shared"
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
failedImport() {
|
||||||
|
this.$toast.error(this.$t("import_failed"), {
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
parsePostmanCollection(collection, folders = true) {
|
||||||
|
let postwomanCollection = folders
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
folders: [],
|
||||||
|
requests: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: {
|
||||||
|
name: "",
|
||||||
|
requests: []
|
||||||
|
};
|
||||||
|
for (let collectionItem of collection.item) {
|
||||||
|
if (collectionItem.request) {
|
||||||
|
if (postwomanCollection[0]) {
|
||||||
|
postwomanCollection[0].name = collection.info
|
||||||
|
? collection.info.name
|
||||||
|
: "";
|
||||||
|
postwomanCollection[0].requests.push(
|
||||||
|
this.parsePostmanRequest(collectionItem)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
postwomanCollection.name = collection.name ? collection.name : "";
|
||||||
|
postwomanCollection.requests.push(
|
||||||
|
this.parsePostmanRequest(collectionItem)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (collectionItem.item) {
|
||||||
|
if (collectionItem.item[0]) {
|
||||||
|
postwomanCollection[0].folders.push(
|
||||||
|
this.parsePostmanCollection(collectionItem, false)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return postwomanCollection;
|
||||||
|
},
|
||||||
|
parsePostmanRequest(requestObject) {
|
||||||
|
let pwRequest = {
|
||||||
|
url: "",
|
||||||
|
path: "",
|
||||||
|
method: "",
|
||||||
|
auth: "",
|
||||||
|
httpUser: "",
|
||||||
|
httpPassword: "",
|
||||||
|
passwordFieldType: "password",
|
||||||
|
bearerToken: "",
|
||||||
|
headers: [],
|
||||||
|
params: [],
|
||||||
|
bodyParams: [],
|
||||||
|
rawParams: "",
|
||||||
|
rawInput: false,
|
||||||
|
contentType: "",
|
||||||
|
requestType: "",
|
||||||
|
name: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
pwRequest.name = requestObject.name;
|
||||||
|
let requestObjectUrl = requestObject.request.url.raw.match(
|
||||||
|
/^(.+:\/\/[^\/]+|{[^\/]+})(\/[^\?]+|).*$/
|
||||||
|
);
|
||||||
|
pwRequest.url = requestObjectUrl[1];
|
||||||
|
pwRequest.path = requestObjectUrl[2] ? requestObjectUrl[2] : "";
|
||||||
|
pwRequest.method = requestObject.request.method;
|
||||||
|
let itemAuth = requestObject.request.auth
|
||||||
|
? requestObject.request.auth
|
||||||
|
: "";
|
||||||
|
let authType = itemAuth ? itemAuth.type : "";
|
||||||
|
if (authType === "basic") {
|
||||||
|
pwRequest.auth = "Basic Auth";
|
||||||
|
pwRequest.httpUser =
|
||||||
|
itemAuth.basic[0].key === "username"
|
||||||
|
? itemAuth.basic[0].value
|
||||||
|
: itemAuth.basic[1].value;
|
||||||
|
pwRequest.httpPassword =
|
||||||
|
itemAuth.basic[0].key === "password"
|
||||||
|
? itemAuth.basic[0].value
|
||||||
|
: itemAuth.basic[1].value;
|
||||||
|
} else if (authType === "oauth2") {
|
||||||
|
pwRequest.auth = "OAuth 2.0";
|
||||||
|
pwRequest.bearerToken =
|
||||||
|
itemAuth.oauth2[0].key === "accessToken"
|
||||||
|
? itemAuth.oauth2[0].value
|
||||||
|
: itemAuth.oauth2[1].value;
|
||||||
|
} else if (authType === "bearer") {
|
||||||
|
pwRequest.auth = "Bearer Token";
|
||||||
|
pwRequest.bearerToken = itemAuth.bearer[0].value;
|
||||||
|
}
|
||||||
|
let requestObjectHeaders = requestObject.request.header;
|
||||||
|
if (requestObjectHeaders) {
|
||||||
|
pwRequest.headers = requestObjectHeaders;
|
||||||
|
for (let header of pwRequest.headers) {
|
||||||
|
delete header.name;
|
||||||
|
delete header.type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let requestObjectParams = requestObject.request.url.query;
|
||||||
|
if (requestObjectParams) {
|
||||||
|
pwRequest.params = requestObjectParams;
|
||||||
|
for (let param of pwRequest.params) {
|
||||||
|
delete param.disabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requestObject.request.body) {
|
||||||
|
if (requestObject.request.body.mode === "urlencoded") {
|
||||||
|
let params = requestObject.request.body.urlencoded;
|
||||||
|
pwRequest.bodyParams = params ? params : [];
|
||||||
|
for (let param of pwRequest.bodyParams) {
|
||||||
|
delete param.type;
|
||||||
|
}
|
||||||
|
} else if (requestObject.request.body.mode === "raw") {
|
||||||
|
pwRequest.rawInput = true;
|
||||||
|
pwRequest.rawParams = requestObject.request.body.raw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pwRequest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ TODO:
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="collections-wrapper">
|
<pw-section class="yellow" :label="$t('collections')" ref="collections">
|
||||||
<addCollection :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
|
<addCollection :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
|
||||||
<editCollection
|
<editCollection
|
||||||
:show="showModalEdit"
|
:show="showModalEdit"
|
||||||
@@ -92,7 +92,7 @@ TODO:
|
|||||||
<span>{{ $t("generate_docs") }}</span>
|
<span>{{ $t("generate_docs") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</pw-section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -113,6 +113,7 @@ import { fb } from "../../functions/fb";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
collection,
|
collection,
|
||||||
|
"pw-section": () => import("../section"),
|
||||||
addCollection: () => import("./addCollection"),
|
addCollection: () => import("./addCollection"),
|
||||||
addFolder: () => import("./addFolder"),
|
addFolder: () => import("./addFolder"),
|
||||||
editCollection: () => import("./editCollection"),
|
editCollection: () => import("./editCollection"),
|
||||||
@@ -142,6 +143,15 @@ export default {
|
|||||||
return this.$store.state.postwoman.collections;
|
return this.$store.state.postwoman.collections;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async mounted() {
|
||||||
|
this._keyListener = function(e) {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.preventDefault();
|
||||||
|
this.showModalAdd = this.showModalEdit = this.showModalImportExport = this.showModalAddFolder = this.showModalEditFolder = this.showModalEditRequest = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.addEventListener("keydown", this._keyListener.bind(this));
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
displayModalAdd(shouldDisplay) {
|
displayModalAdd(shouldDisplay) {
|
||||||
this.showModalAdd = shouldDisplay;
|
this.showModalAdd = shouldDisplay;
|
||||||
@@ -216,6 +226,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener("keydown", this._keyListener);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -104,6 +104,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
@@ -180,6 +182,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
syncCollections() {
|
||||||
|
if (fb.currentUser !== null) {
|
||||||
|
if (fb.currentSettings[0].value) {
|
||||||
|
fb.writeCollections(
|
||||||
|
JSON.parse(JSON.stringify(this.$store.state.postwoman.collections))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
saveRequestAs() {
|
saveRequestAs() {
|
||||||
const userDidntSpecifyCollection =
|
const userDidntSpecifyCollection =
|
||||||
this.$data.requestData.collectionIndex === undefined;
|
this.$data.requestData.collectionIndex === undefined;
|
||||||
@@ -204,6 +215,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.hideModal();
|
this.hideModal();
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit("hide-modal");
|
this.$emit("hide-modal");
|
||||||
|
|||||||
94
components/environments/addEnvironment.vue
Normal file
94
components/environments/addEnvironment.vue
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<h3 class="title">{{ $t("new_environment") }}</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="name"
|
||||||
|
:placeholder="$t('my_new_environment')"
|
||||||
|
@keyup.enter="addNewEnvironment"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<span></span>
|
||||||
|
<span>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
{{ $t("cancel") }}
|
||||||
|
</button>
|
||||||
|
<button class="icon primary" @click="addNewEnvironment">
|
||||||
|
{{ $t("save") }}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
show: Boolean
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
modal: () => import("../../components/modal")
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
name: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
syncEnvironments() {
|
||||||
|
if (fb.currentUser !== null) {
|
||||||
|
if (fb.currentSettings[1].value) {
|
||||||
|
fb.writeEnvironments(
|
||||||
|
JSON.parse(JSON.stringify(this.$store.state.postwoman.environments))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addNewEnvironment() {
|
||||||
|
if (!this.$data.name) {
|
||||||
|
this.$toast.info(this.$t("invalid_environment_name"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let newEnvironment = [
|
||||||
|
{
|
||||||
|
name: this.$data.name,
|
||||||
|
variables: []
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.$store.commit("postwoman/importAddEnvironments", {
|
||||||
|
environments: newEnvironment,
|
||||||
|
confirmation: "Environment added"
|
||||||
|
});
|
||||||
|
this.$emit("hide-modal");
|
||||||
|
this.syncEnvironments();
|
||||||
|
},
|
||||||
|
hideModal() {
|
||||||
|
this.$data.name = undefined;
|
||||||
|
this.$emit("hide-modal");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
221
components/environments/editEnvironment.vue
Normal file
221
components/environments/editEnvironment.vue
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<h3 class="title">{{ $t("edit_environment") }}</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="name"
|
||||||
|
:placeholder="editingEnvironment.name"
|
||||||
|
@keyup.enter="saveEnvironment"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="clearContent($event)"
|
||||||
|
v-tooltip.bottom="$t('clear')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">clear_all</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<textarea
|
||||||
|
id="variableList"
|
||||||
|
readonly
|
||||||
|
v-textarea-auto-height="variableString"
|
||||||
|
v-model="variableString"
|
||||||
|
:placeholder="$t('add_one_variable')"
|
||||||
|
rows="1"
|
||||||
|
></textarea>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul
|
||||||
|
v-for="(variable, index) in this.editingEnvCopy.variables"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<li>
|
||||||
|
<input
|
||||||
|
:placeholder="$t('parameter_count', { count: index + 1 })"
|
||||||
|
:name="'param' + index"
|
||||||
|
:value="variable.key"
|
||||||
|
@change="
|
||||||
|
$store.commit('postwoman/setVariableKey', {
|
||||||
|
index,
|
||||||
|
value: $event.target.value
|
||||||
|
})
|
||||||
|
"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input
|
||||||
|
:placeholder="$t('value_count', { count: index + 1 })"
|
||||||
|
:name="'value' + index"
|
||||||
|
:value="
|
||||||
|
typeof variable.value === 'string'
|
||||||
|
? variable.value
|
||||||
|
: JSON.stringify(variable.value)
|
||||||
|
"
|
||||||
|
@change="
|
||||||
|
$store.commit('postwoman/setVariableValue', {
|
||||||
|
index,
|
||||||
|
value: $event.target.value
|
||||||
|
})
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<li>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="removeEnvironmentVariable(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
|
id="variable"
|
||||||
|
>
|
||||||
|
<i class="material-icons">delete</i>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<button class="icon" @click="addEnvironmentVariable">
|
||||||
|
<i class="material-icons">add</i>
|
||||||
|
<span>{{ $t("add_new") }}</span>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<span></span>
|
||||||
|
<span>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
{{ $t("cancel") }}
|
||||||
|
</button>
|
||||||
|
<button class="icon primary" @click="saveEnvironment">
|
||||||
|
{{ $t("save") }}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import textareaAutoHeight from "../../directives/textareaAutoHeight";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
directives: {
|
||||||
|
textareaAutoHeight
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
show: Boolean,
|
||||||
|
editingEnvironment: Object,
|
||||||
|
editingEnvironmentIndex: Number
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
modal: () => import("../../components/modal")
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
name: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
editingEnvironment: function(update) {
|
||||||
|
this.name = this.$props.editingEnvironment && this.$props.editingEnvironment.name
|
||||||
|
? this.$props.editingEnvironment.name
|
||||||
|
: undefined
|
||||||
|
this.$store.commit(
|
||||||
|
"postwoman/setEditingEnvironment",
|
||||||
|
this.$props.editingEnvironment
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
editingEnvCopy() {
|
||||||
|
return this.$store.state.postwoman.editingEnvironment;
|
||||||
|
},
|
||||||
|
variableString() {
|
||||||
|
const result = this.editingEnvCopy.variables;
|
||||||
|
return result === "" ? "" : JSON.stringify(result);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clearContent(e) {
|
||||||
|
this.$store.commit("postwoman/removeVariables", []);
|
||||||
|
e.target.innerHTML = this.doneButton;
|
||||||
|
this.$toast.info(this.$t("cleared"), {
|
||||||
|
icon: "clear_all"
|
||||||
|
});
|
||||||
|
setTimeout(
|
||||||
|
() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'),
|
||||||
|
1000
|
||||||
|
);
|
||||||
|
},
|
||||||
|
addEnvironmentVariable() {
|
||||||
|
let value = { key: "", value: "" };
|
||||||
|
this.$store.commit("postwoman/addVariable", value);
|
||||||
|
},
|
||||||
|
removeEnvironmentVariable(index) {
|
||||||
|
let variableIndex = index;
|
||||||
|
const oldVariables = this.editingEnvCopy.variables.slice();
|
||||||
|
const newVariables = this.editingEnvCopy.variables.filter(
|
||||||
|
(variable, index) => variableIndex !== index
|
||||||
|
);
|
||||||
|
|
||||||
|
this.$store.commit("postwoman/removeVariable", newVariables);
|
||||||
|
this.$toast.error(this.$t("deleted"), {
|
||||||
|
icon: "delete",
|
||||||
|
action: {
|
||||||
|
text: this.$t("undo"),
|
||||||
|
onClick: (e, toastObject) => {
|
||||||
|
this.$store.commit("postwoman/removeVariable", oldVariables);
|
||||||
|
toastObject.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveEnvironment() {
|
||||||
|
if (!this.$data.name) {
|
||||||
|
this.$toast.info(this.$t("invalid_environment_name"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const environmentUpdated = {
|
||||||
|
...this.editingEnvCopy,
|
||||||
|
name: this.$data.name
|
||||||
|
};
|
||||||
|
this.$store.commit("postwoman/saveEnvironment", {
|
||||||
|
environment: environmentUpdated,
|
||||||
|
environmentIndex: this.$props.editingEnvironmentIndex
|
||||||
|
});
|
||||||
|
this.$emit("hide-modal");
|
||||||
|
},
|
||||||
|
hideModal() {
|
||||||
|
this.$data.name = undefined;
|
||||||
|
this.$emit("hide-modal");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
65
components/environments/environment.vue
Normal file
65
components/environments/environment.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="$emit('select-environment')"
|
||||||
|
v-tooltip="$t('use_environment')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">insert_drive_file</i>
|
||||||
|
<span>{{ environment.name }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<v-popover>
|
||||||
|
<button class="tooltip-target icon" v-tooltip="$t('more')">
|
||||||
|
<i class="material-icons">more_vert</i>
|
||||||
|
</button>
|
||||||
|
<template slot="popover">
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="$emit('edit-environment')"
|
||||||
|
v-close-popover
|
||||||
|
>
|
||||||
|
<i class="material-icons">create</i>
|
||||||
|
<span>{{ $t("edit") }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="removeEnvironment" v-close-popover>
|
||||||
|
<i class="material-icons">delete</i>
|
||||||
|
<span>{{ $t("delete") }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</v-popover>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
display: flex;
|
||||||
|
padding-left: 16px;
|
||||||
|
border-left: 1px solid var(--brd-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
environment: Object,
|
||||||
|
environmentIndex: Number
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
removeEnvironment() {
|
||||||
|
if (!confirm("Are you sure you want to remove this environment?")) return;
|
||||||
|
this.$store.commit("postwoman/removeEnvironment", this.environmentIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
173
components/environments/importExportEnvironment.vue
Normal file
173
components/environments/importExportEnvironment.vue
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<h3 class="title">Import / Export Environment</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<span
|
||||||
|
v-tooltip="{
|
||||||
|
content: !fb.currentUser
|
||||||
|
? $t('login_first')
|
||||||
|
: $t('replace_current')
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
:disabled="!fb.currentUser"
|
||||||
|
class="icon"
|
||||||
|
@click="syncEnvironments"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_shared</i>
|
||||||
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToReplaceWith"
|
||||||
|
v-tooltip="$t('replace_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">create_new_folder</i>
|
||||||
|
<span>{{ $t("replace_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="replaceWithJSON"
|
||||||
|
style="display: none;"
|
||||||
|
ref="inputChooseFileToReplaceWith"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToImportFrom"
|
||||||
|
v-tooltip="$t('preserve_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_special</i>
|
||||||
|
<span>{{ $t("import_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="importFromJSON"
|
||||||
|
style="display: none;"
|
||||||
|
ref="inputChooseFileToImportFrom"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<textarea v-model="environmentJson" rows="8"></textarea>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<span></span>
|
||||||
|
<span>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
{{ $t("cancel") }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon primary"
|
||||||
|
@click="exportJSON"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
{{ $t("export") }}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fb
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
show: Boolean
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
modal: () => import("../../components/modal")
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
environmentJson() {
|
||||||
|
return JSON.stringify(this.$store.state.postwoman.environments, null, 2);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideModal() {
|
||||||
|
this.$emit("hide-modal");
|
||||||
|
},
|
||||||
|
openDialogChooseFileToReplaceWith() {
|
||||||
|
this.$refs.inputChooseFileToReplaceWith.click();
|
||||||
|
},
|
||||||
|
openDialogChooseFileToImportFrom() {
|
||||||
|
this.$refs.inputChooseFileToImportFrom.click();
|
||||||
|
},
|
||||||
|
replaceWithJSON() {
|
||||||
|
let reader = new FileReader();
|
||||||
|
reader.onload = event => {
|
||||||
|
let content = event.target.result;
|
||||||
|
let environments = JSON.parse(content);
|
||||||
|
this.$store.commit("postwoman/replaceEnvironments", environments);
|
||||||
|
};
|
||||||
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
||||||
|
this.fileImported();
|
||||||
|
},
|
||||||
|
importFromJSON() {
|
||||||
|
let reader = new FileReader();
|
||||||
|
reader.onload = event => {
|
||||||
|
let content = event.target.result;
|
||||||
|
let environments = JSON.parse(content);
|
||||||
|
let confirmation = this.$t("file_imported")
|
||||||
|
this.$store.commit("postwoman/importAddEnvironments", {
|
||||||
|
environments,
|
||||||
|
confirmation
|
||||||
|
});
|
||||||
|
};
|
||||||
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
||||||
|
},
|
||||||
|
exportJSON() {
|
||||||
|
let text = this.environmentJson;
|
||||||
|
text = text.replace(/\n/g, "\r\n");
|
||||||
|
let blob = new Blob([text], {
|
||||||
|
type: "text/json"
|
||||||
|
});
|
||||||
|
let anchor = document.createElement("a");
|
||||||
|
anchor.download = "postwoman-environment.json";
|
||||||
|
anchor.href = window.URL.createObjectURL(blob);
|
||||||
|
anchor.target = "_blank";
|
||||||
|
anchor.style.display = "none";
|
||||||
|
document.body.appendChild(anchor);
|
||||||
|
anchor.click();
|
||||||
|
document.body.removeChild(anchor);
|
||||||
|
this.$toast.success(this.$t("download_started"), {
|
||||||
|
icon: "done"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
syncEnvironments() {
|
||||||
|
this.$store.commit(
|
||||||
|
"postwoman/replaceEnvironments",
|
||||||
|
fb.currentEnvironments
|
||||||
|
);
|
||||||
|
this.fileImported();
|
||||||
|
},
|
||||||
|
fileImported() {
|
||||||
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
|
icon: "folder_shared"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
147
components/environments/index.vue
Normal file
147
components/environments/index.vue
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<pw-section
|
||||||
|
class="green"
|
||||||
|
icon="history"
|
||||||
|
:label="$t('environment')"
|
||||||
|
ref="environment"
|
||||||
|
>
|
||||||
|
<addEnvironment :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
|
||||||
|
<editEnvironment
|
||||||
|
:show="showModalEdit"
|
||||||
|
:editingEnvironment="editingEnvironment"
|
||||||
|
:editingEnvironmentIndex="editingEnvironmentIndex"
|
||||||
|
@hide-modal="displayModalEdit(false)"
|
||||||
|
/>
|
||||||
|
<importExportEnvironment
|
||||||
|
:show="showModalImportExport"
|
||||||
|
@hide-modal="displayModalImportExport(false)"
|
||||||
|
/>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="displayModalAdd(true)">
|
||||||
|
<i class="material-icons">add</i>
|
||||||
|
<span>{{ $t("new") }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="displayModalImportExport(true)">
|
||||||
|
{{ $t("import_export") }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p v-if="environments.length === 0" class="info">
|
||||||
|
Create new environment
|
||||||
|
</p>
|
||||||
|
<virtual-list
|
||||||
|
class="virtual-list"
|
||||||
|
:class="{ filled: environments.length }"
|
||||||
|
:size="152"
|
||||||
|
:remain="Math.min(5, environments.length)"
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<li
|
||||||
|
v-for="(environment, index) in environments"
|
||||||
|
:key="environment.name"
|
||||||
|
>
|
||||||
|
<environment
|
||||||
|
:environmentIndex="index"
|
||||||
|
:environment="environment"
|
||||||
|
@edit-environment="editEnvironment(environment, index)"
|
||||||
|
@select-environment="$emit('use-environment', environment)"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
<li v-if="environments.length === 0">
|
||||||
|
<label>Environments are empty</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</virtual-list>
|
||||||
|
</pw-section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.virtual-list {
|
||||||
|
max-height: calc(100vh - 276px);
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import environment from "./environment";
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
|
const updateOnLocalStorage = (propertyName, property) =>
|
||||||
|
window.localStorage.setItem(propertyName, JSON.stringify(property));
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
environment,
|
||||||
|
"pw-section": () => import("../section"),
|
||||||
|
addEnvironment: () => import("./addEnvironment"),
|
||||||
|
editEnvironment: () => import("./editEnvironment"),
|
||||||
|
importExportEnvironment: () => import("./importExportEnvironment"),
|
||||||
|
VirtualList: () => import("vue-virtual-scroll-list")
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showModalImportExport: false,
|
||||||
|
showModalAdd: false,
|
||||||
|
showModalEdit: false,
|
||||||
|
editingEnvironment: undefined,
|
||||||
|
editingEnvironmentIndex: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
environments() {
|
||||||
|
return this.$store.state.postwoman.environments;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
this._keyListener = function(e) {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.preventDefault();
|
||||||
|
this.showModalImportExport = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.addEventListener("keydown", this._keyListener.bind(this));
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
displayModalAdd(shouldDisplay) {
|
||||||
|
this.showModalAdd = shouldDisplay;
|
||||||
|
},
|
||||||
|
displayModalEdit(shouldDisplay) {
|
||||||
|
this.showModalEdit = shouldDisplay;
|
||||||
|
|
||||||
|
if (!shouldDisplay) this.resetSelectedData();
|
||||||
|
},
|
||||||
|
displayModalImportExport(shouldDisplay) {
|
||||||
|
this.showModalImportExport = shouldDisplay;
|
||||||
|
},
|
||||||
|
editEnvironment(environment, environmentIndex) {
|
||||||
|
this.$data.editingEnvironment = environment;
|
||||||
|
this.$data.editingEnvironmentIndex = environmentIndex;
|
||||||
|
this.displayModalEdit(true);
|
||||||
|
this.syncEnvironments;
|
||||||
|
},
|
||||||
|
resetSelectedData() {
|
||||||
|
this.$data.editingEnvironment = undefined;
|
||||||
|
this.$data.editingEnvironmentIndex = undefined;
|
||||||
|
},
|
||||||
|
syncEnvironments() {
|
||||||
|
if (fb.currentUser !== null) {
|
||||||
|
if (fb.currentSettings[1].value) {
|
||||||
|
fb.writeEnvironments(
|
||||||
|
JSON.parse(JSON.stringify(this.$store.state.postwoman.environments))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener("keydown", this._keyListener);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -3,28 +3,25 @@
|
|||||||
v-if="fb.currentFeeds.length !== 0"
|
v-if="fb.currentFeeds.length !== 0"
|
||||||
class="virtual-list"
|
class="virtual-list"
|
||||||
:class="{ filled: fb.currentFeeds.length }"
|
:class="{ filled: fb.currentFeeds.length }"
|
||||||
:size="56"
|
:size="90"
|
||||||
:remain="Math.min(8, fb.currentFeeds.length)"
|
:remain="Math.min(5, fb.currentFeeds.length)"
|
||||||
>
|
>
|
||||||
<ul v-for="feed in fb.currentFeeds" :key="feed.id">
|
<ul v-for="feed in fb.currentFeeds" :key="feed.id" class="entry">
|
||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li>
|
<li class="info">
|
||||||
<input
|
<label>
|
||||||
:aria-label="$t('label')"
|
{{ feed.label || $t("no_label") }}
|
||||||
type="text"
|
</label>
|
||||||
readonly
|
|
||||||
:value="feed.label"
|
|
||||||
:placeholder="$t('no_label')"
|
|
||||||
class="bg-color"
|
|
||||||
/>
|
|
||||||
</li>
|
</li>
|
||||||
<button class="icon" @click="saveFeed(feed)">
|
|
||||||
<i class="material-icons">get_app</i>
|
|
||||||
</button>
|
|
||||||
<button class="icon" @click="deleteFeed(feed)">
|
<button class="icon" @click="deleteFeed(feed)">
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="show-on-large-screen">
|
||||||
|
<li class="info clamb-3">
|
||||||
|
<label>{{ feed.message || $t("empty") }}</label>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</virtual-list>
|
</virtual-list>
|
||||||
<ul v-else>
|
<ul v-else>
|
||||||
@@ -38,6 +35,23 @@
|
|||||||
.virtual-list {
|
.virtual-list {
|
||||||
max-height: calc(100vh - 288px);
|
max-height: calc(100vh - 288px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul,
|
||||||
|
ol {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry {
|
||||||
|
border-bottom: 1px dashed var(--brd-color);
|
||||||
|
padding: 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clamb-3 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -58,23 +72,6 @@ export default {
|
|||||||
this.$toast.error(this.$t("deleted"), {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete"
|
icon: "delete"
|
||||||
});
|
});
|
||||||
},
|
|
||||||
saveFeed(feed) {
|
|
||||||
const dataToWrite = JSON.stringify(feed.message, null, 2);
|
|
||||||
const file = new Blob([dataToWrite], { type: "application/json" });
|
|
||||||
const a = document.createElement("a"),
|
|
||||||
url = URL.createObjectURL(file);
|
|
||||||
a.href = url;
|
|
||||||
a.download = (feed.label + " on " + Date()).replace(/\./g, "[dot]");
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
this.$toast.success(this.$t("download_started"), {
|
|
||||||
icon: "done"
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
document.body.removeChild(a);
|
|
||||||
window.URL.revokeObjectURL(url);
|
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
|
<div class="show-on-large-screen">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:aria-label="$t('label')"
|
:aria-label="$t('label')"
|
||||||
type="text"
|
type="text"
|
||||||
autofocus
|
autofocus
|
||||||
v-model="message"
|
v-model="message"
|
||||||
:placeholder="$t('paste_a_collection')"
|
:placeholder="$t('paste_a_note')"
|
||||||
|
@keyup.enter="formPost"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</div>
|
||||||
<ul>
|
<div class="show-on-large-screen">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:aria-label="$t('label')"
|
:aria-label="$t('label')"
|
||||||
@@ -19,21 +21,30 @@
|
|||||||
autofocus
|
autofocus
|
||||||
v-model="label"
|
v-model="label"
|
||||||
:placeholder="$t('label')"
|
:placeholder="$t('label')"
|
||||||
|
@keyup.enter="formPost"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
:disabled="!(this.message && this.label)"
|
:disabled="!(this.message || this.label)"
|
||||||
value="Save"
|
value="Save"
|
||||||
@click="formPost"
|
@click="formPost"
|
||||||
>
|
>
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
<span>Add</span>
|
<span>Add</span>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
ul,
|
||||||
|
ol {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from "../../functions/fb";
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
@@ -46,6 +57,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formPost() {
|
formPost() {
|
||||||
|
if (!(this.message || this.label)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
fb.writeFeeds(this.message, this.label);
|
fb.writeFeeds(this.message, this.label);
|
||||||
this.message = null;
|
this.message = null;
|
||||||
this.label = null;
|
this.label = null;
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ export default {
|
|||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(res => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (res.additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(this.$t("turn_on") + " " + this.$t("sync"), {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: "sync",
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
@@ -86,9 +86,9 @@ export default {
|
|||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(res => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (res.additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(this.$t("turn_on") + " " + this.$t("sync"), {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: "sync",
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import typelink from "./typelink";
|
import typelink from "./typelink";
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="scss">
|
||||||
.field-box {
|
.field-box {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ const DEFAULT_THEME = "twilight";
|
|||||||
|
|
||||||
import ace from "ace-builds";
|
import ace from "ace-builds";
|
||||||
import * as gql from "graphql";
|
import * as gql from "graphql";
|
||||||
|
import { getAutocompleteSuggestions } from "graphql-language-service-interface";
|
||||||
import "ace-builds/webpack-resolver";
|
import "ace-builds/webpack-resolver";
|
||||||
|
import "ace-builds/src-noconflict/ext-language_tools";
|
||||||
import debounce from "../../functions/utils/debounce";
|
import debounce from "../../functions/utils/debounce";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -46,10 +48,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
theme() {
|
theme() {
|
||||||
this.editor.setTheme("ace/theme/" + this.defineTheme());
|
this.editor.setTheme(`ace/theme/${this.defineTheme()}`);
|
||||||
},
|
},
|
||||||
lang(value) {
|
lang(value) {
|
||||||
this.editor.getSession().setMode("ace/mode/" + value);
|
this.editor.getSession().setMode(`ace/mode/${value}`);
|
||||||
},
|
},
|
||||||
options(value) {
|
options(value) {
|
||||||
this.editor.setOptions(value);
|
this.editor.setOptions(value);
|
||||||
@@ -57,12 +59,48 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let langTools = ace.require("ace/ext/language_tools");
|
||||||
|
|
||||||
const editor = ace.edit(this.$refs.editor, {
|
const editor = ace.edit(this.$refs.editor, {
|
||||||
theme: "ace/theme/" + this.defineTheme(),
|
theme: `ace/theme/${this.defineTheme()}`,
|
||||||
mode: "ace/mode/" + this.lang,
|
mode: `ace/mode/${this.lang}`,
|
||||||
|
enableBasicAutocompletion: true,
|
||||||
|
enableLiveAutocompletion: true,
|
||||||
...this.options
|
...this.options
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const completer = {
|
||||||
|
getCompletions: (
|
||||||
|
editor,
|
||||||
|
_session,
|
||||||
|
{ row, column },
|
||||||
|
_prefix,
|
||||||
|
callback
|
||||||
|
) => {
|
||||||
|
if (this.validationSchema) {
|
||||||
|
const completions = getAutocompleteSuggestions(
|
||||||
|
this.validationSchema,
|
||||||
|
editor.getValue(),
|
||||||
|
{ line: row, character: column }
|
||||||
|
);
|
||||||
|
|
||||||
|
callback(
|
||||||
|
null,
|
||||||
|
completions.map(({ label, detail }) => ({
|
||||||
|
name: label,
|
||||||
|
value: label,
|
||||||
|
score: 1.0,
|
||||||
|
meta: detail
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
callback(null, []);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
langTools.setCompleters([completer]);
|
||||||
|
|
||||||
if (this.value) editor.setValue(this.value, 1);
|
if (this.value) editor.setValue(this.value, 1);
|
||||||
|
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
@@ -101,14 +139,14 @@ export default {
|
|||||||
|
|
||||||
if (this.validationSchema) {
|
if (this.validationSchema) {
|
||||||
this.editor.session.setAnnotations(
|
this.editor.session.setAnnotations(
|
||||||
gql.validate(this.validationSchema, doc).map(err => {
|
gql
|
||||||
return {
|
.validate(this.validationSchema, doc)
|
||||||
row: err.locations[0].line - 1,
|
.map(({ locations, message }) => ({
|
||||||
column: err.locations[0].column - 1,
|
row: locations[0].line - 1,
|
||||||
text: err.message,
|
column: locations[0].column - 1,
|
||||||
|
text: message,
|
||||||
type: "error"
|
type: "error"
|
||||||
};
|
}))
|
||||||
})
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="scss">
|
||||||
.type-box {
|
.type-box {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<span class="typelink" @click="jumpToType">{{ typeString }}</span>
|
<span class="typelink" @click="jumpToType">{{ typeString }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="scss">
|
||||||
.typelink {
|
.typelink {
|
||||||
color: var(--ac-color);
|
color: var(--ac-color);
|
||||||
font-family: "Roboto Mono", monospace;
|
font-family: "Roboto Mono", monospace;
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<pw-section class="green" icon="history" :label="$t('history')" ref="history">
|
<pw-section class="green" icon="history" :label="$t('history')" ref="history">
|
||||||
<ul>
|
<ul>
|
||||||
|
<div class="show-on-large-screen">
|
||||||
<li id="filter-history">
|
<li id="filter-history">
|
||||||
<input
|
<input
|
||||||
aria-label="Search"
|
aria-label="Search"
|
||||||
type="text"
|
type="search"
|
||||||
:placeholder="$t('search_history')"
|
:placeholder="$t('search')"
|
||||||
v-model="filterText"
|
v-model="filterText"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
<button class="icon">
|
||||||
|
<i class="material-icons">search</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<virtual-list
|
<virtual-list
|
||||||
class="virtual-list"
|
class="virtual-list"
|
||||||
@@ -289,11 +294,6 @@ ol {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul li,
|
|
||||||
ol li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.method-list-item {
|
.method-list-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.87);
|
background-color: rgba(0, 0, 0, 0.32);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="scss">
|
||||||
fieldset.no-colored-frames legend {
|
fieldset.no-colored-frames legend {
|
||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,9 @@
|
|||||||
:data-color="color"
|
:data-color="color"
|
||||||
:class="{ active: active }"
|
:class="{ active: active }"
|
||||||
v-tooltip="{ content: name || color }"
|
v-tooltip="{ content: name || color }"
|
||||||
|
:style="{ backgroundColor: color }"
|
||||||
>
|
>
|
||||||
<span :style="{ backgroundColor: color }" class="preview">
|
|
||||||
<i v-if="active" class="material-icons activeTick">done</i>
|
<i v-if="active" class="material-icons activeTick">done</i>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -17,9 +16,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
|
padding: 16px;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
border: 3px solid var(--bg-dark-color);
|
border: 3px solid var(--bg-dark-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
&.fg {
|
&.fg {
|
||||||
color: var(--act-color);
|
color: var(--act-color);
|
||||||
@@ -33,19 +34,8 @@
|
|||||||
border: 3px solid var(--fg-color);
|
border: 3px solid var(--fg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview {
|
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 100%;
|
|
||||||
padding: 16px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.activeTick {
|
.activeTick {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
11
functions/editorutils.js
Normal file
11
functions/editorutils.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
const mimeToMode = {
|
||||||
|
"text/plain": "plain_text",
|
||||||
|
"text/html": "html",
|
||||||
|
"application/xml": "xml",
|
||||||
|
"application/hal+json": "json",
|
||||||
|
"application/json": "json"
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getEditorLangForMimeType(mimeType) {
|
||||||
|
return mimeToMode[mimeType] || "plain_text";
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ export const fb = {
|
|||||||
currentSettings: [],
|
currentSettings: [],
|
||||||
currentHistory: [],
|
currentHistory: [],
|
||||||
currentCollections: [],
|
currentCollections: [],
|
||||||
|
currentEnvironments: [],
|
||||||
writeFeeds: async (message, label) => {
|
writeFeeds: async (message, label) => {
|
||||||
const dt = {
|
const dt = {
|
||||||
createdOn: new Date(),
|
createdOn: new Date(),
|
||||||
@@ -112,6 +113,21 @@ export const fb = {
|
|||||||
.doc("sync")
|
.doc("sync")
|
||||||
.set(cl)
|
.set(cl)
|
||||||
.catch(e => console.error("error updating", cl, e));
|
.catch(e => console.error("error updating", cl, e));
|
||||||
|
},
|
||||||
|
writeEnvironments: async environment => {
|
||||||
|
const ev = {
|
||||||
|
updatedOn: new Date(),
|
||||||
|
author: fb.currentUser.uid,
|
||||||
|
author_name: fb.currentUser.displayName,
|
||||||
|
author_image: fb.currentUser.photoURL,
|
||||||
|
environment: environment
|
||||||
|
};
|
||||||
|
usersCollection
|
||||||
|
.doc(fb.currentUser.uid)
|
||||||
|
.collection("environments")
|
||||||
|
.doc("sync")
|
||||||
|
.set(ev)
|
||||||
|
.catch(e => console.error("error updating", ev, e));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -186,6 +202,19 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
});
|
});
|
||||||
fb.currentCollections = collections[0].collection;
|
fb.currentCollections = collections[0].collection;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
usersCollection
|
||||||
|
.doc(fb.currentUser.uid)
|
||||||
|
.collection("environments")
|
||||||
|
.onSnapshot(environmentsRef => {
|
||||||
|
const environments = [];
|
||||||
|
environmentsRef.forEach(doc => {
|
||||||
|
const environment = doc.data();
|
||||||
|
environment.id = doc.id;
|
||||||
|
environments.push(environment);
|
||||||
|
});
|
||||||
|
fb.currentEnvironments = environments[0].environment;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
fb.currentUser = null;
|
fb.currentUser = null;
|
||||||
}
|
}
|
||||||
|
|||||||
124
functions/headers.js
Normal file
124
functions/headers.js
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
export const commonHeaders = [
|
||||||
|
"WWW-Authenticate",
|
||||||
|
"Authorization",
|
||||||
|
"Proxy-Authenticate",
|
||||||
|
"Proxy-Authorization",
|
||||||
|
"Age",
|
||||||
|
"Cache-Control",
|
||||||
|
"Clear-Site-Data",
|
||||||
|
"Expires",
|
||||||
|
"Pragma",
|
||||||
|
"Warning",
|
||||||
|
"Accept-CH",
|
||||||
|
"Accept-CH-Lifetime",
|
||||||
|
"Early-Data",
|
||||||
|
"Content-DPR",
|
||||||
|
"DPR",
|
||||||
|
"Device-Memory",
|
||||||
|
"Save-Data",
|
||||||
|
"Viewport-Width",
|
||||||
|
"Width",
|
||||||
|
"Last-Modified",
|
||||||
|
"ETag",
|
||||||
|
"If-Match",
|
||||||
|
"If-None-Match",
|
||||||
|
"If-Modified-Since",
|
||||||
|
"If-Unmodified-Since",
|
||||||
|
"Vary",
|
||||||
|
"Connection",
|
||||||
|
"Keep-Alive",
|
||||||
|
"Accept",
|
||||||
|
"Accept-Charset",
|
||||||
|
"Accept-Encoding",
|
||||||
|
"Accept-Language",
|
||||||
|
"Expect",
|
||||||
|
"Max-Forwards",
|
||||||
|
"Cookie",
|
||||||
|
"Set-Cookie",
|
||||||
|
"Cookie2",
|
||||||
|
"Set-Cookie2",
|
||||||
|
"Access-Control-Allow-Origin",
|
||||||
|
"Access-Control-Allow-Credentials",
|
||||||
|
"Access-Control-Allow-Headers",
|
||||||
|
"Access-Control-Allow-Methods",
|
||||||
|
"Access-Control-Expose-Headers",
|
||||||
|
"Access-Control-Max-Age",
|
||||||
|
"Access-Control-Request-Headers",
|
||||||
|
"Access-Control-Request-Method",
|
||||||
|
"Origin",
|
||||||
|
"Service-Worker-Allowed",
|
||||||
|
"Timing-Allow-Origin",
|
||||||
|
"X-Permitted-Cross-Domain-Policies",
|
||||||
|
"DNT",
|
||||||
|
"Tk",
|
||||||
|
"Content-Disposition",
|
||||||
|
"Content-Length",
|
||||||
|
"Content-Type",
|
||||||
|
"Content-Encoding",
|
||||||
|
"Content-Language",
|
||||||
|
"Content-Location",
|
||||||
|
"Forwarded",
|
||||||
|
"X-Forwarded-For",
|
||||||
|
"X-Forwarded-Host",
|
||||||
|
"X-Forwarded-Proto",
|
||||||
|
"Via",
|
||||||
|
"Location",
|
||||||
|
"From",
|
||||||
|
"Host",
|
||||||
|
"Referer",
|
||||||
|
"Referrer-Policy",
|
||||||
|
"User-Agent",
|
||||||
|
"Allow",
|
||||||
|
"Server",
|
||||||
|
"Accept-Ranges",
|
||||||
|
"Range",
|
||||||
|
"If-Range",
|
||||||
|
"Content-Range",
|
||||||
|
"Cross-Origin-Opener-Policy",
|
||||||
|
"Cross-Origin-Resource-Policy",
|
||||||
|
"Content-Security-Policy",
|
||||||
|
"Content-Security-Policy-Report-Only",
|
||||||
|
"Expect-CT",
|
||||||
|
"Feature-Policy",
|
||||||
|
"Public-Key-Pins",
|
||||||
|
"Public-Key-Pins-Report-Only",
|
||||||
|
"Strict-Transport-Security",
|
||||||
|
"Upgrade-Insecure-Requests",
|
||||||
|
"X-Content-Type-Options",
|
||||||
|
"X-Download-Options",
|
||||||
|
"X-Frame-Options",
|
||||||
|
"X-Powered-By",
|
||||||
|
"X-XSS-Protection",
|
||||||
|
"Last-Event-ID",
|
||||||
|
"NEL",
|
||||||
|
"Ping-From",
|
||||||
|
"Ping-To",
|
||||||
|
"Report-To",
|
||||||
|
"Transfer-Encoding",
|
||||||
|
"TE",
|
||||||
|
"Trailer",
|
||||||
|
"Sec-WebSocket-Key",
|
||||||
|
"Sec-WebSocket-Extensions",
|
||||||
|
"Sec-WebSocket-Accept",
|
||||||
|
"Sec-WebSocket-Protocol",
|
||||||
|
"Sec-WebSocket-Version",
|
||||||
|
"Accept-Push-Policy",
|
||||||
|
"Accept-Signature",
|
||||||
|
"Alt-Svc",
|
||||||
|
"Date",
|
||||||
|
"Large-Allocation",
|
||||||
|
"Link",
|
||||||
|
"Push-Policy",
|
||||||
|
"Retry-After",
|
||||||
|
"Signature",
|
||||||
|
"Signed-Headers",
|
||||||
|
"Server-Timing",
|
||||||
|
"SourceMap",
|
||||||
|
"Upgrade",
|
||||||
|
"X-DNS-Prefetch-Control",
|
||||||
|
"X-Firefox-Spdy",
|
||||||
|
"X-Pingback",
|
||||||
|
"X-Requested-With",
|
||||||
|
"X-Robots-Tag",
|
||||||
|
"X-UA-Compatible"
|
||||||
|
];
|
||||||
@@ -1,8 +1,24 @@
|
|||||||
import AxiosStrategy from "./strategies/AxiosStrategy";
|
import AxiosStrategy from "./strategies/AxiosStrategy";
|
||||||
|
import ExtensionStrategy, {
|
||||||
|
hasExtensionInstalled
|
||||||
|
} from "./strategies/ExtensionStrategy";
|
||||||
import FirefoxStrategy from "./strategies/FirefoxStrategy";
|
import FirefoxStrategy from "./strategies/FirefoxStrategy";
|
||||||
import ChromeStrategy, { hasChromeExtensionInstalled } from "./strategies/ChromeStrategy";
|
import ChromeStrategy, {
|
||||||
|
hasChromeExtensionInstalled
|
||||||
|
} from "./strategies/ChromeStrategy";
|
||||||
|
|
||||||
|
const isExtensionsAllowed = ({ state }) =>
|
||||||
|
typeof state.postwoman.settings.EXTENSIONS_ENABLED === "undefined" ||
|
||||||
|
state.postwoman.settings.EXTENSIONS_ENABLED;
|
||||||
|
|
||||||
const runAppropriateStrategy = (req, store) => {
|
const runAppropriateStrategy = (req, store) => {
|
||||||
|
if (isExtensionsAllowed(store)) {
|
||||||
|
if (hasExtensionInstalled()) {
|
||||||
|
return ExtensionStrategy(req, store);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following strategies are deprecated and kept to support older version of the extensions
|
||||||
|
|
||||||
// Chrome Provides a chrome object for scripts to access
|
// Chrome Provides a chrome object for scripts to access
|
||||||
// Check its availability to say whether you are in Google Chrome
|
// Check its availability to say whether you are in Google Chrome
|
||||||
if (window.chrome && hasChromeExtensionInstalled()) {
|
if (window.chrome && hasChromeExtensionInstalled()) {
|
||||||
@@ -13,12 +29,14 @@ const runAppropriateStrategy = (req, store) => {
|
|||||||
if (window.firefoxExtSendRequest) {
|
if (window.firefoxExtSendRequest) {
|
||||||
return FirefoxStrategy(req, store);
|
return FirefoxStrategy(req, store);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return AxiosStrategy(req, store);
|
return AxiosStrategy(req, store);
|
||||||
}
|
};
|
||||||
|
|
||||||
const sendNetworkRequest = (req, store) =>
|
const sendNetworkRequest = (req, store) =>
|
||||||
runAppropriateStrategy(req, store)
|
runAppropriateStrategy(req, store).finally(() =>
|
||||||
.finally(() => window.$nuxt.$loading.finish());
|
window.$nuxt.$loading.finish()
|
||||||
|
);
|
||||||
|
|
||||||
export { sendNetworkRequest };
|
export { sendNetworkRequest };
|
||||||
|
|||||||
@@ -3,47 +3,54 @@ const EXTENSION_ID = "amknoiejhlmhancpahfcfcfhllgkpbld";
|
|||||||
// Check if the Chrome Extension is present
|
// Check if the Chrome Extension is present
|
||||||
// The Chrome extension injects an empty span to help detection.
|
// The Chrome extension injects an empty span to help detection.
|
||||||
// Also check for the presence of window.chrome object to confirm smooth operations
|
// Also check for the presence of window.chrome object to confirm smooth operations
|
||||||
export const hasChromeExtensionInstalled = () => {
|
export const hasChromeExtensionInstalled = () =>
|
||||||
return document.getElementById("chromePWExtensionDetect") !== null;
|
document.getElementById("chromePWExtensionDetect") !== null;
|
||||||
}
|
|
||||||
|
|
||||||
const chromeWithoutProxy = (req, _store) => new Promise((resolve, reject) => {
|
const chromeWithoutProxy = (req, _store) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome.runtime.sendMessage(
|
||||||
EXTENSION_ID, {
|
EXTENSION_ID,
|
||||||
|
{
|
||||||
messageType: "send-req",
|
messageType: "send-req",
|
||||||
data: {
|
data: {
|
||||||
config: req
|
config: req
|
||||||
}
|
}
|
||||||
}, (message) => {
|
},
|
||||||
if (message.data.error) {
|
({ data }) => {
|
||||||
reject(message.data.error);
|
if (data.error) {
|
||||||
|
reject(data.error);
|
||||||
} else {
|
} else {
|
||||||
resolve(message.data.response);
|
resolve(data.response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const chromeWithProxy = (req, { state }) => new Promise((resolve, reject) => {
|
const chromeWithProxy = (req, { state }) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome.runtime.sendMessage(
|
||||||
EXTENSION_ID, {
|
EXTENSION_ID,
|
||||||
|
{
|
||||||
messageType: "send-req",
|
messageType: "send-req",
|
||||||
data: {
|
data: {
|
||||||
config: {
|
config: {
|
||||||
method: "post",
|
method: "post",
|
||||||
url: state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
url:
|
||||||
|
state.postwoman.settings.PROXY_URL ||
|
||||||
|
"https://postwoman.apollotv.xyz/",
|
||||||
data: req
|
data: req
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, (message) => {
|
},
|
||||||
if (message.data.error) {
|
({ data }) => {
|
||||||
|
if (data.error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
resolve(message.data.response.data);
|
resolve(data.response.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const chromeStrategy = (req, store) => {
|
const chromeStrategy = (req, store) => {
|
||||||
if (store.state.postwoman.settings.PROXY_ENABLED) {
|
if (store.state.postwoman.settings.PROXY_ENABLED) {
|
||||||
@@ -51,6 +58,6 @@ const chromeStrategy = (req, store) => {
|
|||||||
} else {
|
} else {
|
||||||
return chromeWithoutProxy(req, store);
|
return chromeWithoutProxy(req, store);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export default chromeStrategy;
|
export default chromeStrategy;
|
||||||
|
|||||||
26
functions/strategies/ExtensionStrategy.js
Normal file
26
functions/strategies/ExtensionStrategy.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
export const hasExtensionInstalled = () =>
|
||||||
|
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== "undefined";
|
||||||
|
|
||||||
|
const extensionWithProxy = async (req, { state }) => {
|
||||||
|
const { data } = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest({
|
||||||
|
method: "post",
|
||||||
|
url:
|
||||||
|
state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
|
data: req
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const extensionWithoutProxy = async (req, _store) => {
|
||||||
|
const res = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest(req);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
const extensionStrategy = (req, store) => {
|
||||||
|
if (store.state.postwoman.settings.PROXY_ENABLED) {
|
||||||
|
return extensionWithProxy(req, store);
|
||||||
|
}
|
||||||
|
return extensionWithoutProxy(req, store);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default extensionStrategy;
|
||||||
@@ -27,7 +27,6 @@ export default {
|
|||||||
method: "Method",
|
method: "Method",
|
||||||
path: "Path",
|
path: "Path",
|
||||||
label: "Label",
|
label: "Label",
|
||||||
again: "Again",
|
|
||||||
content_type: "Content Type",
|
content_type: "Content Type",
|
||||||
raw_input: "Raw input",
|
raw_input: "Raw input",
|
||||||
parameter_list: "Parameter List",
|
parameter_list: "Parameter List",
|
||||||
@@ -46,6 +45,14 @@ export default {
|
|||||||
preview_html: "Preview HTML",
|
preview_html: "Preview HTML",
|
||||||
history: "History",
|
history: "History",
|
||||||
collections: "Collections",
|
collections: "Collections",
|
||||||
|
environment: "Environment",
|
||||||
|
new_environment: "New Environment",
|
||||||
|
my_new_environment: "My New Environment",
|
||||||
|
edit_environment: "Edit Environment",
|
||||||
|
env_variable_list: "Variable List",
|
||||||
|
invalid_environment_name: "Please provide a valid name for the environment",
|
||||||
|
use_environment: "Use Environment",
|
||||||
|
add_one_variable: "(add at least one variable)",
|
||||||
import_curl: "Import cURL",
|
import_curl: "Import cURL",
|
||||||
import: "Import",
|
import: "Import",
|
||||||
generate_code: "Generate code",
|
generate_code: "Generate code",
|
||||||
@@ -111,7 +118,7 @@ export default {
|
|||||||
no_label: "No label",
|
no_label: "No label",
|
||||||
prerequest_script: "Pre-Request Script",
|
prerequest_script: "Pre-Request Script",
|
||||||
no_prerequest_script: "No pre-request script",
|
no_prerequest_script: "No pre-request script",
|
||||||
search_history: "search history",
|
search: "Search",
|
||||||
history_empty: "History is empty",
|
history_empty: "History is empty",
|
||||||
history_deleted: "History Deleted",
|
history_deleted: "History Deleted",
|
||||||
clear: "Clear",
|
clear: "Clear",
|
||||||
@@ -141,6 +148,7 @@ export default {
|
|||||||
deleted: "Deleted",
|
deleted: "Deleted",
|
||||||
undo: "Undo",
|
undo: "Undo",
|
||||||
collection_empty: "Collection is empty",
|
collection_empty: "Collection is empty",
|
||||||
|
invalid_collection_name: "Please provide a valid name for the collection",
|
||||||
new_collection: "New Collection",
|
new_collection: "New Collection",
|
||||||
my_new_collection: "My New Collection",
|
my_new_collection: "My New Collection",
|
||||||
edit_collection: "Edit Collection",
|
edit_collection: "Edit Collection",
|
||||||
@@ -163,7 +171,7 @@ export default {
|
|||||||
kinda_dark: "Kinda Dark",
|
kinda_dark: "Kinda Dark",
|
||||||
clearly_white: "Clearly White",
|
clearly_white: "Clearly White",
|
||||||
just_black: "Just Black",
|
just_black: "Just Black",
|
||||||
auto_system: "Auth (system)",
|
auto_system: "Auto (system)",
|
||||||
green: "Green",
|
green: "Green",
|
||||||
yellow: "Yellow",
|
yellow: "Yellow",
|
||||||
pink: "Pink",
|
pink: "Pink",
|
||||||
@@ -222,6 +230,7 @@ export default {
|
|||||||
payload: "Payload",
|
payload: "Payload",
|
||||||
choose_file: "Choose a file",
|
choose_file: "Choose a file",
|
||||||
file_imported: "File imported",
|
file_imported: "File imported",
|
||||||
|
import_failed: "Import failed",
|
||||||
f12_details: "(F12 for details)",
|
f12_details: "(F12 for details)",
|
||||||
we_use_cookies: "We use cookies",
|
we_use_cookies: "We use cookies",
|
||||||
copied_to_clipboard: "Copied to clipboard",
|
copied_to_clipboard: "Copied to clipboard",
|
||||||
@@ -247,6 +256,8 @@ export default {
|
|||||||
enter_curl: "Enter cURL",
|
enter_curl: "Enter cURL",
|
||||||
empty: "Empty",
|
empty: "Empty",
|
||||||
extensions: "Extensions",
|
extensions: "Extensions",
|
||||||
|
extensions_use_toggle:
|
||||||
|
"Use the browser extension to send requests (if present)",
|
||||||
extensions_info1: "Browser extension that simplifies access to Postwoman",
|
extensions_info1: "Browser extension that simplifies access to Postwoman",
|
||||||
extensions_info2: "Get Postwoman browser extension!",
|
extensions_info2: "Get Postwoman browser extension!",
|
||||||
installed: "Installed",
|
installed: "Installed",
|
||||||
@@ -257,8 +268,10 @@ export default {
|
|||||||
sync: "Sync",
|
sync: "Sync",
|
||||||
syncHistory: "History",
|
syncHistory: "History",
|
||||||
syncCollections: "Collections",
|
syncCollections: "Collections",
|
||||||
|
syncEnvironments: "Environments",
|
||||||
turn_on: "Turn on",
|
turn_on: "Turn on",
|
||||||
login_first: "Login first",
|
login_first: "Login first",
|
||||||
paste_a_collection: "Paste a Collection",
|
paste_a_note: "Paste a note",
|
||||||
import_from_sync: "Import from Sync"
|
import_from_sync: "Import from Sync",
|
||||||
|
notes: "Notes"
|
||||||
};
|
};
|
||||||
|
|||||||
176
lang/es-ES.js
176
lang/es-ES.js
@@ -86,5 +86,179 @@ export default {
|
|||||||
connect: "Conectar",
|
connect: "Conectar",
|
||||||
disconnect: "Desconectar",
|
disconnect: "Desconectar",
|
||||||
start: "Comienzo",
|
start: "Comienzo",
|
||||||
stop: "Detener"
|
stop: "Detener",
|
||||||
|
access_token: "Token de acceso",
|
||||||
|
token_list: "Lista de token",
|
||||||
|
get_token: "Obtener un nuevo token",
|
||||||
|
manage_token: "Gestionar el token de acceso",
|
||||||
|
save_token: "Guardar el token de acceso",
|
||||||
|
use_token: "Usar token guardado",
|
||||||
|
request_token: "Petición del token",
|
||||||
|
save_token_req: "Guardar la petición del token",
|
||||||
|
manage_token_req: "Gestionar la petición del token",
|
||||||
|
use_token_req: "Usar el token de la petición",
|
||||||
|
token_req_name: "Nombre de la petición",
|
||||||
|
token_req_details: "Petición de detalles",
|
||||||
|
token_name: "Nombre del token",
|
||||||
|
oidc_discovery_url: "URL de descubrimiento de OIDC",
|
||||||
|
auth_url: "URL de autenticación",
|
||||||
|
access_token_url: "URL de token de acceso",
|
||||||
|
client_id: "ID del cliente",
|
||||||
|
scope: "Alcance",
|
||||||
|
state: "Estado",
|
||||||
|
token_req_list: "Lista de solicitud de token",
|
||||||
|
no_path: "Sin ruta",
|
||||||
|
no_label: "Sin etiqueta",
|
||||||
|
prerequest_script: "Pre-Request Script",
|
||||||
|
no_prerequest_script: "Script sin pre-requisito",
|
||||||
|
search: "buscar historial",
|
||||||
|
history_empty: "Historial vacío",
|
||||||
|
history_deleted: "Historial borrado",
|
||||||
|
clear: "Limpiar",
|
||||||
|
clear_all: "Limpiar todo",
|
||||||
|
cleared: "Limpiado",
|
||||||
|
close: "Cerrar",
|
||||||
|
sort: "Ordenar",
|
||||||
|
time: "Tiempo",
|
||||||
|
duration: "Duración",
|
||||||
|
no_duration: "Sin duración",
|
||||||
|
show_more: "Mostrar más",
|
||||||
|
hide_more: "Ocultar más",
|
||||||
|
collection: "Colección",
|
||||||
|
current_collection: "Actual colección",
|
||||||
|
select_collection: "Seleccionar una colección",
|
||||||
|
create_collection: "Crear una colección",
|
||||||
|
new: "Nuevo",
|
||||||
|
import_export: "Importar / Exportar",
|
||||||
|
more: "Más",
|
||||||
|
folder: "Directorio",
|
||||||
|
new_folder: "Nuevo directorio",
|
||||||
|
my_new_folder: "Mi nuevo directorio",
|
||||||
|
folder_empty: "Directorio vacío",
|
||||||
|
edit_folder: "Editar directorio",
|
||||||
|
edit: "Editar",
|
||||||
|
delete: "Borrar",
|
||||||
|
deleted: "Borrado",
|
||||||
|
undo: "Deshacer",
|
||||||
|
collection_empty: "Colección vacía",
|
||||||
|
new_collection: "Nueva colección",
|
||||||
|
my_new_collection: "Mi nueva colección",
|
||||||
|
edit_collection: "Editar colección",
|
||||||
|
edit_request: "Editar petición",
|
||||||
|
save_request_as: "Guardar petición como",
|
||||||
|
export: "Exportar",
|
||||||
|
connecting_to: "Conectando a {name}...",
|
||||||
|
connected: "Conectado",
|
||||||
|
connected_to: "Conectado a {name}",
|
||||||
|
disconnected: "Desconectado",
|
||||||
|
disconnected_from: "Desconectado desde {name}",
|
||||||
|
something_went_wrong: "Algo ha salido mal!",
|
||||||
|
error_occurred: "Ha ocurrido un error.",
|
||||||
|
browser_support_sse:
|
||||||
|
"Este navegador parace no tener soporte a los eventos enviados desde el servidor.",
|
||||||
|
log: "Bitácora",
|
||||||
|
no_url: "Sin URL",
|
||||||
|
run_query: "Ejecutar consulta",
|
||||||
|
copy_query: "Copiar consulta",
|
||||||
|
kinda_dark: "Un poco oscúro",
|
||||||
|
clearly_white: "Claramento blanco",
|
||||||
|
just_black: "Solo Negro",
|
||||||
|
auto_system: "Autenticación (sistema)",
|
||||||
|
green: "Verde",
|
||||||
|
yellow: "Amarillo",
|
||||||
|
pink: "Rosado",
|
||||||
|
red: "Rojo",
|
||||||
|
purple: "Púrpura",
|
||||||
|
orange: "Anaranjado",
|
||||||
|
cyan: "Cian",
|
||||||
|
blue: "Azul",
|
||||||
|
loading: "Cargando...",
|
||||||
|
fetching: "Recuperando...",
|
||||||
|
waiting_send_req: "(esperando para enviar la petición)",
|
||||||
|
cancel: "Cancelar",
|
||||||
|
save: "Guardar",
|
||||||
|
dismiss: "Descartar",
|
||||||
|
are_you_sure: "Está seguro?",
|
||||||
|
yes: "Sí",
|
||||||
|
no: "No",
|
||||||
|
restore: "Restaurar",
|
||||||
|
add_star: "Agregar estrella",
|
||||||
|
remove_star: "Eliminar estrella",
|
||||||
|
nothing_found: "No se encontró nada",
|
||||||
|
replace_current: "Reemplaza el actual",
|
||||||
|
replace_json: "Reemplazar con JSON",
|
||||||
|
preserve_current: "Preservar el actual",
|
||||||
|
import_json: "Importar desde JSON",
|
||||||
|
download_file: "Descargar archivo",
|
||||||
|
upload_file: "Cargar archivo",
|
||||||
|
copy_response: "Copiar respuesta",
|
||||||
|
copy_code: "Copiar codigo",
|
||||||
|
copy_schema: "Copiar Esquema",
|
||||||
|
use_request: "Usar la petición",
|
||||||
|
documentation: "Documentación",
|
||||||
|
docs: "Documentos",
|
||||||
|
reset_default: "Reiniciar valores por defecto",
|
||||||
|
fields: "CAMPOS",
|
||||||
|
deprecated: "OBSOLETO",
|
||||||
|
add_one_header: "(agregar al menos una cabecera)",
|
||||||
|
add_one_parameter: "(agregar al menos un parámetro)",
|
||||||
|
header_count: "cabecera {count}",
|
||||||
|
parameter_count: "parámetro {count}",
|
||||||
|
variable_count: "variable {count}",
|
||||||
|
value_count: "valor {count}",
|
||||||
|
send_request_first: "Enviar primero la petición",
|
||||||
|
generate_docs: "Generar la Documentación",
|
||||||
|
generate_docs_message:
|
||||||
|
"Importar cualquier Colección de Postwoman para Generar la Documentación sobre la marcha.",
|
||||||
|
generate_docs_first: "Generar primero la documentación",
|
||||||
|
docs_generated: "Documentación generada",
|
||||||
|
import_collections: "Importar colecciones",
|
||||||
|
optional: "(opcional)",
|
||||||
|
json: "JSON",
|
||||||
|
none: "Nada",
|
||||||
|
username: "Nombre de usuario",
|
||||||
|
password: "Contrasaeña",
|
||||||
|
token: "Token",
|
||||||
|
payload: "Carga",
|
||||||
|
choose_file: "Seleccione un archivo",
|
||||||
|
file_imported: "Archivo imporado",
|
||||||
|
f12_details: "(F12 para ver detalles)",
|
||||||
|
we_use_cookies: "Usamos las cookies",
|
||||||
|
copied_to_clipboard: "Copiado al portapapeles",
|
||||||
|
finished_in: "Terminado en {duration}ms",
|
||||||
|
check_console_details: "Verifique la consola para más detalles.",
|
||||||
|
download_started: "Inició la descarga",
|
||||||
|
url_invalid_format: "La URL no está formateado apropiadamente",
|
||||||
|
curl_invalid_format: "El cURL no está formateado apropiadamente",
|
||||||
|
enable_proxy: "Pruebe habilitando el Proxy",
|
||||||
|
complete_config_urls: "Por favor, termine la configuración de las urls.",
|
||||||
|
token_request_saved: "La petición de tToken ha sido guardada",
|
||||||
|
donate_info1:
|
||||||
|
"Si le ha gustado su productividad usando Postwoman, considere hacer una donación como un signo de su apreciación.",
|
||||||
|
donate_info2:
|
||||||
|
"Puede ayudar al desarrollo de Postwoman mediante los siguientes métodos:",
|
||||||
|
one_time_recurring: "Una vez o recurrente",
|
||||||
|
one_time: "Una vez",
|
||||||
|
recurring: "Recurrente",
|
||||||
|
wiki: "Wiki",
|
||||||
|
error: "Error",
|
||||||
|
go_home: "Ir al inicio",
|
||||||
|
reload: "Recargar",
|
||||||
|
enter_curl: "Intruduzca cURL",
|
||||||
|
empty: "Vacío",
|
||||||
|
extensions: "Extensiones",
|
||||||
|
extensions_info1: "Extensión del navegador que simplifica el acceso a Postwoman",
|
||||||
|
extensions_info2: "Obtener la extensión del navegador de Postwoman!",
|
||||||
|
installed: "Instalado",
|
||||||
|
login_with: "Iniciar sesión con",
|
||||||
|
logged_out: "Sesión cerreda",
|
||||||
|
logout: "Cerrar sesión",
|
||||||
|
account: "Cuenta",
|
||||||
|
sync: "Sync",
|
||||||
|
syncHistory: "Historial",
|
||||||
|
syncCollections: "Colecciones",
|
||||||
|
turn_on: "Encender",
|
||||||
|
login_first: "Inicie sesión primero",
|
||||||
|
paste_a_collection: "Pegar una Colección",
|
||||||
|
import_from_sync: "Importar desde Sync"
|
||||||
};
|
};
|
||||||
|
|||||||
176
lang/fr-FR.js
176
lang/fr-FR.js
@@ -86,5 +86,179 @@ export default {
|
|||||||
connect: "Relier",
|
connect: "Relier",
|
||||||
disconnect: "Déconnecter",
|
disconnect: "Déconnecter",
|
||||||
start: "Début",
|
start: "Début",
|
||||||
stop: "Arrêtez"
|
stop: "Arrêtez",
|
||||||
|
access_token: "Token d'accès",
|
||||||
|
token_list: "Liste des Tokens",
|
||||||
|
get_token: "Obtenir un nouveau Token",
|
||||||
|
manage_token: "Gérer le Token",
|
||||||
|
save_token: "Sauvegarder le Token",
|
||||||
|
use_token: "Utiliser un Token",
|
||||||
|
request_token: "Demander un Token",
|
||||||
|
save_token_req: "Sauvegarder la requête ",
|
||||||
|
manage_token_req: "Gérer la requête avec Token",
|
||||||
|
use_token_req: "Utiliser la requête avec Token",
|
||||||
|
token_req_name: "Nom de la requête",
|
||||||
|
token_req_details: "Détails de la requête",
|
||||||
|
token_name: "Nom du Token",
|
||||||
|
oidc_discovery_url: "OIDC Discovery URL",
|
||||||
|
auth_url: "Auth URL",
|
||||||
|
access_token_url: "URL du Token d'accès",
|
||||||
|
client_id: "Client ID",
|
||||||
|
scope: "Scope",
|
||||||
|
state: "État",
|
||||||
|
token_req_list: "Liste des requêtes avec Token",
|
||||||
|
no_path: "Aucun chemin",
|
||||||
|
no_label: "Aucun label",
|
||||||
|
prerequest_script: "Pre-Request Script",
|
||||||
|
no_prerequest_script: "No pre-request script",
|
||||||
|
search: "Historique de la recherche",
|
||||||
|
history_empty: "L'historique est vide",
|
||||||
|
history_deleted: "Historique supprimé",
|
||||||
|
clear: "Nettoyer",
|
||||||
|
clear_all: "Tout nettoyer",
|
||||||
|
cleared: "Nettoyé",
|
||||||
|
close: "Fermer",
|
||||||
|
sort: "Trier",
|
||||||
|
time: "Temps",
|
||||||
|
duration: "Durée",
|
||||||
|
no_duration: "Aucune durée",
|
||||||
|
show_more: "Plus d'informations",
|
||||||
|
hide_more: "Moins d'informations",
|
||||||
|
collection: "Collection",
|
||||||
|
current_collection: "Collection Actuelle",
|
||||||
|
select_collection: "Selectionner une Collection",
|
||||||
|
create_collection: "Créer une Collection",
|
||||||
|
new: "Nouveau",
|
||||||
|
import_export: "Importer / Exporter",
|
||||||
|
more: "Plus",
|
||||||
|
folder: "Dossier",
|
||||||
|
new_folder: "Nouveau Dossier",
|
||||||
|
my_new_folder: "Mon Nouveau Dossier",
|
||||||
|
folder_empty: "Ce Dossier est vide",
|
||||||
|
edit_folder: "Éditer le Dossier",
|
||||||
|
edit: "Éditer",
|
||||||
|
delete: "Supprimer",
|
||||||
|
deleted: "Supprimé",
|
||||||
|
undo: "Annuler",
|
||||||
|
collection_empty: "Cette Collection est vide",
|
||||||
|
new_collection: "Nouvelle Collection",
|
||||||
|
my_new_collection: "Ma Nouvelle Collection",
|
||||||
|
edit_collection: "Éditer la Collection",
|
||||||
|
edit_request: "Éditer ma requête",
|
||||||
|
save_request_as: "Sauvegarder ma requête sous",
|
||||||
|
export: "Exporter",
|
||||||
|
connecting_to: "Connexion à {name}...",
|
||||||
|
connected: "Connecté",
|
||||||
|
connected_to: "Connecté à {name}",
|
||||||
|
disconnected: "Déconnecté",
|
||||||
|
disconnected_from: "Déconnecté sur {name}",
|
||||||
|
something_went_wrong: "Quelque chose n'a pas marché!",
|
||||||
|
error_occurred: "Une erreur s'est produite.",
|
||||||
|
browser_support_sse:
|
||||||
|
"Ce navigateur ne semble pas prendre en charge les événements envoyés par le serveur.",
|
||||||
|
log: "Log",
|
||||||
|
no_url: "Aucune URL",
|
||||||
|
run_query: "Lancer une recherche",
|
||||||
|
copy_query: "Copier la recherche",
|
||||||
|
kinda_dark: "Plutôt Sombre",
|
||||||
|
clearly_white: "Clairement Blanc",
|
||||||
|
just_black: "Seulement Noir",
|
||||||
|
auto_system: "Auth (système)",
|
||||||
|
green: "Vert",
|
||||||
|
yellow: "Jaune",
|
||||||
|
pink: "Rose",
|
||||||
|
red: "Rouge",
|
||||||
|
purple: "Violet",
|
||||||
|
orange: "Orange",
|
||||||
|
cyan: "Cyan",
|
||||||
|
blue: "Bleue",
|
||||||
|
loading: "Chargement...",
|
||||||
|
fetching: "Récupération...",
|
||||||
|
waiting_send_req: "(en attente de l'envoi de la demande)",
|
||||||
|
cancel: "Annuler",
|
||||||
|
save: "Sauvarder",
|
||||||
|
dismiss: "Dismiss",
|
||||||
|
are_you_sure: "Êtes-vous sûr?",
|
||||||
|
yes: "Oui",
|
||||||
|
no: "Non",
|
||||||
|
restore: "Restaurer",
|
||||||
|
add_star: "Ajouter une étoile",
|
||||||
|
remove_star: "Supprimer une étoile",
|
||||||
|
nothing_found: "Rien n'a été trouvé",
|
||||||
|
replace_current: "Remplacer l'actuel",
|
||||||
|
replace_json: "Replacer avec du JSON",
|
||||||
|
preserve_current: "Conserver l'actuel",
|
||||||
|
import_json: "Importer depuis un JSON",
|
||||||
|
download_file: "Télécharger un fichier",
|
||||||
|
upload_file: "Charger un fichier",
|
||||||
|
copy_response: "Copier la réponse",
|
||||||
|
copy_code: "Copier le code",
|
||||||
|
copy_schema: "Copier le Schéma",
|
||||||
|
use_request: "Utiliser cette requête",
|
||||||
|
documentation: "Documentation",
|
||||||
|
docs: "Docs",
|
||||||
|
reset_default: "Rétablir la valeur par défaut",
|
||||||
|
fields: "CHAMPS",
|
||||||
|
deprecated: "DÉPRÉCIÉ",
|
||||||
|
add_one_header: "(ajouter au moins un en-tête)",
|
||||||
|
add_one_parameter: "(ajouter au moins un paramètre)",
|
||||||
|
header_count: "{count} en-tête",
|
||||||
|
parameter_count: "{count} paramètre",
|
||||||
|
variable_count: "{count} variable",
|
||||||
|
value_count: "{count} valeur",
|
||||||
|
send_request_first: "Envoyez d'abord une requête",
|
||||||
|
generate_docs: "Genérer une Documentation",
|
||||||
|
generate_docs_message:
|
||||||
|
"Importer n'importe quelle collection de Postwoman pour générer de la documentation en déplacement.",
|
||||||
|
generate_docs_first: "Générer la documentation d'abord",
|
||||||
|
docs_generated: "Documentation générée",
|
||||||
|
import_collections: "Importer les collections",
|
||||||
|
optional: "(optionnel)",
|
||||||
|
json: "JSON",
|
||||||
|
none: "Aucun",
|
||||||
|
username: "Username",
|
||||||
|
password: "Password",
|
||||||
|
token: "Token",
|
||||||
|
payload: "Payload",
|
||||||
|
choose_file: "Choisir un fichier",
|
||||||
|
file_imported: "Fichier importé",
|
||||||
|
f12_details: "(F12 pour voir les détails)",
|
||||||
|
we_use_cookies: "Nous utilisons des cookies",
|
||||||
|
copied_to_clipboard: "Copié dans le presse-papier",
|
||||||
|
finished_in: "Fini en {duration}ms",
|
||||||
|
check_console_details: "Consultez la console pour plus de détails.",
|
||||||
|
download_started: "Téléchargement démarré",
|
||||||
|
url_invalid_format: "L'URL n'est pas formatée correctement",
|
||||||
|
curl_invalid_format: "cURL n'est pas formaté correctement",
|
||||||
|
enable_proxy: "Essayez en activant le Proxy",
|
||||||
|
complete_config_urls: "Veuillez compléter les urls de configuration.",
|
||||||
|
token_request_saved: "Requête de Token sauvegardé",
|
||||||
|
donate_info1:
|
||||||
|
"Si vous avez apprécié la productivité de l'utilisation de Postwoman, considérez le don comme un signe d'appréciation.",
|
||||||
|
donate_info2:
|
||||||
|
"Vous pouvez soutenir le développement de Postwoman par les méthodes suivantes :",
|
||||||
|
one_time_recurring: "Ponctuel ou récurrent",
|
||||||
|
one_time: "Une fois",
|
||||||
|
recurring: "Récurrent",
|
||||||
|
wiki: "Wiki",
|
||||||
|
error: "Erreur",
|
||||||
|
go_home: "Aller à l'accueil",
|
||||||
|
reload: "Recharger",
|
||||||
|
enter_curl: "Entrer cURL",
|
||||||
|
empty: "Vide",
|
||||||
|
extensions: "Extensions",
|
||||||
|
extensions_info1: "Extension pour navigateur qui simplifie l'accès à Postwoman",
|
||||||
|
extensions_info2: "Obtenez l'extension Postwoman pour navigateur !",
|
||||||
|
installed: "Installé",
|
||||||
|
login_with: "Se connecter avec",
|
||||||
|
logged_out: "Se déconnecter",
|
||||||
|
logout: "Déconnexion",
|
||||||
|
account: "Compte",
|
||||||
|
sync: "Synchroniser",
|
||||||
|
syncHistory: "Historique",
|
||||||
|
syncCollections: "Collections",
|
||||||
|
turn_on: "Activer",
|
||||||
|
login_first: "Se connecter d'abord",
|
||||||
|
paste_a_collection: "Coller une collection",
|
||||||
|
import_from_sync: "Importer depuis la synchronisation"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export default {
|
|||||||
no_label: "ラベル無し",
|
no_label: "ラベル無し",
|
||||||
prerequest_script: "プレリクエストスクリプト",
|
prerequest_script: "プレリクエストスクリプト",
|
||||||
no_prerequest_script: "プレリクエストスクリプト無し",
|
no_prerequest_script: "プレリクエストスクリプト無し",
|
||||||
search_history: "検索履歴",
|
search: "検索履歴",
|
||||||
history_empty: "履歴が空です",
|
history_empty: "履歴が空です",
|
||||||
history_deleted: "履歴が削除された",
|
history_deleted: "履歴が削除された",
|
||||||
clear: "クリア",
|
clear: "クリア",
|
||||||
|
|||||||
@@ -247,6 +247,11 @@
|
|||||||
<i class="material-icons">brush</i>
|
<i class="material-icons">brush</i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#extensions" v-tooltip.right="$t('extensions')">
|
||||||
|
<i class="material-icons">extensions</i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#proxy" v-tooltip.right="$t('proxy')">
|
<a href="#proxy" v-tooltip.right="$t('proxy')">
|
||||||
<i class="material-icons">public</i>
|
<i class="material-icons">public</i>
|
||||||
@@ -305,11 +310,13 @@
|
|||||||
(fb.currentUser.email ||
|
(fb.currentUser.email ||
|
||||||
'<label><i>Email not found</i></label>')
|
'<label><i>Email not found</i></label>')
|
||||||
"
|
"
|
||||||
|
aria-label="Account"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
v-if="fb.currentUser.photoURL"
|
v-if="fb.currentUser.photoURL"
|
||||||
:src="fb.currentUser.photoURL"
|
:src="fb.currentUser.photoURL"
|
||||||
class="material-icons"
|
class="material-icons"
|
||||||
|
alt="Profile image"
|
||||||
/>
|
/>
|
||||||
<i v-else class="material-icons">account_circle</i>
|
<i v-else class="material-icons">account_circle</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -371,7 +378,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
onClick="window.open('https://twitter.com/share?text=👽 Postwoman • API request builder - Helps you create your requests faster, saving you precious time on your development&url=https://postwoman.io&hashtags=postwoman&via=liyasthomas');"
|
onClick="window.open('https://twitter.com/share?text=👽 Postwoman • A free, fast and beautiful API request builder - Web alternative to Postman - Helps you create requests faster, saving precious time on development.&url=https://postwoman.io&hashtags=postwoman&via=liyasthomas');"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -386,6 +393,15 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span>{{ $t("tweet") }}</span>
|
<span>{{ $t("tweet") }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="navigatorShare"
|
||||||
|
class="icon"
|
||||||
|
@click="nativeShare"
|
||||||
|
v-close-popover
|
||||||
|
v-tooltip="$t('more')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">share</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-popover>
|
</v-popover>
|
||||||
@@ -397,7 +413,7 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<span v-if="version.name" class="mono">
|
<span v-if="version.name" class="mono">
|
||||||
<a
|
<a
|
||||||
class="link"
|
class="footer-link"
|
||||||
:href="
|
:href="
|
||||||
'https://github.com/liyasthomas/postwoman/releases/tag/' +
|
'https://github.com/liyasthomas/postwoman/releases/tag/' +
|
||||||
version.name
|
version.name
|
||||||
@@ -409,7 +425,7 @@
|
|||||||
{{ version.name }}
|
{{ version.name }}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="link"
|
class="footer-link hide-on-small-screen"
|
||||||
href="https://www.netlify.com"
|
href="https://www.netlify.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
@@ -564,19 +580,19 @@
|
|||||||
<div slot="body">
|
<div slot="body">
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t("send_request") }}</label>
|
<label>{{ $t("send_request") }}</label>
|
||||||
<kbd>⌘ G</kbd>
|
<kbd>{{ getSpecialKey() }} G</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t("save_to_collections") }}</label>
|
<label>{{ $t("save_to_collections") }}</label>
|
||||||
<kbd>⌘ S</kbd>
|
<kbd>{{ getSpecialKey() }} S</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t("copy_request_link") }}</label>
|
<label>{{ $t("copy_request_link") }}</label>
|
||||||
<kbd>⌘ K</kbd>
|
<kbd>{{ getSpecialKey() }} K</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t("reset_request") }}</label>
|
<label>{{ $t("reset_request") }}</label>
|
||||||
<kbd>⌘ L</kbd>
|
<kbd>{{ getSpecialKey() }} L</kbd>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer"></div>
|
<div slot="footer"></div>
|
||||||
@@ -649,21 +665,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.link {
|
.footer-link {
|
||||||
margin: 8px 16px;
|
margin: 8px 16px;
|
||||||
}
|
}
|
||||||
@media (max-width: 768px) {
|
|
||||||
.link {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import intializePwa from "../assets/js/pwa";
|
import intializePwa from "../assets/js/pwa";
|
||||||
import * as version from "../.postwoman/version.json";
|
import * as version from "../.postwoman/version.json";
|
||||||
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy";
|
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy";
|
||||||
import firebase from "firebase/app";
|
import firebase from "firebase/app";
|
||||||
import { fb } from "../functions/fb";
|
import { fb } from "../functions/fb";
|
||||||
|
|
||||||
@@ -675,13 +685,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getSpecialKey() {
|
||||||
|
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl";
|
||||||
|
},
|
||||||
linkActive(path) {
|
linkActive(path) {
|
||||||
return {
|
return {
|
||||||
"nuxt-link-exact-active": this.$route.path === path,
|
"nuxt-link-exact-active": this.$route.path === path,
|
||||||
"nuxt-link-active": this.$route.path === path
|
"nuxt-link-active": this.$route.path === path
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
fb.currentUser = null;
|
fb.currentUser = null;
|
||||||
firebase
|
firebase
|
||||||
@@ -695,6 +707,21 @@ export default {
|
|||||||
this.$toast.info(this.$t("logged_out"), {
|
this.$toast.info(this.$t("logged_out"), {
|
||||||
icon: "vpn_key"
|
icon: "vpn_key"
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
nativeShare() {
|
||||||
|
if (navigator.share) {
|
||||||
|
navigator
|
||||||
|
.share({
|
||||||
|
title: "Postwoman",
|
||||||
|
text:
|
||||||
|
"Postwoman • A free, fast and beautiful API request builder - Web alternative to Postman - Helps you create requests faster, saving precious time on development.",
|
||||||
|
url: "https://postwoman.io/"
|
||||||
|
})
|
||||||
|
.then(() => {})
|
||||||
|
.catch(console.error);
|
||||||
|
} else {
|
||||||
|
// fallback
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -708,9 +735,9 @@ export default {
|
|||||||
showExtensions: false,
|
showExtensions: false,
|
||||||
showShortcuts: false,
|
showShortcuts: false,
|
||||||
showSupport: false,
|
showSupport: false,
|
||||||
firefoxExtInstalled: window.firefoxExtSendRequest,
|
extensionInstalled: hasExtensionInstalled(),
|
||||||
chromeExtInstalled: window.chrome && hasChromeExtensionInstalled(),
|
fb,
|
||||||
fb
|
navigatorShare: navigator.share
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -771,8 +798,7 @@ export default {
|
|||||||
let showExtensionsToast =
|
let showExtensionsToast =
|
||||||
localStorage.getItem("showExtensionsToast") === "yes";
|
localStorage.getItem("showExtensionsToast") === "yes";
|
||||||
if (
|
if (
|
||||||
!this.firefoxExtInstalled &&
|
!this.extensionInstalled &&
|
||||||
!this.chromeExtInstalled &&
|
|
||||||
!showExtensionsToast
|
!showExtensionsToast
|
||||||
) {
|
) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -799,6 +825,14 @@ export default {
|
|||||||
});
|
});
|
||||||
}, 15000);
|
}, 15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._keyListener = function(e) {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.preventDefault();
|
||||||
|
this.showExtensions = this.showShortcuts = this.showSupport = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.addEventListener("keydown", this._keyListener.bind(this));
|
||||||
})();
|
})();
|
||||||
|
|
||||||
window.addEventListener("scroll", event => {
|
window.addEventListener("scroll", event => {
|
||||||
@@ -839,6 +873,10 @@ export default {
|
|||||||
availableLocales() {
|
availableLocales() {
|
||||||
return this.$i18n.locales.filter(i => i.code !== this.$i18n.locale);
|
return this.$i18n.locales.filter(i => i.code !== this.$i18n.locale);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener("keydown", this._keyListener);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
||||||
export const meta = {
|
export const meta = {
|
||||||
name: "Postwoman",
|
name: "Postwoman",
|
||||||
shortDescription: "API request builder",
|
shortDescription: "A free, fast and beautiful API request builder",
|
||||||
description:
|
description:
|
||||||
"The Postwoman API request builder helps you create your requests faster, saving you precious time on your development."
|
"Web alternative to Postman - Helps you create requests faster, saving precious time on development."
|
||||||
};
|
};
|
||||||
// Sets the base path for the router.
|
// Sets the base path for the router.
|
||||||
// Important for deploying to GitHub pages.
|
// Important for deploying to GitHub pages.
|
||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
itemprop: "image",
|
itemprop: "image",
|
||||||
content: `${routerBase.router.base}logo.jpg`
|
content: `https://postwoman.io/logo.jpg`
|
||||||
},
|
},
|
||||||
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: "og:image",
|
property: "og:image",
|
||||||
content: `${routerBase.router.base}logo.jpg`
|
content: `https://postwoman.io/logo.jpg`
|
||||||
},
|
},
|
||||||
// Twitter
|
// Twitter
|
||||||
{
|
{
|
||||||
|
|||||||
1204
package-lock.json
generated
1204
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "postwoman",
|
"name": "postwoman",
|
||||||
"version": "1.5.0",
|
"version": "1.9.0",
|
||||||
"description": "A free, fast and beautiful API request builder",
|
"description": "A free, fast and beautiful API request builder",
|
||||||
"author": "liyasthomas",
|
"author": "liyasthomas",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -14,33 +14,34 @@
|
|||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"e2e": "cypress run",
|
"e2e": "cypress run",
|
||||||
"e2e:open": "cypress open",
|
"e2e:open": "cypress open",
|
||||||
"dev:e2e": "start-server-and-test dev http://localhost:3000 e2e:open",
|
"dev:e2e": "server-test dev :3000 e2e:open",
|
||||||
"test": "start-server-and-test dev http://localhost:3000 e2e"
|
"test": "start-server-and-test start http-get://localhost:3000 e2e"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/axios": "^5.9.3",
|
"@nuxtjs/axios": "^5.9.5",
|
||||||
"@nuxtjs/google-analytics": "^2.2.3",
|
"@nuxtjs/google-analytics": "^2.2.3",
|
||||||
"@nuxtjs/google-tag-manager": "^2.3.1",
|
"@nuxtjs/google-tag-manager": "^2.3.1",
|
||||||
"@nuxtjs/pwa": "^3.0.0-beta.19",
|
"@nuxtjs/pwa": "^3.0.0-beta.20",
|
||||||
"@nuxtjs/robots": "^2.4.2",
|
"@nuxtjs/robots": "^2.4.2",
|
||||||
"@nuxtjs/sitemap": "^2.0.1",
|
"@nuxtjs/sitemap": "^2.0.1",
|
||||||
"@nuxtjs/toast": "^3.3.0",
|
"@nuxtjs/toast": "^3.3.0",
|
||||||
"ace-builds": "^1.4.8",
|
"ace-builds": "^1.4.8",
|
||||||
"firebase": "^7.7.0",
|
"firebase": "^7.9.1",
|
||||||
"graphql": "^14.5.8",
|
"graphql": "^14.6.0",
|
||||||
|
"graphql-language-service-interface": "^2.3.3",
|
||||||
"nuxt": "^2.11.0",
|
"nuxt": "^2.11.0",
|
||||||
"nuxt-i18n": "^6.5.0",
|
"nuxt-i18n": "^6.5.0",
|
||||||
"v-tooltip": "^2.0.3",
|
"v-tooltip": "^2.0.3",
|
||||||
"vue-virtual-scroll-list": "^1.4.4",
|
"vue-virtual-scroll-list": "^1.4.6",
|
||||||
"vuefire": "^2.2.1",
|
"vuefire": "^2.2.1",
|
||||||
"vuejs-auto-complete": "^0.9.0",
|
"vuejs-auto-complete": "^0.9.0",
|
||||||
"vuex-persist": "^2.2.0",
|
"vuex-persist": "^2.2.0",
|
||||||
"yargs-parser": "^16.1.0"
|
"yargs-parser": "^17.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "^3.8.3",
|
"cypress": "^4.0.2",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
"sass-loader": "^8.0.2",
|
"sass-loader": "^8.0.2",
|
||||||
"start-server-and-test": "^1.10.6"
|
"start-server-and-test": "^1.10.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,8 +363,8 @@ export default {
|
|||||||
let file = this.$refs.collectionUpload.files[0];
|
let file = this.$refs.collectionUpload.files[0];
|
||||||
if (file !== undefined && file !== null) {
|
if (file !== undefined && file !== null) {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
reader.onload = e => {
|
reader.onload = ({ target }) => {
|
||||||
this.collectionJSON = e.target.result;
|
this.collectionJSON = target.result;
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
this.$toast.info(this.$t("file_imported"), {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
|
|||||||
@@ -187,67 +187,21 @@
|
|||||||
useWorker: false
|
useWorker: false
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="flex-wrap">
|
</pw-section>
|
||||||
<label>{{ $t("query_variables") }}</label>
|
|
||||||
<div>
|
<pw-section class="yellow" label="Variables" ref="variables">
|
||||||
<button
|
<Editor
|
||||||
class="icon"
|
v-model="variableString"
|
||||||
@click="variables = []"
|
:lang="'json'"
|
||||||
v-tooltip.bottom="$t('clear')"
|
:options="{
|
||||||
>
|
maxLines: responseBodyMaxLines,
|
||||||
<i class="material-icons">clear_all</i>
|
minLines: '16',
|
||||||
</button>
|
fontSize: '16px',
|
||||||
</div>
|
autoScrollEditorIntoView: true,
|
||||||
</div>
|
showPrintMargin: false,
|
||||||
<ul v-for="(variable, index) in variables" :key="index">
|
useWorker: false
|
||||||
<li>
|
}"
|
||||||
<input
|
|
||||||
:placeholder="$t('variable_count', { count: index + 1 })"
|
|
||||||
:name="'variable_key_' + index"
|
|
||||||
:value="variable.key"
|
|
||||||
@change="
|
|
||||||
$store.commit('setGQLVariableKey', {
|
|
||||||
index,
|
|
||||||
value: $event.target.value
|
|
||||||
})
|
|
||||||
"
|
|
||||||
autofocus
|
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<input
|
|
||||||
:placeholder="$t('value_count', { count: index + 1 })"
|
|
||||||
:name="'variable_value_' + index"
|
|
||||||
:value="variable.value"
|
|
||||||
@change="
|
|
||||||
$store.commit('setGQLVariableValue', {
|
|
||||||
index,
|
|
||||||
value: $event.target.value
|
|
||||||
})
|
|
||||||
"
|
|
||||||
autofocus
|
|
||||||
/>
|
|
||||||
</li>
|
|
||||||
<div>
|
|
||||||
<li>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="removeQueryVariable(index)"
|
|
||||||
v-tooltip.bottom="$t('delete')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">delete</i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<button class="icon" @click="addQueryVariable">
|
|
||||||
<i class="material-icons">add</i>
|
|
||||||
<span>{{ $t("add_new") }}</span>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="purple" label="Response" ref="response">
|
<pw-section class="purple" label="Response" ref="response">
|
||||||
@@ -391,6 +345,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import * as gql from "graphql";
|
import * as gql from "graphql";
|
||||||
import textareaAutoHeight from "../directives/textareaAutoHeight";
|
import textareaAutoHeight from "../directives/textareaAutoHeight";
|
||||||
|
import { commonHeaders } from "../functions/headers";
|
||||||
import AceEditor from "../components/ace-editor";
|
import AceEditor from "../components/ace-editor";
|
||||||
import QueryEditor from "../components/graphql/queryeditor";
|
import QueryEditor from "../components/graphql/queryeditor";
|
||||||
import { sendNetworkRequest } from "../functions/network";
|
import { sendNetworkRequest } from "../functions/network";
|
||||||
@@ -410,130 +365,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
schemaString: "",
|
schemaString: "",
|
||||||
commonHeaders: [
|
commonHeaders,
|
||||||
"WWW-Authenticate",
|
|
||||||
"Authorization",
|
|
||||||
"Proxy-Authenticate",
|
|
||||||
"Proxy-Authorization",
|
|
||||||
"Age",
|
|
||||||
"Cache-Control",
|
|
||||||
"Clear-Site-Data",
|
|
||||||
"Expires",
|
|
||||||
"Pragma",
|
|
||||||
"Warning",
|
|
||||||
"Accept-CH",
|
|
||||||
"Accept-CH-Lifetime",
|
|
||||||
"Early-Data",
|
|
||||||
"Content-DPR",
|
|
||||||
"DPR",
|
|
||||||
"Device-Memory",
|
|
||||||
"Save-Data",
|
|
||||||
"Viewport-Width",
|
|
||||||
"Width",
|
|
||||||
"Last-Modified",
|
|
||||||
"ETag",
|
|
||||||
"If-Match",
|
|
||||||
"If-None-Match",
|
|
||||||
"If-Modified-Since",
|
|
||||||
"If-Unmodified-Since",
|
|
||||||
"Vary",
|
|
||||||
"Connection",
|
|
||||||
"Keep-Alive",
|
|
||||||
"Accept",
|
|
||||||
"Accept-Charset",
|
|
||||||
"Accept-Encoding",
|
|
||||||
"Accept-Language",
|
|
||||||
"Expect",
|
|
||||||
"Max-Forwards",
|
|
||||||
"Cookie",
|
|
||||||
"Set-Cookie",
|
|
||||||
"Cookie2",
|
|
||||||
"Set-Cookie2",
|
|
||||||
"Access-Control-Allow-Origin",
|
|
||||||
"Access-Control-Allow-Credentials",
|
|
||||||
"Access-Control-Allow-Headers",
|
|
||||||
"Access-Control-Allow-Methods",
|
|
||||||
"Access-Control-Expose-Headers",
|
|
||||||
"Access-Control-Max-Age",
|
|
||||||
"Access-Control-Request-Headers",
|
|
||||||
"Access-Control-Request-Method",
|
|
||||||
"Origin",
|
|
||||||
"Service-Worker-Allowed",
|
|
||||||
"Timing-Allow-Origin",
|
|
||||||
"X-Permitted-Cross-Domain-Policies",
|
|
||||||
"DNT",
|
|
||||||
"Tk",
|
|
||||||
"Content-Disposition",
|
|
||||||
"Content-Length",
|
|
||||||
"Content-Type",
|
|
||||||
"Content-Encoding",
|
|
||||||
"Content-Language",
|
|
||||||
"Content-Location",
|
|
||||||
"Forwarded",
|
|
||||||
"X-Forwarded-For",
|
|
||||||
"X-Forwarded-Host",
|
|
||||||
"X-Forwarded-Proto",
|
|
||||||
"Via",
|
|
||||||
"Location",
|
|
||||||
"From",
|
|
||||||
"Host",
|
|
||||||
"Referer",
|
|
||||||
"Referrer-Policy",
|
|
||||||
"User-Agent",
|
|
||||||
"Allow",
|
|
||||||
"Server",
|
|
||||||
"Accept-Ranges",
|
|
||||||
"Range",
|
|
||||||
"If-Range",
|
|
||||||
"Content-Range",
|
|
||||||
"Cross-Origin-Opener-Policy",
|
|
||||||
"Cross-Origin-Resource-Policy",
|
|
||||||
"Content-Security-Policy",
|
|
||||||
"Content-Security-Policy-Report-Only",
|
|
||||||
"Expect-CT",
|
|
||||||
"Feature-Policy",
|
|
||||||
"Public-Key-Pins",
|
|
||||||
"Public-Key-Pins-Report-Only",
|
|
||||||
"Strict-Transport-Security",
|
|
||||||
"Upgrade-Insecure-Requests",
|
|
||||||
"X-Content-Type-Options",
|
|
||||||
"X-Download-Options",
|
|
||||||
"X-Frame-Options",
|
|
||||||
"X-Powered-By",
|
|
||||||
"X-XSS-Protection",
|
|
||||||
"Last-Event-ID",
|
|
||||||
"NEL",
|
|
||||||
"Ping-From",
|
|
||||||
"Ping-To",
|
|
||||||
"Report-To",
|
|
||||||
"Transfer-Encoding",
|
|
||||||
"TE",
|
|
||||||
"Trailer",
|
|
||||||
"Sec-WebSocket-Key",
|
|
||||||
"Sec-WebSocket-Extensions",
|
|
||||||
"Sec-WebSocket-Accept",
|
|
||||||
"Sec-WebSocket-Protocol",
|
|
||||||
"Sec-WebSocket-Version",
|
|
||||||
"Accept-Push-Policy",
|
|
||||||
"Accept-Signature",
|
|
||||||
"Alt-Svc",
|
|
||||||
"Date",
|
|
||||||
"Large-Allocation",
|
|
||||||
"Link",
|
|
||||||
"Push-Policy",
|
|
||||||
"Retry-After",
|
|
||||||
"Signature",
|
|
||||||
"Signed-Headers",
|
|
||||||
"Server-Timing",
|
|
||||||
"SourceMap",
|
|
||||||
"Upgrade",
|
|
||||||
"X-DNS-Prefetch-Control",
|
|
||||||
"X-Firefox-Spdy",
|
|
||||||
"X-Pingback",
|
|
||||||
"X-Requested-With",
|
|
||||||
"X-Robots-Tag",
|
|
||||||
"X-UA-Compatible"
|
|
||||||
],
|
|
||||||
queryFields: [],
|
queryFields: [],
|
||||||
mutationFields: [],
|
mutationFields: [],
|
||||||
subscriptionFields: [],
|
subscriptionFields: [],
|
||||||
@@ -564,14 +396,6 @@ export default {
|
|||||||
this.$store.commit("setGQLState", { value, attribute: "headers" });
|
this.$store.commit("setGQLState", { value, attribute: "headers" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
variables: {
|
|
||||||
get() {
|
|
||||||
return this.$store.state.gql.variables;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit("setGQLState", { value, attribute: "variables" });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
gqlQueryString: {
|
gqlQueryString: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.gql.query;
|
return this.$store.state.gql.query;
|
||||||
@@ -580,6 +404,17 @@ export default {
|
|||||||
this.$store.commit("setGQLState", { value, attribute: "query" });
|
this.$store.commit("setGQLState", { value, attribute: "query" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
variableString: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.gql.variablesJSONString;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$store.commit("setGQLState", {
|
||||||
|
value,
|
||||||
|
attribute: "variablesJSONString"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
headerString() {
|
headerString() {
|
||||||
const result = this.headers
|
const result = this.headers
|
||||||
.filter(({ key }) => !!key)
|
.filter(({ key }) => !!key)
|
||||||
@@ -667,18 +502,9 @@ export default {
|
|||||||
headers[header.key] = header.value;
|
headers[header.key] = header.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
let variables = {};
|
let variables = JSON.parse(this.variableString);
|
||||||
|
|
||||||
const gqlQueryString = this.gqlQueryString;
|
const gqlQueryString = this.gqlQueryString;
|
||||||
this.variables.forEach(variable => {
|
|
||||||
// todo: better variable type validation
|
|
||||||
if (gqlQueryString.indexOf(`\$${variable.key}: Int`) > -1) {
|
|
||||||
variables[variable.key] = parseInt(variable.value);
|
|
||||||
} else if (gqlQueryString.indexOf(`\$${variable.key}: Float`) > -1) {
|
|
||||||
variables[variable.key] = parseFloat(variable.value);
|
|
||||||
} else {
|
|
||||||
variables[variable.key] = variable.value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const reqOptions = {
|
const reqOptions = {
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -835,13 +661,10 @@ export default {
|
|||||||
downloadResponse() {
|
downloadResponse() {
|
||||||
const dataToWrite = JSON.stringify(this.schemaString, null, 2);
|
const dataToWrite = JSON.stringify(this.schemaString, null, 2);
|
||||||
const file = new Blob([dataToWrite], { type: "application/json" });
|
const file = new Blob([dataToWrite], { type: "application/json" });
|
||||||
const a = document.createElement("a"),
|
const a = document.createElement("a");
|
||||||
url = URL.createObjectURL(file);
|
const url = URL.createObjectURL(file);
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = (this.url + " on " + Date() + ".graphql").replace(
|
a.download = `${this.url} on ${Date()}.graphql`.replace(/\./g, "[dot]");
|
||||||
/\./g,
|
|
||||||
"[dot]"
|
|
||||||
);
|
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
||||||
@@ -879,30 +702,6 @@ export default {
|
|||||||
});
|
});
|
||||||
// console.log(oldHeaders);
|
// console.log(oldHeaders);
|
||||||
},
|
},
|
||||||
addQueryVariable(index) {
|
|
||||||
this.$store.commit("addGQLVariable", {
|
|
||||||
key: "",
|
|
||||||
value: ""
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
removeQueryVariable(index) {
|
|
||||||
const oldVariables = this.variables.slice();
|
|
||||||
|
|
||||||
this.$store.commit("removeGQLVariable", index);
|
|
||||||
this.$toast.error(this.$t("deleted"), {
|
|
||||||
icon: "delete",
|
|
||||||
action: {
|
|
||||||
text: this.$t("undo"),
|
|
||||||
duration: 4000,
|
|
||||||
onClick: (e, toastObject) => {
|
|
||||||
this.variables = oldVariables;
|
|
||||||
toastObject.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// console.log(oldVariables);
|
|
||||||
},
|
|
||||||
scrollInto(view) {
|
scrollInto(view) {
|
||||||
this.$refs[view].$el.scrollIntoView({
|
this.$refs[view].$el.scrollIntoView({
|
||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
|
|||||||
644
pages/index.vue
644
pages/index.vue
File diff suppressed because it is too large
Load Diff
@@ -211,24 +211,20 @@ export default {
|
|||||||
urlValid() {
|
urlValid() {
|
||||||
const protocol = "^(wss?:\\/\\/)?";
|
const protocol = "^(wss?:\\/\\/)?";
|
||||||
const validIP = new RegExp(
|
const validIP = new RegExp(
|
||||||
protocol +
|
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
||||||
"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
|
|
||||||
);
|
);
|
||||||
const validHostname = new RegExp(
|
const validHostname = new RegExp(
|
||||||
protocol +
|
`${protocol}(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9/])$`
|
||||||
"(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9/])$"
|
|
||||||
);
|
);
|
||||||
return validIP.test(this.url) || validHostname.test(this.url);
|
return validIP.test(this.url) || validHostname.test(this.url);
|
||||||
},
|
},
|
||||||
serverValid() {
|
serverValid() {
|
||||||
const protocol = "^(https?:\\/\\/)?";
|
const protocol = "^(https?:\\/\\/)?";
|
||||||
const validIP = new RegExp(
|
const validIP = new RegExp(
|
||||||
protocol +
|
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
||||||
"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
|
|
||||||
);
|
);
|
||||||
const validHostname = new RegExp(
|
const validHostname = new RegExp(
|
||||||
protocol +
|
`${protocol}(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9/])$`
|
||||||
"(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9/])$"
|
|
||||||
);
|
);
|
||||||
return validIP.test(this.server) || validHostname.test(this.server);
|
return validIP.test(this.server) || validHostname.test(this.server);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
{{ setting.value ? $t("enabled") : $t("disabled") }}
|
{{ setting.value ? $t("enabled") : $t("disabled") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="fb.currentSettings.length == 0">
|
<p v-if="fb.currentSettings.length !== 3">
|
||||||
<button class="" @click="initSettings">
|
<button class="" @click="initSettings">
|
||||||
<i class="material-icons">sync</i>
|
<i class="material-icons">sync</i>
|
||||||
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
||||||
@@ -141,6 +141,21 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
|
<pw-section class="purple" :label="$t('extensions')" ref="extensions">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<pw-toggle
|
||||||
|
:on="settings.EXTENSIONS_ENABLED"
|
||||||
|
@change="toggleSetting('EXTENSIONS_ENABLED')"
|
||||||
|
>
|
||||||
|
{{ $t("extensions_use_toggle") }}
|
||||||
|
</pw-toggle>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="blue" :label="$t('proxy')" ref="proxy">
|
<pw-section class="blue" :label="$t('proxy')" ref="proxy">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -192,7 +207,12 @@
|
|||||||
{{ $t("postwoman_official_proxy_hosting") }}
|
{{ $t("postwoman_official_proxy_hosting") }}
|
||||||
<br />
|
<br />
|
||||||
{{ $t("read_the") }}
|
{{ $t("read_the") }}
|
||||||
<a href="https://apollotv.xyz/legal" target="_blank" rel="noopener">
|
<a
|
||||||
|
class="link"
|
||||||
|
href="https://apollotv.xyz/legal"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
{{ $t("apollotv_privacy_policy") }} </a
|
{{ $t("apollotv_privacy_policy") }} </a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
@@ -256,7 +276,7 @@ export default {
|
|||||||
aceEditor: "vibrant_ink"
|
aceEditor: "vibrant_ink"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "var(--bg-color)",
|
color: "var(--ac-color)",
|
||||||
name: this.$t("auto_system"),
|
name: this.$t("auto_system"),
|
||||||
vibrant: window.matchMedia("(prefers-color-scheme: light)").matches,
|
vibrant: window.matchMedia("(prefers-color-scheme: light)").matches,
|
||||||
class: "auto",
|
class: "auto",
|
||||||
@@ -323,7 +343,12 @@ export default {
|
|||||||
PROXY_URL:
|
PROXY_URL:
|
||||||
this.$store.state.postwoman.settings.PROXY_URL ||
|
this.$store.state.postwoman.settings.PROXY_URL ||
|
||||||
"https://postwoman.apollotv.xyz/",
|
"https://postwoman.apollotv.xyz/",
|
||||||
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || ""
|
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
|
||||||
|
EXTENSIONS_ENABLED:
|
||||||
|
typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !==
|
||||||
|
"undefined"
|
||||||
|
? this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
|
||||||
|
: true
|
||||||
},
|
},
|
||||||
|
|
||||||
doneButton: '<i class="material-icons">done</i>',
|
doneButton: '<i class="material-icons">done</i>',
|
||||||
@@ -398,9 +423,9 @@ export default {
|
|||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(res => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (res.additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(this.$t("turn_on") + " " + this.$t("sync"), {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: "sync",
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
@@ -408,7 +433,8 @@ export default {
|
|||||||
text: this.$t("yes"),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings("syncHistory", true);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", false);
|
fb.writeSettings("syncCollections", true);
|
||||||
|
fb.writeSettings("syncEnvironments", true);
|
||||||
this.$router.push({ path: "/settings" });
|
this.$router.push({ path: "/settings" });
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
}
|
}
|
||||||
@@ -427,9 +453,9 @@ export default {
|
|||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(res => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (res.additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(this.$t("turn_on") + " " + this.$t("sync"), {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: "sync",
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
@@ -437,7 +463,8 @@ export default {
|
|||||||
text: this.$t("yes"),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings("syncHistory", true);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", false);
|
fb.writeSettings("syncCollections", true);
|
||||||
|
fb.writeSettings("syncEnvironments", true);
|
||||||
this.$router.push({ path: "/settings" });
|
this.$router.push({ path: "/settings" });
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
}
|
}
|
||||||
@@ -456,16 +483,17 @@ export default {
|
|||||||
},
|
},
|
||||||
initSettings() {
|
initSettings() {
|
||||||
fb.writeSettings("syncHistory", true);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", false);
|
fb.writeSettings("syncCollections", true);
|
||||||
|
fb.writeSettings("syncEnvironments", true);
|
||||||
},
|
},
|
||||||
resetProxy(e) {
|
resetProxy({ target }) {
|
||||||
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`;
|
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`;
|
||||||
e.target.innerHTML = this.doneButton;
|
target.innerHTML = this.doneButton;
|
||||||
this.$toast.info(this.$t("cleared"), {
|
this.$toast.info(this.$t("cleared"), {
|
||||||
icon: "clear_all"
|
icon: "clear_all"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'),
|
() => (target.innerHTML = '<i class="material-icons">clear_all</i>'),
|
||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,22 +23,6 @@ export default {
|
|||||||
gql.headers[index].value = value;
|
gql.headers[index].value = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
addGQLVariable({ gql }, object) {
|
|
||||||
gql.variables.push(object);
|
|
||||||
},
|
|
||||||
|
|
||||||
removeGQLVariable({ gql }, index) {
|
|
||||||
gql.variables.splice(index, 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
setGQLVariableKey({ gql }, { index, value }) {
|
|
||||||
gql.variables[index].key = value;
|
|
||||||
},
|
|
||||||
|
|
||||||
setGQLVariableValue({ gql }, { index, value }) {
|
|
||||||
gql.variables[index].value = value;
|
|
||||||
},
|
|
||||||
|
|
||||||
addHeaders({ request }, value) {
|
addHeaders({ request }, value) {
|
||||||
request.headers.push(value);
|
request.headers.push(value);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -56,7 +56,13 @@ export const SETTINGS_KEYS = [
|
|||||||
* An array of properties to exclude from the URL.
|
* An array of properties to exclude from the URL.
|
||||||
* e.g. 'auth'
|
* e.g. 'auth'
|
||||||
*/
|
*/
|
||||||
"URL_EXCLUDES"
|
"URL_EXCLUDES",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A boolean value indicating whether to use the browser extensions
|
||||||
|
* to run the requests
|
||||||
|
*/
|
||||||
|
"EXTENSIONS_ENABLED"
|
||||||
];
|
];
|
||||||
|
|
||||||
export const state = () => ({
|
export const state = () => ({
|
||||||
@@ -68,6 +74,13 @@ export const state = () => ({
|
|||||||
requests: []
|
requests: []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
environments: [
|
||||||
|
{
|
||||||
|
name: "My Environment Variables",
|
||||||
|
variables: []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
editingEnvironment: {},
|
||||||
selectedRequest: {},
|
selectedRequest: {},
|
||||||
editingRequest: {}
|
editingRequest: {}
|
||||||
});
|
});
|
||||||
@@ -96,6 +109,80 @@ export const mutations = {
|
|||||||
settings[key] = value;
|
settings[key] = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removeVariables({ editingEnvironment }, value) {
|
||||||
|
editingEnvironment.variables = value;
|
||||||
|
},
|
||||||
|
|
||||||
|
setEditingEnvironment(state, value) {
|
||||||
|
state.editingEnvironment = { ...value };
|
||||||
|
},
|
||||||
|
|
||||||
|
setVariableKey({ editingEnvironment }, { index, value }) {
|
||||||
|
editingEnvironment.variables[index].key = value;
|
||||||
|
},
|
||||||
|
|
||||||
|
setVariableValue({ editingEnvironment }, { index, value }) {
|
||||||
|
editingEnvironment.variables[index].value = testValue(value);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeVariable({ editingEnvironment }, variables) {
|
||||||
|
editingEnvironment.variables = variables;
|
||||||
|
},
|
||||||
|
|
||||||
|
addVariable({ editingEnvironment }, value) {
|
||||||
|
editingEnvironment.variables.push(value);
|
||||||
|
},
|
||||||
|
|
||||||
|
replaceEnvironments(state, environments) {
|
||||||
|
state.environments = environments;
|
||||||
|
},
|
||||||
|
|
||||||
|
importAddEnvironments(state, { environments, confirmation }) {
|
||||||
|
const duplicateEnvironment = environments.some(
|
||||||
|
item => {
|
||||||
|
return state.environments.some(
|
||||||
|
item2 => {
|
||||||
|
return item.name.toLowerCase() === item2.name.toLowerCase();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (duplicateEnvironment) {
|
||||||
|
this.$toast.info("Duplicate environment");
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
state.environments = [...state.environments, ...environments];
|
||||||
|
|
||||||
|
let index = 0;
|
||||||
|
for (let environment of state.environments) {
|
||||||
|
environment.environmentIndex = index;
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
|
this.$toast.info(confirmation, {
|
||||||
|
icon: "folder_shared"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeEnvironment({ environments }, environmentIndex) {
|
||||||
|
environments.splice(environmentIndex, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
saveEnvironment({ environments }, payload) {
|
||||||
|
const { environment, environmentIndex } = payload;
|
||||||
|
const { name } = environment;
|
||||||
|
const duplicateEnvironment = environments.length === 1
|
||||||
|
? false
|
||||||
|
: environments.some(
|
||||||
|
item =>
|
||||||
|
item.environmentIndex !== environmentIndex &&
|
||||||
|
item.name.toLowerCase() === name.toLowerCase()
|
||||||
|
);
|
||||||
|
if (duplicateEnvironment) {
|
||||||
|
this.$toast.info("Duplicate environment");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
environments[environmentIndex] = environment;
|
||||||
|
},
|
||||||
|
|
||||||
replaceCollections(state, collections) {
|
replaceCollections(state, collections) {
|
||||||
state.collections = collections;
|
state.collections = collections;
|
||||||
},
|
},
|
||||||
@@ -112,7 +199,9 @@ export const mutations = {
|
|||||||
|
|
||||||
addNewCollection({ collections }, collection) {
|
addNewCollection({ collections }, collection) {
|
||||||
const { name } = collection;
|
const { name } = collection;
|
||||||
const duplicateCollection = collections.some(item => item.name === name);
|
const duplicateCollection = collections.some(
|
||||||
|
item => item.name.toLowerCase() === name.toLowerCase()
|
||||||
|
);
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info("Duplicate collection");
|
this.$toast.info("Duplicate collection");
|
||||||
return;
|
return;
|
||||||
@@ -131,9 +220,13 @@ export const mutations = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
editCollection({ collections }, payload) {
|
editCollection({ collections }, payload) {
|
||||||
const { collection, collectionIndex } = payload;
|
const {
|
||||||
const { name } = collection;
|
collection: { name },
|
||||||
const duplicateCollection = collections.some(item => item.name === name);
|
collectionIndex
|
||||||
|
} = payload;
|
||||||
|
const duplicateCollection = collections.some(
|
||||||
|
item => item.name.toLowerCase() === name.toLowerCase()
|
||||||
|
);
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info("Duplicate collection");
|
this.$toast.info("Duplicate collection");
|
||||||
return;
|
return;
|
||||||
@@ -317,3 +410,12 @@ export const mutations = {
|
|||||||
state.selectedRequest = Object.assign({}, request);
|
state.selectedRequest = Object.assign({}, request);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function testValue(myValue) {
|
||||||
|
try {
|
||||||
|
return JSON.parse(myValue);
|
||||||
|
} catch(ex) {
|
||||||
|
// Now we know it's a string just leave it as a string value.
|
||||||
|
return myValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
export default () => ({
|
export default () => ({
|
||||||
request: {
|
request: {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "https://reqres.in",
|
url: "https://httpbin.org",
|
||||||
path: "/api/users",
|
path: "/get",
|
||||||
label: "",
|
label: "",
|
||||||
auth: "None",
|
auth: "None",
|
||||||
httpUser: "",
|
httpUser: "",
|
||||||
@@ -20,7 +20,7 @@ export default () => ({
|
|||||||
gql: {
|
gql: {
|
||||||
url: "https://rickandmortyapi.com/graphql",
|
url: "https://rickandmortyapi.com/graphql",
|
||||||
headers: [],
|
headers: [],
|
||||||
variables: [],
|
variablesJSONString: "{}",
|
||||||
query: ""
|
query: ""
|
||||||
},
|
},
|
||||||
oauth2: {
|
oauth2: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
describe('Visit home', () => {
|
describe('Visit home', () => {
|
||||||
it('Have a page title with "Postwoman"', () => {
|
it('Have a page title with "Postwoman"', () => {
|
||||||
cy.visit('/')
|
cy.visit('/', { retryOnStatusCodeFailure: true })
|
||||||
.get('title')
|
.get('title')
|
||||||
.should('contain','Postwoman')
|
.should('contain','Postwoman')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,57 +1,34 @@
|
|||||||
describe('Methods', () => {
|
|
||||||
const methods = [ 'POST', 'HEAD', 'POST', 'PUT', 'DELETE','OPTIONS', 'PATCH']
|
|
||||||
methods.forEach((method) => {
|
|
||||||
it(`Change the default method GET to ${method} with url query`, () => {
|
|
||||||
cy.visit(`/?method=${method}`)
|
|
||||||
.get('#method').should('have.value', method)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Url and path', () => {
|
|
||||||
it('Change default url with query and reset default path to empty string and make a request to cat api', () => {
|
|
||||||
cy.seedAndVisit('catapi', '/?url=https://api.thecatapi.com&path=')
|
|
||||||
.get('#url').then((el) => expect(el.val() === 'https://api.thecatapi.com').to.equal(true))
|
|
||||||
.get("#path").then((el) => expect(el.val() === '').to.equal(true))
|
|
||||||
.get('#response-details-wrapper').should($wrapper => {
|
|
||||||
expect($wrapper).to.contain('FAKE Cat API')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Authentication', () => {
|
describe('Authentication', () => {
|
||||||
it(`Change default auth 'None' to 'Basic' and set httpUser and httpPassword with url query`, () => {
|
it(`Change default auth user and pass with url`, () => {
|
||||||
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
|
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
|
||||||
.get('#authentication').contains('Authentication').click()
|
.get('input[name="http_basic_user"]', { timeout: 500 })
|
||||||
.then(() => {
|
|
||||||
cy.get('input[name="http_basic_user"]', { timeout: 500 })
|
|
||||||
.invoke('val')
|
.invoke('val')
|
||||||
.then((user) => {
|
.then((user) => {
|
||||||
expect(user === 'foo').to.equal(true)
|
expect(user === 'foo').to.equal(true)
|
||||||
cy.log('Success! user === foo')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.get('input[name="http_basic_passwd"]')
|
.get('input[name="http_basic_passwd"]')
|
||||||
.invoke('val')
|
.invoke('val')
|
||||||
.then((user) => {
|
.then((pass) => {
|
||||||
expect(user === 'bar').to.equal(true)
|
expect(pass === 'bar').to.equal(true)
|
||||||
cy.log('Success! password === bar')
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const base64Tkn = encodeURI(btoa('{"alg":"HS256", "typ": "JWT"}'))
|
it('Enable user and pass at url with toggler', () => {
|
||||||
|
cy.visit('/', { retryOnStatusCodeFailure: true })
|
||||||
it(`Change default auth 'None' to 'Bearer token' and set bearerToken with url query`, () => {
|
.get('#auth')
|
||||||
cy.visit(`/?auth=Bearer Token&bearerToken=${base64Tkn}`, { retryOnStatusCodeFailure: true })
|
.select('Basic Auth')
|
||||||
.get('#authentication').contains('Authentication').click()
|
.get('input[name="http_basic_user"]', { timeout: 500 })
|
||||||
.then(() => {
|
.type('foo')
|
||||||
cy.get('input[name="bearer_token"]', { timeout: 500 })
|
.get('input[name="http_basic_passwd"]', { timeout: 500 })
|
||||||
.invoke('val')
|
.type('bar')
|
||||||
.then((tkn) => {
|
.url()
|
||||||
expect(tkn === base64Tkn).to.equal(true)
|
.should('not.contain', 'foo')
|
||||||
cy.log(`Success! input[name="bearer_token"] === ${base64Tkn}`)
|
.should('not.contain', 'bar')
|
||||||
})
|
.get('.toggle')
|
||||||
})
|
.click()
|
||||||
|
.url()
|
||||||
|
.should('contain', 'foo')
|
||||||
|
.should('contain', 'bar')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
20
tests/e2e/integration/proxy.spec.js
Normal file
20
tests/e2e/integration/proxy.spec.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
describe('Proxy disabled - local request', () => {
|
||||||
|
it('Change default url with query and make a request to local cat api', () => {
|
||||||
|
cy.seedAndVisit('catapi', '/?url=https://api.thecatapi.com&path=')
|
||||||
|
.get('#url').then((el) => expect(el.val() === 'https://api.thecatapi.com').to.equal(true))
|
||||||
|
.get("#path").then((el) => expect(el.val() === '').to.equal(true))
|
||||||
|
.get('#response-details-wrapper').should($wrapper => {
|
||||||
|
expect($wrapper).to.contain('FAKE Cat API')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Proxy enabled - external request', () => {
|
||||||
|
it('Enable the proxy and make a request to the real cat api', () => {
|
||||||
|
cy.enableProxy('/?url=https://api.thecatapi.com&path=')
|
||||||
|
.get('#send').click()
|
||||||
|
.get('#response-details-wrapper').should($wrapper => {
|
||||||
|
expect($wrapper).to.contain('Cat API')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -7,10 +7,23 @@
|
|||||||
*/
|
*/
|
||||||
Cypress.Commands.add('seedAndVisit', (seedData, path = '/', method = 'GET') => {
|
Cypress.Commands.add('seedAndVisit', (seedData, path = '/', method = 'GET') => {
|
||||||
cy.server()
|
cy.server()
|
||||||
.route(method, 'https://api.thecatapi.com/', `fixture:${seedData}`).as(
|
.route(method, 'https://api.thecatapi.com/', `fixture:${seedData}`).as('load')
|
||||||
'load'
|
|
||||||
)
|
|
||||||
cy.visit(path)
|
cy.visit(path)
|
||||||
.get('#send').click()
|
.get('#send').click()
|
||||||
.wait('@load')
|
.wait('@load')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates cy.enableProxy() function
|
||||||
|
* This function will enable the proxy and navigate back to a given path
|
||||||
|
* @param { String } goBackPath The page go back
|
||||||
|
*/
|
||||||
|
Cypress.Commands.add('enableProxy', (goBackPath) => {
|
||||||
|
cy.visit('/settings')
|
||||||
|
.get('#proxy')
|
||||||
|
.find('.toggle')
|
||||||
|
.click( { force: true } )
|
||||||
|
.should('have.class', 'on')
|
||||||
|
.visit(goBackPath)
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user