imageLens.ts (hoppscotch-2.2.1) | : | imageLens.ts (hoppscotch-3.0.0) | ||
---|---|---|---|---|
import { defineAsyncComponent } from "vue" | ||||
import { Lens } from "./lenses" | import { Lens } from "./lenses" | |||
const imageLens: Lens = { | const imageLens: Lens = { | |||
lensName: "response.image", | lensName: "response.image", | |||
isSupportedContentType: (contentType) => | isSupportedContentType: (contentType) => | |||
/\bimage\/(?:gif|jpeg|png|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test ( | /\bimage\/(?:gif|jpeg|png|webp|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i .test( | |||
contentType | contentType | |||
), | ), | |||
renderer: "imageres", | renderer: "imageres", | |||
rendererImport: () => | rendererImport: defineAsyncComponent( | |||
import("~/components/lenses/renderers/ImageLensRenderer.vue"), | () => import("~/components/lenses/renderers/ImageLensRenderer.vue") | |||
), | ||||
} | } | |||
export default imageLens | export default imageLens | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 5 lines changed or added |