diff --git a/packages/hoppscotch-app/.gitignore b/packages/hoppscotch-app/.gitignore index a3ab74b17..7c831b208 100644 --- a/packages/hoppscotch-app/.gitignore +++ b/packages/hoppscotch-app/.gitignore @@ -115,4 +115,4 @@ shims-volar.d.ts helpers/backend/backend-schema.json # GraphQL Type Generation -helpers/backend/graphql.ts \ No newline at end of file +helpers/backend/graphql.ts diff --git a/packages/hoppscotch-app/components/collections/my/Request.vue b/packages/hoppscotch-app/components/collections/my/Request.vue index 41ee80cd1..abeb983e3 100644 --- a/packages/hoppscotch-app/components/collections/my/Request.vue +++ b/packages/hoppscotch-app/components/collections/my/Request.vue @@ -32,15 +32,10 @@ {{ request.name }} @@ -72,7 +67,7 @@ @@ -89,11 +84,11 @@ + + - diff --git a/packages/hoppscotch-app/components/collections/teams/Request.vue b/packages/hoppscotch-app/components/collections/teams/Request.vue index 5ac37e6e1..477e61e23 100644 --- a/packages/hoppscotch-app/components/collections/teams/Request.vue +++ b/packages/hoppscotch-app/components/collections/teams/Request.vue @@ -32,11 +32,7 @@ {{ request.name }} + + - diff --git a/packages/hoppscotch-app/components/history/index.vue b/packages/hoppscotch-app/components/history/index.vue index d14580f00..f757d4c79 100644 --- a/packages/hoppscotch-app/components/history/index.vue +++ b/packages/hoppscotch-app/components/history/index.vue @@ -97,16 +97,29 @@ @hide-modal="confirmRemove = false" @resolve="clearHistory" /> + + diff --git a/packages/hoppscotch-app/components/http/ReqChangeConfirmModal.vue b/packages/hoppscotch-app/components/http/ReqChangeConfirmModal.vue new file mode 100644 index 000000000..3e0376aaa --- /dev/null +++ b/packages/hoppscotch-app/components/http/ReqChangeConfirmModal.vue @@ -0,0 +1,59 @@ + + + diff --git a/packages/hoppscotch-app/helpers/types/HoppRequestSaveContext.ts b/packages/hoppscotch-app/helpers/types/HoppRequestSaveContext.ts index f80def03b..014b76b39 100644 --- a/packages/hoppscotch-app/helpers/types/HoppRequestSaveContext.ts +++ b/packages/hoppscotch-app/helpers/types/HoppRequestSaveContext.ts @@ -1,3 +1,5 @@ +import { HoppRESTRequest } from "@hoppscotch/data" + /** * We use the save context to figure out * how a loaded request is to be saved. @@ -18,6 +20,10 @@ export type HoppRequestSaveContext = * Index to the request */ requestIndex: number + /** + * Current request + */ + req?: HoppRESTRequest } | { /** @@ -36,4 +42,8 @@ export type HoppRequestSaveContext = * ID of the collection loaded */ collectionID?: string + /** + * Current request + */ + req?: HoppRESTRequest } diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json index 58319455e..feff6b09e 100644 --- a/packages/hoppscotch-app/locales/en.json +++ b/packages/hoppscotch-app/locales/en.json @@ -10,6 +10,7 @@ "disconnect": "Disconnect", "dismiss": "Dismiss", "download_file": "Download file", + "dont_save": "Don't save", "duplicate": "Duplicate", "edit": "Edit", "go_back": "Go back", @@ -121,6 +122,7 @@ "team_collections": "Team Collections" }, "confirm": { + "request_change": "Are you sure you want to discard current request, unsaved changes will be lost.", "exit_team": "Are you sure you want to leave this team?", "logout": "Are you sure you want to logout?", "remove_collection": "Are you sure you want to permanently delete this collection?",