Compare commits

...

6 Commits

Author SHA1 Message Date
Andrew Bastin
faab1d20fd chore: bump version to 2023.12.6 2024-02-26 22:31:58 +05:30
Anwarul Islam
bd406616ec fix: collection level authorization inheritance issue (#3852) 2024-02-23 19:39:55 +05:30
Andrew Bastin
6827e97ec5 refactor: possible links in email templates do not highlight (#3851) 2024-02-23 01:05:20 +05:30
amk-dev
10d2048975 fix: use x-www-form-urlencoded for token exchange requests 2024-02-22 00:43:50 +05:30
Nivedin
291f18591e fix: perfomance in safari (#3848) 2024-02-22 00:41:30 +05:30
James George
342532c9b1 fix(common): prevent exceptions with open shared requests in new tab action (#3835) 2024-02-22 00:36:45 +05:30
40 changed files with 205 additions and 166 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "hoppscotch-backend",
"version": "2023.12.5",
"version": "2023.12.6",
"description": "",
"author": "",
"private": true,

View File

@@ -25,7 +25,7 @@ export class MailerService {
): string {
switch (mailDesc.template) {
case 'team-invitation':
return `${mailDesc.variables.invitee} invited you to join ${mailDesc.variables.invite_team_name} in Hoppscotch`;
return `A user has invited you to join a team workspace in Hoppscotch`;
case 'user-invitation':
return 'Sign in to Hoppscotch';

View File

@@ -27,6 +27,12 @@
color: #3869D4;
}
a.nohighlight {
color: inherit !important;
text-decoration: none !important;
cursor: default !important;
}
a img {
border: none;
}
@@ -458,7 +464,7 @@
<td class="content-cell">
<div class="f-fallback">
<h1>Hi there,</h1>
<p>{{invitee}} with {{invite_team_name}} has invited you to use Hoppscotch to collaborate with them. Click the button below to set up your account and get started:</p>
<p><a class="nohighlight" name="invitee" href="#">{{invitee}}</a> with <a class="nohighlight" name="invite_team_name" href="#">{{invite_team_name}}</a> has invited you to use Hoppscotch to collaborate with them. Click the button below to set up your account and get started:</p>
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
@@ -484,7 +490,7 @@
Welcome aboard, <br />
Your friends at Hoppscotch
</p>
<p><strong>P.S.</strong> If you don't associate with {{invitee}} or {{invite_team_name}}, just ignore this email.</p>
<p><strong>P.S.</strong> If you don't associate with <a class="nohighlight" name="invitee" href="#">{{invitee}}</a> or <a class="nohighlight" name="invite_team_name" href="#">{{invite_team_name}}</a>, just ignore this email.</p>
<!-- Sub copy -->
<table class="body-sub">
<tr>

View File

@@ -14,7 +14,7 @@
-->
<style type="text/css" rel="stylesheet" media="all">
/* Base ------------------------------ */
@import url("https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap");
body {
width: 100% !important;
@@ -22,19 +22,25 @@
margin: 0;
-webkit-text-size-adjust: none;
}
a {
color: #3869D4;
}
a.nohighlight {
color: inherit !important;
text-decoration: none !important;
cursor: default !important;
}
a img {
border: none;
}
td {
word-break: break-word;
}
.preheader {
display: none !important;
visibility: hidden;
@@ -47,13 +53,13 @@
overflow: hidden;
}
/* Type ------------------------------ */
body,
td,
th {
font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
}
h1 {
margin-top: 0;
color: #333333;
@@ -61,7 +67,7 @@
font-weight: bold;
text-align: left;
}
h2 {
margin-top: 0;
color: #333333;
@@ -69,7 +75,7 @@
font-weight: bold;
text-align: left;
}
h3 {
margin-top: 0;
color: #333333;
@@ -77,12 +83,12 @@
font-weight: bold;
text-align: left;
}
td,
th {
font-size: 16px;
}
p,
ul,
ol,
@@ -91,25 +97,25 @@
font-size: 16px;
line-height: 1.625;
}
p.sub {
font-size: 13px;
}
/* Utilities ------------------------------ */
.align-right {
text-align: right;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
/* Buttons ------------------------------ */
.button {
background-color: #3869D4;
border-top: 10px solid #3869D4;
@@ -124,7 +130,7 @@
-webkit-text-size-adjust: none;
box-sizing: border-box;
}
.button--green {
background-color: #22BC66;
border-top: 10px solid #22BC66;
@@ -132,7 +138,7 @@
border-bottom: 10px solid #22BC66;
border-left: 18px solid #22BC66;
}
.button--red {
background-color: #FF6136;
border-top: 10px solid #FF6136;
@@ -140,7 +146,7 @@
border-bottom: 10px solid #FF6136;
border-left: 18px solid #FF6136;
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
@@ -148,21 +154,21 @@
}
}
/* Attribute list ------------------------------ */
.attributes {
margin: 0 0 21px;
}
.attributes_content {
background-color: #F4F4F7;
padding: 16px;
}
.attributes_item {
padding: 0;
}
/* Related Items ------------------------------ */
.related {
width: 100%;
margin: 0;
@@ -171,31 +177,31 @@
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.related_item {
padding: 10px 0;
color: #CBCCCF;
font-size: 15px;
line-height: 18px;
}
.related_item-title {
display: block;
margin: .5em 0 0;
}
.related_item-thumb {
display: block;
padding-bottom: 10px;
}
.related_heading {
border-top: 1px solid #CBCCCF;
text-align: center;
padding: 25px 0 10px;
}
/* Discount Code ------------------------------ */
.discount {
width: 100%;
margin: 0;
@@ -206,33 +212,33 @@
background-color: #F4F4F7;
border: 2px dashed #CBCCCF;
}
.discount_heading {
text-align: center;
}
.discount_body {
text-align: center;
font-size: 15px;
}
/* Social Icons ------------------------------ */
.social {
width: auto;
}
.social td {
padding: 0;
width: auto;
}
.social_icon {
height: 20px;
margin: 0 8px 10px 8px;
padding: 0;
}
/* Data table ------------------------------ */
.purchase {
width: 100%;
margin: 0;
@@ -241,7 +247,7 @@
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_content {
width: 100%;
margin: 0;
@@ -250,50 +256,50 @@
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_item {
padding: 10px 0;
color: #51545E;
font-size: 15px;
line-height: 18px;
}
.purchase_heading {
padding-bottom: 8px;
border-bottom: 1px solid #EAEAEC;
}
.purchase_heading p {
margin: 0;
color: #85878E;
font-size: 12px;
}
.purchase_footer {
padding-top: 15px;
border-top: 1px solid #EAEAEC;
}
.purchase_total {
margin: 0;
text-align: right;
font-weight: bold;
color: #333333;
}
.purchase_total--label {
padding: 0 15px 0 0;
}
body {
background-color: #F2F4F6;
color: #51545E;
}
p {
color: #51545E;
}
.email-wrapper {
width: 100%;
margin: 0;
@@ -303,7 +309,7 @@
-premailer-cellspacing: 0;
background-color: #F2F4F6;
}
.email-content {
width: 100%;
margin: 0;
@@ -313,16 +319,16 @@
-premailer-cellspacing: 0;
}
/* Masthead ----------------------- */
.email-masthead {
padding: 25px 0;
text-align: center;
}
.email-masthead_logo {
width: 94px;
}
.email-masthead_name {
font-size: 16px;
font-weight: bold;
@@ -331,7 +337,7 @@
text-shadow: 0 1px 0 white;
}
/* Body ------------------------------ */
.email-body {
width: 100%;
margin: 0;
@@ -340,7 +346,7 @@
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.email-body_inner {
width: 570px;
margin: 0 auto;
@@ -350,7 +356,7 @@
-premailer-cellspacing: 0;
background-color: #FFFFFF;
}
.email-footer {
width: 570px;
margin: 0 auto;
@@ -360,11 +366,11 @@
-premailer-cellspacing: 0;
text-align: center;
}
.email-footer p {
color: #A8AAAF;
}
.body-action {
width: 100%;
margin: 30px auto;
@@ -374,25 +380,25 @@
-premailer-cellspacing: 0;
text-align: center;
}
.body-sub {
margin-top: 25px;
padding-top: 25px;
border-top: 1px solid #EAEAEC;
}
.content-cell {
padding: 45px;
}
/*Media Queries ------------------------------ */
@media only screen and (max-width: 600px) {
.email-body_inner,
.email-footer {
width: 100% !important;
}
}
@media (prefers-color-scheme: dark) {
body,
.email-body,

View File

@@ -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;

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/common",
"private": true,
"version": "2023.12.5",
"version": "2023.12.6",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",
"test": "vitest --run",

View File

@@ -614,8 +614,8 @@ const addNewRootCollection = (name: string) => {
requests: [],
headers: [],
auth: {
authType: "inherit",
authActive: false,
authType: "none",
authActive: true,
},
})
)

View File

@@ -31,17 +31,6 @@
tabindex="0"
@keyup.escape="hide()"
>
<HoppSmartItem
label="None"
:icon="authName === 'None' ? IconCircleDot : IconCircle"
:active="authName === 'None'"
@click="
() => {
auth.authType = 'none'
hide()
}
"
/>
<HoppSmartItem
v-if="!isRootCollection"
label="Inherit"
@@ -54,6 +43,17 @@
}
"
/>
<HoppSmartItem
label="None"
:icon="authName === 'None' ? IconCircleDot : IconCircle"
:active="authName === 'None'"
@click="
() => {
auth.authType = 'none'
hide()
}
"
/>
<HoppSmartItem
label="Basic Auth"
:icon="authName === 'Basic Auth' ? IconCircleDot : IconCircle"
@@ -284,7 +284,7 @@ const authActive = pluckRef(auth, "authActive")
const clearContent = () => {
auth.value = {
authType: "none",
authType: "inherit",
authActive: true,
}
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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`"

View File

@@ -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">

View File

@@ -31,17 +31,6 @@
tabindex="0"
@keyup.escape="hide()"
>
<HoppSmartItem
label="None"
:icon="authName === 'None' ? IconCircleDot : IconCircle"
:active="authName === 'None'"
@click="
() => {
auth.authType = 'none'
hide()
}
"
/>
<HoppSmartItem
v-if="!isRootCollection"
label="Inherit"
@@ -54,6 +43,17 @@
}
"
/>
<HoppSmartItem
label="None"
:icon="authName === 'None' ? IconCircleDot : IconCircle"
:active="authName === 'None'"
@click="
() => {
auth.authType = 'none'
hide()
}
"
/>
<HoppSmartItem
label="Basic Auth"
:icon="authName === 'Basic Auth' ? IconCircleDot : IconCircle"
@@ -265,7 +265,7 @@ const authActive = pluckRef(auth, "authActive")
const clearContent = () => {
auth.value = {
authType: "none",
authType: "inherit",
authActive: true,
}
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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>

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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>

View File

@@ -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">

View File

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

View File

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

View File

@@ -18,7 +18,7 @@ const samples = [
method: "GET",
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: "application/x-www-form-urlencoded",
body: rawKeyValueEntriesToString([
@@ -149,7 +149,7 @@ const samples = [
method: "GET",
name: "Untitled",
endpoint: "https://google.com/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: null,
body: null,
@@ -166,7 +166,7 @@ const samples = [
method: "POST",
name: "Untitled",
endpoint: "http://localhost:1111/hello/world/?buzz",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: "application/json",
body: `{\n "foo": "bar"\n}`,
@@ -189,7 +189,7 @@ const samples = [
method: "GET",
name: "Untitled",
endpoint: "https://example.com/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: null,
body: null,
@@ -217,7 +217,7 @@ const samples = [
method: "POST",
name: "Untitled",
endpoint: "https://bing.com/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: "multipart/form-data",
body: [
@@ -301,7 +301,7 @@ const samples = [
name: "Untitled",
endpoint: "http://localhost:9900/",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
body: {
@@ -345,7 +345,7 @@ const samples = [
endpoint: "https://hoppscotch.io/?io",
auth: {
authActive: true,
authType: "none",
authType: "inherit",
},
body: {
contentType: null,
@@ -380,7 +380,7 @@ const samples = [
endpoint: "https://someshadywebsite.com/questionable/path/?so",
auth: {
authActive: true,
authType: "none",
authType: "inherit",
},
body: {
contentType: "multipart/form-data",
@@ -441,7 +441,7 @@ const samples = [
endpoint: "http://localhost/",
auth: {
authActive: true,
authType: "none",
authType: "inherit",
},
body: {
contentType: "multipart/form-data",
@@ -473,7 +473,7 @@ const samples = [
method: "GET",
name: "Untitled",
endpoint: "https://hoppscotch.io/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: null,
body: null,
@@ -528,7 +528,7 @@ const samples = [
method: "GET",
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
body: {
contentType: "application/x-www-form-urlencoded",
body: rawKeyValueEntriesToString([
@@ -573,7 +573,7 @@ const samples = [
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
method: "POST",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [
{
active: true,
@@ -615,7 +615,7 @@ const samples = [
name: "Untitled",
endpoint: "https://muxueqz.top/skybook.html",
method: "GET",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [],
body: { contentType: null, body: null },
params: [],
@@ -629,7 +629,7 @@ const samples = [
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
method: "POST",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [],
body: {
contentType: "multipart/form-data",
@@ -653,7 +653,7 @@ const samples = [
name: "Untitled",
endpoint: "http://127.0.0.1/",
method: "CUSTOMMETHOD",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [],
body: {
contentType: null,
@@ -670,7 +670,7 @@ const samples = [
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
method: "GET",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [
{
active: true,
@@ -693,7 +693,7 @@ const samples = [
name: "Untitled",
endpoint: "https://echo.hoppscotch.io/",
method: "GET",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [],
body: {
contentType: null,
@@ -710,7 +710,7 @@ const samples = [
name: "Untitled",
endpoint: "https://example.org/",
method: "HEAD",
auth: { authType: "none", authActive: true },
auth: { authType: "inherit", authActive: true },
headers: [],
body: {
contentType: null,
@@ -756,7 +756,7 @@ const samples = [
name: "Untitled",
endpoint: "https://google.com/",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
body: {
@@ -777,7 +777,7 @@ const samples = [
name: "Untitled",
endpoint: "https://google.com/",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
body: {
@@ -797,7 +797,7 @@ const samples = [
name: "Untitled",
endpoint: "http://192.168.0.24:8080/ping",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
body: {
@@ -817,7 +817,7 @@ const samples = [
name: "Untitled",
endpoint: "https://example.com/",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
body: {

View File

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

View File

@@ -27,7 +27,7 @@ export const getDefaultGQLRequest = (): HoppGQLRequest => ({
}`,
query: DEFAULT_QUERY,
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
})

View File

@@ -250,19 +250,23 @@ const handleOAuthRedirect = async () => {
return E.left("NO_CODE_VERIFIER" as const)
}
const data = new URLSearchParams({
grant_type: "authorization_code",
code: queryParams.code,
client_id: clientID,
client_secret: clientSecret,
redirect_uri: redirectUri,
code_verifier: codeVerifier,
})
// Exchange the authorization code for an access token
const tokenResponse = await runRequestThroughInterceptor({
url: tokenEndpoint,
data: JSON.stringify({
grant_type: "authorization_code",
code: queryParams.code,
client_id: clientID,
client_secret: clientSecret,
redirect_uri: redirectUri,
code_verifier: codeVerifier,
}),
data: data.toString(),
method: "POST",
headers: {},
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
})
// Clean these up since we don't need them anymore

View File

@@ -8,7 +8,7 @@ export const getDefaultRESTRequest = (): HoppRESTRequest => ({
headers: [],
method: "GET",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
preRequestScript: "",

View File

@@ -57,7 +57,7 @@ export function getDefaultGQLRequest(): HoppGQLRequest {
}`.trim(),
query: DEFAULT_QUERY,
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
}

View File

@@ -167,7 +167,7 @@ export function getDefaultRESTRequest(): HoppRESTRequest {
headers: [],
method: "GET",
auth: {
authType: "none",
authType: "inherit",
authActive: true,
},
preRequestScript: "",

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-desktop",
"private": true,
"version": "2023.12.5",
"version": "2023.12.6",
"type": "module",
"scripts": {
"dev:vite": "vite",

View File

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

View File

@@ -1,6 +1,6 @@
[package]
name = "hoppscotch-desktop"
version = "23.12.5"
version = "23.12.6"
description = "A Tauri App"
authors = ["you"]
license = ""

View File

@@ -8,7 +8,7 @@
},
"package": {
"productName": "Hoppscotch",
"version": "23.12.5"
"version": "23.12.6"
},
"tauri": {
"allowlist": {

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-web",
"private": true,
"version": "2023.12.5",
"version": "2023.12.6",
"type": "module",
"scripts": {
"dev:vite": "vite",

View File

@@ -1,7 +1,7 @@
{
"name": "hoppscotch-sh-admin",
"private": true,
"version": "2023.12.5",
"version": "2023.12.6",
"type": "module",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",