Compare commits
15 Commits
release/20
...
fix/safari
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a870725abf | ||
|
|
cd7429dd24 | ||
|
|
e6cc235532 | ||
|
|
6a65eb03e7 | ||
|
|
c66ea66689 | ||
|
|
8b0f337280 | ||
|
|
2e8a04fbd6 | ||
|
|
7e1ebd5b43 | ||
|
|
1eb5e02100 | ||
|
|
6198a25bc6 | ||
|
|
342532c9b1 | ||
|
|
4bd54b12cd | ||
|
|
ed6e9b6954 | ||
|
|
dfdd44b4ed | ||
|
|
fc34871dae |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hoppscotch-backend",
|
||||
"version": "2023.12.4",
|
||||
"version": "2023.12.5",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -429,6 +429,11 @@ pre.ace_editor {
|
||||
}
|
||||
}
|
||||
|
||||
.splitpanes__pane {
|
||||
@apply will-change-auto;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.smart-splitter .splitpanes__splitter {
|
||||
@apply relative;
|
||||
@apply before:absolute;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/common",
|
||||
"private": true,
|
||||
"version": "2023.12.4",
|
||||
"version": "2023.12.5",
|
||||
"scripts": {
|
||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||
"test": "vitest --run",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex h-full flex-1 flex-col">
|
||||
<div class="h-full">
|
||||
<HoppSmartTabs
|
||||
v-model="selectedOptionTab"
|
||||
styles="sticky top-0 bg-primary z-10 border-b-0"
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
</tippy>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="schemaEditor" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full">
|
||||
<div ref="schemaEditor"></div>
|
||||
</div>
|
||||
</div>
|
||||
<component
|
||||
:is="response[0].error.component"
|
||||
|
||||
@@ -145,11 +145,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="schemaString"
|
||||
ref="schemaEditor"
|
||||
class="flex flex-1 flex-col"
|
||||
></div>
|
||||
<div v-if="schemaString" class="h-full relative w-full">
|
||||
<div ref="schemaEditor" class="absolute inset-0"></div>
|
||||
</div>
|
||||
<HoppSmartPlaceholder
|
||||
v-else
|
||||
:src="`/images/states/${colorMode.value}/blockchain.svg`"
|
||||
|
||||
@@ -67,7 +67,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="variableEditor" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full relative">
|
||||
<div ref="variableEditor" class="flex flex-1 flex-col"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -49,7 +49,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="bulkMode" ref="bulkEditor" class="flex flex-1 flex-col"></div>
|
||||
<div v-if="bulkMode" class="h-full relative w-full">
|
||||
<div ref="bulkEditor" class="absolute inset-0"></div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<draggable
|
||||
v-model="workingHeaders"
|
||||
|
||||
@@ -112,7 +112,7 @@ const handleAccessTokenRequest = async () => {
|
||||
}
|
||||
|
||||
const envs = getCombinedEnvVariables()
|
||||
const envVars = [...envs.selected.variables, ...envs.global]
|
||||
const envVars = [...envs.selected, ...envs.global]
|
||||
|
||||
try {
|
||||
const tokenReqParams = {
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="bulkMode" ref="bulkEditor" class="flex flex-1 flex-col"></div>
|
||||
<div v-if="bulkMode" class="h-full relative">
|
||||
<div ref="bulkEditor" class="absolute inset-0"></div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<draggable
|
||||
v-model="workingParams"
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-1 border-b border-dividerLight">
|
||||
<div class="w-2/3 border-r border-dividerLight">
|
||||
<div ref="preRequestEditor" class="h-full"></div>
|
||||
<div class="w-2/3 border-r border-dividerLight h-full relative">
|
||||
<div ref="preRequestEditor" class="h-full absolute inset-0"></div>
|
||||
</div>
|
||||
<div
|
||||
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="rawBodyParameters" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full relative">
|
||||
<div ref="rawBodyParameters" class="absolute inset-0"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/>
|
||||
</template>
|
||||
<template #secondary>
|
||||
<HttpResponse v-model:document="tab.document" />
|
||||
<HttpResponse v-model:document="tab.document" :is-embed="false" />
|
||||
</template>
|
||||
</AppPaneLayout>
|
||||
</template>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-1 border-b border-dividerLight">
|
||||
<div class="w-2/3 border-r border-dividerLight">
|
||||
<div ref="testScriptEditor" class="h-full"></div>
|
||||
<div class="w-2/3 border-r border-dividerLight h-full relative">
|
||||
<div ref="testScriptEditor" class="h-full absolute inset-0"></div>
|
||||
</div>
|
||||
<div
|
||||
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="bulkMode" ref="bulkEditor" class="flex flex-1 flex-col"></div>
|
||||
<div v-if="bulkMode" class="h-full relative">
|
||||
<div ref="bulkEditor" class="absolute inset-0"></div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<draggable
|
||||
v-model="workingUrlEncodedParams"
|
||||
|
||||
@@ -44,11 +44,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-show="!previewEnabled"
|
||||
ref="htmlResponse"
|
||||
class="flex flex-1 flex-col"
|
||||
></div>
|
||||
<div v-show="!previewEnabled" class="h-full">
|
||||
<div ref="htmlResponse" class="flex flex-1 flex-col"></div>
|
||||
</div>
|
||||
<iframe
|
||||
v-show="previewEnabled"
|
||||
ref="previewFrame"
|
||||
|
||||
@@ -119,11 +119,12 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
ref="jsonResponse"
|
||||
class="flex h-auto h-full flex-1 flex-col"
|
||||
:class="toggleFilter ? 'responseToggleOn' : 'responseToggleOff'"
|
||||
></div>
|
||||
<div class="h-full">
|
||||
<div
|
||||
ref="jsonResponse"
|
||||
:class="toggleFilter ? 'responseToggleOn' : 'responseToggleOff'"
|
||||
></div>
|
||||
</div>
|
||||
<div
|
||||
v-if="outlinePath"
|
||||
class="sticky bottom-0 z-10 flex flex-shrink-0 flex-nowrap overflow-auto overflow-x-auto border-t border-dividerLight bg-primaryLight px-2"
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="rawResponse" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full">
|
||||
<div ref="rawResponse" class="flex flex-1 flex-col"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="xmlResponse" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full">
|
||||
<div ref="xmlResponse" class="flex flex-1 flex-col"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -130,7 +130,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="wsCommunicationBody" class="flex flex-1 flex-col"></div>
|
||||
<div class="h-full">
|
||||
<div ref="wsCommunicationBody" class="flex flex-1 flex-col"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:shortcut="['T']"
|
||||
@click="
|
||||
() => {
|
||||
openInNewTab()
|
||||
emit('open-shared-request', parseRequest)
|
||||
hide()
|
||||
}
|
||||
"
|
||||
@@ -128,6 +128,7 @@ const emit = defineEmits<{
|
||||
embedProperties?: string | null
|
||||
): void
|
||||
(e: "delete-shared-request", codeID: string): void
|
||||
(e: "open-shared-request", request: HoppRESTRequest): void
|
||||
}>()
|
||||
|
||||
const tippyActions = ref<TippyComponent | null>(null)
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
:request="request"
|
||||
@customize-shared-request="customizeSharedRequest"
|
||||
@delete-shared-request="deleteSharedRequest"
|
||||
@open-shared-request="openRequestInNewTab"
|
||||
/>
|
||||
<HoppSmartIntersection
|
||||
v-if="hasMoreSharedRequests"
|
||||
@@ -483,6 +484,13 @@ const getErrorMessage = (err: GQLError<string>) => {
|
||||
}
|
||||
}
|
||||
|
||||
const openRequestInNewTab = (request: HoppRESTRequest) => {
|
||||
restTab.createNewTab({
|
||||
isDirty: false,
|
||||
request,
|
||||
})
|
||||
}
|
||||
|
||||
defineActionHandler("share.request", ({ request }) => {
|
||||
requestToShare.value = request
|
||||
displayShareRequestModal(true)
|
||||
|
||||
@@ -171,9 +171,6 @@ export const baseTheme = EditorView.theme({
|
||||
".cm-activeLineGutter": {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
".cm-scroller::-webkit-scrollbar": {
|
||||
display: "none",
|
||||
},
|
||||
".cm-foldPlaceholder": {
|
||||
backgroundColor: "var(--divider-light-color)",
|
||||
color: "var(--secondary-dark-color)",
|
||||
@@ -320,9 +317,6 @@ export const inputTheme = EditorView.theme({
|
||||
".cm-activeLineGutter": {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
".cm-scroller::-webkit-scrollbar": {
|
||||
display: "none",
|
||||
},
|
||||
".cm-foldPlaceholder": {
|
||||
backgroundColor: "var(--divider-light-color)",
|
||||
color: "var(--secondary-dark-color)",
|
||||
|
||||
@@ -568,7 +568,18 @@ export function getLegacyGlobalEnvironment(): Environment | null {
|
||||
}
|
||||
|
||||
export function getGlobalVariables(): Environment["variables"] {
|
||||
return environmentsStore.value.globals
|
||||
return environmentsStore.value.globals.map(
|
||||
(env: Environment["variables"][number]) => {
|
||||
if (env.key && "value" in env && !("secret" in env)) {
|
||||
return {
|
||||
...(env as Environment["variables"][number]),
|
||||
secret: false,
|
||||
}
|
||||
}
|
||||
|
||||
return env
|
||||
}
|
||||
) as Environment["variables"]
|
||||
}
|
||||
|
||||
export function getGlobalVariableID() {
|
||||
|
||||
@@ -425,7 +425,10 @@ export class PersistenceService extends Service {
|
||||
|
||||
if (globalIndex !== -1) {
|
||||
const globalEnv = environmentsData[globalIndex]
|
||||
globalEnv.variables.forEach((variable) => addGlobalEnvVariable(variable))
|
||||
globalEnv.variables.forEach(
|
||||
(variable: Environment["variables"][number]) =>
|
||||
addGlobalEnvVariable(variable)
|
||||
)
|
||||
|
||||
// Remove global from environments
|
||||
environmentsData.splice(globalIndex, 1)
|
||||
@@ -628,7 +631,7 @@ export class PersistenceService extends Service {
|
||||
|
||||
private setupGlobalEnvsPersistence() {
|
||||
const globalEnvKey = "globalEnv"
|
||||
let globalEnvData: Environment["variables"] = JSON.parse(
|
||||
let globalEnvData: z.infer<typeof GLOBAL_ENV_SCHEMA> = JSON.parse(
|
||||
window.localStorage.getItem(globalEnvKey) || "[]"
|
||||
)
|
||||
|
||||
@@ -644,7 +647,7 @@ export class PersistenceService extends Service {
|
||||
)
|
||||
}
|
||||
|
||||
setGlobalEnvVariables(globalEnvData)
|
||||
setGlobalEnvVariables(globalEnvData as Environment["variables"])
|
||||
|
||||
globalEnv$.subscribe((vars) => {
|
||||
window.localStorage.setItem(globalEnvKey, JSON.stringify(vars))
|
||||
|
||||
@@ -229,24 +229,24 @@ export const MQTT_REQUEST_SCHEMA = z.nullable(
|
||||
.strict()
|
||||
)
|
||||
|
||||
export const GLOBAL_ENV_SCHEMA = z.union([
|
||||
z.array(z.never()),
|
||||
|
||||
z.array(
|
||||
z.union([
|
||||
z.object({
|
||||
key: z.string(),
|
||||
secret: z.literal(true),
|
||||
}),
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
secret: z.literal(false),
|
||||
}),
|
||||
])
|
||||
),
|
||||
const EnvironmentVariablesSchema = z.union([
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
secret: z.literal(false).catch(false),
|
||||
}),
|
||||
z.object({
|
||||
key: z.string(),
|
||||
secret: z.literal(true),
|
||||
}),
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
}),
|
||||
])
|
||||
|
||||
export const GLOBAL_ENV_SCHEMA = z.array(EnvironmentVariablesSchema)
|
||||
|
||||
const OperationTypeSchema = z.enum([
|
||||
"subscription",
|
||||
"query",
|
||||
@@ -364,22 +364,6 @@ const HoppTestDataSchema = z.lazy(() =>
|
||||
.strict()
|
||||
)
|
||||
|
||||
const EnvironmentVariablesSchema = z.union([
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
secret: z.literal(false),
|
||||
}),
|
||||
z.object({
|
||||
key: z.string(),
|
||||
secret: z.literal(true),
|
||||
}),
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
}),
|
||||
])
|
||||
|
||||
export const SECRET_ENVIRONMENT_VARIABLE_SCHEMA = z.union([
|
||||
z.object({}).strict(),
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export const V1_SCHEMA = z.object({
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.string(),
|
||||
secret: z.literal(false),
|
||||
secret: z.literal(false).catch(false),
|
||||
}),
|
||||
])
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/selfhost-desktop",
|
||||
"private": true,
|
||||
"version": "2023.12.4",
|
||||
"version": "2023.12.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev:vite": "vite",
|
||||
|
||||
@@ -1260,7 +1260,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hoppscotch-desktop"
|
||||
version = "23.12.4"
|
||||
version = "23.12.5"
|
||||
dependencies = [
|
||||
"cocoa 0.25.0",
|
||||
"hex_color",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "hoppscotch-desktop"
|
||||
version = "23.12.4"
|
||||
version = "23.12.5"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Hoppscotch",
|
||||
"version": "23.12.4"
|
||||
"version": "23.12.5"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/selfhost-web",
|
||||
"private": true,
|
||||
"version": "2023.12.4",
|
||||
"version": "2023.12.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev:vite": "vite",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hoppscotch-sh-admin",
|
||||
"private": true,
|
||||
"version": "2023.12.4",
|
||||
"version": "2023.12.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||
|
||||
Reference in New Issue
Block a user