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,30 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("new_collection") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("new_collection") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,30 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="show = false">
|
<modal v-if="show" @close="show = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("new_folder") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("new_folder") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,30 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("edit_collection") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("edit_collection") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,25 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="show = false">
|
<modal v-if="show" @close="show = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("edit_folder") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("edit_folder") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,18 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("edit_request") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("edit_request") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,105 +1,103 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3>
|
<v-popover>
|
||||||
<div>
|
<button class="tooltip-target icon" v-tooltip.left="$t('more')">
|
||||||
<v-popover>
|
<i class="material-icons">more_vert</i>
|
||||||
<button class="tooltip-target icon" v-tooltip.left="$t('more')">
|
</button>
|
||||||
<i class="material-icons">more_vert</i>
|
<template slot="popover">
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="readCollectionGist" v-close-popover>
|
||||||
|
<i class="material-icons">assignment_returned</i>
|
||||||
|
<span>{{ $t("import_from_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
</div>
|
||||||
<div>
|
<div
|
||||||
<button class="icon" @click="readCollectionGist" v-close-popover>
|
v-tooltip.bottom="{
|
||||||
<i class="material-icons">code</i>
|
content: !fb.currentUser
|
||||||
<span>{{ $t("import_from_gist") }}</span>
|
? $t('login_with_github_to') + $t('create_secret_gist')
|
||||||
</button>
|
: fb.currentUser.provider !== 'github.com'
|
||||||
</div>
|
? $t('login_with_github_to') + $t('create_secret_gist')
|
||||||
<div
|
: null,
|
||||||
v-tooltip.bottom="{
|
}"
|
||||||
content: !fb.currentUser
|
>
|
||||||
? $t('login_with_github_to') + $t('create_secret_gist')
|
<button
|
||||||
: fb.currentUser.provider !== 'github.com'
|
:disabled="
|
||||||
? $t('login_with_github_to') + $t('create_secret_gist')
|
!fb.currentUser ? true : fb.currentUser.provider !== 'github.com' ? true : false
|
||||||
: null,
|
"
|
||||||
}"
|
class="icon"
|
||||||
>
|
@click="createCollectionGist"
|
||||||
<button
|
v-close-popover
|
||||||
:disabled="
|
>
|
||||||
!fb.currentUser
|
<i class="material-icons">assignment_turned_in</i>
|
||||||
? true
|
<span>{{ $t("create_secret_gist") }}</span>
|
||||||
: fb.currentUser.provider !== 'github.com'
|
</button>
|
||||||
? true
|
</div>
|
||||||
: false
|
</template>
|
||||||
"
|
</v-popover>
|
||||||
class="icon"
|
<button class="icon" @click="hideModal">
|
||||||
@click="createCollectionGist"
|
<i class="material-icons">close</i>
|
||||||
v-close-popover
|
</button>
|
||||||
>
|
</div>
|
||||||
<i class="material-icons">code</i>
|
</div>
|
||||||
<span>{{ $t("create_secret_gist") }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</v-popover>
|
|
||||||
<button class="icon" @click="hideModal">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<span
|
|
||||||
v-tooltip="{
|
|
||||||
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<button :disabled="!fb.currentUser" class="icon" @click="syncCollections">
|
|
||||||
<i class="material-icons">folder_shared</i>
|
|
||||||
<span>{{ $t("import_from_sync") }}</span>
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToReplaceWith"
|
|
||||||
v-tooltip="$t('replace_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">create_new_folder</i>
|
|
||||||
<span>{{ $t("replace_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="replaceWithJSON"
|
|
||||||
style="display: none"
|
|
||||||
ref="inputChooseFileToReplaceWith"
|
|
||||||
accept="application/json"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToImportFrom"
|
|
||||||
v-tooltip="$t('preserve_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">folder_special</i>
|
|
||||||
<span>{{ $t("import_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="importFromJSON"
|
|
||||||
style="display: none"
|
|
||||||
ref="inputChooseFileToImportFrom"
|
|
||||||
accept="application/json"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<textarea v-model="collectionJson" rows="8"></textarea>
|
<div class="flex flex-col items-start">
|
||||||
|
<span
|
||||||
|
v-tooltip="{
|
||||||
|
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<button :disabled="!fb.currentUser" class="icon" @click="syncCollections">
|
||||||
|
<i class="material-icons">folder_shared</i>
|
||||||
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToReplaceWith"
|
||||||
|
v-tooltip="$t('replace_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">create_new_folder</i>
|
||||||
|
<span>{{ $t("replace_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="replaceWithJSON"
|
||||||
|
style="display: none"
|
||||||
|
ref="inputChooseFileToReplaceWith"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToImportFrom"
|
||||||
|
v-tooltip="$t('preserve_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_special</i>
|
||||||
|
<span>{{ $t("import_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="importFromJSON"
|
||||||
|
style="display: none"
|
||||||
|
ref="inputChooseFileToImportFrom"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div v-if="showJsonCode" class="row-wrapper">
|
||||||
|
<textarea v-model="collectionJson" rows="8" readonly></textarea>
|
||||||
|
</div>
|
||||||
</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,29 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("save_request_as") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("save_request_as") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,13 +30,17 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label>{{ $t("folder") }}</label>
|
</li>
|
||||||
<autocomplete
|
</ul>
|
||||||
:placeholder="$t('search')"
|
<label>{{ $t("folder") }}</label>
|
||||||
:source="folders"
|
<autocomplete
|
||||||
:spellcheck="false"
|
:placeholder="$t('search')"
|
||||||
v-model="requestData.folderName"
|
:source="folders"
|
||||||
/>
|
:spellcheck="false"
|
||||||
|
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,30 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("new_environment") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("new_environment") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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,42 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("edit_environment") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("edit_environment") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</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>
|
<div class="row-wrapper">
|
||||||
</ul>
|
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
||||||
<ul>
|
<div>
|
||||||
<li>
|
<button class="icon" @click="clearContent($event)" v-tooltip.bottom="$t('clear')">
|
||||||
<div class="row-wrapper">
|
<i class="material-icons">clear_all</i>
|
||||||
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
</button>
|
||||||
<div>
|
</div>
|
||||||
<button class="icon" @click="clearContent($event)" v-tooltip.bottom="$t('clear')">
|
</div>
|
||||||
<i class="material-icons">clear_all</i>
|
|
||||||
</button>
|
|
||||||
</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,105 +1,103 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3>
|
<v-popover>
|
||||||
<div>
|
<button class="tooltip-target icon" v-tooltip.left="$t('more')">
|
||||||
<v-popover>
|
<i class="material-icons">more_vert</i>
|
||||||
<button class="tooltip-target icon" v-tooltip.left="$t('more')">
|
</button>
|
||||||
<i class="material-icons">more_vert</i>
|
<template slot="popover">
|
||||||
|
<div>
|
||||||
|
<button class="icon" @click="readEnvironmentGist" v-close-popover>
|
||||||
|
<i class="material-icons">assignment_returned</i>
|
||||||
|
<span>{{ $t("import_from_gist") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
</div>
|
||||||
<div>
|
<div
|
||||||
<button class="icon" @click="readEnvironmentGist" v-close-popover>
|
v-tooltip.bottom="{
|
||||||
<i class="material-icons">code</i>
|
content: !fb.currentUser
|
||||||
<span>{{ $t("import_from_gist") }}</span>
|
? $t('login_with_github_to') + $t('create_secret_gist')
|
||||||
</button>
|
: fb.currentUser.provider !== 'github.com'
|
||||||
</div>
|
? $t('login_with_github_to') + $t('create_secret_gist')
|
||||||
<div
|
: null,
|
||||||
v-tooltip.bottom="{
|
}"
|
||||||
content: !fb.currentUser
|
>
|
||||||
? $t('login_with_github_to') + $t('create_secret_gist')
|
<button
|
||||||
: fb.currentUser.provider !== 'github.com'
|
:disabled="
|
||||||
? $t('login_with_github_to') + $t('create_secret_gist')
|
!fb.currentUser ? true : fb.currentUser.provider !== 'github.com' ? true : false
|
||||||
: null,
|
"
|
||||||
}"
|
class="icon"
|
||||||
>
|
@click="createEnvironmentGist"
|
||||||
<button
|
v-close-popover
|
||||||
:disabled="
|
>
|
||||||
!fb.currentUser
|
<i class="material-icons">assignment_turned_in</i>
|
||||||
? true
|
<span>{{ $t("create_secret_gist") }}</span>
|
||||||
: fb.currentUser.provider !== 'github.com'
|
</button>
|
||||||
? true
|
</div>
|
||||||
: false
|
</template>
|
||||||
"
|
</v-popover>
|
||||||
class="icon"
|
<button class="icon" @click="hideModal">
|
||||||
@click="createEnvironmentGist"
|
<i class="material-icons">close</i>
|
||||||
v-close-popover
|
</button>
|
||||||
>
|
</div>
|
||||||
<i class="material-icons">code</i>
|
</div>
|
||||||
<span>{{ $t("create_secret_gist") }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</v-popover>
|
|
||||||
<button class="icon" @click="hideModal">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<span
|
|
||||||
v-tooltip="{
|
|
||||||
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<button :disabled="!fb.currentUser" class="icon" @click="syncEnvironments">
|
|
||||||
<i class="material-icons">folder_shared</i>
|
|
||||||
<span>{{ $t("import_from_sync") }}</span>
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToReplaceWith"
|
|
||||||
v-tooltip="$t('replace_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">create_new_folder</i>
|
|
||||||
<span>{{ $t("replace_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="replaceWithJSON"
|
|
||||||
style="display: none"
|
|
||||||
ref="inputChooseFileToReplaceWith"
|
|
||||||
accept="application/json"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToImportFrom"
|
|
||||||
v-tooltip="$t('preserve_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">folder_special</i>
|
|
||||||
<span>{{ $t("import_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="importFromJSON"
|
|
||||||
style="display: none"
|
|
||||||
ref="inputChooseFileToImportFrom"
|
|
||||||
accept="application/json"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<textarea v-model="environmentJson" rows="8"></textarea>
|
<div class="flex flex-col items-start">
|
||||||
|
<span
|
||||||
|
v-tooltip="{
|
||||||
|
content: !fb.currentUser ? $t('login_first') : $t('replace_current'),
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<button :disabled="!fb.currentUser" class="icon" @click="syncEnvironments">
|
||||||
|
<i class="material-icons">folder_shared</i>
|
||||||
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToReplaceWith"
|
||||||
|
v-tooltip="$t('replace_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">create_new_folder</i>
|
||||||
|
<span>{{ $t("replace_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="replaceWithJSON"
|
||||||
|
style="display: none"
|
||||||
|
ref="inputChooseFileToReplaceWith"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToImportFrom"
|
||||||
|
v-tooltip="$t('preserve_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_special</i>
|
||||||
|
<span>{{ $t("import_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="importFromJSON"
|
||||||
|
style="display: none"
|
||||||
|
ref="inputChooseFileToImportFrom"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div v-if="showJsonCode" class="row-wrapper">
|
||||||
|
<textarea v-model="environmentJson" rows="8" readonly></textarea>
|
||||||
|
</div>
|
||||||
</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,40 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="flex-col">
|
||||||
<ul class="flex-col">
|
<div class="show-on-large-screen">
|
||||||
<div class="show-on-large-screen">
|
<input
|
||||||
<li>
|
:aria-label="$t('label')"
|
||||||
<input
|
type="text"
|
||||||
:aria-label="$t('label')"
|
autofocus
|
||||||
type="text"
|
v-model="message"
|
||||||
autofocus
|
:placeholder="$t('paste_a_note')"
|
||||||
v-model="message"
|
@keyup.enter="formPost"
|
||||||
:placeholder="$t('paste_a_note')"
|
/>
|
||||||
@keyup.enter="formPost"
|
</div>
|
||||||
/>
|
<div class="show-on-large-screen">
|
||||||
</li>
|
<input
|
||||||
</div>
|
:aria-label="$t('label')"
|
||||||
<div class="show-on-large-screen">
|
type="text"
|
||||||
<li>
|
autofocus
|
||||||
<input
|
v-model="label"
|
||||||
:aria-label="$t('label')"
|
:placeholder="$t('label')"
|
||||||
type="text"
|
@keyup.enter="formPost"
|
||||||
autofocus
|
/>
|
||||||
v-model="label"
|
<button class="icon" :disabled="!(this.message || this.label)" value="Save" @click="formPost">
|
||||||
:placeholder="$t('label')"
|
<i class="material-icons">add</i>
|
||||||
@keyup.enter="formPost"
|
<span>Add</span>
|
||||||
/>
|
</button>
|
||||||
</li>
|
</div>
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
:disabled="!(this.message || this.label)"
|
|
||||||
value="Save"
|
|
||||||
@click="formPost"
|
|
||||||
>
|
|
||||||
<i class="material-icons">add</i>
|
|
||||||
<span>Add</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,72 +1,60 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("generate_code") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("generate_code") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<label for="requestType">{{ $t("request_type") }}</label>
|
||||||
<li>
|
<span class="select-wrapper">
|
||||||
<label for="requestType">{{ $t("request_type") }}</label>
|
<v-popover>
|
||||||
<span class="select-wrapper">
|
<pre v-if="requestType">{{ codegens.find((x) => x.id === requestType).name }}</pre>
|
||||||
<v-popover>
|
<input
|
||||||
<pre v-if="requestType">{{ codegens.find((x) => x.id === requestType).name }}</pre>
|
v-else
|
||||||
<input
|
id="requestType"
|
||||||
v-else
|
v-model="requestType"
|
||||||
id="requestType"
|
:placeholder="$t('choose_language')"
|
||||||
v-model="requestType"
|
class="cursor-pointer"
|
||||||
:placeholder="$t('choose_language')"
|
readonly
|
||||||
class="cursor-pointer"
|
autofocus
|
||||||
readonly
|
/>
|
||||||
autofocus
|
<template slot="popover">
|
||||||
/>
|
<div v-for="gen in codegens" :key="gen.id">
|
||||||
<template slot="popover">
|
<button class="icon" @click="requestType = gen.id" v-close-popover>
|
||||||
<div v-for="gen in codegens" :key="gen.id">
|
{{ gen.name }}
|
||||||
<button class="icon" @click="requestType = gen.id" v-close-popover>
|
|
||||||
{{ gen.name }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</v-popover>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="row-wrapper">
|
|
||||||
<label for="generatedCode">{{ $t("generated_code") }}</label>
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="copyRequestCode"
|
|
||||||
id="copyRequestCode"
|
|
||||||
ref="copyRequestCode"
|
|
||||||
v-tooltip="$t('copy_code')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">content_copy</i>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
<textarea
|
</v-popover>
|
||||||
id="generatedCode"
|
</span>
|
||||||
ref="generatedCode"
|
<div class="row-wrapper">
|
||||||
name="generatedCode"
|
<label for="generatedCode">{{ $t("generated_code") }}</label>
|
||||||
rows="8"
|
<div>
|
||||||
v-model="requestCode"
|
<button
|
||||||
readonly
|
class="icon"
|
||||||
></textarea>
|
@click="copyRequestCode"
|
||||||
</li>
|
id="copyRequestCode"
|
||||||
</ul>
|
ref="copyRequestCode"
|
||||||
|
v-tooltip="$t('copy_code')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">content_copy</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<textarea
|
||||||
|
id="generatedCode"
|
||||||
|
ref="generatedCode"
|
||||||
|
name="generatedCode"
|
||||||
|
rows="8"
|
||||||
|
v-model="requestCode"
|
||||||
|
readonly
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("import_curl") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("import_curl") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<textarea id="import-curl" autofocus rows="8" :placeholder="$t('enter_curl')"></textarea>
|
||||||
<li>
|
|
||||||
<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>
|
<login />
|
||||||
<label>{{ $t("login_first") }}</label>
|
|
||||||
<p>
|
|
||||||
<login />
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,36 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal v-if="show" @close="hideModal">
|
<modal v-if="show" @close="hideModal">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("manage_token") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("manage_token") }}</h3>
|
<button class="icon" @click="hideModal">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="hideModal">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<label for="token-list">{{ $t("token_list") }}</label>
|
||||||
<div class="row-wrapper">
|
<div v-if="tokens.length != 0">
|
||||||
<label for="token-list">{{ $t("token_list") }}</label>
|
<button
|
||||||
<div v-if="tokens.length != 0">
|
class="icon"
|
||||||
<button
|
@click="clearContent('tokens', $event)"
|
||||||
class="icon"
|
v-tooltip.bottom="$t('clear')"
|
||||||
@click="clearContent('tokens', $event)"
|
>
|
||||||
v-tooltip.bottom="$t('clear')"
|
<i class="material-icons">clear_all</i>
|
||||||
>
|
</button>
|
||||||
<i class="material-icons">clear_all</i>
|
</div>
|
||||||
</button>
|
</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,115 +175,107 @@ 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) {
|
this.$toast.show(this.$t("we_use_cookies"), {
|
||||||
this.$toast.show(this.$t("we_use_cookies"), {
|
icon: "info",
|
||||||
icon: "info",
|
duration: 5000,
|
||||||
|
theme: "toasted-primary",
|
||||||
|
action: [
|
||||||
|
{
|
||||||
|
text: this.$t("dismiss"),
|
||||||
|
onClick: (e, toastObject) => {
|
||||||
|
localStorage.setItem("cookiesAllowed", "yes")
|
||||||
|
toastObject.goAway(0)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let showAd = localStorage.getItem("showAd") === "no"
|
||||||
|
if (!showAd) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$toast.clear()
|
||||||
|
this.$toast.show(
|
||||||
|
"<span><a href='https://github.com/sponsors/hoppscotch' target='_blank' rel='noopener'>Sponsor us to support Hoppscotch open source project 💖</a><br><sub>Whoosh this away to dismiss.</sub></span>",
|
||||||
|
{
|
||||||
|
icon: "",
|
||||||
|
duration: 0,
|
||||||
|
theme: "toasted-ad",
|
||||||
|
action: [
|
||||||
|
{
|
||||||
|
text: "Sponsor",
|
||||||
|
icon: "chevron_right",
|
||||||
|
onClick: (e, toastObject) => {
|
||||||
|
localStorage.setItem("showAd", "no")
|
||||||
|
toastObject.goAway(0)
|
||||||
|
window.open("https://github.com/sponsors/hoppscotch")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
onComplete() {
|
||||||
|
localStorage.setItem("showAd", "no")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}, 8000)
|
||||||
|
}
|
||||||
|
|
||||||
|
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
|
||||||
|
// Just return if showExtensionsToast is "no"
|
||||||
|
if (!showExtensionsToast) return
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!hasExtensionInstalled()) {
|
||||||
|
this.$toast.show(this.$t("extensions_info2"), {
|
||||||
|
icon: "extension",
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
theme: "toasted-primary",
|
theme: "toasted-primary",
|
||||||
action: [
|
action: [
|
||||||
{
|
{
|
||||||
text: this.$t("dismiss"),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
localStorage.setItem("cookiesAllowed", "yes")
|
this.showExtensions = true
|
||||||
|
localStorage.setItem("showExtensionsToast", "yes")
|
||||||
|
toastObject.goAway(0)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: this.$t("no"),
|
||||||
|
onClick: (e, toastObject) => {
|
||||||
|
this.$store.commit("setMiscState", {
|
||||||
|
value: false,
|
||||||
|
attribute: "showExtensionsToast",
|
||||||
|
})
|
||||||
|
localStorage.setItem("showExtensionsToast", "no")
|
||||||
toastObject.goAway(0)
|
toastObject.goAway(0)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}, 5000)
|
||||||
let showAd = localStorage.getItem("showAd") === "no"
|
|
||||||
if (!showAd) {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$toast.clear()
|
|
||||||
this.$toast.show(
|
|
||||||
"<span><a href='https://github.com/sponsors/hoppscotch' target='_blank' rel='noopener'>Sponsor us to support Hoppscotch open source project 💖</a><br><sub>Whoosh this away to dismiss.</sub></span>",
|
|
||||||
{
|
|
||||||
icon: "",
|
|
||||||
duration: 0,
|
|
||||||
theme: "toasted-ad",
|
|
||||||
action: [
|
|
||||||
{
|
|
||||||
text: "Sponsor",
|
|
||||||
icon: "chevron_right",
|
|
||||||
onClick: (e, toastObject) => {
|
|
||||||
localStorage.setItem("showAd", "no")
|
|
||||||
toastObject.goAway(0)
|
|
||||||
window.open("https://github.com/sponsors/hoppscotch")
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
onComplete() {
|
|
||||||
localStorage.setItem("showAd", "no")
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}, 8000)
|
|
||||||
}
|
|
||||||
|
|
||||||
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
|
|
||||||
|
|
||||||
// Just return if showExtensionsToast is "no"
|
|
||||||
if (!showExtensionsToast) return
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!hasExtensionInstalled()) {
|
|
||||||
this.$toast.show(this.$t("extensions_info2"), {
|
|
||||||
icon: "extension",
|
|
||||||
duration: 5000,
|
|
||||||
theme: "toasted-primary",
|
|
||||||
action: [
|
|
||||||
{
|
|
||||||
text: this.$t("yes"),
|
|
||||||
onClick: (e, toastObject) => {
|
|
||||||
this.showExtensions = true
|
|
||||||
localStorage.setItem("showExtensionsToast", "yes")
|
|
||||||
toastObject.goAway(0)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: this.$t("no"),
|
|
||||||
onClick: (e, toastObject) => {
|
|
||||||
this.$store.commit("setMiscState", {
|
|
||||||
value: false,
|
|
||||||
attribute: "showExtensionsToast",
|
|
||||||
})
|
|
||||||
localStorage.setItem("showExtensionsToast", "no")
|
|
||||||
toastObject.goAway(0)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, 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 />
|
</p>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,77 +1,75 @@
|
|||||||
<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>
|
<button
|
||||||
<button
|
class="icon"
|
||||||
class="icon"
|
@click="ToggleExpandResponse"
|
||||||
@click="ToggleExpandResponse"
|
ref="ToggleExpandResponse"
|
||||||
ref="ToggleExpandResponse"
|
v-if="response.body"
|
||||||
v-if="response.body"
|
v-tooltip="{
|
||||||
v-tooltip="{
|
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
||||||
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<i class="material-icons">
|
|
||||||
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="response.body"
|
|
||||||
class="icon"
|
|
||||||
@click.prevent="togglePreview"
|
|
||||||
v-tooltip="{
|
|
||||||
content: previewEnabled ? $t('hide_preview') : $t('preview_html'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<i class="material-icons">
|
|
||||||
{{ !previewEnabled ? "visibility" : "visibility_off" }}
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="downloadResponse"
|
|
||||||
ref="downloadResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('download_file')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">save_alt</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="copyResponse"
|
|
||||||
ref="copyResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('copy_response')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">content_copy</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="response-details-wrapper">
|
|
||||||
<ace-editor
|
|
||||||
:value="responseBodyText"
|
|
||||||
:lang="'html'"
|
|
||||||
:options="{
|
|
||||||
maxLines: responseBodyMaxLines,
|
|
||||||
minLines: '16',
|
|
||||||
fontSize: '16px',
|
|
||||||
autoScrollEditorIntoView: true,
|
|
||||||
readOnly: true,
|
|
||||||
showPrintMargin: false,
|
|
||||||
useWorker: false,
|
|
||||||
}"
|
}"
|
||||||
/>
|
>
|
||||||
<iframe
|
<i class="material-icons">
|
||||||
:class="{ hidden: !previewEnabled }"
|
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
||||||
class="covers-response"
|
</i>
|
||||||
ref="previewFrame"
|
</button>
|
||||||
src="about:blank"
|
<button
|
||||||
></iframe>
|
v-if="response.body"
|
||||||
|
class="icon"
|
||||||
|
@click.prevent="togglePreview"
|
||||||
|
v-tooltip="{
|
||||||
|
content: previewEnabled ? $t('hide_preview') : $t('preview_html'),
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<i class="material-icons">
|
||||||
|
{{ !previewEnabled ? "visibility" : "visibility_off" }}
|
||||||
|
</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="downloadResponse"
|
||||||
|
ref="downloadResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">save_alt</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="copyResponse"
|
||||||
|
ref="copyResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('copy_response')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">content_copy</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div id="response-details-wrapper">
|
||||||
|
<ace-editor
|
||||||
|
:value="responseBodyText"
|
||||||
|
:lang="'html'"
|
||||||
|
:options="{
|
||||||
|
maxLines: responseBodyMaxLines,
|
||||||
|
minLines: '16',
|
||||||
|
fontSize: '16px',
|
||||||
|
autoScrollEditorIntoView: true,
|
||||||
|
readOnly: true,
|
||||||
|
showPrintMargin: false,
|
||||||
|
useWorker: false,
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<iframe
|
||||||
|
:class="{ hidden: !previewEnabled }"
|
||||||
|
class="covers-response"
|
||||||
|
ref="previewFrame"
|
||||||
|
src="about:blank"
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
<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>
|
<button
|
||||||
<button
|
class="icon"
|
||||||
class="icon"
|
@click="downloadResponse"
|
||||||
@click="downloadResponse"
|
ref="downloadResponse"
|
||||||
ref="downloadResponse"
|
v-if="response.body"
|
||||||
v-if="response.body"
|
v-tooltip="$t('download_file')"
|
||||||
v-tooltip="$t('download_file')"
|
>
|
||||||
>
|
<i class="material-icons">save_alt</i>
|
||||||
<i class="material-icons">save_alt</i>
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
</div>
|
||||||
<img class="max-w-full" :src="imageSource" />
|
<div id="response-details-wrapper">
|
||||||
</div>
|
<img class="max-w-full" :src="imageSource" />
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,62 +1,60 @@
|
|||||||
<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>
|
<button
|
||||||
<button
|
class="icon"
|
||||||
class="icon"
|
@click="ToggleExpandResponse"
|
||||||
@click="ToggleExpandResponse"
|
ref="ToggleExpandResponse"
|
||||||
ref="ToggleExpandResponse"
|
v-if="response.body"
|
||||||
v-if="response.body"
|
v-tooltip="{
|
||||||
v-tooltip="{
|
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
||||||
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<i class="material-icons">
|
|
||||||
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="downloadResponse"
|
|
||||||
ref="downloadResponse"
|
|
||||||
v-if="response.body && canDownloadResponse"
|
|
||||||
v-tooltip="$t('download_file')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">save_alt</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="copyResponse"
|
|
||||||
ref="copyResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('copy_response')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">content_copy</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="valid-warning" v-if="jsonInvalid">
|
|
||||||
<p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p>
|
|
||||||
</div>
|
|
||||||
<div id="response-details-wrapper">
|
|
||||||
<ace-editor
|
|
||||||
:value="jsonBodyText"
|
|
||||||
:lang="'json'"
|
|
||||||
:options="{
|
|
||||||
maxLines: responseBodyMaxLines,
|
|
||||||
minLines: '16',
|
|
||||||
fontSize: '16px',
|
|
||||||
autoScrollEditorIntoView: true,
|
|
||||||
readOnly: true,
|
|
||||||
showPrintMargin: false,
|
|
||||||
useWorker: false,
|
|
||||||
}"
|
}"
|
||||||
/>
|
>
|
||||||
|
<i class="material-icons">
|
||||||
|
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
||||||
|
</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="downloadResponse"
|
||||||
|
ref="downloadResponse"
|
||||||
|
v-if="response.body && canDownloadResponse"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">save_alt</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="copyResponse"
|
||||||
|
ref="copyResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('copy_response')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">content_copy</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div class="valid-warning" v-if="jsonInvalid">
|
||||||
|
<p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p>
|
||||||
|
</div>
|
||||||
|
<div id="response-details-wrapper">
|
||||||
|
<ace-editor
|
||||||
|
:value="jsonBodyText"
|
||||||
|
:lang="'json'"
|
||||||
|
:options="{
|
||||||
|
maxLines: responseBodyMaxLines,
|
||||||
|
minLines: '16',
|
||||||
|
fontSize: '16px',
|
||||||
|
autoScrollEditorIntoView: true,
|
||||||
|
readOnly: true,
|
||||||
|
showPrintMargin: false,
|
||||||
|
useWorker: false,
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,59 +1,57 @@
|
|||||||
<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>
|
<button
|
||||||
<button
|
class="icon"
|
||||||
class="icon"
|
@click="ToggleExpandResponse"
|
||||||
@click="ToggleExpandResponse"
|
ref="ToggleExpandResponse"
|
||||||
ref="ToggleExpandResponse"
|
v-if="response.body"
|
||||||
v-if="response.body"
|
v-tooltip="{
|
||||||
v-tooltip="{
|
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
||||||
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<i class="material-icons">
|
|
||||||
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="downloadResponse"
|
|
||||||
ref="downloadResponse"
|
|
||||||
v-if="response.body && canDownloadResponse"
|
|
||||||
v-tooltip="$t('download_file')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">save_alt</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="copyResponse"
|
|
||||||
ref="copyResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('copy_response')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">content_copy</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="response-details-wrapper">
|
|
||||||
<ace-editor
|
|
||||||
:value="responseBodyText"
|
|
||||||
:lang="'plain_text'"
|
|
||||||
:options="{
|
|
||||||
maxLines: responseBodyMaxLines,
|
|
||||||
minLines: '16',
|
|
||||||
fontSize: '16px',
|
|
||||||
autoScrollEditorIntoView: true,
|
|
||||||
readOnly: true,
|
|
||||||
showPrintMargin: false,
|
|
||||||
useWorker: false,
|
|
||||||
}"
|
}"
|
||||||
/>
|
>
|
||||||
|
<i class="material-icons">
|
||||||
|
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
||||||
|
</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="downloadResponse"
|
||||||
|
ref="downloadResponse"
|
||||||
|
v-if="response.body && canDownloadResponse"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">save_alt</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="copyResponse"
|
||||||
|
ref="copyResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('copy_response')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">content_copy</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div id="response-details-wrapper">
|
||||||
|
<ace-editor
|
||||||
|
:value="responseBodyText"
|
||||||
|
:lang="'plain_text'"
|
||||||
|
:options="{
|
||||||
|
maxLines: responseBodyMaxLines,
|
||||||
|
minLines: '16',
|
||||||
|
fontSize: '16px',
|
||||||
|
autoScrollEditorIntoView: true,
|
||||||
|
readOnly: true,
|
||||||
|
showPrintMargin: false,
|
||||||
|
useWorker: false,
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,59 +1,57 @@
|
|||||||
<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>
|
<button
|
||||||
<button
|
class="icon"
|
||||||
class="icon"
|
@click="ToggleExpandResponse"
|
||||||
@click="ToggleExpandResponse"
|
ref="ToggleExpandResponse"
|
||||||
ref="ToggleExpandResponse"
|
v-if="response.body"
|
||||||
v-if="response.body"
|
v-tooltip="{
|
||||||
v-tooltip="{
|
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
||||||
content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<i class="material-icons">
|
|
||||||
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="downloadResponse"
|
|
||||||
ref="downloadResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('download_file')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">save_alt</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="copyResponse"
|
|
||||||
ref="copyResponse"
|
|
||||||
v-if="response.body"
|
|
||||||
v-tooltip="$t('copy_response')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">content_copy</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="response-details-wrapper">
|
|
||||||
<ace-editor
|
|
||||||
:value="responseBodyText"
|
|
||||||
:lang="'xml'"
|
|
||||||
:options="{
|
|
||||||
maxLines: responseBodyMaxLines,
|
|
||||||
minLines: '16',
|
|
||||||
fontSize: '16px',
|
|
||||||
autoScrollEditorIntoView: true,
|
|
||||||
readOnly: true,
|
|
||||||
showPrintMargin: false,
|
|
||||||
useWorker: false,
|
|
||||||
}"
|
}"
|
||||||
/>
|
>
|
||||||
|
<i class="material-icons">
|
||||||
|
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
||||||
|
</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="downloadResponse"
|
||||||
|
ref="downloadResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">save_alt</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="copyResponse"
|
||||||
|
ref="copyResponse"
|
||||||
|
v-if="response.body"
|
||||||
|
v-tooltip="$t('copy_response')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">content_copy</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div id="response-details-wrapper">
|
||||||
|
<ace-editor
|
||||||
|
:value="responseBodyText"
|
||||||
|
:lang="'xml'"
|
||||||
|
:options="{
|
||||||
|
maxLines: responseBodyMaxLines,
|
||||||
|
minLines: '16',
|
||||||
|
fontSize: '16px',
|
||||||
|
autoScrollEditorIntoView: true,
|
||||||
|
readOnly: true,
|
||||||
|
showPrintMargin: false,
|
||||||
|
useWorker: false,
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</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,43 +724,39 @@
|
|||||||
|
|
||||||
<modal v-if="showTokenRequestList" @close="showTokenRequestList = false">
|
<modal v-if="showTokenRequestList" @close="showTokenRequestList = false">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<ul>
|
<div class="row-wrapper">
|
||||||
<li>
|
<h3 class="title">{{ $t("manage_token_req") }}</h3>
|
||||||
<div class="row-wrapper">
|
<div>
|
||||||
<h3 class="title">{{ $t("manage_token_req") }}</h3>
|
<button class="icon" @click="showTokenRequestList = false">
|
||||||
<div>
|
<i class="material-icons">close</i>
|
||||||
<button class="icon" @click="showTokenRequestList = false">
|
</button>
|
||||||
<i class="material-icons">close</i>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
|
<div class="row-wrapper">
|
||||||
|
<label for="token-req-list">{{ $t("token_req_list") }}</label>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
:disabled="this.tokenReqs.length === 0"
|
||||||
|
class="icon"
|
||||||
|
@click="showTokenRequestList = false"
|
||||||
|
v-tooltip.bottom="$t('use_token_req')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">input</i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
:disabled="this.tokenReqs.length === 0"
|
||||||
|
class="icon"
|
||||||
|
@click="removeOAuthTokenReq"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">delete</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="row-wrapper">
|
|
||||||
<label for="token-req-list">{{ $t("token_req_list") }}</label>
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
:disabled="this.tokenReqs.length === 0"
|
|
||||||
class="icon"
|
|
||||||
@click="showTokenRequestList = false"
|
|
||||||
v-tooltip.bottom="$t('use_token_req')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">input</i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
:disabled="this.tokenReqs.length === 0"
|
|
||||||
class="icon"
|
|
||||||
@click="removeOAuthTokenReq"
|
|
||||||
v-tooltip.bottom="$t('delete')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">delete</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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>
|
<label for="token-req-name">{{ $t("token_req_name") }}</label>
|
||||||
<li>
|
<input v-model="tokenReqName" />
|
||||||
<label for="token-req-name">{{ $t("token_req_name") }}</label>
|
<label for="token-req-details">
|
||||||
<input v-model="tokenReqName" />
|
{{ $t("token_req_details") }}
|
||||||
</li>
|
</label>
|
||||||
</ul>
|
<textarea id="token-req-details" readonly rows="7" v-model="tokenReqDetails"></textarea>
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<label for="token-req-details">
|
|
||||||
{{ $t("token_req_details") }}
|
|
||||||
</label>
|
|
||||||
<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