Compare commits

..

2 Commits

Author SHA1 Message Date
Balu Babu
5226c74d0c feat: updated base node version of hoppscotch-old-backend to v20.12.2 2024-05-10 14:16:54 +05:30
Balu Babu
7dbdabb5b8 feat: updated node version to node20-apline3.19 in prod.dockerfile 2024-05-10 14:16:54 +05:30
7 changed files with 21 additions and 54 deletions

View File

@@ -43,19 +43,12 @@
@click="invokeAction('modals.support.toggle')" @click="invokeAction('modals.support.toggle')"
/> />
</div> </div>
<div <div class="flex">
class="flex"
:class="{
'flex-row-reverse gap-2':
workspaceSelectorFlagEnabled && !currentUser,
}"
>
<div <div
v-if="currentUser === null" v-if="currentUser === null"
class="inline-flex items-center space-x-2" class="inline-flex items-center space-x-2"
> >
<HoppButtonSecondary <HoppButtonSecondary
v-if="!workspaceSelectorFlagEnabled"
:icon="IconUploadCloud" :icon="IconUploadCloud"
:label="t('header.save_workspace')" :label="t('header.save_workspace')"
class="!focus-visible:text-emerald-600 !hover:text-emerald-600 hidden h-8 border border-emerald-600/25 bg-emerald-500/10 !text-emerald-500 hover:border-emerald-600/20 hover:bg-emerald-600/20 focus-visible:border-emerald-600/20 focus-visible:bg-emerald-600/20 md:flex" class="!focus-visible:text-emerald-600 !hover:text-emerald-600 hidden h-8 border border-emerald-600/25 bg-emerald-500/10 !text-emerald-500 hover:border-emerald-600/20 hover:bg-emerald-600/20 focus-visible:border-emerald-600/20 focus-visible:bg-emerald-600/20 md:flex"
@@ -67,22 +60,18 @@
@click="invokeAction('modals.login.toggle')" @click="invokeAction('modals.login.toggle')"
/> />
</div> </div>
<TeamsMemberStack <div v-else class="inline-flex items-center space-x-2">
v-else-if=" <TeamsMemberStack
currentUser !== null && v-if="
workspace.type === 'team' && workspace.type === 'team' &&
selectedTeam && selectedTeam &&
selectedTeam.teamMembers.length > 1 selectedTeam.teamMembers.length > 1
" "
:team-members="selectedTeam.teamMembers" :team-members="selectedTeam.teamMembers"
show-count show-count
class="mx-2" class="mx-2"
@handle-click="handleTeamEdit()" @handle-click="handleTeamEdit()"
/> />
<div
v-if="workspaceSelectorFlagEnabled || currentUser"
class="inline-flex items-center space-x-2"
>
<div <div
class="flex h-8 divide-x divide-emerald-600/25 rounded border border-emerald-600/25 bg-emerald-500/10 focus-within:divide-emerald-600/20 focus-within:border-emerald-600/20 focus-within:bg-emerald-600/20 hover:divide-emerald-600/20 hover:border-emerald-600/20 hover:bg-emerald-600/20" class="flex h-8 divide-x divide-emerald-600/25 rounded border border-emerald-600/25 bg-emerald-500/10 focus-within:divide-emerald-600/20 focus-within:border-emerald-600/20 focus-within:bg-emerald-600/20 hover:divide-emerald-600/20 hover:border-emerald-600/20 hover:bg-emerald-600/20"
> >
@@ -95,7 +84,6 @@
/> />
<HoppButtonSecondary <HoppButtonSecondary
v-if=" v-if="
currentUser &&
workspace.type === 'team' && workspace.type === 'team' &&
selectedTeam && selectedTeam &&
selectedTeam?.myRole === 'OWNER' selectedTeam?.myRole === 'OWNER'
@@ -136,7 +124,7 @@
</div> </div>
</template> </template>
</tippy> </tippy>
<span v-if="currentUser" class="px-2"> <span class="px-2">
<tippy <tippy
interactive interactive
trigger="click" trigger="click"
@@ -271,13 +259,6 @@ import {
const t = useI18n() const t = useI18n()
const toast = useToast() const toast = useToast()
/**
* Feature flag to enable the workspace selector login conversion
*/
const workspaceSelectorFlagEnabled = computed(
() => !!platform.platformFeatureFlags.workspaceSwitcherLogin?.value
)
/** /**
* Once the PWA code is initialized, this holds a method * Once the PWA code is initialized, this holds a method
* that can be called to show the user the installation * that can be called to show the user the installation
@@ -399,8 +380,6 @@ const inviteTeam = (team: { name: string }, teamID: string) => {
// Show the workspace selected team invite modal if the user is an owner of the team else show the default invite modal // Show the workspace selected team invite modal if the user is an owner of the team else show the default invite modal
const handleInvite = () => { const handleInvite = () => {
if (!currentUser.value) return invokeAction("modals.login.toggle")
if ( if (
workspace.value.type === "team" && workspace.value.type === "team" &&
workspace.value.teamID && workspace.value.teamID &&

View File

@@ -89,7 +89,6 @@ import { readFileAsText } from "~/helpers/functional/files"
import xmlFormat from "xml-formatter" import xmlFormat from "xml-formatter"
import { useNestedSetting } from "~/composables/settings" import { useNestedSetting } from "~/composables/settings"
import { toggleNestedSetting } from "~/newstore/settings" import { toggleNestedSetting } from "~/newstore/settings"
import * as LJSON from "lossless-json"
type PossibleContentTypes = Exclude< type PossibleContentTypes = Exclude<
ValidContentTypes, ValidContentTypes,
@@ -188,8 +187,8 @@ const prettifyRequestBody = () => {
let prettifyBody = "" let prettifyBody = ""
try { try {
if (body.value.contentType.endsWith("json")) { if (body.value.contentType.endsWith("json")) {
const jsonObj = LJSON.parse(rawParamsBody.value as string) const jsonObj = JSON.parse(rawParamsBody.value as string)
prettifyBody = LJSON.stringify(jsonObj, undefined, 2) as string prettifyBody = JSON.stringify(jsonObj, null, 2)
} else if (body.value.contentType === "application/xml") { } else if (body.value.contentType === "application/xml") {
prettifyBody = prettifyXML(rawParamsBody.value as string) prettifyBody = prettifyXML(rawParamsBody.value as string)
} }

View File

@@ -59,7 +59,7 @@
/> />
</div> </div>
<div <div
v-else-if="teamListAdapterError" v-if="!loading && teamListAdapterError"
class="flex flex-col items-center py-4" class="flex flex-col items-center py-4"
> >
<icon-lucide-help-circle class="svg-icons mb-4" /> <icon-lucide-help-circle class="svg-icons mb-4" />
@@ -85,7 +85,7 @@ import { useColorMode } from "@composables/theming"
import { GetMyTeamsQuery } from "~/helpers/backend/graphql" import { GetMyTeamsQuery } from "~/helpers/backend/graphql"
import IconDone from "~icons/lucide/check" import IconDone from "~icons/lucide/check"
import { useLocalState } from "~/newstore/localstate" import { useLocalState } from "~/newstore/localstate"
import { defineActionHandler, invokeAction } from "~/helpers/actions" import { defineActionHandler } from "~/helpers/actions"
import { WorkspaceService } from "~/services/workspace.service" import { WorkspaceService } from "~/services/workspace.service"
import { useService } from "dioc/vue" import { useService } from "dioc/vue"
import { useElementVisibility, useIntervalFn } from "@vueuse/core" import { useElementVisibility, useIntervalFn } from "@vueuse/core"
@@ -157,8 +157,8 @@ const switchToTeamWorkspace = (team: GetMyTeamsQuery["myTeams"][number]) => {
workspaceService.changeWorkspace({ workspaceService.changeWorkspace({
teamID: team.id, teamID: team.id,
teamName: team.name, teamName: team.name,
type: "team",
role: team.myRole, role: team.myRole,
type: "team",
}) })
} }
@@ -174,16 +174,12 @@ watch(
(user) => { (user) => {
if (!user) { if (!user) {
switchToPersonalWorkspace() switchToPersonalWorkspace()
teamListadapter.dispose()
} }
} }
) )
const displayModalAdd = (shouldDisplay: boolean) => { const displayModalAdd = (shouldDisplay: boolean) => {
if (!currentUser.value) return invokeAction("modals.login.toggle")
showModalAdd.value = shouldDisplay showModalAdd.value = shouldDisplay
teamListadapter.fetchList()
} }
defineActionHandler("modals.team.new", () => { defineActionHandler("modals.team.new", () => {

View File

@@ -50,7 +50,6 @@ export default class TeamListAdapter {
} }
public dispose() { public dispose() {
this.teamList$.next([])
this.isDispose = true this.isDispose = true
clearTimeout(this.timeoutHandle as any) clearTimeout(this.timeoutHandle as any)
this.timeoutHandle = null this.timeoutHandle = null

View File

@@ -11,7 +11,6 @@ import { InspectorsPlatformDef } from "./inspectors"
import { ServiceClassInstance } from "dioc" import { ServiceClassInstance } from "dioc"
import { IOPlatformDef } from "./io" import { IOPlatformDef } from "./io"
import { SpotlightPlatformDef } from "./spotlight" import { SpotlightPlatformDef } from "./spotlight"
import { Ref } from "vue"
export type PlatformDef = { export type PlatformDef = {
ui?: UIPlatformDef ui?: UIPlatformDef
@@ -46,11 +45,6 @@ export type PlatformDef = {
* If a value is not given, then the value is assumed to be true * If a value is not given, then the value is assumed to be true
*/ */
promptAsUsingCookies?: boolean promptAsUsingCookies?: boolean
/**
* Whether to show the A/B testing workspace switcher click login flow or not
*/
workspaceSwitcherLogin?: Ref<boolean>
} }
} }

View File

@@ -1260,7 +1260,7 @@ dependencies = [
[[package]] [[package]]
name = "hoppscotch-desktop" name = "hoppscotch-desktop"
version = "24.3.3" version = "24.3.2"
dependencies = [ dependencies = [
"cocoa 0.25.0", "cocoa 0.25.0",
"hex_color", "hex_color",

View File

@@ -26,7 +26,7 @@ createHoppApp("#app", {
history: historyDef, history: historyDef,
}, },
interceptors: { interceptors: {
default: "browser", default: "proxy",
interceptors: [ interceptors: [
{ type: "standalone", interceptor: browserInterceptor }, { type: "standalone", interceptor: browserInterceptor },
{ type: "standalone", interceptor: proxyInterceptor }, { type: "standalone", interceptor: proxyInterceptor },