diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 99a7b11bf..2ab257426 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,15 +31,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -47,7 +38,7 @@ jobs: with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. + # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3651f616d..cdb8184a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,5 +22,5 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: npm run build --if-present + - run: npm run generate --if-present - run: npm test diff --git a/README.md b/README.md index a750d0733..e02bb6dcc 100644 --- a/README.md +++ b/README.md @@ -477,7 +477,7 @@ docker pull hoppscotch/hoppscotch docker build -t hoppscotch/hoppscotch:latest . #run -docker run -p 3000:3000 hoppscotch/hoppscotch:latest +docker run --rm --name hoppscotch -p 3000:3000 hoppscotch/hoppscotch:latest ``` **Legacy container**   [![liyasthomas/postwoman](https://img.shields.io/docker/pulls/liyasthomas/postwoman?style=social)](https://hub.docker.com/r/liyasthomas/postwoman) diff --git a/assets/scss/styles.scss b/assets/scss/styles.scss index 9a5ae70fe..493d6d8d5 100644 --- a/assets/scss/styles.scss +++ b/assets/scss/styles.scss @@ -727,11 +727,13 @@ section { } .inner-right { + --width: 33%; + --ml: 1rem; @apply flex; @apply order-2; - @apply ml-4; - width: 33%; + margin-left: var(--ml); + width: var(--width); } @media (max-width: $responsiveWidth) { @@ -770,7 +772,7 @@ section { } .inner-right { - @apply ml-0; + --ml: 0; } .toasted-container { diff --git a/components/app/Header.vue b/components/app/Header.vue index 8e8760840..399e9bd55 100644 --- a/components/app/Header.vue +++ b/components/app/Header.vue @@ -189,14 +189,6 @@ export default { } }, async mounted() { - this._keyListener = function (e) { - if (e.key === "Escape") { - e.preventDefault() - this.showExtensions = this.showShortcuts = this.showSupport = false - } - } - document.addEventListener("keydown", this._keyListener.bind(this)) - // Initializes the PWA code - checks if the app is installed, // etc. this.showInstallPrompt = await intializePwa() @@ -281,9 +273,6 @@ export default { // }, 5000) // } }, - beforeDestroy() { - document.removeEventListener("keydown", this._keyListener) - }, methods: { nativeShare() { if (navigator.share) { diff --git a/components/app/Section.vue b/components/app/Section.vue index 2bb6c204f..5e302addf 100644 --- a/components/app/Section.vue +++ b/components/app/Section.vue @@ -26,7 +26,7 @@ export default Vue.extend({ }, noLegend: { type: Boolean, - default: false, + default: true, }, }, computed: { diff --git a/components/collections/SaveRequest.vue b/components/collections/SaveRequest.vue index 90daea20b..349963ae7 100644 --- a/components/collections/SaveRequest.vue +++ b/components/collections/SaveRequest.vue @@ -232,6 +232,7 @@ export default { this.hideModal() }, hideModal() { + this.picked = null this.$emit("hide-modal") }, }, diff --git a/components/collections/graphql/Collection.vue b/components/collections/graphql/Collection.vue index fef0716ae..3273c9afb 100644 --- a/components/collections/graphql/Collection.vue +++ b/components/collections/graphql/Collection.vue @@ -36,7 +36,7 @@ > topic - + @@ -197,6 +197,14 @@ export default Vue.extend({ this.showChildren = !this.showChildren }, removeCollection() { + // Cancel pick if picked collection is deleted + if ( + this.picked && + this.picked.pickedType === "gql-my-collection" && + this.picked.collectionIndex === this.collectionIndex + ) { + this.$emit("select", { picked: null }) + } removeGraphqlCollection(this.collectionIndex) this.$toast.error(this.$t("deleted").toString(), { diff --git a/components/collections/graphql/Folder.vue b/components/collections/graphql/Folder.vue index f1d257537..b03dbad5f 100644 --- a/components/collections/graphql/Folder.vue +++ b/components/collections/graphql/Folder.vue @@ -28,7 +28,7 @@ {{ folder.name }} - + @@ -181,6 +181,15 @@ export default Vue.extend({ this.showChildren = !this.showChildren }, removeFolder() { + // Cancel pick if the picked folder is deleted + if ( + this.picked && + this.picked.pickedType === "gql-my-folder" && + this.picked.folderPath === this.folderPath + ) { + this.$emit("select", { picked: null }) + } + removeGraphqlFolder(this.folderPath) this.$toast.error(this.$t("deleted").toString(), { icon: "delete", diff --git a/components/collections/graphql/Request.vue b/components/collections/graphql/Request.vue index 3c1156604..4bcee0bbe 100644 --- a/components/collections/graphql/Request.vue +++ b/components/collections/graphql/Request.vue @@ -25,7 +25,7 @@ {{ request.name }} - + @@ -122,6 +122,16 @@ export default Vue.extend({ dataTransfer.setData("requestIndex", this.requestIndex) }, removeRequest() { + // Cancel pick if the picked request is deleted + if ( + this.picked && + this.picked.pickedType === "gql-my-request" && + this.picked.folderPath === this.folderPath && + this.picked.requestIndex === this.requestIndex + ) { + this.$emit("select", { picked: null }) + } + removeGraphqlRequest(this.folderPath, this.requestIndex) this.$toast.error(this.$t("deleted").toString(), { icon: "delete", diff --git a/components/collections/graphql/index.vue b/components/collections/graphql/index.vue index 8c134a3b0..d8fa81903 100644 --- a/components/collections/graphql/index.vue +++ b/components/collections/graphql/index.vue @@ -1,12 +1,8 @@