rename all components to new namespace (#1515)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Liyas Thomas
2021-03-01 09:28:14 +05:30
committed by GitHub
parent 37bdd525ea
commit dc5ca76d05
86 changed files with 2761 additions and 3077 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("extensions") }}</h3> <h3 class="title">{{ $t("extensions") }}</h3>
@@ -54,7 +54,7 @@
</div> </div>
</div> </div>
<div slot="footer"></div> <div slot="footer"></div>
</modal> </SmartModal>
</template> </template>
<script> <script>
@@ -69,9 +69,9 @@ export default {
}, },
watch: { watch: {
show() { show() {
this.hasChromeExtInstalled = hasChromeExtensionInstalled(); this.hasChromeExtInstalled = hasChromeExtensionInstalled()
this.hasFirefoxExtInstalled = hasFirefoxExtensionInstalled(); this.hasFirefoxExtInstalled = hasFirefoxExtensionInstalled()
} },
}, },
data() { data() {
return { return {

View File

@@ -54,7 +54,7 @@
<i class="material-icons">login</i> <i class="material-icons">login</i>
</button> </button>
<template slot="popover"> <template slot="popover">
<login /> <FirebaseLogin />
</template> </template>
</v-popover> </v-popover>
<v-popover v-else> <v-popover v-else>
@@ -87,7 +87,7 @@
</nuxt-link> </nuxt-link>
</div> </div>
<div> <div>
<logout /> <FirebaseLogout />
</div> </div>
</template> </template>
</v-popover> </v-popover>
@@ -134,9 +134,9 @@
</v-popover> </v-popover>
</span> </span>
</div> </div>
<extensions :show="showExtensions" @hide-modal="showExtensions = false" /> <AppExtensions :show="showExtensions" @hide-modal="showExtensions = false" />
<shortcuts :show="showShortcuts" @hide-modal="showShortcuts = false" /> <AppShortcuts :show="showShortcuts" @hide-modal="showShortcuts = false" />
<support :show="showSupport" @hide-modal="showSupport = false" /> <AppSupport :show="showSupport" @hide-modal="showSupport = false" />
</header> </header>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("shortcuts") }}</h3> <h3 class="title">{{ $t("shortcuts") }}</h3>
@@ -70,7 +70,7 @@
</div> </div>
</div> </div>
<div slot="footer"></div> <div slot="footer"></div>
</modal> </SmartModal>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -11,7 +11,7 @@
v-tooltip.right="$t('home')" v-tooltip.right="$t('home')"
:aria-label="$t('home')" :aria-label="$t('home')"
> >
<logo alt class="material-icons" style="height: 24px"></logo> <AppLogo alt class="material-icons" style="height: 24px" />
</nuxt-link> </nuxt-link>
<nuxt-link <nuxt-link
:to="localePath('realtime')" :to="localePath('realtime')"

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("support_us") }}</h3> <h3 class="title">{{ $t("support_us") }}</h3>
@@ -11,10 +11,10 @@
</div> </div>
</div> </div>
<div slot="body" class="flex flex-col"> <div slot="body" class="flex flex-col">
<contributors /> <AppContributors />
</div> </div>
<div slot="footer"></div> <div slot="footer"></div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("new_collection") }}</h3> <h3 class="title">{{ $t("new_collection") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="show = false"> <SmartModal v-if="show" @close="show = false">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("new_folder") }}</h3> <h3 class="title">{{ $t("new_folder") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -62,7 +62,7 @@
:key="folder.name" :key="folder.name"
class="ml-8 border-l border-brdColor" class="ml-8 border-l border-brdColor"
> >
<folder <CollectionsFolder
:folder="folder" :folder="folder"
:folder-index="index" :folder-index="index"
:folder-path="`${collectionIndex}/${index}`" :folder-path="`${collectionIndex}/${index}`"
@@ -81,7 +81,7 @@
:key="index" :key="index"
class="ml-8 border-l border-brdColor" class="ml-8 border-l border-brdColor"
> >
<request <CollectionsRequest
:request="request" :request="request"
:collection-index="collectionIndex" :collection-index="collectionIndex"
:folder-index="-1" :folder-index="-1"
@@ -103,7 +103,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<confirm-modal <SmartConfirmModal
:show="confirmRemove" :show="confirmRemove"
:title="$t('are_you_sure_remove_collection')" :title="$t('are_you_sure_remove_collection')"
@hide-modal="confirmRemove = false" @hide-modal="confirmRemove = false"

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("edit_collection") }}</h3> <h3 class="title">{{ $t("edit_collection") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="show = false"> <SmartModal v-if="show" @close="show = false">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("edit_folder") }}</h3> <h3 class="title">{{ $t("edit_folder") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("edit_request") }}</h3> <h3 class="title">{{ $t("edit_request") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -58,7 +58,7 @@
:key="index" :key="index"
class="flex ml-8 border-l border-brdColor" class="flex ml-8 border-l border-brdColor"
> >
<request <CollectionsRequest
:request="request" :request="request"
:collection-index="collectionIndex" :collection-index="collectionIndex"
:folder-index="folderIndex" :folder-index="folderIndex"
@@ -75,7 +75,7 @@
:key="subFolder.name" :key="subFolder.name"
class="ml-8 border-l border-brdColor" class="ml-8 border-l border-brdColor"
> >
<folder <CollectionsFolder
:folder="subFolder" :folder="subFolder"
:folder-index="subFolderIndex" :folder-index="subFolderIndex"
:collection-index="collectionIndex" :collection-index="collectionIndex"
@@ -100,7 +100,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<confirm-modal <SmartConfirmModal
:show="confirmRemove" :show="confirmRemove"
:title="$t('are_you_sure_remove_folder')" :title="$t('are_you_sure_remove_folder')"
@hide-modal="confirmRemove = false" @hide-modal="confirmRemove = false"

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3> <h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3>
@@ -94,9 +94,9 @@
<div slot="footer"> <div slot="footer">
<div class="row-wrapper"> <div class="row-wrapper">
<span> <span>
<pw-toggle :on="showJsonCode" @change="showJsonCode = $event"> <SmartToggle :on="showJsonCode" @change="showJsonCode = $event">
{{ $t("show_code") }} {{ $t("show_code") }}
</pw-toggle> </SmartToggle>
</span> </span>
<span> <span>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
@@ -108,7 +108,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -50,7 +50,7 @@
</template> </template>
</v-popover> </v-popover>
</div> </div>
<confirm-modal <SmartConfirmModal
:show="confirmRemove" :show="confirmRemove"
:title="$t('are_you_sure_remove_request')" :title="$t('are_you_sure_remove_request')"
@hide-modal="confirmRemove = false" @hide-modal="confirmRemove = false"

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("save_request_as") }}</h3> <h3 class="title">{{ $t("save_request_as") }}</h3>
@@ -33,7 +33,7 @@
</li> </li>
</ul> </ul>
<label>{{ $t("folder") }}</label> <label>{{ $t("folder") }}</label>
<autocomplete <SmartAutoComplete
:placeholder="$t('search')" :placeholder="$t('search')"
:source="folders" :source="folders"
:spellcheck="false" :spellcheck="false"
@@ -66,7 +66,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<pw-section class="yellow" :label="$t('collections')" ref="collections" no-legend> <AppSection class="yellow" :label="$t('collections')" ref="collections" no-legend>
<div class="show-on-large-screen"> <div class="show-on-large-screen">
<input <input
aria-label="Search" aria-label="Search"
@@ -9,28 +9,28 @@
class="rounded-t-lg" class="rounded-t-lg"
/> />
</div> </div>
<add-collection :show="showModalAdd" @hide-modal="displayModalAdd(false)" /> <CollectionsAdd :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
<edit-collection <CollectionsEdit
:show="showModalEdit" :show="showModalEdit"
:editing-collection="editingCollection" :editing-collection="editingCollection"
:editing-collection-index="editingCollectionIndex" :editing-collection-index="editingCollectionIndex"
@hide-modal="displayModalEdit(false)" @hide-modal="displayModalEdit(false)"
/> />
<add-folder <CollectionsAddFolder
:show="showModalAddFolder" :show="showModalAddFolder"
:folder="editingFolder" :folder="editingFolder"
:folder-path="editingFolderPath" :folder-path="editingFolderPath"
@add-folder="onAddFolder($event)" @add-folder="onAddFolder($event)"
@hide-modal="displayModalAddFolder(false)" @hide-modal="displayModalAddFolder(false)"
/> />
<edit-folder <CollectionsEditFolder
:show="showModalEditFolder" :show="showModalEditFolder"
:collection-index="editingCollectionIndex" :collection-index="editingCollectionIndex"
:folder="editingFolder" :folder="editingFolder"
:folder-index="editingFolderIndex" :folder-index="editingFolderIndex"
@hide-modal="displayModalEditFolder(false)" @hide-modal="displayModalEditFolder(false)"
/> />
<edit-request <CollectionsEditRequest
:show="showModalEditRequest" :show="showModalEditRequest"
:collection-index="editingCollectionIndex" :collection-index="editingCollectionIndex"
:folder-index="editingFolderIndex" :folder-index="editingFolderIndex"
@@ -39,7 +39,7 @@
:request-index="editingRequestIndex" :request-index="editingRequestIndex"
@hide-modal="displayModalEditRequest(false)" @hide-modal="displayModalEditRequest(false)"
/> />
<import-export-collections <CollectionsImportExport
:show="showModalImportExport" :show="showModalImportExport"
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
/> />
@@ -58,7 +58,7 @@
<div class="virtual-list"> <div class="virtual-list">
<ul class="flex-col"> <ul class="flex-col">
<li v-for="(collection, index) in filteredCollections" :key="collection.name"> <li v-for="(collection, index) in filteredCollections" :key="collection.name">
<collection <CollectionsCollection
:name="collection.name" :name="collection.name"
:collection-index="index" :collection-index="index"
:collection="collection" :collection="collection"
@@ -76,7 +76,7 @@
<p v-if="filterText && filteredCollections.length === 0" class="info"> <p v-if="filterText && filteredCollections.length === 0" class="info">
<i class="material-icons">not_interested</i> {{ $t("nothing_found") }} "{{ filterText }}" <i class="material-icons">not_interested</i> {{ $t("nothing_found") }} "{{ filterText }}"
</p> </p>
</pw-section> </AppSection>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("new_environment") }}</h3> <h3 class="title">{{ $t("new_environment") }}</h3>
@@ -33,7 +33,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("edit_environment") }}</h3> <h3 class="title">{{ $t("edit_environment") }}</h3>
@@ -97,7 +97,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -27,7 +27,7 @@
</template> </template>
</v-popover> </v-popover>
</div> </div>
<confirm-modal <SmartConfirmModal
:show="confirmRemove" :show="confirmRemove"
:title="$t('are_you_sure_remove_environment')" :title="$t('are_you_sure_remove_environment')"
@hide-modal="confirmRemove = false" @hide-modal="confirmRemove = false"

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3> <h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3>
@@ -94,9 +94,9 @@
<div slot="footer"> <div slot="footer">
<div class="row-wrapper"> <div class="row-wrapper">
<span> <span>
<pw-toggle :on="showJsonCode" @change="showJsonCode = $event"> <SmartToggle :on="showJsonCode" @change="showJsonCode = $event">
{{ $t("show_code") }} {{ $t("show_code") }}
</pw-toggle> </SmartToggle>
</span> </span>
<span> <span>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
@@ -108,7 +108,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<pw-section class="green" icon="history" :label="$t('environments')" ref="environments" no-legend> <AppSection class="green" icon="history" :label="$t('environments')" ref="environments" no-legend>
<div class="show-on-large-screen"> <div class="show-on-large-screen">
<span class="select-wrapper"> <span class="select-wrapper">
<select <select
@@ -17,14 +17,14 @@
</select> </select>
</span> </span>
</div> </div>
<add-environment :show="showModalAdd" @hide-modal="displayModalAdd(false)" /> <EnvironmentsAdd :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
<edit-environment <EnvironmentsEdit
:show="showModalEdit" :show="showModalEdit"
:editingEnvironment="editingEnvironment" :editingEnvironment="editingEnvironment"
:editingEnvironmentIndex="editingEnvironmentIndex" :editingEnvironmentIndex="editingEnvironmentIndex"
@hide-modal="displayModalEdit(false)" @hide-modal="displayModalEdit(false)"
/> />
<import-export-environment <EnvironmentsImportExport
:show="showModalImportExport" :show="showModalImportExport"
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
/> />
@@ -47,7 +47,7 @@
<div class="virtual-list"> <div class="virtual-list">
<ul class="flex-col"> <ul class="flex-col">
<li v-for="(environment, index) in environments" :key="environment.name"> <li v-for="(environment, index) in environments" :key="environment.name">
<environment <EnvironmentsEnvironment
:environmentIndex="index" :environmentIndex="index"
:environment="environment" :environment="environment"
@edit-environment="editEnvironment(environment, index)" @edit-environment="editEnvironment(environment, index)"
@@ -55,7 +55,7 @@
</li> </li>
</ul> </ul>
</div> </div>
</pw-section> </AppSection>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -1,4 +1,4 @@
import feeds from "../feeds" import feeds from "../Feeds"
import { shallowMount } from "@vue/test-utils" import { shallowMount } from "@vue/test-utils"
jest.mock("~/helpers/fb", () => ({ jest.mock("~/helpers/fb", () => ({

View File

@@ -1,4 +1,4 @@
import inputform from "../inputform" import inputform from "../Inputform"
import { shallowMount } from "@vue/test-utils" import { shallowMount } from "@vue/test-utils"
jest.mock("~/helpers/fb", () => ({ jest.mock("~/helpers/fb", () => ({

View File

@@ -1,4 +1,4 @@
import logout from "../logout" import logout from "../Logout"
import { shallowMount, createLocalVue } from "@vue/test-utils" import { shallowMount, createLocalVue } from "@vue/test-utils"
jest.mock("~/helpers/fb", () => ({ jest.mock("~/helpers/fb", () => ({

View File

@@ -6,12 +6,12 @@
( (
<span v-for="(field, index) in fieldArgs" :key="index"> <span v-for="(field, index) in fieldArgs" :key="index">
{{ field.name }}: {{ field.name }}:
<typelink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" /> <GraphqlTypeLink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
<span v-if="index !== fieldArgs.length - 1"> , </span> <span v-if="index !== fieldArgs.length - 1"> , </span>
</span> </span>
) </span ) </span
>: >:
<typelink :gqlType="gqlField.type" :jumpTypeCallback="jumpTypeCallback" /> <GraphqlTypeLink :gqlType="gqlField.type" :jumpTypeCallback="jumpTypeCallback" />
</div> </div>
<div class="mt-2 text-fgLightColor field-desc" v-if="gqlField.description"> <div class="mt-2 text-fgLightColor field-desc" v-if="gqlField.description">
{{ gqlField.description }} {{ gqlField.description }}
@@ -27,7 +27,7 @@
<div class="px-4 border-l-2 border-acColor"> <div class="px-4 border-l-2 border-acColor">
<div v-for="(field, index) in fieldArgs" :key="index"> <div v-for="(field, index) in fieldArgs" :key="index">
{{ field.name }}: {{ field.name }}:
<typelink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" /> <GraphqlTypeLink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
<div class="mt-2 text-fgLightColor field-desc" v-if="field.description"> <div class="mt-2 text-fgLightColor field-desc" v-if="field.description">
{{ field.description }} {{ field.description }}
</div> </div>

View File

@@ -12,19 +12,19 @@
<div v-if="interfaces.length > 0" class="mb-2"> <div v-if="interfaces.length > 0" class="mb-2">
<h5>{{ $t("interfaces") }}</h5> <h5>{{ $t("interfaces") }}</h5>
<div v-for="gqlInterface in interfaces" :key="gqlInterface.name" class="m-2 ml-4"> <div v-for="gqlInterface in interfaces" :key="gqlInterface.name" class="m-2 ml-4">
<typelink :gqlType="gqlInterface" :jumpTypeCallback="jumpTypeCallback" /> <GraphqlTypeLink :gqlType="gqlInterface" :jumpTypeCallback="jumpTypeCallback" />
</div> </div>
</div> </div>
<div v-if="children.length > 0" class="mb-2"> <div v-if="children.length > 0" class="mb-2">
<h5>{{ $t("children") }}</h5> <h5>{{ $t("children") }}</h5>
<div v-for="child in children" :key="child.name" class="m-2 ml-4"> <div v-for="child in children" :key="child.name" class="m-2 ml-4">
<typelink :gqlType="child" :jumpTypeCallback="jumpTypeCallback" /> <GraphqlTypeLink :gqlType="child" :jumpTypeCallback="jumpTypeCallback" />
</div> </div>
</div> </div>
<div v-if="gqlType.getFields"> <div v-if="gqlType.getFields">
<h5>{{ $t("fields") }}</h5> <h5>{{ $t("fields") }}</h5>
<div v-for="field in gqlType.getFields()" :key="field.name"> <div v-for="field in gqlType.getFields()" :key="field.name">
<field <GraphqlField
:gqlField="field" :gqlField="field"
:isHighlighted="isFieldHighlighted({ field })" :isHighlighted="isFieldHighlighted({ field })"
:jumpTypeCallback="jumpTypeCallback" :jumpTypeCallback="jumpTypeCallback"

View File

@@ -1,4 +1,4 @@
import field from "../field" import field from "../Field"
import { shallowMount } from "@vue/test-utils" import { shallowMount } from "@vue/test-utils"
const gqlField = { const gqlField = {
@@ -21,7 +21,7 @@ const factory = (props) =>
shallowMount(field, { shallowMount(field, {
propsData: props, propsData: props,
stubs: { stubs: {
typelink: { GraphqlTypeLink: {
template: "<span>Typelink</span>", template: "<span>Typelink</span>",
}, },
}, },

View File

@@ -1,4 +1,4 @@
import type from "../type" import type from "../Type"
import { shallowMount } from "@vue/test-utils" import { shallowMount } from "@vue/test-utils"
import {GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType} from "graphql" import {GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType} from "graphql"
@@ -15,7 +15,7 @@ const factory = (props) =>
$t: (text) => text, $t: (text) => text,
}, },
propsData: { gqlTypes: [], ...props }, propsData: { gqlTypes: [], ...props },
stubs: ["field", "typelink"], stubs: ["GraphqlField", "GraphqlTypeLink"],
}) })
describe("type", () => { describe("type", () => {
@@ -61,7 +61,7 @@ describe("type", () => {
getFields: undefined, getFields: undefined,
}, },
}) })
expect(wrapper.find("field-stub").exists()).toEqual(false) expect(wrapper.find("GraphqlField-stub").exists()).toEqual(false)
}) })
test("all fields are rendered if present with props passed properly", () => { test("all fields are rendered if present with props passed properly", () => {
@@ -71,7 +71,7 @@ describe("type", () => {
}, },
}) })
expect(wrapper.findAll("field-stub").length).toEqual(2) expect(wrapper.findAll("GraphqlField-stub").length).toEqual(2)
}) })
test("prepends 'input' to type name for Input Types", () => { test("prepends 'input' to type name for Input Types", () => {

View File

@@ -1,4 +1,4 @@
import typelink from "../typelink" import typelink from "../TypeLink.vue"
import { shallowMount } from "@vue/test-utils" import { shallowMount } from "@vue/test-utils"
import {GraphQLInt} from "graphql" import {GraphQLInt} from "graphql"

View File

@@ -54,13 +54,13 @@
/> />
<div v-else class="file-chips-container"> <div v-else class="file-chips-container">
<div class="file-chips-wrapper"> <div class="file-chips-wrapper">
<deletable-chip <SmartDeletableChip
v-for="(file, i) in Array.from(bodyParams[index].value)" v-for="(file, i) in Array.from(bodyParams[index].value)"
:key="`body-param-${index}-file-${i}`" :key="`body-param-${index}-file-${i}`"
@chip-delete="chipDelete(index, i)" @chip-delete="chipDelete(index, i)"
> >
{{ file.name }} {{ file.name }}
</deletable-chip> </SmartDeletableChip>
</div> </div>
</div> </div>
</li> </li>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("generate_code") }}</h3> <h3 class="title">{{ $t("generate_code") }}</h3>
@@ -56,7 +56,7 @@
class="rounded-b-lg" class="rounded-b-lg"
></textarea> ></textarea>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<pw-section class="orange" label="Headers" ref="headers" no-legend> <AppSection class="orange" label="Headers" ref="headers" no-legend>
<ul v-if="headers.length !== 0"> <ul v-if="headers.length !== 0">
<li> <li>
<div class="row-wrapper"> <div class="row-wrapper">
@@ -23,7 +23,7 @@
:class="{ 'border-t': index == 0 }" :class="{ 'border-t': index == 0 }"
> >
<li> <li>
<autocomplete <SmartAutoComplete
:placeholder="$t('header_count', { count: index + 1 })" :placeholder="$t('header_count', { count: index + 1 })"
:source="commonHeaders" :source="commonHeaders"
:spellcheck="false" :spellcheck="false"
@@ -98,7 +98,7 @@
</button> </button>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<pw-section class="green" icon="history" :label="$t('history')" ref="history" no-legend> <AppSection class="green" icon="history" :label="$t('history')" ref="history" no-legend>
<div class="show-on-large-screen"> <div class="show-on-large-screen">
<input <input
aria-label="Search" aria-label="Search"
@@ -212,7 +212,7 @@
</div> </div>
</div> </div>
</div> </div>
</pw-section> </AppSection>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("import_curl") }}</h3> <h3 class="title">{{ $t("import_curl") }}</h3>
@@ -26,7 +26,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,14 +1,14 @@
<template> <template>
<pw-section class="pink" :label="$t('notes')" ref="sync" no-legend> <AppSection class="pink" :label="$t('notes')" ref="sync" no-legend>
<div v-if="fb.currentUser"> <div v-if="fb.currentUser">
<inputform /> <FirebaseInputform />
<feeds /> <FirebaseFeeds />
</div> </div>
<div v-else> <div v-else>
<p class="info">{{ $t("login_first") }}</p> <p class="info">{{ $t("login_first") }}</p>
<login /> <FirebaseLogin />
</div> </div>
</pw-section> </AppSection>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<pw-section class="pink" label="Parameters" ref="parameters" no-legend> <AppSection class="pink" label="Parameters" ref="parameters" no-legend>
<ul v-if="params.length !== 0"> <ul v-if="params.length !== 0">
<li> <li>
<div class="row-wrapper"> <div class="row-wrapper">
@@ -115,7 +115,7 @@
</button> </button>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</template> </template>
<script> <script>

View File

@@ -30,7 +30,7 @@
</div> </div>
</div> </div>
<div class="relative"> <div class="relative">
<ace-editor <SmartAceEditor
v-model="rawParamsBody" v-model="rawParamsBody"
:lang="rawInputEditorLang" :lang="rawInputEditorLang"
:options="{ :options="{

View File

@@ -1,10 +1,10 @@
<template> <template>
<pw-section class="purple" id="response" :label="$t('response')" ref="response" no-legend> <AppSection class="purple" id="response" :label="$t('response')" ref="response" no-legend>
<http-response-meta :response="response" :active="active" /> <HttpResponseMeta :response="response" :active="active" />
<div v-if="response.body && response.body !== $t('loading')"> <div v-if="response.body && response.body !== $t('loading')">
<response-body-renderer :response="response" /> <LensesResponseBodyRenderer :response="response" />
</div> </div>
</pw-section> </AppSection>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("manage_token") }}</h3> <h3 class="title">{{ $t("manage_token") }}</h3>
@@ -60,7 +60,7 @@
{{ $t("empty") }} {{ $t("empty") }}
</p> </p>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<tabs styles="m-4"> <SmartTabs styles="m-4">
<tab <SmartTab
v-for="(lens, index) in validLenses" v-for="(lens, index) in validLenses"
:key="lens.lensName" :key="lens.lensName"
:id="lens.lensName" :id="lens.lensName"
@@ -9,15 +9,15 @@
:selected="index === 0" :selected="index === 0"
> >
<component :is="lens.renderer" :response="response" /> <component :is="lens.renderer" :response="response" />
</tab> </SmartTab>
<tab <SmartTab
v-if="Object.keys(response.headers).length !== 0" v-if="Object.keys(response.headers).length !== 0"
id="headers" id="headers"
:label="`Headers \xA0 • \xA0 ${Object.keys(response.headers).length}`" :label="`Headers \xA0 • \xA0 ${Object.keys(response.headers).length}`"
> >
<headers :headers="response.headers" /> <LensesHeadersRenderer :headers="response.headers" />
</tab> </SmartTab>
</tabs> </SmartTabs>
</div> </div>
</template> </template>

View File

@@ -49,7 +49,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<ace-editor <SmartAceEditor
:value="responseBodyText" :value="responseBodyText"
:lang="'html'" :lang="'html'"
:options="{ :options="{

View File

@@ -40,7 +40,7 @@
<p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p> <p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<ace-editor <SmartAceEditor
:value="jsonBodyText" :value="jsonBodyText"
:lang="'json'" :lang="'json'"
:provideJSONOutline="true" :provideJSONOutline="true"

View File

@@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<ace-editor <SmartAceEditor
:value="responseBodyText" :value="responseBodyText"
:lang="'plain_text'" :lang="'plain_text'"
:options="{ :options="{

View File

@@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<ace-editor <SmartAceEditor
:value="responseBodyText" :value="responseBodyText"
:lang="'xml'" :lang="'xml'"
:options="{ :options="{

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<pw-section class="blue" :label="$t('request')" no-legend> <AppSection class="blue" :label="$t('request')" no-legend>
<ul> <ul>
<li> <li>
<label for="mqtt-url">{{ $t("url") }}</label> <label for="mqtt-url">{{ $t("url") }}</label>
@@ -30,12 +30,12 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </Appsection>
<pw-section class="blue" :label="$t('communication')" no-legend> <AppSection class="blue" :label="$t('communication')" no-legend>
<ul> <ul>
<li> <li>
<log :title="$t('log')" :log="this.log" /> <RealtimeLog :title="$t('log')" :log="this.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -94,7 +94,7 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </Appsection>
</div> </div>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<pw-section class="blue" :label="$t('request')" ref="request" no-legend> <AppSection class="blue" :label="$t('request')" ref="request" no-legend>
<ul> <ul>
<li> <li>
<label for="socketio-url">{{ $t("url") }}</label> <label for="socketio-url">{{ $t("url") }}</label>
@@ -41,12 +41,12 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </AppSection>
<pw-section class="purple" :label="$t('communication')" id="response" ref="response" no-legend> <AppSection class="purple" :label="$t('communication')" id="response" ref="response" no-legend>
<ul> <ul>
<li> <li>
<log :title="$t('log')" :log="communication.log" /> <RealtimeLog :title="$t('log')" :log="communication.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -113,7 +113,7 @@
</button> </button>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</div> </div>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="page"> <div class="page">
<pw-section class="blue" :label="$t('request')" ref="request" no-legend> <AppSection class="blue" :label="$t('request')" ref="request" no-legend>
<ul> <ul>
<li> <li>
<label for="server">{{ $t("server") }}</label> <label for="server">{{ $t("server") }}</label>
@@ -34,16 +34,16 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </AppSection>
<pw-section class="purple" :label="$t('communication')" id="response" ref="response" no-legend> <AppSection class="purple" :label="$t('communication')" id="response" ref="response" no-legend>
<ul> <ul>
<li> <li>
<log :title="$t('events')" :log="events.log" /> <RealtimeLog :title="$t('events')" :log="events.log" />
<div id="result"></div> <div id="result"></div>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</div> </div>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="page"> <div class="page">
<pw-section class="blue" :label="$t('request')" ref="request" no-legend> <AppSection class="blue" :label="$t('request')" ref="request" no-legend>
<ul> <ul>
<li> <li>
<label for="websocket-url">{{ $t("url") }}</label> <label for="websocket-url">{{ $t("url") }}</label>
@@ -35,12 +35,12 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </AppSection>
<pw-section class="purple" :label="$t('communication')" id="response" ref="response" no-legend> <AppSection class="purple" :label="$t('communication')" id="response" ref="response" no-legend>
<ul> <ul>
<li> <li>
<log :title="$t('log')" :log="communication.log" /> <RealtimeLog :title="$t('log')" :log="communication.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -76,7 +76,7 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </AppSection>
</div> </div>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<modal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("confirm") }}</h3> <h3 class="title">{{ $t("confirm") }}</h3>
@@ -26,7 +26,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</template> </template>
<script> <script>

View File

@@ -1,4 +1,4 @@
import autocomplete from "../autocomplete" import autocomplete from "../AutoComplete"
import { mount } from "@vue/test-utils" import { mount } from "@vue/test-utils"
const props = { const props = {

View File

@@ -1,4 +1,4 @@
import tab from "../tab" import tab from "../Tab"
import { mount } from "@vue/test-utils" import { mount } from "@vue/test-utils"
const factory = (props, data) => { const factory = (props, data) => {

View File

@@ -1,5 +1,5 @@
import tabs from "../tabs" import tabs from "../Tabs"
import tab from "../tab" import tab from "../Tab"
import { mount } from "@vue/test-utils" import { mount } from "@vue/test-utils"
@@ -7,13 +7,13 @@ const factory = () =>
mount(tabs, { mount(tabs, {
slots: { slots: {
default: [ default: [
`<tab id="tab1" href="#" :label="'tab 1'" :icon="'testicon1'" :selected=true><div id="tab1render">tab1</div></tab>`, `<Tab id="tab1" href="#" :label="'tab 1'" :icon="'testicon1'" :selected=true><div id="tab1render">tab1</div></Tab>`,
`<tab id="tab2" href="#" :label="'tab 2'" :icon="'testicon2'"><div id="tab2render">tab1</div></tab>`, `<Tab id="tab2" href="#" :label="'tab 2'" :icon="'testicon2'"><div id="tab2render">tab1</div></Tab>`,
`<tab id="tab3" href="#" :label="'tab 3'" :icon="'testicon3'"><div id="tab3render">tab1</div></tab>`, `<Tab id="tab3" href="#" :label="'tab 3'" :icon="'testicon3'"><div id="tab3render">tab1</div></Tab>`,
], ],
}, },
stubs: { stubs: {
tab, "Tab": tab,
}, },
}) })

View File

@@ -1,4 +1,4 @@
import pwToggle from "../pw-toggle" import pwToggle from "../Toggle"
import { mount } from "@vue/test-utils" import { mount } from "@vue/test-utils"
const factory = (props, slot) => const factory = (props, slot) =>

View File

@@ -1,4 +1,4 @@
import urlField from "../url-field" import urlField from "../UrlField"
import { mount } from "@vue/test-utils" import { mount } from "@vue/test-utils"
const factory = (props) => const factory = (props) =>

View File

@@ -2,11 +2,11 @@
<div class="wrapper"> <div class="wrapper">
<div class="content"> <div class="content">
<div class="columns"> <div class="columns">
<sidenav /> <AppSidenav />
<main class="container"> <main class="container">
<pw-header /> <AppHeader />
<nuxt /> <nuxt />
<pw-footer /> <AppFooter />
</main> </main>
</div> </div>
</div> </div>

5216
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,7 @@
"graphql": "^15.5.0", "graphql": "^15.5.0",
"graphql-language-service-interface": "^2.8.2", "graphql-language-service-interface": "^2.8.2",
"mustache": "^4.1.0", "mustache": "^4.1.0",
"nuxt": "^2.14.12", "nuxt": "^2.15.2",
"nuxt-i18n": "^6.20.3", "nuxt-i18n": "^6.20.3",
"paho-mqtt": "^1.1.0", "paho-mqtt": "^1.1.0",
"socket.io-client": "^3.1.1", "socket.io-client": "^3.1.1",
@@ -46,7 +46,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.13.1", "@babel/core": "^7.13.1",
"@babel/preset-env": "^7.12.17", "@babel/preset-env": "^7.13.8",
"@nuxtjs/color-mode": "^2.0.3", "@nuxtjs/color-mode": "^2.0.3",
"@nuxtjs/google-analytics": "^2.4.0", "@nuxtjs/google-analytics": "^2.4.0",
"@nuxtjs/google-fonts": "^1.2.0", "@nuxtjs/google-fonts": "^1.2.0",

View File

@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<div class="content"> <div class="content">
<div class="page-columns inner-left"> <div class="page-columns inner-left">
<pw-section class="blue" :label="$t('import')" ref="import" no-legend> <AppSection class="blue" :label="$t('import')" ref="import" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("collection") }}</label> <label>{{ $t("collection") }}</label>
<p class="info"> <p class="info">
@@ -27,7 +27,7 @@
</button> </button>
</div> </div>
</div> </div>
<ace-editor <SmartAceEditor
v-model="collectionJSON" v-model="collectionJSON"
:lang="'json'" :lang="'json'"
:lint="false" :lint="false"
@@ -45,9 +45,9 @@
<span>{{ $t("generate_docs") }}</span> <span>{{ $t("generate_docs") }}</span>
</button> </button>
</div> </div>
</pw-section> </AppSection>
<pw-section class="green" :label="$t('documentation')" ref="documentation" no-legend> <AppSection class="green" :label="$t('documentation')" ref="documentation" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("documentation") }}</label> <label>{{ $t("documentation") }}</label>
<p v-if="this.items.length === 0" class="info"> <p v-if="this.items.length === 0" class="info">
@@ -277,11 +277,11 @@
</span> </span>
</div> </div>
</div> </div>
</pw-section> </AppSection>
</div> </div>
<aside class="sticky-inner inner-right lg:max-w-md"> <aside class="sticky-inner inner-right lg:max-w-md">
<collections @use-collection="useSelectedCollection($event)" :doc="true" /> <Collections @use-collection="useSelectedCollection($event)" :doc="true" />
</aside> </aside>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<div class="content"> <div class="content">
<div class="page-columns inner-left"> <div class="page-columns inner-left">
<pw-section class="blue" :label="$t('endpoint')" ref="endpoint" no-legend> <AppSection class="blue" :label="$t('endpoint')" ref="endpoint" no-legend>
<ul> <ul>
<li> <li>
<label for="url">{{ $t("url") }}</label> <label for="url">{{ $t("url") }}</label>
@@ -35,9 +35,9 @@
</li> </li>
</div> </div>
</ul> </ul>
</pw-section> </AppSection>
<pw-section class="orange" :label="$t('headers')" ref="headers" no-legend> <AppSection class="orange" :label="$t('headers')" ref="headers" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("headers") }}</label> <label>{{ $t("headers") }}</label>
<ul v-if="headers.length !== 0"> <ul v-if="headers.length !== 0">
@@ -59,7 +59,7 @@
:class="{ 'border-t': index == 0 }" :class="{ 'border-t': index == 0 }"
> >
<li> <li>
<autocomplete <SmartAutoComplete
:placeholder="$t('header_count', { count: index + 1 })" :placeholder="$t('header_count', { count: index + 1 })"
:source="commonHeaders" :source="commonHeaders"
:spellcheck="false" :spellcheck="false"
@@ -138,9 +138,9 @@
</li> </li>
</ul> </ul>
</div> </div>
</pw-section> </AppSection>
<pw-section class="green" :label="$t('schema')" ref="schema" no-legend> <AppSection class="green" :label="$t('schema')" ref="schema" no-legend>
<div class="row-wrapper"> <div class="row-wrapper">
<label>{{ $t("schema") }}</label> <label>{{ $t("schema") }}</label>
<div v-if="schema"> <div v-if="schema">
@@ -174,7 +174,7 @@
</button> </button>
</div> </div>
</div> </div>
<ace-editor <SmartAceEditor
v-if="schema" v-if="schema"
:value="schema" :value="schema"
:lang="'graphqlschema'" :lang="'graphqlschema'"
@@ -198,9 +198,9 @@
readonly readonly
type="text" type="text"
/> />
</pw-section> </AppSection>
<pw-section class="teal" :label="$t('query')" ref="query" no-legend> <AppSection class="teal" :label="$t('query')" ref="query" no-legend>
<div class="row-wrapper gqlRunQuery"> <div class="row-wrapper gqlRunQuery">
<label for="gqlQuery">{{ $t("query") }}</label> <label for="gqlQuery">{{ $t("query") }}</label>
<div> <div>
@@ -227,7 +227,7 @@
</button> </button>
</div> </div>
</div> </div>
<queryeditor <GraphqlQueryEditor
ref="queryEditor" ref="queryEditor"
v-model="gqlQueryString" v-model="gqlQueryString"
:onRunGQLQuery="runQuery" :onRunGQLQuery="runQuery"
@@ -241,12 +241,12 @@
}" }"
styles="rounded-b-lg" styles="rounded-b-lg"
/> />
</pw-section> </AppSection>
<pw-section class="yellow" :label="$t('variables')" ref="variables" no-legend> <AppSection class="yellow" :label="$t('variables')" ref="variables" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("variables") }}</label> <label>{{ $t("variables") }}</label>
<ace-editor <SmartAceEditor
v-model="variableString" v-model="variableString"
:lang="'json'" :lang="'json'"
:options="{ :options="{
@@ -260,9 +260,9 @@
styles="rounded-b-lg" styles="rounded-b-lg"
/> />
</div> </div>
</pw-section> </AppSection>
<pw-section class="purple" :label="$t('response')" ref="response" no-legend> <AppSection class="purple" :label="$t('response')" ref="response" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("response") }}</label> <label>{{ $t("response") }}</label>
<div class="row-wrapper"> <div class="row-wrapper">
@@ -288,7 +288,7 @@
</button> </button>
</div> </div>
</div> </div>
<ace-editor <SmartAceEditor
v-if="response" v-if="response"
:value="response" :value="response"
:lang="'json'" :lang="'json'"
@@ -314,11 +314,11 @@
type="text" type="text"
/> />
</div> </div>
</pw-section> </AppSection>
</div> </div>
<aside class="sticky-inner inner-right lg:max-w-md"> <aside class="sticky-inner inner-right lg:max-w-md">
<pw-section class="purple" :label="$t('docs')" ref="docs" no-legend> <AppSection class="purple" :label="$t('docs')" ref="docs" no-legend>
<section class="flex-col"> <section class="flex-col">
<input <input
type="text" type="text"
@@ -326,43 +326,47 @@
v-model="graphqlFieldsFilterText" v-model="graphqlFieldsFilterText"
class="rounded-t-lg" class="rounded-t-lg"
/> />
<tabs ref="gqlTabs" styles="m-4"> <SmartTabs ref="gqlTabs" styles="m-4">
<div class="gqlTabs"> <div class="gqlTabs">
<tab <SmartTab
v-if="queryFields.length > 0" v-if="queryFields.length > 0"
:id="'queries'" :id="'queries'"
:label="$t('queries')" :label="$t('queries')"
:selected="true" :selected="true"
> >
<div v-for="field in filteredQueryFields" :key="field.name"> <div v-for="field in filteredQueryFields" :key="field.name">
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <GraphqlField :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </SmartTab>
<tab v-if="mutationFields.length > 0" :id="'mutations'" :label="$t('mutations')"> <SmartTab
v-if="mutationFields.length > 0"
:id="'mutations'"
:label="$t('mutations')"
>
<div v-for="field in filteredMutationFields" :key="field.name"> <div v-for="field in filteredMutationFields" :key="field.name">
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <GraphqlField :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </SmartTab>
<tab <SmartTab
v-if="subscriptionFields.length > 0" v-if="subscriptionFields.length > 0"
:id="'subscriptions'" :id="'subscriptions'"
:label="$t('subscriptions')" :label="$t('subscriptions')"
> >
<div v-for="field in filteredSubscriptionFields" :key="field.name"> <div v-for="field in filteredSubscriptionFields" :key="field.name">
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <GraphqlField :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </SmartTab>
<tab <SmartTab
v-if="graphqlTypes.length > 0" v-if="graphqlTypes.length > 0"
:id="'types'" :id="'types'"
:label="$t('types')" :label="$t('types')"
ref="typesTab" ref="typesTab"
> >
<div v-for="type in filteredGraphqlTypes" :key="type.name"> <div v-for="type in filteredGraphqlTypes" :key="type.name">
<type <GraphqlType
:gqlType="type" :gqlType="type"
:gqlTypes="graphqlTypes" :gqlTypes="graphqlTypes"
:isHighlighted="isGqlTypeHighlighted({ gqlType: type })" :isHighlighted="isGqlTypeHighlighted({ gqlType: type })"
@@ -370,9 +374,9 @@
:jumpTypeCallback="handleJumpToType" :jumpTypeCallback="handleJumpToType"
/> />
</div> </div>
</tab> </SmartTab>
</div> </div>
</tabs> </SmartTabs>
</section> </section>
<p <p
@@ -386,7 +390,7 @@
> >
{{ $t("send_request_first") }} {{ $t("send_request_first") }}
</p> </p>
</pw-section> </AppSection>
</aside> </aside>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<div class="content"> <div class="content">
<div class="page-columns inner-left"> <div class="page-columns inner-left">
<pw-section class="blue" :label="$t('request')" ref="request" no-legend> <AppSection class="blue" :label="$t('request')" ref="request" no-legend>
<ul> <ul>
<li class="shrink"> <li class="shrink">
<label for="method">{{ $t("method") }}</label> <label for="method">{{ $t("method") }}</label>
@@ -50,7 +50,7 @@
@input="pathInputHandler" @input="pathInputHandler"
:placeholder="$t('url')" :placeholder="$t('url')"
/> />
<url-field v-model="uri" v-else /> <SmartUrlField v-model="uri" v-else />
</li> </li>
<li class="shrink"> <li class="shrink">
<label class="hide-on-small-screen" for="send">&nbsp;</label> <label class="hide-on-small-screen" for="send">&nbsp;</label>
@@ -84,7 +84,7 @@
<ul> <ul>
<li> <li>
<label for="contentType" class="text-sm">{{ $t("content_type") }}</label> <label for="contentType" class="text-sm">{{ $t("content_type") }}</label>
<autocomplete <SmartAutoComplete
:source="validContentTypes" :source="validContentTypes"
:spellcheck="false" :spellcheck="false"
v-model="contentType" v-model="contentType"
@@ -96,14 +96,18 @@
<li> <li>
<div class="row-wrapper"> <div class="row-wrapper">
<span> <span>
<pw-toggle v-if="canListParameters" :on="rawInput" @change="rawInput = $event"> <SmartToggle
v-if="canListParameters"
:on="rawInput"
@change="rawInput = $event"
>
{{ $t("raw_input") }} {{ $t("raw_input") }}
</pw-toggle> </SmartToggle>
</span> </span>
</div> </div>
</li> </li>
</ul> </ul>
<http-body-parameters <HttpBodyParameters
v-if="!rawInput" v-if="!rawInput"
:bodyParams="bodyParams" :bodyParams="bodyParams"
@clear-content="clearContent" @clear-content="clearContent"
@@ -111,7 +115,7 @@
@remove-request-body-param="removeRequestBodyParam" @remove-request-body-param="removeRequestBodyParam"
@add-request-body-param="addRequestBodyParam" @add-request-body-param="addRequestBodyParam"
/> />
<http-raw-body <HttpRawBody
v-else v-else
:rawParams="rawParams" :rawParams="rawParams"
:contentType="contentType" :contentType="contentType"
@@ -169,42 +173,42 @@
</button> </button>
</span> </span>
</div> </div>
</pw-section> </AppSection>
<section id="options"> <section id="options">
<tabs> <SmartTabs>
<tab <SmartTab
:id="'params'" :id="'params'"
:label=" :label="
$t('parameters') + `${params.length !== 0 ? ' \xA0 • \xA0 ' + params.length : ''}` $t('parameters') + `${params.length !== 0 ? ' \xA0 • \xA0 ' + params.length : ''}`
" "
:selected="true" :selected="true"
> >
<http-parameters <HttpParameters
:params="params" :params="params"
@clear-content="clearContent" @clear-content="clearContent"
@remove-request-param="removeRequestParam" @remove-request-param="removeRequestParam"
@add-request-param="addRequestParam" @add-request-param="addRequestParam"
/> />
</tab> </SmartTab>
<tab <SmartTab
:id="'headers'" :id="'headers'"
:label=" :label="
$t('headers') + `${headers.length !== 0 ? ' \xA0 • \xA0 ' + headers.length : ''}` $t('headers') + `${headers.length !== 0 ? ' \xA0 • \xA0 ' + headers.length : ''}`
" "
> >
<http-headers <HttpHeaders
:headers="headers" :headers="headers"
@clear-content="clearContent" @clear-content="clearContent"
@set-route-query-state="setRouteQueryState" @set-route-query-state="setRouteQueryState"
@remove-request-header="removeRequestHeader" @remove-request-header="removeRequestHeader"
@add-request-header="addRequestHeader" @add-request-header="addRequestHeader"
/> />
</tab> </SmartTab>
<tab :id="'authentication'" :label="$t('authentication')"> <SmartTab :id="'authentication'" :label="$t('authentication')">
<pw-section class="teal" :label="$t('authentication')" ref="authentication" no-legend> <AppSection class="teal" :label="$t('authentication')" ref="authentication" no-legend>
<ul> <ul>
<li> <li>
<div class="row-wrapper"> <div class="row-wrapper">
@@ -276,13 +280,13 @@
</li> </li>
</ul> </ul>
<div class="row-wrapper"> <div class="row-wrapper">
<pw-toggle :on="!urlExcludes.auth" @change="setExclude('auth', !$event)"> <SmartToggle :on="!urlExcludes.auth" @change="setExclude('auth', !$event)">
{{ $t("include_in_url") }} {{ $t("include_in_url") }}
</pw-toggle> </SmartToggle>
</div> </div>
</pw-section> </AppSection>
<pw-section <AppSection
v-if="showTokenRequest" v-if="showTokenRequest"
class="red" class="red"
label="Access Token Request" label="Access Token Request"
@@ -400,11 +404,11 @@
</button> </button>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</tab> </SmartTab>
<tab :id="'pre_request_script'" :label="$t('pre_request_script')"> <SmartTab :id="'pre_request_script'" :label="$t('pre_request_script')">
<pw-section <AppSection
v-if="showPreRequestScript" v-if="showPreRequestScript"
class="orange" class="orange"
:label="$t('pre_request_script')" :label="$t('pre_request_script')"
@@ -427,7 +431,7 @@
</a> </a>
</div> </div>
</div> </div>
<js-editor <SmartJsEditor
v-model="preRequestScript" v-model="preRequestScript"
:options="{ :options="{
maxLines: '16', maxLines: '16',
@@ -442,11 +446,11 @@
/> />
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</tab> </SmartTab>
<tab :id="'tests'" :label="$t('tests')"> <SmartTab :id="'tests'" :label="$t('tests')">
<pw-section <AppSection
v-if="testsEnabled" v-if="testsEnabled"
class="orange" class="orange"
:label="$t('tests')" :label="$t('tests')"
@@ -469,7 +473,7 @@
</a> </a>
</div> </div>
</div> </div>
<js-editor <SmartJsEditor
v-model="testScript" v-model="testScript"
:options="{ :options="{
maxLines: '16', maxLines: '16',
@@ -516,50 +520,50 @@
</div> </div>
</li> </li>
</ul> </ul>
</pw-section> </AppSection>
</tab> </SmartTab>
</tabs> </SmartTabs>
</section> </section>
<http-response :response="response" :active="runningRequest" ref="response" /> <HttpResponse :response="response" :active="runningRequest" ref="response" />
</div> </div>
<aside v-if="activeSidebar" class="sticky-inner inner-right lg:max-w-md"> <aside v-if="activeSidebar" class="sticky-inner inner-right lg:max-w-md">
<section> <section>
<tabs> <SmartTabs>
<tab :id="'history'" :label="$t('history')" :selected="true"> <SmartTab :id="'history'" :label="$t('history')" :selected="true">
<history @useHistory="handleUseHistory" ref="historyComponent" /> <HttpHistory @useHistory="handleUseHistory" ref="historyComponent" />
</tab> </SmartTab>
<tab :id="'collections'" :label="$t('collections')"> <SmartTab :id="'collections'" :label="$t('collections')">
<collections /> <Collections />
</tab> </SmartTab>
<tab :id="'env'" :label="$t('environments')"> <SmartTab :id="'env'" :label="$t('environments')">
<environments @use-environment="useSelectedEnvironment($event)" /> <Environments @use-environment="useSelectedEnvironment($event)" />
</tab> </SmartTab>
<tab :id="'notes'" :label="$t('notes')"> <SmartTab :id="'notes'" :label="$t('notes')">
<notes /> <HttpNotes />
</tab> </SmartTab>
</tabs> </SmartTabs>
</section> </section>
</aside> </aside>
</div> </div>
<save-request-as <CollectionsSaveRequest
:show="showSaveRequestModal" :show="showSaveRequestModal"
@hide-modal="hideRequestModal" @hide-modal="hideRequestModal"
:editing-request="editRequest" :editing-request="editRequest"
/> />
<import-curl <HttpImportCurl
:show="showCurlImportModal" :show="showCurlImportModal"
@hide-modal="showCurlImportModal = false" @hide-modal="showCurlImportModal = false"
@handle-import="handleImport" @handle-import="handleImport"
/> />
<codegen-modal <HttpCodegenModal
:show="showCodegenModal" :show="showCodegenModal"
:requestTypeProp="requestType" :requestTypeProp="requestType"
:requestCode="requestCode" :requestCode="requestCode"
@@ -567,7 +571,7 @@
@set-request-type="setRequestType" @set-request-type="setRequestType"
/> />
<token-list <HttpTokenList
:show="showTokenListModal" :show="showTokenListModal"
:tokens="tokens" :tokens="tokens"
@clear-content="clearContent" @clear-content="clearContent"
@@ -576,7 +580,7 @@
@hide-modal="showTokenListModal = false" @hide-modal="showTokenListModal = false"
/> />
<modal v-if="showTokenRequestList" @close="showTokenRequestList = false"> <SmartModal v-if="showTokenRequestList" @close="showTokenRequestList = false">
<div slot="header"> <div slot="header">
<div class="row-wrapper"> <div class="row-wrapper">
<h3 class="title">{{ $t("manage_token_req") }}</h3> <h3 class="title">{{ $t("manage_token_req") }}</h3>
@@ -642,7 +646,7 @@
</span> </span>
</div> </div>
</div> </div>
</modal> </SmartModal>
</div> </div>
</template> </template>
@@ -1652,25 +1656,25 @@ export default {
} }
} }
}, },
observeRequestButton() { // observeRequestButton() {
const requestElement = this.$refs.request.$el // const requestElement = this.$refs.request
const sendButtonElement = this.$refs.sendButton // const sendButtonElement = this.$refs.sendButton
const observer = new IntersectionObserver( // const observer = new IntersectionObserver(
(entries, observer) => { // (entries, observer) => {
entries.forEach(({ isIntersecting }) => { // entries.forEach(({ isIntersecting }) => {
if (isIntersecting) sendButtonElement.classList.remove("show") // if (isIntersecting) sendButtonElement.classList.remove("show")
// The button should float when it is no longer visible on screen. // // The button should float when it is no longer visible on screen.
// This is done by adding the show class to the button. // // This is done by adding the show class to the button.
else sendButtonElement.classList.add("show") // else sendButtonElement.classList.add("show")
}) // })
}, // },
{ // {
rootMargin: "0px", // rootMargin: "0px",
threshold: [0], // threshold: [0],
} // }
) // )
observer.observe(requestElement) // observer.observe(requestElement)
}, // },
handleImport() { handleImport() {
const { value: text } = document.getElementById("import-curl") const { value: text } = document.getElementById("import-curl")
try { try {
@@ -1930,7 +1934,7 @@ export default {
}, },
}, },
async mounted() { async mounted() {
this.observeRequestButton() // this.observeRequestButton()
this._keyListener = function (e) { this._keyListener = function (e) {
if (e.key === "g" && (e.ctrlKey || e.metaKey)) { if (e.key === "g" && (e.ctrlKey || e.metaKey)) {
e.preventDefault() e.preventDefault()

View File

@@ -1,23 +1,23 @@
<template> <template>
<div class="page"> <div class="page">
<section id="options"> <section id="options">
<tabs> <SmartTabs>
<tab :id="'websocket'" :label="$t('websocket')" :selected="true"> <SmartTab :id="'websocket'" :label="$t('websocket')" :selected="true">
<websocket /> <RealtimeWebsocket />
</tab> </SmartTab>
<tab :id="'sse'" :label="$t('sse')"> <SmartTab :id="'sse'" :label="$t('sse')">
<sse /> <RealtimeSse />
</tab> </SmartTab>
<tab :id="'socketio'" :label="$t('socketio')"> <SmartTab :id="'socketio'" :label="$t('socketio')">
<socketio /> <RealtimeSocketio />
</tab> </SmartTab>
<tab :id="'mqtt'" :label="$t('mqtt')"> <SmartTab :id="'mqtt'" :label="$t('mqtt')">
<mqtt /> <RealtimeMqtt />
</tab> </SmartTab>
</tabs> </SmartTabs>
</section> </section>
</div> </div>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="page"> <div class="page">
<pw-section class="green" :label="$t('account')" ref="account" no-legend> <AppSection class="green" :label="$t('account')" ref="account" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("account") }}</label> <label>{{ $t("account") }}</label>
<div v-if="fb.currentUser"> <div v-if="fb.currentUser">
@@ -23,16 +23,16 @@
</span> </span>
</button> </button>
<br /> <br />
<logout /> <FirebaseLogout />
<p v-for="setting in fb.currentSettings" :key="setting.id"> <p v-for="setting in fb.currentSettings" :key="setting.id">
<pw-toggle <SmartToggle
:key="setting.name" :key="setting.name"
:on="setting.value" :on="setting.value"
@change="toggleSettings(setting.name, setting.value)" @change="toggleSettings(setting.name, setting.value)"
> >
{{ $t(setting.name) + " " + $t("sync") }} {{ $t(setting.name) + " " + $t("sync") }}
{{ setting.value ? $t("enabled") : $t("disabled") }} {{ setting.value ? $t("enabled") : $t("disabled") }}
</pw-toggle> </SmartToggle>
</p> </p>
<p v-if="fb.currentSettings.length !== 3"> <p v-if="fb.currentSettings.length !== 3">
<button class="" @click="initSettings"> <button class="" @click="initSettings">
@@ -44,48 +44,48 @@
<div v-else> <div v-else>
<label>{{ $t("login_with") }}</label> <label>{{ $t("login_with") }}</label>
<p> <p>
<login /> <FirebaseLogin />
</p> </p>
</div> </div>
</div> </div>
</pw-section> </AppSection>
<pw-section class="teal" :label="$t('theme')" ref="theme" no-legend> <AppSection class="teal" :label="$t('theme')" ref="theme" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("theme") }}</label> <label>{{ $t("theme") }}</label>
<color-mode-picker /> <SmartColorModePicker />
<accent-mode-picker /> <SmartAccentModePicker />
<span> <span>
<pw-toggle <SmartToggle
:on="settings.FRAME_COLORS_ENABLED" :on="settings.FRAME_COLORS_ENABLED"
@change="toggleSetting('FRAME_COLORS_ENABLED')" @change="toggleSetting('FRAME_COLORS_ENABLED')"
> >
{{ $t("multi_color") }} {{ $t("multi_color") }}
{{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") }} {{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle> </SmartToggle>
</span> </span>
<span> <span>
<pw-toggle <SmartToggle
:on="settings.SCROLL_INTO_ENABLED" :on="settings.SCROLL_INTO_ENABLED"
@change="toggleSetting('SCROLL_INTO_ENABLED')" @change="toggleSetting('SCROLL_INTO_ENABLED')"
> >
{{ $t("scrollInto_use_toggle") }} {{ $t("scrollInto_use_toggle") }}
{{ settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled") }} {{ settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle> </SmartToggle>
</span> </span>
</div> </div>
</pw-section> </AppSection>
<pw-section class="purple" :label="$t('extensions')" ref="extensions" no-legend> <AppSection class="purple" :label="$t('extensions')" ref="extensions" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("extensions") }}</label> <label>{{ $t("extensions") }}</label>
<div class="row-wrapper"> <div class="row-wrapper">
<pw-toggle <SmartToggle
:on="settings.EXTENSIONS_ENABLED" :on="settings.EXTENSIONS_ENABLED"
@change="toggleSetting('EXTENSIONS_ENABLED')" @change="toggleSetting('EXTENSIONS_ENABLED')"
> >
{{ $t("extensions_use_toggle") }} {{ $t("extensions_use_toggle") }}
</pw-toggle> </SmartToggle>
</div> </div>
<p v-if="extensionVersion != null" class="info"> <p v-if="extensionVersion != null" class="info">
{{ $t("extension_version") }}: v{{ extensionVersion.major }}.{{ extensionVersion.minor }} {{ $t("extension_version") }}: v{{ extensionVersion.major }}.{{ extensionVersion.minor }}
@@ -94,17 +94,17 @@
{{ $t("extension_version") }}: {{ $t("extension_ver_not_reported") }} {{ $t("extension_version") }}: {{ $t("extension_ver_not_reported") }}
</p> </p>
</div> </div>
</pw-section> </AppSection>
<pw-section class="blue" :label="$t('proxy')" ref="proxy" no-legend> <AppSection class="blue" :label="$t('proxy')" ref="proxy" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("proxy") }}</label> <label>{{ $t("proxy") }}</label>
<div class="row-wrapper"> <div class="row-wrapper">
<span> <span>
<pw-toggle :on="settings.PROXY_ENABLED" @change="toggleSetting('PROXY_ENABLED')"> <SmartToggle :on="settings.PROXY_ENABLED" @change="toggleSetting('PROXY_ENABLED')">
{{ $t("proxy") }} {{ $t("proxy") }}
{{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }} {{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle> </SmartToggle>
</span> </span>
<a <a
href="https://github.com/hoppscotch/hoppscotch/wiki/Proxy" href="https://github.com/hoppscotch/hoppscotch/wiki/Proxy"
@@ -158,9 +158,9 @@
</li> </li>
</ul> </ul>
--> -->
</pw-section> </AppSection>
<pw-section class="red" :label="$t('experiments')" ref="experiments" no-legend> <AppSection class="red" :label="$t('experiments')" ref="experiments" no-legend>
<div class="flex flex-col"> <div class="flex flex-col">
<label>{{ $t("experiments") }}</label> <label>{{ $t("experiments") }}</label>
<p class="info"> <p class="info">
@@ -174,15 +174,15 @@
>. >.
</p> </p>
<div class="row-wrapper"> <div class="row-wrapper">
<pw-toggle <SmartToggle
:on="settings.EXPERIMENTAL_URL_BAR_ENABLED" :on="settings.EXPERIMENTAL_URL_BAR_ENABLED"
@change="toggleSetting('EXPERIMENTAL_URL_BAR_ENABLED')" @change="toggleSetting('EXPERIMENTAL_URL_BAR_ENABLED')"
> >
{{ $t("use_experimental_url_bar") }} {{ $t("use_experimental_url_bar") }}
</pw-toggle> </SmartToggle>
</div> </div>
</div> </div>
</pw-section> </AppSection>
</div> </div>
</template> </template>