Refactor UI
This commit is contained in:
@@ -324,13 +324,12 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info:not(.toasted) {
|
.info:not(.toasted) {
|
||||||
@apply m-2;
|
@apply m-4;
|
||||||
@apply text-fgLightColor;
|
@apply text-fgLightColor;
|
||||||
|
|
||||||
.material-icons {
|
.material-icons {
|
||||||
@apply align-middle;
|
@apply align-middle;
|
||||||
@apply ml-2;
|
@apply mr-2;
|
||||||
@apply mr-4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("new_collection") }}</h3>
|
<h3 class="title">{{ $t("new_collection") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,20 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="selectLabel"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="$t('my_new_collection')"
|
:placeholder="$t('my_new_collection')"
|
||||||
@keyup.enter="addNewCollection"
|
@keyup.enter="addNewCollection"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="show = false">
|
<modal v-if="show" @close="show = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("new_folder") }}</h3>
|
<h3 class="title">{{ $t("new_folder") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,20 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="selectLabel"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="$t('my_new_folder')"
|
:placeholder="$t('my_new_folder')"
|
||||||
@keyup.enter="addFolder"
|
@keyup.enter="addFolder"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.folders.length === 0 && collection.requests.length === 0">
|
<li v-if="collection.folders.length === 0 && collection.requests.length === 0">
|
||||||
<label>{{ $t("collection_empty") }}</label>
|
<p class="info">{{ $t("collection_empty") }}</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="flex-col">
|
<ul class="flex-col">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("edit_collection") }}</h3>
|
<h3 class="title">{{ $t("edit_collection") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,20 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="selectLabel"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="editingCollection.name"
|
:placeholder="editingCollection.name"
|
||||||
@keyup.enter="saveCollection"
|
@keyup.enter="saveCollection"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="show = false">
|
<modal v-if="show" @close="show = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("edit_folder") }}</h3>
|
<h3 class="title">{{ $t("edit_folder") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,15 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
<input
|
||||||
<input type="text" v-model="name" :placeholder="folder.name" @keyup.enter="editFolder" />
|
type="text"
|
||||||
</li>
|
id="selectLabel"
|
||||||
</ul>
|
v-model="name"
|
||||||
|
:placeholder="folder.name"
|
||||||
|
@keyup.enter="editFolder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("edit_request") }}</h3>
|
<h3 class="title">{{ $t("edit_request") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,8 +9,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<label for="selectLabel">{{ $t("label") }}</label>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<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>
|
||||||
<div>
|
<div>
|
||||||
@@ -13,7 +11,7 @@
|
|||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="readCollectionGist" v-close-popover>
|
<button class="icon" @click="readCollectionGist" v-close-popover>
|
||||||
<i class="material-icons">code</i>
|
<i class="material-icons">assignment_returned</i>
|
||||||
<span>{{ $t("import_from_gist") }}</span>
|
<span>{{ $t("import_from_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,17 +26,13 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
!fb.currentUser
|
!fb.currentUser ? true : fb.currentUser.provider !== 'github.com' ? true : false
|
||||||
? true
|
|
||||||
: fb.currentUser.provider !== 'github.com'
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
"
|
"
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="createCollectionGist"
|
@click="createCollectionGist"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">code</i>
|
<i class="material-icons">assignment_turned_in</i>
|
||||||
<span>{{ $t("create_secret_gist") }}</span>
|
<span>{{ $t("create_secret_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,7 +43,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-wrapper">
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<div class="flex flex-col items-start">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
||||||
@@ -91,15 +87,17 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<div v-if="showJsonCode" class="row-wrapper">
|
||||||
</ul>
|
<textarea v-model="collectionJson" rows="8" readonly></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
|
||||||
<textarea v-model="collectionJson" rows="8"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<span></span>
|
<span>
|
||||||
|
<pw-toggle :on="showJsonCode" @change="showJsonCode = $event">
|
||||||
|
{{ $t("show_code") }}
|
||||||
|
</pw-toggle>
|
||||||
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t("cancel") }}
|
{{ $t("cancel") }}
|
||||||
@@ -120,6 +118,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fb,
|
fb,
|
||||||
|
showJsonCode: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -89,11 +89,9 @@ TODO:
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ul class="flex-col" v-if="filterText && filteredCollections.length === 0">
|
<p v-if="filterText && filteredCollections.length === 0" class="info">
|
||||||
<li>
|
{{ $t("nothing_found") }} "{{ filterText }}"
|
||||||
<label>{{ $t("nothing_found") }} "{{ filterText }}"</label>
|
</p>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("save_request_as") }}</h3>
|
<h3 class="title">{{ $t("save_request_as") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,19 +9,12 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
|
<label for="selectLabel">{{ $t("token_req_name") }}</label>
|
||||||
|
<input type="text" id="selectLabel" v-model="requestData.name" @keyup.enter="saveRequestAs" />
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="selectLabel">{{ $t("token_req_name") }}</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
id="selectLabel"
|
|
||||||
v-model="requestData.name"
|
|
||||||
@keyup.enter="saveRequestAs"
|
|
||||||
/>
|
|
||||||
<label for="selectCollection">{{ $t("collection") }}</label>
|
<label for="selectCollection">{{ $t("collection") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectCollection" v-model="requestData.collectionIndex">
|
<select type="text" id="selectCollection" v-model="requestData.collectionIndex">
|
||||||
@@ -39,6 +30,8 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<label>{{ $t("folder") }}</label>
|
<label>{{ $t("folder") }}</label>
|
||||||
<autocomplete
|
<autocomplete
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('search')"
|
||||||
@@ -46,6 +39,8 @@
|
|||||||
:spellcheck="false"
|
:spellcheck="false"
|
||||||
v-model="requestData.folderName"
|
v-model="requestData.folderName"
|
||||||
/>
|
/>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
<label for="selectRequest">{{ $t("request") }}</label>
|
<label for="selectRequest">{{ $t("request") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectRequest" v-model="requestData.requestIndex">
|
<select type="text" id="selectRequest" v-model="requestData.requestIndex">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("new_environment") }}</h3>
|
<h3 class="title">{{ $t("new_environment") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,20 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="selectLabel"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="$t('my_new_environment')"
|
:placeholder="$t('my_new_environment')"
|
||||||
@keyup.enter="addNewEnvironment"
|
@keyup.enter="addNewEnvironment"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("edit_environment") }}</h3>
|
<h3 class="title">{{ $t("edit_environment") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,22 +9,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="selectLabel"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:placeholder="editingEnvironment.name"
|
:placeholder="editingEnvironment.name"
|
||||||
@keyup.enter="saveEnvironment"
|
@keyup.enter="saveEnvironment"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -35,8 +27,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul v-for="(variable, index) in this.editingEnvCopy.variables" :key="index">
|
<ul v-for="(variable, index) in this.editingEnvCopy.variables" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<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>
|
||||||
<div>
|
<div>
|
||||||
@@ -13,7 +11,7 @@
|
|||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="readEnvironmentGist" v-close-popover>
|
<button class="icon" @click="readEnvironmentGist" v-close-popover>
|
||||||
<i class="material-icons">code</i>
|
<i class="material-icons">assignment_returned</i>
|
||||||
<span>{{ $t("import_from_gist") }}</span>
|
<span>{{ $t("import_from_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,17 +26,13 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
!fb.currentUser
|
!fb.currentUser ? true : fb.currentUser.provider !== 'github.com' ? true : false
|
||||||
? true
|
|
||||||
: fb.currentUser.provider !== 'github.com'
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
"
|
"
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="createEnvironmentGist"
|
@click="createEnvironmentGist"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">code</i>
|
<i class="material-icons">assignment_turned_in</i>
|
||||||
<span>{{ $t("create_secret_gist") }}</span>
|
<span>{{ $t("create_secret_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,7 +43,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-wrapper">
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<div class="flex flex-col items-start">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
||||||
@@ -91,15 +87,17 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<div v-if="showJsonCode" class="row-wrapper">
|
||||||
</ul>
|
<textarea v-model="environmentJson" rows="8" readonly></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
|
||||||
<textarea v-model="environmentJson" rows="8"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<span></span>
|
<span>
|
||||||
|
<pw-toggle :on="showJsonCode" @change="showJsonCode = $event">
|
||||||
|
{{ $t("show_code") }}
|
||||||
|
</pw-toggle>
|
||||||
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t("cancel") }}
|
{{ $t("cancel") }}
|
||||||
@@ -120,6 +118,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fb,
|
fb,
|
||||||
|
showJsonCode: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="flex-col">
|
||||||
<ul class="flex-col">
|
|
||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
:aria-label="$t('label')"
|
:aria-label="$t('label')"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -11,10 +9,8 @@
|
|||||||
:placeholder="$t('paste_a_note')"
|
:placeholder="$t('paste_a_note')"
|
||||||
@keyup.enter="formPost"
|
@keyup.enter="formPost"
|
||||||
/>
|
/>
|
||||||
</li>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li>
|
|
||||||
<input
|
<input
|
||||||
:aria-label="$t('label')"
|
:aria-label="$t('label')"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -23,18 +19,11 @@
|
|||||||
:placeholder="$t('label')"
|
:placeholder="$t('label')"
|
||||||
@keyup.enter="formPost"
|
@keyup.enter="formPost"
|
||||||
/>
|
/>
|
||||||
</li>
|
<button class="icon" :disabled="!(this.message || this.label)" value="Save" @click="formPost">
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
:disabled="!(this.message || this.label)"
|
|
||||||
value="Save"
|
|
||||||
@click="formPost"
|
|
||||||
>
|
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
<span>Add</span>
|
<span>Add</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("generate_code") }}</h3>
|
<h3 class="title">{{ $t("generate_code") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,12 +9,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<label for="requestType">{{ $t("request_type") }}</label>
|
<label for="requestType">{{ $t("request_type") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<v-popover>
|
<v-popover>
|
||||||
@@ -39,10 +33,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</v-popover>
|
</v-popover>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="generatedCode">{{ $t("generated_code") }}</label>
|
<label for="generatedCode">{{ $t("generated_code") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -65,8 +55,6 @@
|
|||||||
v-model="requestCode"
|
v-model="requestCode"
|
||||||
readonly
|
readonly
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("import_curl") }}</h3>
|
<h3 class="title">{{ $t("import_curl") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,15 +9,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<textarea id="import-curl" autofocus rows="8" :placeholder="$t('enter_curl')"></textarea>
|
<textarea id="import-curl" autofocus rows="8" :placeholder="$t('enter_curl')"></textarea>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
@@ -5,14 +5,8 @@
|
|||||||
<feeds />
|
<feeds />
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<ul>
|
<p class="info">{{ $t("login_first") }}</p>
|
||||||
<li>
|
|
||||||
<label>{{ $t("login_first") }}</label>
|
|
||||||
<p>
|
|
||||||
<login />
|
<login />
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("manage_token") }}</h3>
|
<h3 class="title">{{ $t("manage_token") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -11,12 +9,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="token-list">{{ $t("token_list") }}</label>
|
<label for="token-list">{{ $t("token_list") }}</label>
|
||||||
<div v-if="tokens.length != 0">
|
<div v-if="tokens.length != 0">
|
||||||
@@ -29,8 +23,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul id="token-list" v-for="(token, index) in tokens" :key="index">
|
<ul id="token-list" v-for="(token, index) in tokens" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -129,11 +129,9 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ul :class="{ hidden: filteredHistory.length != 0 || history.length === 0 }">
|
<p :class="{ hidden: filteredHistory.length != 0 || history.length === 0 }" class="info">
|
||||||
<li>
|
{{ $t("nothing_found") }} "{{ filterText }}"
|
||||||
<label>{{ $t("nothing_found") }} "{{ filterText }}"</label>
|
</p>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p v-if="history.length === 0" class="info">
|
<p v-if="history.length === 0" class="info">
|
||||||
<i class="material-icons">schedule</i> {{ $t("history_empty") }}
|
<i class="material-icons">schedule</i> {{ $t("history_empty") }}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -124,167 +124,15 @@
|
|||||||
</v-popover>
|
</v-popover>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<modal v-if="showExtensions" @close="showExtensions = false">
|
<extensions :show="showExtensions" @hide-modal="showExtensions = false" />
|
||||||
<div slot="header">
|
<shortcuts :show="showShortcuts" @hide-modal="showShortcuts = false" />
|
||||||
<ul>
|
<support :show="showSupport" @hide-modal="showSupport = false" />
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<h3 class="title">{{ $t("extensions") }}</h3>
|
|
||||||
<div>
|
|
||||||
<button class="icon" @click="showExtensions = false">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div slot="body">
|
|
||||||
<p class="info">
|
|
||||||
{{ $t("extensions_info1") }}
|
|
||||||
</p>
|
|
||||||
<div>
|
|
||||||
<a
|
|
||||||
href="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
>
|
|
||||||
<button class="icon">
|
|
||||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path
|
|
||||||
d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm8.003 8.657c-1.276-3.321-4.46-4.605-5.534-4.537 3.529 1.376 4.373 6.059 4.06 7.441-.307-1.621-1.286-3.017-1.872-3.385 3.417 8.005-4.835 10.465-7.353 7.687.649.168 1.931.085 2.891-.557.898-.602.983-.638 1.56-.683.686-.053-.041-1.406-1.539-1.177-.616.094-1.632.819-2.88.341-1.508-.576-1.46-2.634.096-2.015.337-.437.088-1.263.088-1.263.452-.414 1.022-.706 1.37-.911.228-.135.829-.507.795-1.23-.123-.096-.32-.219-.766-.193-1.736.11-1.852-.518-1.967-.808.078-.668.524-1.534 1.361-1.931-1.257-.193-2.28.397-2.789 1.154-.809-.174-1.305-.183-2.118-.031-.316-.24-.666-.67-.878-1.181C6.36 3.312 9.027 2 12 2c5.912 0 8.263 4.283 8.003 6.657z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span>Firefox</span>
|
|
||||||
<span class="icon" v-if="hasFirefoxExtInstalled" v-tooltip="$t('installed')">
|
|
||||||
<i class="material-icons">done</i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a
|
|
||||||
href="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
>
|
|
||||||
<button class="icon">
|
|
||||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path
|
|
||||||
d="M2.897 4.181A11.87 11.87 0 0111.969 0c4.288 0 8.535 2.273 10.717 6.554h-9.293c-1.674.001-2.755-.037-3.926.579-1.376.724-2.415 2.067-2.777 3.644L2.897 4.181zM8.007 12c0 2.2 1.789 3.99 3.988 3.99s3.988-1.79 3.988-3.99-1.789-3.991-3.988-3.991S8.007 9.8 8.007 12zm5.536 5.223c-2.238.666-4.858-.073-6.293-2.549-1.095-1.891-3.989-6.933-5.305-9.225A11.856 11.856 0 000 11.956c0 5.448 3.726 10.65 9.673 11.818l3.87-6.551zm2.158-9.214a5.463 5.463 0 011.007 6.719 1815.43 1815.43 0 01-5.46 9.248C18.437 24.419 24 18.616 24 12.004c0-1.313-.22-2.66-.69-3.995h-7.609z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span>Chrome</span>
|
|
||||||
<span class="icon" v-if="hasChromeExtInstalled" v-tooltip="$t('installed')">
|
|
||||||
<i class="material-icons">done</i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div slot="footer"></div>
|
|
||||||
</modal>
|
|
||||||
<modal v-if="showShortcuts" @close="showShortcuts = false">
|
|
||||||
<div slot="header">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<h3 class="title">{{ $t("shortcuts") }}</h3>
|
|
||||||
<div>
|
|
||||||
<button class="icon" @click="showShortcuts = false">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div slot="body">
|
|
||||||
<div>
|
|
||||||
<kbd>{{ getSpecialKey() }}</kbd>
|
|
||||||
+
|
|
||||||
<kbd>G</kbd>
|
|
||||||
<label>{{ $t("send_request") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>{{ getSpecialKey() }}</kbd
|
|
||||||
>+<kbd>S</kbd>
|
|
||||||
<label>{{ $t("save_to_collections") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>{{ getSpecialKey() }}</kbd
|
|
||||||
>+<kbd>K</kbd>
|
|
||||||
<label>{{ $t("copy_request_link") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>{{ getSpecialKey() }}</kbd
|
|
||||||
>+<kbd>I</kbd>
|
|
||||||
<label>{{ $t("reset_request") }}</label>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>▲</kbd>
|
|
||||||
<label>{{ $t("select_next_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>▼</kbd>
|
|
||||||
<label>{{ $t("select_previous_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>G</kbd>
|
|
||||||
<label>{{ $t("select_get_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>H</kbd>
|
|
||||||
<label>{{ $t("select_head_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>P</kbd>
|
|
||||||
<label>{{ $t("select_post_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>U</kbd>
|
|
||||||
<label>{{ $t("select_put_method") }}</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<kbd>Alt</kbd>+<kbd>X</kbd>
|
|
||||||
<label>{{ $t("select_delete_method") }}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div slot="footer"></div>
|
|
||||||
</modal>
|
|
||||||
<modal v-if="showSupport" @close="showSupport = false">
|
|
||||||
<div slot="header">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<h3 class="title">{{ $t("support_us") }}</h3>
|
|
||||||
<div>
|
|
||||||
<button class="icon" @click="showSupport = false">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div slot="body">
|
|
||||||
<contributors />
|
|
||||||
</div>
|
|
||||||
<div slot="footer"></div>
|
|
||||||
</modal>
|
|
||||||
</header>
|
</header>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
$responsiveWidth: 768px;
|
$responsiveWidth: 768px;
|
||||||
|
|
||||||
kbd {
|
|
||||||
@apply inline-flex;
|
|
||||||
@apply resize-none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes slideIn {
|
@keyframes slideIn {
|
||||||
0% {
|
0% {
|
||||||
@apply opacity-0;
|
@apply opacity-0;
|
||||||
@@ -316,12 +164,7 @@ kbd {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import intializePwa from "~/helpers/pwa"
|
import intializePwa from "~/helpers/pwa"
|
||||||
import {
|
import { hasExtensionInstalled } from "~/helpers/strategies/ExtensionStrategy"
|
||||||
hasExtensionInstalled,
|
|
||||||
hasChromeExtensionInstalled,
|
|
||||||
hasFirefoxExtensionInstalled,
|
|
||||||
} from "~/helpers/strategies/ExtensionStrategy"
|
|
||||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
|
||||||
import { fb } from "~/helpers/fb"
|
import { fb } from "~/helpers/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -332,19 +175,23 @@ export default {
|
|||||||
// prompt.
|
// prompt.
|
||||||
showInstallPrompt: null,
|
showInstallPrompt: null,
|
||||||
showExtensions: false,
|
showExtensions: false,
|
||||||
hasChromeExtInstalled: hasChromeExtensionInstalled(),
|
|
||||||
hasFirefoxExtInstalled: hasFirefoxExtensionInstalled(),
|
|
||||||
showShortcuts: false,
|
showShortcuts: false,
|
||||||
showSupport: false,
|
showSupport: false,
|
||||||
fb,
|
|
||||||
navigatorShare: navigator.share,
|
navigatorShare: navigator.share,
|
||||||
|
fb,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async mounted() {
|
||||||
|
this._keyListener = function (e) {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.preventDefault()
|
||||||
|
this.showExtensions = this.showShortcuts = this.showSupport = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
|
|
||||||
mounted() {
|
|
||||||
// Initializes the PWA code - checks if the app is installed,
|
// Initializes the PWA code - checks if the app is installed,
|
||||||
// etc.
|
// etc.
|
||||||
;(async () => {
|
|
||||||
this.showInstallPrompt = await intializePwa()
|
this.showInstallPrompt = await intializePwa()
|
||||||
let cookiesAllowed = localStorage.getItem("cookiesAllowed") === "yes"
|
let cookiesAllowed = localStorage.getItem("cookiesAllowed") === "yes"
|
||||||
if (!cookiesAllowed) {
|
if (!cookiesAllowed) {
|
||||||
@@ -394,7 +241,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
|
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
|
||||||
|
|
||||||
// Just return if showExtensionsToast is "no"
|
// Just return if showExtensionsToast is "no"
|
||||||
if (!showExtensionsToast) return
|
if (!showExtensionsToast) return
|
||||||
|
|
||||||
@@ -428,19 +274,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 5000)
|
}, 5000)
|
||||||
|
|
||||||
this._keyListener = function (e) {
|
|
||||||
if (e.key === "Escape") {
|
|
||||||
e.preventDefault()
|
|
||||||
this.showExtensions = this.showShortcuts = this.showSupport = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
document.addEventListener("keydown", this._keyListener.bind(this))
|
|
||||||
})()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getSpecialKey: getPlatformSpecialKey,
|
|
||||||
nativeShare() {
|
nativeShare() {
|
||||||
if (navigator.share) {
|
if (navigator.share) {
|
||||||
navigator
|
navigator
|
||||||
@@ -457,5 +292,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener("keydown", this._keyListener)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ul v-for="(value, key) in headers" :key="key">
|
<p v-for="(value, key) in headers" :key="key">
|
||||||
<li>
|
|
||||||
<input :value="`${key} → ${value}`" :name="key" class="bg-transparent" readonly />
|
<input :value="`${key} → ${value}`" :name="key" class="bg-transparent" readonly />
|
||||||
</li>
|
</p>
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="body">{{ $t("response") }}</label>
|
<label for="body">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -70,8 +69,7 @@
|
|||||||
src="about:blank"
|
src="about:blank"
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="body">{{ $t("response") }}</label>
|
<label for="body">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -18,8 +17,7 @@
|
|||||||
<div id="response-details-wrapper">
|
<div id="response-details-wrapper">
|
||||||
<img class="max-w-full" :src="imageSource" />
|
<img class="max-w-full" :src="imageSource" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="body">{{ $t("response") }}</label>
|
<label for="body">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -55,8 +54,7 @@
|
|||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="body">{{ $t("response") }}</label>
|
<label for="body">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -52,8 +51,7 @@
|
|||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="body">{{ $t("response") }}</label>
|
<label for="body">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -52,8 +51,7 @@
|
|||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
82
components/others/extensions.vue
Normal file
82
components/others/extensions.vue
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<div class="row-wrapper">
|
||||||
|
<h3 class="title">{{ $t("extensions") }}</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<p class="info">
|
||||||
|
{{ $t("extensions_info1") }}
|
||||||
|
</p>
|
||||||
|
<div>
|
||||||
|
<a
|
||||||
|
href="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
<button class="icon">
|
||||||
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
||||||
|
<path
|
||||||
|
d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm8.003 8.657c-1.276-3.321-4.46-4.605-5.534-4.537 3.529 1.376 4.373 6.059 4.06 7.441-.307-1.621-1.286-3.017-1.872-3.385 3.417 8.005-4.835 10.465-7.353 7.687.649.168 1.931.085 2.891-.557.898-.602.983-.638 1.56-.683.686-.053-.041-1.406-1.539-1.177-.616.094-1.632.819-2.88.341-1.508-.576-1.46-2.634.096-2.015.337-.437.088-1.263.088-1.263.452-.414 1.022-.706 1.37-.911.228-.135.829-.507.795-1.23-.123-.096-.32-.219-.766-.193-1.736.11-1.852-.518-1.967-.808.078-.668.524-1.534 1.361-1.931-1.257-.193-2.28.397-2.789 1.154-.809-.174-1.305-.183-2.118-.031-.316-.24-.666-.67-.878-1.181C6.36 3.312 9.027 2 12 2c5.912 0 8.263 4.283 8.003 6.657z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span>Firefox</span>
|
||||||
|
<span class="icon" v-if="hasFirefoxExtInstalled" v-tooltip="$t('installed')">
|
||||||
|
<i class="material-icons">done</i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a
|
||||||
|
href="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
<button class="icon">
|
||||||
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
||||||
|
<path
|
||||||
|
d="M2.897 4.181A11.87 11.87 0 0111.969 0c4.288 0 8.535 2.273 10.717 6.554h-9.293c-1.674.001-2.755-.037-3.926.579-1.376.724-2.415 2.067-2.777 3.644L2.897 4.181zM8.007 12c0 2.2 1.789 3.99 3.988 3.99s3.988-1.79 3.988-3.99-1.789-3.991-3.988-3.991S8.007 9.8 8.007 12zm5.536 5.223c-2.238.666-4.858-.073-6.293-2.549-1.095-1.891-3.989-6.933-5.305-9.225A11.856 11.856 0 000 11.956c0 5.448 3.726 10.65 9.673 11.818l3.87-6.551zm2.158-9.214a5.463 5.463 0 011.007 6.719 1815.43 1815.43 0 01-5.46 9.248C18.437 24.419 24 18.616 24 12.004c0-1.313-.22-2.66-.69-3.995h-7.609z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span>Chrome</span>
|
||||||
|
<span class="icon" v-if="hasChromeExtInstalled" v-tooltip="$t('installed')">
|
||||||
|
<i class="material-icons">done</i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer"></div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
hasChromeExtensionInstalled,
|
||||||
|
hasFirefoxExtensionInstalled,
|
||||||
|
} from "~/helpers/strategies/ExtensionStrategy"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
show: Boolean,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
hasChromeExtInstalled: hasChromeExtensionInstalled(),
|
||||||
|
hasFirefoxExtInstalled: hasFirefoxExtensionInstalled(),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideModal() {
|
||||||
|
this.$emit("hide-modal")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
91
components/others/shortcuts.vue
Normal file
91
components/others/shortcuts.vue
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<div class="row-wrapper">
|
||||||
|
<h3 class="title">{{ $t("shortcuts") }}</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<div>
|
||||||
|
<kbd>{{ getSpecialKey() }}</kbd>
|
||||||
|
+
|
||||||
|
<kbd>G</kbd>
|
||||||
|
<label>{{ $t("send_request") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>{{ getSpecialKey() }}</kbd
|
||||||
|
>+<kbd>S</kbd>
|
||||||
|
<label>{{ $t("save_to_collections") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>{{ getSpecialKey() }}</kbd
|
||||||
|
>+<kbd>K</kbd>
|
||||||
|
<label>{{ $t("copy_request_link") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>{{ getSpecialKey() }}</kbd
|
||||||
|
>+<kbd>I</kbd>
|
||||||
|
<label>{{ $t("reset_request") }}</label>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>▲</kbd>
|
||||||
|
<label>{{ $t("select_next_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>▼</kbd>
|
||||||
|
<label>{{ $t("select_previous_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>G</kbd>
|
||||||
|
<label>{{ $t("select_get_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>H</kbd>
|
||||||
|
<label>{{ $t("select_head_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>P</kbd>
|
||||||
|
<label>{{ $t("select_post_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>U</kbd>
|
||||||
|
<label>{{ $t("select_put_method") }}</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<kbd>Alt</kbd>+<kbd>X</kbd>
|
||||||
|
<label>{{ $t("select_delete_method") }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer"></div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
kbd {
|
||||||
|
@apply inline-flex;
|
||||||
|
@apply resize-none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
show: Boolean,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getSpecialKey: getPlatformSpecialKey,
|
||||||
|
hideModal() {
|
||||||
|
this.$emit("hide-modal")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
31
components/others/support.vue
Normal file
31
components/others/support.vue
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<template>
|
||||||
|
<modal v-if="show" @close="hideModal">
|
||||||
|
<div slot="header">
|
||||||
|
<div class="row-wrapper">
|
||||||
|
<h3 class="title">{{ $t("support_us") }}</h3>
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="hideModal">
|
||||||
|
<i class="material-icons">close</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="body">
|
||||||
|
<contributors />
|
||||||
|
</div>
|
||||||
|
<div slot="footer"></div>
|
||||||
|
</modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
show: Boolean,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideModal() {
|
||||||
|
this.$emit("hide-modal")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
@click="createDocsGist"
|
@click="createDocsGist"
|
||||||
>
|
>
|
||||||
<i class="material-icons">code</i>
|
<i class="material-icons">assignment</i>
|
||||||
<span>{{ $t("create_secret_gist") }}</span>
|
<span>{{ $t("create_secret_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -724,8 +724,6 @@
|
|||||||
|
|
||||||
<modal v-if="showTokenRequestList" @close="showTokenRequestList = false">
|
<modal v-if="showTokenRequestList" @close="showTokenRequestList = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<h3 class="title">{{ $t("manage_token_req") }}</h3>
|
<h3 class="title">{{ $t("manage_token_req") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
@@ -734,12 +732,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
<label for="token-req-list">{{ $t("token_req_list") }}</label>
|
<label for="token-req-list">{{ $t("token_req_list") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -761,6 +755,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
id="token-req-list"
|
id="token-req-list"
|
||||||
@@ -775,20 +771,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<label for="token-req-name">{{ $t("token_req_name") }}</label>
|
<label for="token-req-name">{{ $t("token_req_name") }}</label>
|
||||||
<input v-model="tokenReqName" />
|
<input v-model="tokenReqName" />
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<label for="token-req-details">
|
<label for="token-req-details">
|
||||||
{{ $t("token_req_details") }}
|
{{ $t("token_req_details") }}
|
||||||
</label>
|
</label>
|
||||||
<textarea id="token-req-details" readonly rows="7" v-model="tokenReqDetails"></textarea>
|
<textarea id="token-req-details" readonly rows="7" v-model="tokenReqDetails"></textarea>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="row-wrapper">
|
<div class="row-wrapper">
|
||||||
|
|||||||
Reference in New Issue
Block a user