From 26429466e95f2d3f777948a631bd451e511aa44b Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Fri, 19 Nov 2021 21:13:58 +0530 Subject: [PATCH] refactor: remove icons from toast --- .../hoppscotch-app/assets/scss/styles.scss | 2 +- .../hoppscotch-app/components/app/Header.vue | 7 +- .../hoppscotch-app/components/app/Share.vue | 4 +- .../components/collections/Add.vue | 4 +- .../components/collections/AddFolder.vue | 4 +- .../components/collections/Edit.vue | 4 +- .../components/collections/EditFolder.vue | 4 +- .../components/collections/EditRequest.vue | 4 +- .../components/collections/ImportExport.vue | 20 ++---- .../components/collections/SaveRequest.vue | 24 ++----- .../components/collections/graphql/Add.vue | 4 +- .../collections/graphql/Collection.vue | 4 +- .../components/collections/graphql/Edit.vue | 4 +- .../collections/graphql/EditFolder.vue | 4 +- .../collections/graphql/EditRequest.vue | 4 +- .../components/collections/graphql/Folder.vue | 4 +- .../collections/graphql/ImportExport.vue | 20 ++---- .../collections/graphql/Request.vue | 4 +- .../components/collections/index.vue | 68 +++++-------------- .../components/collections/my/Folder.vue | 4 +- .../components/collections/teams/Folder.vue | 8 +-- .../components/environments/Add.vue | 4 +- .../components/environments/Edit.vue | 8 +-- .../components/environments/Environment.vue | 4 +- .../components/environments/ImportExport.vue | 16 ++--- .../components/firebase/Login.vue | 18 ++--- .../components/firebase/Logout.vue | 8 +-- .../components/graphql/RequestOptions.vue | 26 +++---- .../components/graphql/Response.vue | 5 +- .../components/graphql/Sidebar.vue | 4 +- .../components/history/index.vue | 8 +-- .../components/http/CodegenModal.vue | 4 +- .../components/http/Headers.vue | 9 +-- .../components/http/ImportCurl.vue | 4 +- .../components/http/OAuth2Authorization.vue | 8 +-- .../components/http/Parameters.vue | 9 +-- .../components/http/RawBody.vue | 12 +--- .../components/http/Request.vue | 20 ++---- .../components/http/ResponseMeta.vue | 2 +- .../components/lenses/HeadersRenderer.vue | 4 +- .../lenses/renderers/HTMLLensRenderer.vue | 8 +-- .../lenses/renderers/ImageLensRenderer.vue | 4 +- .../lenses/renderers/JSONLensRenderer.vue | 8 +-- .../lenses/renderers/RawLensRenderer.vue | 8 +-- .../lenses/renderers/XMLLensRenderer.vue | 8 +-- .../components/realtime/Mqtt.vue | 12 +--- .../components/realtime/Socketio.vue | 12 +--- .../components/realtime/Sse.vue | 12 +--- .../components/realtime/Websocket.vue | 13 +--- .../hoppscotch-app/components/teams/Add.vue | 13 ++-- .../hoppscotch-app/components/teams/Edit.vue | 28 ++------ .../components/teams/Invite.vue | 12 +--- .../hoppscotch-app/components/teams/Team.vue | 30 +++----- packages/hoppscotch-app/layouts/default.vue | 1 - .../hoppscotch-app/pages/documentation.vue | 24 ++----- packages/hoppscotch-app/pages/join-team.vue | 4 +- packages/hoppscotch-app/pages/profile.vue | 2 +- packages/hoppscotch-app/pages/settings.vue | 4 +- 58 files changed, 156 insertions(+), 425 deletions(-) diff --git a/packages/hoppscotch-app/assets/scss/styles.scss b/packages/hoppscotch-app/assets/scss/styles.scss index 17d3e0815..52b2ff04c 100644 --- a/packages/hoppscotch-app/assets/scss/styles.scss +++ b/packages/hoppscotch-app/assets/scss/styles.scss @@ -313,7 +313,7 @@ pre.ace_editor { &.toasted-primary { @apply bg-tooltip; @apply text-primary; - @apply justify-start; + @apply justify-between; @apply shadow; @apply font-medium; @apply transition; diff --git a/packages/hoppscotch-app/components/app/Header.vue b/packages/hoppscotch-app/components/app/Header.vue index 4f3614ff2..246eb7ee8 100644 --- a/packages/hoppscotch-app/components/app/Header.vue +++ b/packages/hoppscotch-app/components/app/Header.vue @@ -160,12 +160,11 @@ onMounted(() => { const cookiesAllowed = getLocalConfig("cookiesAllowed") === "yes" if (!cookiesAllowed) { - $toast.show(t("app.we_use_cookies").toString(), { - icon: "cookie", + $toast.show(`${t("app.we_use_cookies")}`, { duration: 0, action: [ { - text: t("action.learn_more").toString(), + text: `${t("action.learn_more")}`, onClick: (_, toastObject) => { setLocalConfig("cookiesAllowed", "yes") toastObject.goAway(0) @@ -173,7 +172,7 @@ onMounted(() => { }, }, { - text: t("action.dismiss").toString(), + text: `${t("action.dismiss")}`, onClick: (_, toastObject) => { setLocalConfig("cookiesAllowed", "yes") toastObject.goAway(0) diff --git a/packages/hoppscotch-app/components/app/Share.vue b/packages/hoppscotch-app/components/app/Share.vue index 3d7067889..306e16c75 100644 --- a/packages/hoppscotch-app/components/app/Share.vue +++ b/packages/hoppscotch-app/components/app/Share.vue @@ -92,9 +92,7 @@ const platforms = [ const copyAppLink = () => { copyToClipboard(url) copyIcon.value = "check" - $toast.success(t("state.copied_to_clipboard").toString(), { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/collections/Add.vue b/packages/hoppscotch-app/components/collections/Add.vue index 92133e317..c1a16f70f 100644 --- a/packages/hoppscotch-app/components/collections/Add.vue +++ b/packages/hoppscotch-app/components/collections/Add.vue @@ -47,9 +47,7 @@ export default defineComponent({ methods: { addNewCollection() { if (!this.name) { - this.$toast.error(this.$t("collection.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("collection.invalid_name")) return } this.$emit("submit", this.name) diff --git a/packages/hoppscotch-app/components/collections/AddFolder.vue b/packages/hoppscotch-app/components/collections/AddFolder.vue index 3517fdc12..0de1c6cbb 100644 --- a/packages/hoppscotch-app/components/collections/AddFolder.vue +++ b/packages/hoppscotch-app/components/collections/AddFolder.vue @@ -51,9 +51,7 @@ export default defineComponent({ methods: { addFolder() { if (!this.name) { - this.$toast.error(this.$t("folder.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("folder.invalid_name")) return } this.$emit("add-folder", { diff --git a/packages/hoppscotch-app/components/collections/Edit.vue b/packages/hoppscotch-app/components/collections/Edit.vue index 54b76f16b..4fb5c292f 100644 --- a/packages/hoppscotch-app/components/collections/Edit.vue +++ b/packages/hoppscotch-app/components/collections/Edit.vue @@ -48,9 +48,7 @@ export default defineComponent({ methods: { saveCollection() { if (!this.name) { - this.$toast.error(this.$t("collection.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("collection.invalid_name")) return } this.$emit("submit", this.name) diff --git a/packages/hoppscotch-app/components/collections/EditFolder.vue b/packages/hoppscotch-app/components/collections/EditFolder.vue index 2cee4e9bf..8fdde392d 100644 --- a/packages/hoppscotch-app/components/collections/EditFolder.vue +++ b/packages/hoppscotch-app/components/collections/EditFolder.vue @@ -48,9 +48,7 @@ export default defineComponent({ methods: { editFolder() { if (!this.name) { - this.$toast.error(this.$t("folder.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("folder.invalid_name")) return } this.$emit("submit", this.name) diff --git a/packages/hoppscotch-app/components/collections/EditRequest.vue b/packages/hoppscotch-app/components/collections/EditRequest.vue index 44e240ed0..3b0337e18 100644 --- a/packages/hoppscotch-app/components/collections/EditRequest.vue +++ b/packages/hoppscotch-app/components/collections/EditRequest.vue @@ -47,9 +47,7 @@ export default defineComponent({ methods: { saveRequest() { if (!this.requestUpdateData.name) { - this.$toast.error(this.$t("request.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("request.invalid_name")) return } this.$emit("submit", this.requestUpdateData) diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue index e12fe5947..454c8d5a6 100644 --- a/packages/hoppscotch-app/components/collections/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/ImportExport.vue @@ -229,15 +229,11 @@ export default defineComponent({ } ) .then((res) => { - this.$toast.success(this.$t("export.gist_created"), { - icon: "done", - }) + this.$toast.success(this.$t("export.gist_created")) window.open(res.html_url) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) }, @@ -415,23 +411,17 @@ export default defineComponent({ a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json` document.body.appendChild(a) a.click() - this.$toast.success(this.$t("state.download_started"), { - icon: "downloading", - }) + this.$toast.success(this.$t("state.download_started")) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) }, 1000) }, fileImported() { - this.$toast.success(this.$t("state.file_imported"), { - icon: "folder_shared", - }) + this.$toast.success(this.$t("state.file_imported")) }, failedImport() { - this.$toast.error(this.$t("import.failed"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("import.failed")) }, parsePostmanCollection({ info, name, item }) { const hoppscotchCollection = { diff --git a/packages/hoppscotch-app/components/collections/SaveRequest.vue b/packages/hoppscotch-app/components/collections/SaveRequest.vue index c412503c6..e3b1472b7 100644 --- a/packages/hoppscotch-app/components/collections/SaveRequest.vue +++ b/packages/hoppscotch-app/components/collections/SaveRequest.vue @@ -194,15 +194,11 @@ const hideModal = () => { const saveRequestAs = async () => { if (!requestName.value) { - $toast.error(`${t("error.empty_req_name")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.empty_req_name")}`) return } if (picked.value === null) { - $toast.error(`${t("collection.select")}`, { - icon: "error_outline", - }) + $toast.error(`${t("collection.select")}`) return } @@ -283,9 +279,7 @@ const saveRequestAs = async () => { requestSaved() }) .catch((error) => { - $toast.error(t("profile.no_permission").toString(), { - icon: "error_outline", - }) + $toast.error(`${t("profile.no_permission")}`) throw new Error(error) }) @@ -320,9 +314,7 @@ const saveRequestAs = async () => { requestSaved() } catch (error) { - $toast.error(t("profile.no_permission").toString(), { - icon: "error_outline", - }) + $toast.error(`${t("profile.no_permission")}`) console.error(error) } } else if (picked.value.pickedType === "teams-collection") { @@ -352,9 +344,7 @@ const saveRequestAs = async () => { requestSaved() } catch (error) { - $toast.error(t("profile.no_permission").toString(), { - icon: "error_outline", - }) + $toast.error(`${t("profile.no_permission")}`) console.error(error) } } else if (picked.value.pickedType === "gql-my-request") { @@ -386,9 +376,7 @@ const saveRequestAs = async () => { } const requestSaved = () => { - $toast.success(`${t("request.added")}`, { - icon: "post_add", - }) + $toast.success(`${t("request.added")}`) hideModal() } diff --git a/packages/hoppscotch-app/components/collections/graphql/Add.vue b/packages/hoppscotch-app/components/collections/graphql/Add.vue index df7dd32c2..712750c4b 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Add.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Add.vue @@ -49,9 +49,7 @@ export default defineComponent({ methods: { addNewCollection() { if (!this.name) { - this.$toast.error(`${this.$t("collection.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("collection.invalid_name")}`) return } diff --git a/packages/hoppscotch-app/components/collections/graphql/Collection.vue b/packages/hoppscotch-app/components/collections/graphql/Collection.vue index e8bc49f69..49f5c72c4 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Collection.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Collection.vue @@ -251,9 +251,7 @@ export default defineComponent({ this.$emit("select", { picked: null }) } removeGraphqlCollection(this.collectionIndex) - this.$toast.success(`${this.$t("state.deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.deleted")}`) }, dropEvent({ dataTransfer }: any) { this.dragging = !this.dragging diff --git a/packages/hoppscotch-app/components/collections/graphql/Edit.vue b/packages/hoppscotch-app/components/collections/graphql/Edit.vue index 81a603f3b..62c919b64 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Edit.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Edit.vue @@ -54,9 +54,7 @@ export default defineComponent({ methods: { saveCollection() { if (!this.name) { - this.$toast.error(`${this.$t("collection.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("collection.invalid_name")}`) return } const collectionUpdated = { diff --git a/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue b/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue index 4017d9ced..68c514074 100644 --- a/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue +++ b/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue @@ -54,9 +54,7 @@ export default defineComponent({ methods: { editFolder() { if (!this.name) { - this.$toast.error(`${this.$t("collection.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("collection.invalid_name")}`) return } editGraphqlFolder(this.folderPath, { diff --git a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue index 06c7ae990..1fe5c6582 100644 --- a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue +++ b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue @@ -58,9 +58,7 @@ export default defineComponent({ methods: { saveRequest() { if (!this.requestUpdateData.name) { - this.$toast.error(`${this.$t("collection.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("collection.invalid_name")}`) return } const requestUpdated = { diff --git a/packages/hoppscotch-app/components/collections/graphql/Folder.vue b/packages/hoppscotch-app/components/collections/graphql/Folder.vue index 2295aa914..5b90b0238 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Folder.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Folder.vue @@ -250,9 +250,7 @@ export default defineComponent({ } removeGraphqlFolder(this.folderPath) - this.$toast.success(`${this.$t("state.deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.deleted")}`) }, dropEvent({ dataTransfer }: any) { this.dragging = !this.dragging diff --git a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue index cab3d4b87..50f1067e3 100644 --- a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue @@ -140,15 +140,11 @@ export default defineComponent({ } ) .then((res) => { - this.$toast.success(this.$t("export.gist_created"), { - icon: "done", - }) + this.$toast.success(this.$t("export.gist_created")) window.open(res.html_url) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) }, @@ -252,23 +248,17 @@ export default defineComponent({ a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json` document.body.appendChild(a) a.click() - this.$toast.success(this.$t("state.download_started"), { - icon: "downloading", - }) + this.$toast.success(this.$t("state.download_started")) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) }, 1000) }, fileImported() { - this.$toast.success(this.$t("state.file_imported"), { - icon: "folder_shared", - }) + this.$toast.success(this.$t("state.file_imported")) }, failedImport() { - this.$toast.error(this.$t("import.failed"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("import.failed")) }, parsePostmanCollection({ info, name, item }) { const hoppscotchCollection = { diff --git a/packages/hoppscotch-app/components/collections/graphql/Request.vue b/packages/hoppscotch-app/components/collections/graphql/Request.vue index a1f36835b..b2c979a29 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Request.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Request.vue @@ -194,9 +194,7 @@ export default defineComponent({ } removeGraphqlRequest(this.folderPath, this.requestIndex) - this.$toast.success(`${this.$t("state.deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.deleted")}`) }, }, }) diff --git a/packages/hoppscotch-app/components/collections/index.vue b/packages/hoppscotch-app/components/collections/index.vue index e968e292e..94f537983 100644 --- a/packages/hoppscotch-app/components/collections/index.vue +++ b/packages/hoppscotch-app/components/collections/index.vue @@ -361,14 +361,10 @@ export default defineComponent({ this.collectionsType.selectedTeam.id ) .then(() => { - this.$toast.success(this.$t("collection.created"), { - icon: "done", - }) + this.$toast.success(this.$t("collection.created")) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -377,9 +373,7 @@ export default defineComponent({ // Intented to be called by CollectionEdit modal submit event updateEditingCollection(newName) { if (!newName) { - this.$toast.error(this.$t("collection.invalid_name"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("collection.invalid_name")) return } if (this.collectionsType.type === "my-collections") { @@ -396,14 +390,10 @@ export default defineComponent({ teamUtils .renameCollection(this.$apollo, newName, this.editingCollection.id) .then(() => { - this.$toast.success(this.$t("collection.renamed"), { - icon: "done", - }) + this.$toast.success(this.$t("collection.renamed")) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -420,14 +410,10 @@ export default defineComponent({ teamUtils .renameCollection(this.$apollo, name, this.editingFolder.id) .then(() => { - this.$toast.success(this.$t("folder.renamed"), { - icon: "done", - }) + this.$toast.success(this.$t("folder.renamed")) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -460,15 +446,11 @@ export default defineComponent({ this.editingRequestIndex ) .then(() => { - this.$toast.success(this.$t("request.renamed"), { - icon: "done", - }) + this.$toast.success(this.$t("request.renamed")) this.$emit("update-team-collections") }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -533,15 +515,11 @@ export default defineComponent({ }, }) .then(() => { - this.$toast.success(this.$t("folder.created"), { - icon: "done", - }) + this.$toast.success(this.$t("folder.created")) this.$emit("update-team-collections") }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -605,9 +583,7 @@ export default defineComponent({ } removeRESTCollection(collectionIndex) - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) } else if (collectionsType.type === "team-collections") { // Cancel pick if picked collection is deleted if ( @@ -633,14 +609,10 @@ export default defineComponent({ }, }) .then(() => { - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } @@ -658,9 +630,7 @@ export default defineComponent({ this.$emit("select", { picked: null }) } removeRESTRequest(folderPath, requestIndex) - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) } else if (this.collectionsType.type === "team-collections") { // Cancel pick if the picked item is being deleted if ( @@ -674,14 +644,10 @@ export default defineComponent({ teamUtils .deleteRequest(this.$apollo, requestIndex) .then(() => { - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) } diff --git a/packages/hoppscotch-app/components/collections/my/Folder.vue b/packages/hoppscotch-app/components/collections/my/Folder.vue index dc2a7b726..87ea2c140 100644 --- a/packages/hoppscotch-app/components/collections/my/Folder.vue +++ b/packages/hoppscotch-app/components/collections/my/Folder.vue @@ -262,9 +262,7 @@ export default defineComponent({ this.$emit("select", { picked: null }) } removeRESTFolder(this.folderPath) - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) }, dropEvent({ dataTransfer }) { this.dragging = !this.dragging diff --git a/packages/hoppscotch-app/components/collections/teams/Folder.vue b/packages/hoppscotch-app/components/collections/teams/Folder.vue index 38373a40d..5ef8fb6be 100644 --- a/packages/hoppscotch-app/components/collections/teams/Folder.vue +++ b/packages/hoppscotch-app/components/collections/teams/Folder.vue @@ -253,15 +253,11 @@ export default defineComponent({ teamUtils .deleteCollection(this.$apollo, this.folder.id) .then(() => { - this.$toast.success(this.$t("state.deleted"), { - icon: "delete", - }) + this.$toast.success(this.$t("state.deleted")) this.$emit("update-team-collections") }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) this.$emit("update-team-collections") diff --git a/packages/hoppscotch-app/components/environments/Add.vue b/packages/hoppscotch-app/components/environments/Add.vue index e3df2ab98..2188289e7 100644 --- a/packages/hoppscotch-app/components/environments/Add.vue +++ b/packages/hoppscotch-app/components/environments/Add.vue @@ -52,9 +52,7 @@ export default defineComponent({ methods: { addNewEnvironment() { if (!this.name) { - this.$toast.error(`${this.$t("environment.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("environment.invalid_name")}`) return } createEnvironment(this.name) diff --git a/packages/hoppscotch-app/components/environments/Edit.vue b/packages/hoppscotch-app/components/environments/Edit.vue index e1716f2d1..4d32aaab8 100644 --- a/packages/hoppscotch-app/components/environments/Edit.vue +++ b/packages/hoppscotch-app/components/environments/Edit.vue @@ -177,9 +177,7 @@ export default defineComponent({ clearContent() { this.vars = [] this.clearIcon = "check" - this.$toast.success(`${this.$t("state.cleared")}`, { - icon: "clear_all", - }) + this.$toast.success(`${this.$t("state.cleared")}`) setTimeout(() => (this.clearIcon = "trash-2"), 1000) }, addEnvironmentVariable() { @@ -193,9 +191,7 @@ export default defineComponent({ }, saveEnvironment() { if (!this.name) { - this.$toast.error(`${this.$t("environment.invalid_name")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("environment.invalid_name")}`) return } diff --git a/packages/hoppscotch-app/components/environments/Environment.vue b/packages/hoppscotch-app/components/environments/Environment.vue index a7f83d8da..79893e0a0 100644 --- a/packages/hoppscotch-app/components/environments/Environment.vue +++ b/packages/hoppscotch-app/components/environments/Environment.vue @@ -102,9 +102,7 @@ export default defineComponent({ removeEnvironment() { if (this.environmentIndex !== "Global") deleteEnvironment(this.environmentIndex) - this.$toast.success(`${this.$t("state.deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.deleted")}`) }, duplicateEnvironment() { if (this.environmentIndex === "Global") { diff --git a/packages/hoppscotch-app/components/environments/ImportExport.vue b/packages/hoppscotch-app/components/environments/ImportExport.vue index c607e7ab5..4dbb599f5 100644 --- a/packages/hoppscotch-app/components/environments/ImportExport.vue +++ b/packages/hoppscotch-app/components/environments/ImportExport.vue @@ -140,15 +140,11 @@ export default defineComponent({ } ) .then((res) => { - this.$toast.success(this.$t("export.gist_created"), { - icon: "done", - }) + this.$toast.success(this.$t("export.gist_created")) window.open(res.html_url) }) .catch((e) => { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) console.error(e) }) }, @@ -230,18 +226,14 @@ export default defineComponent({ a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json` document.body.appendChild(a) a.click() - this.$toast.success(this.$t("state.download_started"), { - icon: "downloading", - }) + this.$toast.success(this.$t("state.download_started")) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) }, 1000) }, fileImported() { - this.$toast.success(this.$t("state.file_imported"), { - icon: "folder_shared", - }) + this.$toast.success(this.$t("state.file_imported")) }, }, }) diff --git a/packages/hoppscotch-app/components/firebase/Login.vue b/packages/hoppscotch-app/components/firebase/Login.vue index 2d72853ac..cb51b3405 100644 --- a/packages/hoppscotch-app/components/firebase/Login.vue +++ b/packages/hoppscotch-app/components/firebase/Login.vue @@ -155,9 +155,7 @@ export default defineComponent({ }, methods: { showLoginSuccess() { - this.$toast.success(`${this.$t("auth.login_success")}`, { - icon: "vpn_key", - }) + this.$toast.success(`${this.$t("auth.login_success")}`) }, async signInWithGoogle() { this.signingInWithGoogle = true @@ -174,7 +172,6 @@ export default defineComponent({ // The pending Google credential. const pendingCred = e.credential this.$toast.info(`${this.$t("auth.account_exists")}`, { - icon: "vpn_key", duration: 0, closeOnSwipe: false, action: { @@ -190,9 +187,7 @@ export default defineComponent({ }, }) } else { - this.$toast.error(`${this.$t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("error.something_went_wrong")}`) } } @@ -218,7 +213,6 @@ export default defineComponent({ // The pending Google credential. const pendingCred = e.credential this.$toast.info(`${this.$t("auth.account_exists")}`, { - icon: "vpn_key", duration: 0, closeOnSwipe: false, action: { @@ -234,9 +228,7 @@ export default defineComponent({ }, }) } else { - this.$toast.error(`${this.$t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("error.something_went_wrong")}`) } } @@ -256,9 +248,7 @@ export default defineComponent({ }) .catch((e) => { console.error(e) - this.$toast.error(e.message, { - icon: "error_outline", - }) + this.$toast.error(e.message) this.signingInWithEmail = false }) .finally(() => { diff --git a/packages/hoppscotch-app/components/firebase/Logout.vue b/packages/hoppscotch-app/components/firebase/Logout.vue index 787b2b5bb..58fbd03c4 100644 --- a/packages/hoppscotch-app/components/firebase/Logout.vue +++ b/packages/hoppscotch-app/components/firebase/Logout.vue @@ -40,14 +40,10 @@ export default defineComponent({ async logout() { try { await signOutUser() - this.$toast.success(`${this.$t("auth.logged_out")}`, { - icon: "vpn_key", - }) + this.$toast.success(`${this.$t("auth.logged_out")}`) } catch (e) { console.error(e) - this.$toast.error(`${this.$t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + this.$toast.error(`${this.$t("error.something_went_wrong")}`) } }, }, diff --git a/packages/hoppscotch-app/components/graphql/RequestOptions.vue b/packages/hoppscotch-app/components/graphql/RequestOptions.vue index dd7443134..40c8a199d 100644 --- a/packages/hoppscotch-app/components/graphql/RequestOptions.vue +++ b/packages/hoppscotch-app/components/graphql/RequestOptions.vue @@ -337,9 +337,7 @@ watch(bulkHeaders, () => { })) setGQLHeaders(transformation as GQLHeader[]) } catch (e) { - $toast.error(`${t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.something_went_wrong")}`) console.error(e) } }) @@ -428,6 +426,7 @@ onMounted(() => { const copyQuery = () => { copyToClipboard(gqlQueryString.value) copyQueryIcon.value = "check" + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyQueryIcon.value = "copy"), 1000) } @@ -471,18 +470,14 @@ const runQuery = async () => { }) ) - $toast.success(`${t("state.finished_in", { duration })}`, { - icon: "done", - }) + $toast.success(`${t("state.finished_in", { duration })}`) } catch (e: any) { response.value = `${e}` nuxt.value.$loading.finish() $toast.error( `${t("error.something_went_wrong")}. ${t("error.check_console_details")}`, - { - icon: "error_outline", - } + {} ) console.error(e) } @@ -500,12 +495,11 @@ const hideRequestModal = () => { const prettifyQuery = () => { try { gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value)) + prettifyQueryIcon.value = "check" } catch (e) { - $toast.error(`${t("error.gql_prettify_invalid_query")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.gql_prettify_invalid_query")}`) + prettifyQueryIcon.value = "info" } - prettifyQueryIcon.value = "check" setTimeout(() => (prettifyQueryIcon.value = "wand"), 1000) } @@ -516,6 +510,7 @@ const saveRequest = () => { const copyVariables = () => { copyToClipboard(variableString.value) copyVariablesIcon.value = "check" + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyVariablesIcon.value = "copy"), 1000) } @@ -543,11 +538,10 @@ const removeRequestHeader = (index: number) => { const deletedItem = headersBeforeDeletion[index] if (deletedItem.key || deletedItem.value) { - $toast.success(t("state.deleted").toString(), { - icon: "delete", + $toast.success(`${t("state.deleted")}`, { action: [ { - text: t("action.undo").toString(), + text: `${t("action.undo")}`, onClick: (_, toastObject) => { setGQLHeaders(headersBeforeDeletion as GQLHeader[]) editBulkHeadersLine(index, deletedItem) diff --git a/packages/hoppscotch-app/components/graphql/Response.vue b/packages/hoppscotch-app/components/graphql/Response.vue index 20073a4bb..ffa5125d2 100644 --- a/packages/hoppscotch-app/components/graphql/Response.vue +++ b/packages/hoppscotch-app/components/graphql/Response.vue @@ -128,6 +128,7 @@ const copyResponseIcon = ref("copy") const copyResponse = () => { copyToClipboard(responseString.value!) copyResponseIcon.value = "check" + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyResponseIcon.value = "copy"), 1000) } @@ -141,9 +142,7 @@ const downloadResponse = () => { document.body.appendChild(a) a.click() downloadResponseIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) diff --git a/packages/hoppscotch-app/components/graphql/Sidebar.vue b/packages/hoppscotch-app/components/graphql/Sidebar.vue index 5bb072320..70eb299bf 100644 --- a/packages/hoppscotch-app/components/graphql/Sidebar.vue +++ b/packages/hoppscotch-app/components/graphql/Sidebar.vue @@ -449,9 +449,7 @@ const downloadSchema = () => { document.body.appendChild(a) a.click() downloadSchemaIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) diff --git a/packages/hoppscotch-app/components/history/index.vue b/packages/hoppscotch-app/components/history/index.vue index 26d5c2b34..39967da6c 100644 --- a/packages/hoppscotch-app/components/history/index.vue +++ b/packages/hoppscotch-app/components/history/index.vue @@ -140,9 +140,7 @@ export default defineComponent({ clearHistory() { if (this.page === "rest") clearRESTHistory() else clearGraphqlHistory() - this.$toast.success(`${this.$t("state.history_deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.history_deleted")}`) }, useHistory(entry: any) { if (this.page === "rest") setRESTRequest(entry.request) @@ -150,9 +148,7 @@ export default defineComponent({ deleteHistory(entry: any) { if (this.page === "rest") deleteRESTHistoryEntry(entry) else deleteGraphqlHistoryEntry(entry) - this.$toast.success(`${this.$t("state.deleted")}`, { - icon: "delete", - }) + this.$toast.success(`${this.$t("state.deleted")}`) }, toggleStar(entry: any) { if (this.page === "rest") toggleRESTHistoryEntryStar(entry) diff --git a/packages/hoppscotch-app/components/http/CodegenModal.vue b/packages/hoppscotch-app/components/http/CodegenModal.vue index 35f25ff8b..62685f5d4 100644 --- a/packages/hoppscotch-app/components/http/CodegenModal.vue +++ b/packages/hoppscotch-app/components/http/CodegenModal.vue @@ -126,9 +126,7 @@ const hideModal = () => emit("hide-modal") const copyRequestCode = () => { copyToClipboard(requestCode.value) copyIcon.value = "check" - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/http/Headers.vue b/packages/hoppscotch-app/components/http/Headers.vue index 5eb154bea..683a9e3f1 100644 --- a/packages/hoppscotch-app/components/http/Headers.vue +++ b/packages/hoppscotch-app/components/http/Headers.vue @@ -214,9 +214,7 @@ watch(bulkHeaders, () => { })) setRESTHeaders(transformation as HoppRESTHeader[]) } catch (e) { - $toast.error(`${t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.something_went_wrong")}`) console.error(e) } }) @@ -278,11 +276,10 @@ const deleteHeader = (index: number) => { const deletedItem = headersBeforeDeletion[index] if (deletedItem.key || deletedItem.value) { - $toast.success(t("state.deleted").toString(), { - icon: "delete", + $toast.success(`${t("state.deleted")}`, { action: [ { - text: t("action.undo").toString(), + text: `${t("action.undo")}`, onClick: (_, toastObject) => { setRESTHeaders(headersBeforeDeletion as HoppRESTHeader[]) editBulkHeadersLine(index, deletedItem) diff --git a/packages/hoppscotch-app/components/http/ImportCurl.vue b/packages/hoppscotch-app/components/http/ImportCurl.vue index 393d1868e..5710818b9 100644 --- a/packages/hoppscotch-app/components/http/ImportCurl.vue +++ b/packages/hoppscotch-app/components/http/ImportCurl.vue @@ -123,9 +123,7 @@ const handleImport = () => { ) } catch (e) { console.error(e) - $toast.error(`${t("error.curl_invalid_format")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.curl_invalid_format")}`) } hideModal() } diff --git a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue b/packages/hoppscotch-app/components/http/OAuth2Authorization.vue index ff71c2b9f..088778299 100644 --- a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue +++ b/packages/hoppscotch-app/components/http/OAuth2Authorization.vue @@ -97,9 +97,7 @@ export default { oidcDiscoveryURL.value === "" && (authURL.value === "" || accessTokenURL.value === "") ) { - $toast.error(`${$t("complete_config_urls")}`, { - icon: "error", - }) + $toast.error(`${$t("complete_config_urls")}`) return } try { @@ -113,9 +111,7 @@ export default { } await tokenRequest(tokenReqParams) } catch (e) { - $toast.error(`${e}`, { - icon: "code", - }) + $toast.error(`${e}`) } } diff --git a/packages/hoppscotch-app/components/http/Parameters.vue b/packages/hoppscotch-app/components/http/Parameters.vue index 8490ccb15..99415f313 100644 --- a/packages/hoppscotch-app/components/http/Parameters.vue +++ b/packages/hoppscotch-app/components/http/Parameters.vue @@ -196,9 +196,7 @@ watch(bulkParams, () => { })) setRESTParams(transformation as HoppRESTParam[]) } catch (e) { - $toast.error(`${t("error.something_went_wrong")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.something_went_wrong")}`) console.error(e) } }) @@ -271,11 +269,10 @@ const deleteParam = (index: number) => { const deletedItem = parametersBeforeDeletion[index] if (deletedItem.key || deletedItem.value) { - $toast.success(t("state.deleted").toString(), { - icon: "delete", + $toast.success(`${t("state.deleted")}`, { action: [ { - text: t("action.undo").toString(), + text: `${t("action.undo")}`, onClick: (_, toastObject) => { setRESTParams(parametersBeforeDeletion as HoppRESTParam[]) editBulkParamsLine(index, deletedItem) diff --git a/packages/hoppscotch-app/components/http/RawBody.vue b/packages/hoppscotch-app/components/http/RawBody.vue index 1d67ed93e..ba166dfa4 100644 --- a/packages/hoppscotch-app/components/http/RawBody.vue +++ b/packages/hoppscotch-app/components/http/RawBody.vue @@ -118,13 +118,9 @@ const uploadPayload = (e: InputEvent) => { rawParamsBody.value = target?.result } reader.readAsText(file) - $toast.success(`${t("state.file_imported")}`, { - icon: "attach_file", - }) + $toast.success(`${t("state.file_imported")}`) } else { - $toast.error(`${t("action.choose_file")}`, { - icon: "attach_file", - }) + $toast.error(`${t("action.choose_file")}`) } } const prettifyRequestBody = () => { @@ -135,9 +131,7 @@ const prettifyRequestBody = () => { setTimeout(() => (prettifyIcon.value = "wand"), 1000) } catch (e) { console.error(e) - $toast.error(`${t("error.json_prettify_invalid_body")}`, { - icon: "error_outline", - }) + $toast.error(`${t("error.json_prettify_invalid_body")}`) } } diff --git a/packages/hoppscotch-app/components/http/Request.vue b/packages/hoppscotch-app/components/http/Request.vue index f13e2e854..d964d7b60 100644 --- a/packages/hoppscotch-app/components/http/Request.vue +++ b/packages/hoppscotch-app/components/http/Request.vue @@ -341,9 +341,7 @@ const copyRequest = () => { .catch(() => {}) } else { copyToClipboard(window.location.href) - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) } } @@ -382,9 +380,7 @@ const saveRequest = () => { if (saveCtx.originLocation === "user-collection") { editRESTRequest(saveCtx.folderPath, saveCtx.requestIndex, getRESTRequest()) - $toast.success(`${t("request.saved")}`, { - icon: "playlist_add_check", - }) + $toast.success(`${t("request.saved")}`) } else if (saveCtx.originLocation === "team-collection") { const req = getRESTRequest() @@ -397,20 +393,14 @@ const saveRequest = () => { saveCtx.requestID ) .then(() => { - $toast.success(`${t("request.saved")}`, { - icon: "playlist_add_check", - }) + $toast.success(`${t("request.saved")}`) }) .catch(() => { - $toast.error(t("profile.no_permission").toString(), { - icon: "error_outline", - }) + $toast.error(`${t("profile.no_permission")}`) }) } catch (error) { showSaveRequestModal.value = true - $toast.error(t("error.something_went_wrong").toString(), { - icon: "error_outline", - }) + $toast.error(`${t("error.something_went_wrong")}`) console.error(error) } } diff --git a/packages/hoppscotch-app/components/http/ResponseMeta.vue b/packages/hoppscotch-app/components/http/ResponseMeta.vue index d213251dd..ff9ff831c 100644 --- a/packages/hoppscotch-app/components/http/ResponseMeta.vue +++ b/packages/hoppscotch-app/components/http/ResponseMeta.vue @@ -73,7 +73,7 @@ w-32 inline-flex " - :alt="$t('empty.network_fail')" + :alt="$t('error.network_fail')" /> {{ $t("error.network_fail") }} diff --git a/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue b/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue index 5ff97bceb..a0d69c58b 100644 --- a/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue @@ -89,9 +89,7 @@ const copyIcon = ref("copy") const copyHeaders = () => { copyToClipboard(JSON.stringify(props.headers)) copyIcon.value = "check" - $toast.success(t("state.copied_to_clipboard").toString(), { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue index b2c78ddb1..eb4bc9b4a 100644 --- a/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue @@ -127,9 +127,7 @@ const downloadResponse = () => { document.body.appendChild(a) a.click() downloadIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) @@ -140,9 +138,7 @@ const downloadResponse = () => { const copyResponse = () => { copyToClipboard(responseBodyText.value) copyIcon.value = "check" - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/lenses/renderers/ImageLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/ImageLensRenderer.vue index 537e6000b..b90d498b1 100644 --- a/packages/hoppscotch-app/components/lenses/renderers/ImageLensRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/renderers/ImageLensRenderer.vue @@ -103,9 +103,7 @@ export default defineComponent({ document.body.appendChild(a) a.click() this.downloadIcon = "check" - this.$toast.success(this.$t("state.download_started"), { - icon: "downloading", - }) + this.$toast.success(this.$t("state.download_started")) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) diff --git a/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue index 994b3e183..bdff4bfdb 100644 --- a/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue @@ -234,9 +234,7 @@ const downloadResponse = () => { document.body.appendChild(a) a.click() downloadIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) @@ -256,9 +254,7 @@ const outlinePath = computed(() => { const copyResponse = () => { copyToClipboard(responseBodyText.value) copyIcon.value = "check" - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue index c6beccdcc..0cf9e44df 100644 --- a/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue @@ -117,9 +117,7 @@ const downloadResponse = () => { document.body.appendChild(a) a.click() downloadIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) @@ -130,9 +128,7 @@ const downloadResponse = () => { const copyResponse = () => { copyToClipboard(responseBodyText.value) copyIcon.value = "check" - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue index bc36d7a63..131962840 100644 --- a/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue +++ b/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue @@ -117,9 +117,7 @@ const downloadResponse = () => { document.body.appendChild(a) a.click() downloadIcon.value = "check" - $toast.success(`${t("state.download_started")}`, { - icon: "downloading", - }) + $toast.success(`${t("state.download_started")}`) setTimeout(() => { document.body.removeChild(a) URL.revokeObjectURL(url) @@ -130,9 +128,7 @@ const downloadResponse = () => { const copyResponse = () => { copyToClipboard(responseBodyText.value) copyIcon.value = "check" - $toast.success(`${t("state.copied_to_clipboard")}`, { - icon: "content_paste", - }) + $toast.success(`${t("state.copied_to_clipboard")}`) setTimeout(() => (copyIcon.value = "copy"), 1000) } diff --git a/packages/hoppscotch-app/components/realtime/Mqtt.vue b/packages/hoppscotch-app/components/realtime/Mqtt.vue index b34bd1f57..b50bb664f 100644 --- a/packages/hoppscotch-app/components/realtime/Mqtt.vue +++ b/packages/hoppscotch-app/components/realtime/Mqtt.vue @@ -288,9 +288,7 @@ export default defineComponent({ color: "var(--accent-color)", ts: new Date().toLocaleTimeString(), }) - this.$toast.success(this.$t("state.connected"), { - icon: "sync", - }) + this.$toast.success(this.$t("state.connected")) }, onMessageArrived({ payloadString, destinationName }) { this.log.push({ @@ -321,13 +319,9 @@ export default defineComponent({ this.connectingState = false this.connectionState = false if (this.manualDisconnect) { - this.$toast.error(this.$t("state.disconnected"), { - icon: "sync_disabled", - }) + this.$toast.error(this.$t("state.disconnected")) } else { - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) } this.manualDisconnect = false this.subscriptionState = false diff --git a/packages/hoppscotch-app/components/realtime/Socketio.vue b/packages/hoppscotch-app/components/realtime/Socketio.vue index 0fde8c04b..a6ab50abe 100644 --- a/packages/hoppscotch-app/components/realtime/Socketio.vue +++ b/packages/hoppscotch-app/components/realtime/Socketio.vue @@ -325,9 +325,7 @@ export default defineComponent({ ts: new Date().toLocaleTimeString(), }, ] - this.$toast.success(this.$t("state.connected"), { - icon: "sync", - }) + this.$toast.success(this.$t("state.connected")) }) this.io.on("*", ({ data }) => { const [eventName, message] = data @@ -355,15 +353,11 @@ export default defineComponent({ color: "#ff5555", ts: new Date().toLocaleTimeString(), }) - this.$toast.error(this.$t("state.disconnected"), { - icon: "sync_disabled", - }) + this.$toast.error(this.$t("state.disconnected")) }) } catch (e) { this.handleError(e) - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) } logHoppRequestRunToAnalytics({ diff --git a/packages/hoppscotch-app/components/realtime/Sse.vue b/packages/hoppscotch-app/components/realtime/Sse.vue index 9d5747a3f..2990bf758 100644 --- a/packages/hoppscotch-app/components/realtime/Sse.vue +++ b/packages/hoppscotch-app/components/realtime/Sse.vue @@ -171,9 +171,7 @@ export default defineComponent({ ts: new Date().toLocaleTimeString(), }, ] - this.$toast.success(this.$t("state.connected"), { - icon: "sync", - }) + this.$toast.success(this.$t("state.connected")) } this.sse.onerror = () => { this.handleSSEError() @@ -188,9 +186,7 @@ export default defineComponent({ color: "#ff5555", ts: new Date().toLocaleTimeString(), }) - this.$toast.error(this.$t("state.disconnected"), { - icon: "sync_disabled", - }) + this.$toast.error(this.$t("state.disconnected")) } this.sse.addEventListener(this.eventType, ({ data }) => { this.events.log.push({ @@ -201,9 +197,7 @@ export default defineComponent({ }) } catch (e) { this.handleSSEError(e) - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) } } else { this.events.log = [ diff --git a/packages/hoppscotch-app/components/realtime/Websocket.vue b/packages/hoppscotch-app/components/realtime/Websocket.vue index bbd951841..54ee06b7e 100644 --- a/packages/hoppscotch-app/components/realtime/Websocket.vue +++ b/packages/hoppscotch-app/components/realtime/Websocket.vue @@ -319,9 +319,7 @@ export default defineComponent({ ts: new Date().toLocaleTimeString(), }, ] - this.$toast.success(this.$t("state.connected"), { - icon: "sync", - }) + this.$toast.success(this.$t("state.connected")) } this.socket.onerror = () => { this.handleError() @@ -334,9 +332,7 @@ export default defineComponent({ color: "#ff5555", ts: new Date().toLocaleTimeString(), }) - this.$toast.error(this.$t("state.disconnected"), { - icon: "sync_disabled", - }) + this.$toast.error(this.$t("state.disconnected")) } this.socket.onmessage = ({ data }) => { this.communication.log.push({ @@ -347,9 +343,7 @@ export default defineComponent({ } } catch (e) { this.handleError(e) - this.$toast.error(this.$t("error.something_went_wrong"), { - icon: "error_outline", - }) + this.$toast.error(this.$t("error.something_went_wrong")) } logHoppRequestRunToAnalytics({ @@ -433,7 +427,6 @@ export default defineComponent({ const oldProtocols = this.protocols.slice() this.$delete(this.protocols, index) this.$toast.success(this.$t("state.deleted"), { - icon: "delete", action: { text: this.$t("action.undo"), duration: 4000, diff --git a/packages/hoppscotch-app/components/teams/Add.vue b/packages/hoppscotch-app/components/teams/Add.vue index 9d70e2de8..5a380311c 100644 --- a/packages/hoppscotch-app/components/teams/Add.vue +++ b/packages/hoppscotch-app/components/teams/Add.vue @@ -1,5 +1,5 @@