diff --git a/README.md b/README.md index cd224224c..577f4a6d5 100644 --- a/README.md +++ b/README.md @@ -181,19 +181,19 @@ _Requests with Pre-Request Scripts are indicated in History entries_ 🌎 **i18n**: Internationalization β. - Add a new locale in `lang/` - - Ex: `lang/es-ES.js` + Ex: `lang/es-ES.js` - Mention `code`, `name`, `iso` and `file` in `nuxt.config.js` - - ``` - i18n: { - locales: [{ + Ex: + ``` + i18n: { + locales: [{ code: 'es', name: 'Español', iso: 'es-ES', file: 'es-ES.js' }] - } - ``` + } + ``` _**All contributions are welcome to `i18n` [branch](https://github.com/liyasthomas/postwoman/tree/i18n) only!**_ diff --git a/assets/css/fonts.scss b/assets/css/fonts.scss index a3ca63387..7dd8ad035 100644 --- a/assets/css/fonts.scss +++ b/assets/css/fonts.scss @@ -14,6 +14,8 @@ font-family: "Material Icons"; font-weight: normal; font-style: normal; + height: 24px; + width: 24px; font-size: 24px; line-height: 1; letter-spacing: normal; @@ -24,6 +26,7 @@ direction: ltr; -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; + font-feature-settings: "liga"; } /* poppins-500 - latin */ @@ -35,7 +38,8 @@ src: local("Poppins Medium"), local("Poppins-Medium"), url("~assets/fonts/poppins-v9-latin-500.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url("~assets/fonts/poppins-v9-latin-500.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url("~assets/fonts/poppins-v9-latin-500.woff") format("woff"); + /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } /* poppins-700 - latin */ @@ -47,7 +51,8 @@ src: local("Poppins Bold"), local("Poppins-Bold"), url("~assets/fonts/poppins-v9-latin-700.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url("~assets/fonts/poppins-v9-latin-700.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url("~assets/fonts/poppins-v9-latin-700.woff") format("woff"); + /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } /* roboto-mono-regular - latin */ @@ -59,5 +64,6 @@ src: local("Roboto Mono"), local("RobotoMono-Regular"), url("~assets/fonts/roboto-mono-v7-latin-regular.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url("~assets/fonts/roboto-mono-v7-latin-regular.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url("~assets/fonts/roboto-mono-v7-latin-regular.woff") format("woff"); + /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } diff --git a/assets/css/styles.scss b/assets/css/styles.scss index a43e7c38e..7ed33872b 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -1,22 +1,14 @@ -// Layout transitions +.page-enter-active, +.page-leave-active, .layout-enter-active, .layout-leave-active { - transition: opacity 0.5s; -} - -.layout-enter, -.layout-leave-active { - opacity: 0; -} - -// Page transitions -.page-enter-active, -.page-leave-active { - transition: opacity 0.5s; + transition: all 0.2s ease-in-out; } .page-enter, -.page-leave-to { +.page-leave-active, +.layout-enter, +.layout-leave-active { opacity: 0; } @@ -79,7 +71,6 @@ body { // Make theme transition smoother. body.afterLoad { - &, & * { transition: background-color 0.2s ease-in-out, border 0.2s ease-in-out; @@ -98,7 +89,7 @@ a { header, footer { - &>div { + & > div { display: flex; padding: 16px; width: 100%; @@ -194,11 +185,13 @@ nav.primary-nav { border-radius: 50%; background-color: var(--brd-color); color: var(--fg-light-color); + fill: var(--fg-light-color); margin: 8px; transition: all 0.2s ease-in-out; &:hover { color: var(--fg-color); + fill: var(--fg-color); svg { fill: var(--fg-color); @@ -208,6 +201,7 @@ nav.primary-nav { &.nuxt-link-exact-active { background-color: var(--ac-color); color: var(--act-color); + fill: var(--act-color); border-radius: 16px; svg { @@ -548,7 +542,7 @@ input[type="checkbox"] { display: none; &, - &+label { + & + label { vertical-align: middle; cursor: pointer; @@ -567,7 +561,7 @@ input[type="checkbox"] { } } - &:checked+label:before { + &:checked + label:before { background-color: var(--ac-color); border-color: var(--ac-color); color: var(--act-color); @@ -734,7 +728,7 @@ input[type="radio"], display: none; } -input[type="radio"]+label { +input[type="radio"] + label { padding: 8px 16px; border-bottom: 2px solid transparent; cursor: pointer; @@ -747,12 +741,12 @@ input[type="radio"]+label { } } -input[type="radio"]:checked+label { +input[type="radio"]:checked + label { border-color: var(--fg-color); color: var(--fg-color); } -input[type="radio"]:checked+label+.tab { +input[type="radio"]:checked + label + .tab { display: block; } diff --git a/assets/css/themes.scss b/assets/css/themes.scss index 3c9f2b7f3..8373d740b 100644 --- a/assets/css/themes.scss +++ b/assets/css/themes.scss @@ -33,7 +33,7 @@ @include darkTheme; } -@media(prefers-color-scheme: dark) { +@media (prefers-color-scheme: dark) { :root.auto { @include darkTheme; } @@ -65,7 +65,7 @@ @include lightTheme; } -@media(prefers-color-scheme: light) { +@media (prefers-color-scheme: light) { :root.auto { @include lightTheme; } diff --git a/components/ace-editor.vue b/components/ace-editor.vue index a07aa2606..a54e4c241 100644 --- a/components/ace-editor.vue +++ b/components/ace-editor.vue @@ -60,10 +60,16 @@ export default { ...this.options }); - editor.setValue(this.value); + if (this.value) editor.setValue(this.value, 1); this.editor = editor; this.cacheValue = this.value; + + editor.on('change', () => { + const content = editor.getValue(); + this.$emit("input", content); + this.cacheValue = content; + }); }, methods: { diff --git a/layouts/default.vue b/layouts/default.vue index ba9c6dd59..53156c47f 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -111,8 +111,116 @@ :to="localePath('graphql')" :class="linkActive('/graphql')" v-tooltip.right="$t('graphql')" + aria-label="GraphQL" > - cloud + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  • - cloud_upload + cloud
  • + assignment_returned + +
  • +
  • + + cloud_upload + +
  • +
  • + cloud_download
  • @@ -193,9 +311,7 @@ - - - + diff --git a/package-lock.json b/package-lock.json index 8f051b90f..e81d602c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3682,9 +3682,9 @@ "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, "cypress": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.6.1.tgz", - "integrity": "sha512-6n0oqENdz/oQ7EJ6IgESNb2M7Bo/70qX9jSJsAziJTC3kICfEMmJUlrAnP9bn+ut24MlXQST5nRXhUP5nRIx6A==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.7.0.tgz", + "integrity": "sha512-o+vfRxqAba8TduelzfZQ4WHmj2yNEjaoO2EuZ8dZ9pJpuW+WGtBGheKIp6zkoQsp8ZgFe8OoHh1i2mY8BDnMAw==", "dev": true, "requires": { "@cypress/listr-verbose-renderer": "0.4.1", @@ -11154,9 +11154,9 @@ "integrity": "sha512-ER5moSbLZuNSMBFnEBVGhQ1uCBNJslH9W/Dw2W7GZN23UQA69uapP5GTT9Vm8Trc0PzBSVt6LzF3hGjmv41xcg==" }, "vuex-persist": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vuex-persist/-/vuex-persist-2.1.1.tgz", - "integrity": "sha512-FD/l3M5b2y3r/zerE/IV7EmWAq03g/t5uKboLD3dB+8hyTAQztX+rqNvbJqBJ3aOcccIrkvEmyvwgOW9QM/LPg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vuex-persist/-/vuex-persist-2.2.0.tgz", + "integrity": "sha512-o/qbBeMcKZZqMvCXc7kfIew/5cjHxlP1f53rx5YYp3r2tk2kxXYK/UZumxKn7OXywlurl2r0mgkuBzH6nIWFjw==", "requires": { "flatted": "^2.0.0", "lodash.merge": "^4.6.2" diff --git a/package.json b/package.json index 5a8d5e802..2619a962b 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ "v-tooltip": "^2.0.2", "vue-virtual-scroll-list": "^1.4.3", "vuejs-auto-complete": "^0.9.0", - "vuex-persist": "^2.1.1", + "vuex-persist": "^2.2.0", "yargs-parser": "^16.1.0" }, "devDependencies": { - "cypress": "^3.6.1", + "cypress": "^3.7.0", "node-sass": "^4.13.0", "sass-loader": "^7.3.1", "start-server-and-test": "^1.10.6" diff --git a/pages/graphql.vue b/pages/graphql.vue index 91c96a2ac..be61af9a2 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -171,11 +171,17 @@ - +
    @@ -216,9 +222,9 @@ name="side" checked="checked" /> - +
    @@ -232,9 +238,9 @@ name="side" checked="checked" /> - +
    @@ -248,9 +254,9 @@ name="side" checked="checked" /> - +
    @@ -264,7 +270,9 @@ name="side" checked="checked" /> - +
    @@ -435,7 +443,7 @@ export default { : res; this.responseString = JSON.stringify(data.data, null, 2); - + this.$nuxt.$loading.finish(); const duration = Date.now() - startTime; this.$toast.info(`Finished in ${duration}ms`, { @@ -449,7 +457,6 @@ export default { }); console.log("Error", error); } - }, async getSchema() { const startTime = Date.now(); diff --git a/pages/index.vue b/pages/index.vue index 5e0f36259..4e0f00ea1 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -24,14 +24,18 @@
    - + :lang="'javascript'" + :options="{ + maxLines: responseBodyMaxLines, + minLines: '16', + fontSize: '16px', + autoScrollEditorIntoView: true, + showPrintMargin: false, + useWorker: false + }" + /> @@ -126,10 +130,10 @@
  • - {{ $t("raw_input") }} - {{ rawInput ? $t("enabled") : $t("disabled") }} + + {{ $t("raw_input") }} + {{ rawInput ? $t("enabled") : $t("disabled") }} +
    @@ -625,7 +630,7 @@
  • - import("../components/collections"), saveRequestAs: () => import("../components/collections/saveRequestAs"), - ResponseBody: AceEditor + Editor: AceEditor }, data() { return { showModal: false, showPreRequestScript: false, - preRequestScript: "", + preRequestScript: "// pw.env.set('variable', 'value');", copyButton: 'file_copy', downloadButton: 'get_app', doneButton: 'done', @@ -2029,7 +2034,7 @@ export default { } else if (e.key === "k" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); this.copyRequest(); - } else if (e.key === "l" && (e.ctrlKey || e.metaKey)) { + } else if (e.key === "j" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); this.$refs.clearAll.click(); } diff --git a/pages/settings.vue b/pages/settings.vue index e06e426bc..777b4ffbe 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -46,11 +46,12 @@ {{ $t("multi_color") }} + > + {{ $t("multi_color") }} {{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") - }} + }} + @@ -64,11 +65,10 @@ {{ $t("proxy") }} - {{ - settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") - }} + {{ $t("proxy") }} + {{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }} + {{ $t("read_the") }} - {{ $t("apollotv_privacy_policy") }} + {{ $t("apollotv_privacy_policy") }} .

    diff --git a/static/icons/graphql.svg b/static/icons/graphql.svg new file mode 100644 index 000000000..b2f4689a6 --- /dev/null +++ b/static/icons/graphql.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + s + + + + + + + + + + + + + + + + + + diff --git a/static/images/screenshot1.png b/static/images/screenshot1.png index 235a98c38..275533389 100644 Binary files a/static/images/screenshot1.png and b/static/images/screenshot1.png differ diff --git a/static/images/screenshot2.png b/static/images/screenshot2.png index bcc75fb79..f932e2366 100644 Binary files a/static/images/screenshot2.png and b/static/images/screenshot2.png differ