feat: unsaved change popup (#2239)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: liyasthomas <liyascthomas@gmail.com>
This commit is contained in:
Nivedin
2022-04-13 20:52:44 +05:30
committed by GitHub
parent 745b9f7275
commit efbd165c5c
7 changed files with 772 additions and 243 deletions

View File

@@ -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
}