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:
Akash K
2024-06-28 21:18:10 +05:30
committed by GitHub
parent 0c06f26893
commit 2917d50c6a
7 changed files with 119 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
query GetSMTPStatus {
isSMTPEnabled
}

View File

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

View File

@@ -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")
},
}