feat: copyable invite links (#4153)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com> Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
query GetSMTPStatus {
|
||||
isSMTPEnabled
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import { ExtensionInterceptorService } from "@hoppscotch/common/platform/std/int
|
||||
import { stdFooterItems } from "@hoppscotch/common/platform/std/ui/footerItem"
|
||||
import { stdSupportOptionItems } from "@hoppscotch/common/platform/std/ui/supportOptionsItem"
|
||||
import { browserIODef } from "@hoppscotch/common/platform/std/io"
|
||||
import { InfraPlatform } from "@platform/infra/infra.platform"
|
||||
|
||||
createHoppApp("#app", {
|
||||
ui: {
|
||||
@@ -40,4 +41,5 @@ createHoppApp("#app", {
|
||||
exportAsGIST: false,
|
||||
hasTelemetry: false,
|
||||
},
|
||||
infra: InfraPlatform,
|
||||
})
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { runGQLQuery } from "@hoppscotch/common/helpers/backend/GQLClient"
|
||||
import { InfraPlatformDef } from "@hoppscotch/common/platform/infra"
|
||||
import { GetSmtpStatusDocument } from "../../api/generated/graphql"
|
||||
import * as E from "fp-ts/Either"
|
||||
|
||||
const getSMTPStatus = () => {
|
||||
return runGQLQuery({
|
||||
query: GetSmtpStatusDocument,
|
||||
variables: {},
|
||||
})
|
||||
}
|
||||
|
||||
export const InfraPlatform: InfraPlatformDef = {
|
||||
getIsSMTPEnabled: async () => {
|
||||
const res = await getSMTPStatus()
|
||||
|
||||
if (E.isRight(res)) {
|
||||
return E.right(res.right.isSMTPEnabled)
|
||||
}
|
||||
|
||||
return E.left("SMTP_STATUS_FETCH_FAILED")
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user