Compare commits

..

10 Commits

Author SHA1 Message Date
nivedin
a870725abf chore: enable cm scrollbar 2024-02-22 00:37:35 +05:30
nivedin
cd7429dd24 fix: add parent containers for codemirror instances 2024-02-22 00:37:35 +05:30
nivedin
e6cc235532 fix: add parent containers for codemirror instances 2024-02-22 00:37:35 +05:30
nivedin
6a65eb03e7 fix: add parent container for codemirror instance in gql schema 2024-02-22 00:37:35 +05:30
nivedin
c66ea66689 fix: increase paintfull performance 2024-02-22 00:37:35 +05:30
nivedin
8b0f337280 chore: remove unwanted style 2024-02-22 00:37:35 +05:30
nivedin
2e8a04fbd6 fix: add parent container for codemirror instance in realtime 2024-02-22 00:37:35 +05:30
nivedin
7e1ebd5b43 fix: add parent container for codemirror instance in gql 2024-02-22 00:37:35 +05:30
nivedin
1eb5e02100 fix: add parent container for codemirror instance 2024-02-22 00:37:35 +05:30
nivedin
6198a25bc6 fix: absolute gql response codemirror position 2024-02-22 00:37:35 +05:30
20 changed files with 129 additions and 145 deletions

View File

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

View File

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

View File

@@ -27,12 +27,6 @@
color: #3869D4; color: #3869D4;
} }
a.nohighlight {
color: inherit !important;
text-decoration: none !important;
cursor: default !important;
}
a img { a img {
border: none; border: none;
} }
@@ -464,7 +458,7 @@
<td class="content-cell"> <td class="content-cell">
<div class="f-fallback"> <div class="f-fallback">
<h1>Hi there,</h1> <h1>Hi there,</h1>
<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> <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>
<!-- Action --> <!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0"> <table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr> <tr>
@@ -490,7 +484,7 @@
Welcome aboard, <br /> Welcome aboard, <br />
Your friends at Hoppscotch Your friends at Hoppscotch
</p> </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> <p><strong>P.S.</strong> If you don't associate with {{invitee}} or {{invite_team_name}}, just ignore this email.</p>
<!-- Sub copy --> <!-- Sub copy -->
<table class="body-sub"> <table class="body-sub">
<tr> <tr>

View File

@@ -27,12 +27,6 @@
color: #3869D4; color: #3869D4;
} }
a.nohighlight {
color: inherit !important;
text-decoration: none !important;
cursor: default !important;
}
a img { a img {
border: none; border: none;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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