feat: fix codemirror width

This commit is contained in:
liyasthomas
2022-02-09 15:36:00 +05:30
parent 846ae087ae
commit 0895d65188
11 changed files with 13 additions and 117 deletions

View File

@@ -61,13 +61,6 @@
/>
<SmartEnvInput
v-model="variable.value"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
:placeholder="`${$t('count.value', { count: index + 1 })}`"
:name="'value' + index"
/>

View File

@@ -166,15 +166,6 @@
:spellcheck="false"
:value="header.key"
autofocus
styles="
bg-transparent
flex
flex-1
py-1
px-4
truncate
"
class="flex-1 !flex"
@input="
updateHeader(index, {
key: $event,

View File

@@ -158,50 +158,32 @@
<SmartEnvInput
v-model="basicUsername"
:placeholder="$t('authorization.username')"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="basicPassword"
:placeholder="$t('authorization.password')"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
</div>
<div v-if="authType === 'bearer'">
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="bearerToken"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartEnvInput v-model="bearerToken" placeholder="Token" />
</div>
</div>
<div v-if="authType === 'oauth-2'">
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="oauth2Token"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartEnvInput v-model="oauth2Token" placeholder="Token" />
</div>
<HttpOAuth2Authorization />
</div>
<div v-if="authType === 'api-key'">
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="apiKey"
placeholder="Key"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartEnvInput v-model="apiKey" placeholder="Key" />
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="apiValue"
placeholder="Value"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartEnvInput v-model="apiValue" placeholder="Value" />
</div>
<div class="flex items-center border-b border-dividerLight">
<label class="ml-4 text-secondaryLight">

View File

@@ -36,13 +36,6 @@
<SmartEnvInput
v-model="param.key"
:placeholder="`${$t('count.parameter', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateBodyParam(index, {
key: $event,
@@ -66,13 +59,6 @@
<SmartEnvInput
v-model="param.value"
:placeholder="`${$t('count.value', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateBodyParam(index, {
key: param.key,

View File

@@ -49,15 +49,6 @@
:spellcheck="false"
:value="header.key"
autofocus
styles="
bg-transparent
flex
flex-1
py-1
px-4
truncate
"
class="flex-1 !flex"
@input="
updateHeader(index, {
key: $event,
@@ -69,13 +60,6 @@
<SmartEnvInput
v-model="header.value"
:placeholder="`${t('count.value', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateHeader(index, {
key: header.key,

View File

@@ -46,13 +46,6 @@
<SmartEnvInput
v-model="param.key"
:placeholder="`${t('count.parameter', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateParam(index, {
key: $event,
@@ -64,13 +57,6 @@
<SmartEnvInput
v-model="param.value"
:placeholder="`${t('count.value', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateParam(index, {
key: param.key,

View File

@@ -37,20 +37,6 @@
<SmartEnvInput
v-model="newEndpoint"
:placeholder="`${t('request.url')}`"
styles="
bg-primaryLight
border border-divider
flex
flex-1
rounded-r
text-secondaryDark
min-w-32
py-1
px-4
hover:border-dividerDark
focus-visible:border-dividerDark
focus-visible:bg-transparent
"
@enter="newSendRequest()"
@paste="onPasteUrl($event)"
/>

View File

@@ -46,13 +46,6 @@
<SmartEnvInput
v-model="param.key"
:placeholder="`${t('count.parameter', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateUrlEncodedParam(index, {
key: $event,
@@ -64,13 +57,6 @@
<SmartEnvInput
v-model="param.value"
:placeholder="`${t('count.value', { count: index + 1 })}`"
styles="
bg-transparent
flex
flex-1
py-1
px-4
"
@change="
updateUrlEncodedParam(index, {
key: param.key,

View File

@@ -18,7 +18,7 @@
class="hide-scrollbar !overflow-auto flex flex-col"
>
<div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
class="sticky top-0 z-10 flex flex-shrink-0 p-4 space-x-2 overflow-x-auto bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2">
<div class="flex flex-1">
@@ -193,11 +193,7 @@
>
<div class="w-2/3 border-r border-dividerLight">
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="bearerToken"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartEnvInput v-model="bearerToken" placeholder="Token" />
</div>
</div>
<div

View File

@@ -150,8 +150,10 @@ watch(editor, () => {
<style lang="scss" scoped>
.env-input-container {
@apply relative;
@apply inline-grid;
@apply inline-flex;
@apply flex-1;
@apply bg-red-100;
@apply border border-red-400;
}
[contenteditable] {
@@ -180,6 +182,9 @@ watch(editor, () => {
@apply overflow-y-hidden;
@apply resize-none;
@apply focus:outline-none;
@apply bg-green-100;
@apply border border-green-400;
@apply w-full;
}
.env-input::-webkit-scrollbar {

View File

@@ -33,6 +33,7 @@ export const baseTheme = EditorView.theme({
fontSize: "var(--font-size-body)",
height: "100%",
width: "100%",
flex: "1",
},
".cm-content": {
caretColor: "var(--secondary-light-color)",