Replaced hard-coded strings with localizable strings (#490)
Replaced hard-coded strings with localizable strings
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">New Collection</h3>
|
<h3 class="title">{{ $t("new_collection") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<input type="text" v-model="name" placeholder="My New Collection" />
|
<input type="text" v-model="name" :placeholder="$t('my_new_collection')" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="addNewCollection">
|
<button class="icon primary" @click="addNewCollection">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">New Folder</h3>
|
<h3 class="title">{{ $t("new_folder") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<input type="text" v-model="name" placeholder="My New Folder" />
|
<input type="text" v-model="name" :placeholder="$t('my_new_folder')" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="addNewFolder">
|
<button class="icon primary" @click="addNewFolder">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="'More'">
|
<button class="tooltip-target icon" v-tooltip="$t('more')">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="$emit('add-folder')" v-close-popover>
|
<button class="icon" @click="$emit('add-folder')" v-close-popover>
|
||||||
<i class="material-icons">create_new_folder</i>
|
<i class="material-icons">create_new_folder</i>
|
||||||
<span>New folder</span>
|
<span>{{ $t("new_folder") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -27,13 +27,13 @@
|
|||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">create</i>
|
<i class="material-icons">create</i>
|
||||||
<span>Edit</span>
|
<span>{{ $t("edit") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="removeCollection" v-close-popover>
|
<button class="icon" @click="removeCollection" v-close-popover>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>Delete</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
collection.folders.length === 0 && collection.requests.length === 0
|
collection.folders.length === 0 && collection.requests.length === 0
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<label>Collection is empty</label>
|
<label>{{ $t("collection_empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">Edit Collection</h3>
|
<h3 class="title">{{ $t("edit_collection") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveCollection">
|
<button class="icon primary" @click="saveCollection">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">Edit Folder</h3>
|
<h3 class="title">{{ $t("edit_folder") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="editFolder">
|
<button class="icon primary" @click="editFolder">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">Edit Request</h3>
|
<h3 class="title">{{ $t("edit_request") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="selectLabel">Label</label>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="selectLabel"
|
id="selectLabel"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
@keyup.enter="saveRequest"
|
@keyup.enter="saveRequest"
|
||||||
:placeholder="request.name"
|
:placeholder="request.name"
|
||||||
/>
|
/>
|
||||||
<label for="selectCollection">Collection</label>
|
<label for="selectCollection">{{ $t("collection") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
type="text"
|
type="text"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
hidden
|
hidden
|
||||||
disabled
|
disabled
|
||||||
selected
|
selected
|
||||||
>Current Collection</option
|
>{{ $t("current_collection") }}</option
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
v-for="(collection, index) in $store.state.postwoman
|
v-for="(collection, index) in $store.state.postwoman
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectFolder">Folder</label>
|
<label for="selectFolder">{{ $t("folder") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
type="text"
|
type="text"
|
||||||
@@ -75,10 +75,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveRequest">
|
<button class="icon primary" @click="saveRequest">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,20 +10,20 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="'More'">
|
<button class="tooltip-target icon" v-tooltip="$t('more')">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="editFolder" v-close-popover>
|
<button class="icon" @click="editFolder" v-close-popover>
|
||||||
<i class="material-icons">edit</i>
|
<i class="material-icons">edit</i>
|
||||||
<span>Edit</span>
|
<span>{{ $t("edit") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="removeFolder" v-close-popover>
|
<button class="icon" @click="removeFolder" v-close-popover>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>Delete</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="folder.requests.length === 0">
|
<li v-if="folder.requests.length === 0">
|
||||||
<label>Folder is empty</label>
|
<label>{{ $t("folder_empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="openDialogChooseFileToReplaceWith"
|
@click="openDialogChooseFileToReplaceWith"
|
||||||
v-tooltip="'Replace current'"
|
v-tooltip="$t('replace_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">create_new_folder</i>
|
<i class="material-icons">create_new_folder</i>
|
||||||
<span>Replace with JSON</span>
|
<span>{{ $t("replace_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="replaceWithJSON"
|
@change="replaceWithJSON"
|
||||||
@@ -37,10 +37,10 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="openDialogChooseFileToImportFrom"
|
@click="openDialogChooseFileToImportFrom"
|
||||||
v-tooltip="'Preserve current'"
|
v-tooltip="$t('preserve_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">folder_shared</i>
|
<i class="material-icons">folder_shared</i>
|
||||||
<span>Import from JSON</span>
|
<span>{{ $t("import_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="importFromJSON"
|
@change="importFromJSON"
|
||||||
@@ -55,14 +55,14 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="icon primary"
|
class="icon primary"
|
||||||
@click="exportJSON"
|
@click="exportJSON"
|
||||||
v-tooltip="'Download file'"
|
v-tooltip="$t('download_file')"
|
||||||
>
|
>
|
||||||
Export
|
{{ $t("export") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ TODO:
|
|||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="displayModalAdd(true)">
|
<button class="icon" @click="displayModalAdd(true)">
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
<span>New</span>
|
<span>{{ $t("new") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="displayModalImportExport(true)"
|
@click="displayModalImportExport(true)"
|
||||||
v-tooltip="'Import / Export'"
|
v-tooltip="$t('import_export')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">import_export</i>
|
<i class="material-icons">import_export</i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="selectRequest()" v-tooltip="'Use request'">
|
<button class="icon" @click="selectRequest()" v-tooltip="$t('use_request')">
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
<span>{{ request.name }}</span>
|
<span>{{ request.name }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="'More'">
|
<button class="tooltip-target icon" v-tooltip="$t('more')">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="$emit('edit-request')" v-close-popover>
|
<button class="icon" @click="$emit('edit-request')" v-close-popover>
|
||||||
<i class="material-icons">edit</i>
|
<i class="material-icons">edit</i>
|
||||||
<span>Edit</span>
|
<span>{{ $t("edit") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="removeRequest" v-close-popover>
|
<button class="icon" @click="removeRequest" v-close-popover>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>Delete</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">Save Request As</h3>
|
<h3 class="title">{{ $t("save_request_as") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div slot="body">
|
<div slot="body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="selectLabel">Label</label>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="selectLabel"
|
id="selectLabel"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
:placeholder="defaultRequestName"
|
:placeholder="defaultRequestName"
|
||||||
@keyup.enter="saveRequestAs"
|
@keyup.enter="saveRequestAs"
|
||||||
/>
|
/>
|
||||||
<label for="selectCollection">Collection</label>
|
<label for="selectCollection">{{ $t("collection") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
type="text"
|
type="text"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
hidden
|
hidden
|
||||||
disabled
|
disabled
|
||||||
selected
|
selected
|
||||||
>Select a Collection</option
|
>{{ $t("select_collection") }}</option
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
v-for="(collection, index) in $store.state.postwoman
|
v-for="(collection, index) in $store.state.postwoman
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectFolder">Folder</label>
|
<label for="selectFolder">{{ $t("folder") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
type="text"
|
type="text"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectRequest">Request</label>
|
<label for="selectRequest">{{ $t("request") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select
|
<select
|
||||||
type="text"
|
type="text"
|
||||||
@@ -92,10 +92,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveRequestAs">
|
<button class="icon primary" @click="saveRequestAs">
|
||||||
Save
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,7 +184,7 @@ export default {
|
|||||||
const userDidntSpecifyCollection =
|
const userDidntSpecifyCollection =
|
||||||
this.$data.requestData.collectionIndex === undefined;
|
this.$data.requestData.collectionIndex === undefined;
|
||||||
if (userDidntSpecifyCollection) {
|
if (userDidntSpecifyCollection) {
|
||||||
this.$toast.error("Select a Collection", {
|
this.$toast.error(this.$t("select_collection"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-deprecated" v-if="gqlField.isDeprecated">
|
<div class="field-deprecated" v-if="gqlField.isDeprecated">
|
||||||
DEPRECATED
|
{{ $t("deprecated") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="gqlType.getFields">
|
<div v-if="gqlType.getFields">
|
||||||
<h5>FIELDS</h5>
|
<h5>{{ $t("fields") }}</h5>
|
||||||
<div v-for="field in gqlType.getFields()" :key="field.name">
|
<div v-for="field in gqlType.getFields()" :key="field.name">
|
||||||
<gql-field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
|
<gql-field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<pw-section class="green" icon="history" label="History" ref="history">
|
<pw-section
|
||||||
|
class="green"
|
||||||
|
icon="history"
|
||||||
|
:label="$t('history')"
|
||||||
|
ref="history"
|
||||||
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li id="filter-history">
|
<li id="filter-history">
|
||||||
<input
|
<input
|
||||||
aria-label="Search"
|
aria-label="Search"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="search history"
|
:placeholder="$t('search_history')"
|
||||||
v-model="filterText"
|
v-model="filterText"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
@@ -22,7 +27,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
:class="{ stared: entry.star }"
|
:class="{ stared: entry.star }"
|
||||||
@click="toggleStar(index)"
|
@click="toggleStar(index)"
|
||||||
v-tooltip="{ content: !entry.star ? 'Add star' : 'Remove star' }"
|
v-tooltip="{ content: !entry.star ? $t('add_star') : $t('remove_star') }"
|
||||||
>
|
>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ entry.star ? "star" : "star_border" }}
|
{{ entry.star ? "star" : "star_border" }}
|
||||||
@@ -30,11 +35,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="Label"
|
:aria-label="$t('label')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.label"
|
:value="entry.label"
|
||||||
placeholder="No label"
|
:placeholder="$t('no_label')"
|
||||||
class="bg-color"
|
class="bg-color"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
@@ -53,7 +58,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</li> -->
|
</li> -->
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="'Options'">
|
<button class="tooltip-target icon" v-tooltip="$t('options')">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
@@ -62,11 +67,11 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
:id="'use-button#' + index"
|
:id="'use-button#' + index"
|
||||||
@click="useHistory(entry)"
|
@click="useHistory(entry)"
|
||||||
aria-label="Edit"
|
:aria-label="$t('edit')"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">restore</i>
|
<i class="material-icons">restore</i>
|
||||||
<span>Restore</span>
|
<span>{{ $t("restore") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -74,11 +79,11 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
:id="'delete-button#' + index"
|
:id="'delete-button#' + index"
|
||||||
@click="deleteHistory(entry)"
|
@click="deleteHistory(entry)"
|
||||||
aria-label="Delete"
|
:aria-label="$t('delete')"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>Delete</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -87,7 +92,7 @@
|
|||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li class="method-list-item">
|
<li class="method-list-item">
|
||||||
<input
|
<input
|
||||||
aria-label="Method"
|
:aria-label="$t('method')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.method"
|
:value="entry.method"
|
||||||
@@ -105,20 +110,20 @@
|
|||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="URL"
|
:aria-label="$t('url')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.url"
|
:value="entry.url"
|
||||||
placeholder="No URL"
|
:placeholder="$t('no_url')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="Path"
|
:aria-label="$t('path')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.path"
|
:value="entry.path"
|
||||||
placeholder="No path"
|
:placeholder="$t('no_path')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
@@ -126,7 +131,7 @@
|
|||||||
<div v-if="showMore" class="show-on-large-screen">
|
<div v-if="showMore" class="show-on-large-screen">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="Time"
|
:aria-label="$t('time')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.time"
|
:value="entry.time"
|
||||||
@@ -135,20 +140,20 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="Duration"
|
:aria-label="$t('duration')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.duration"
|
:value="entry.duration"
|
||||||
placeholder="No duration"
|
:placeholder="$t('no_duration')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
aria-label="Pre Request Script"
|
:aria-label="$t('prerequest_script')"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
:value="entry.preRequestScript"
|
:value="entry.preRequestScript"
|
||||||
placeholder="No pre request script"
|
:placeholder="$t('no_prerequest_script')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
@@ -159,11 +164,11 @@
|
|||||||
:class="{ hidden: filteredHistory.length != 0 || history.length === 0 }"
|
:class="{ hidden: filteredHistory.length != 0 || history.length === 0 }"
|
||||||
>
|
>
|
||||||
<li>
|
<li>
|
||||||
<label>Nothing found "{{ filterText }}"</label>
|
<label>{{ $t("nothing_found") }} "{{ filterText }}"</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-if="history.length === 0" class="info">
|
<p v-if="history.length === 0" class="info">
|
||||||
History is empty
|
{{ $t("history_empty") }}
|
||||||
</p>
|
</p>
|
||||||
<div v-if="history.length !== 0">
|
<div v-if="history.length !== 0">
|
||||||
<div class="flex-wrap" v-if="!isClearingHistory">
|
<div class="flex-wrap" v-if="!isClearingHistory">
|
||||||
@@ -174,23 +179,23 @@
|
|||||||
@click="enableHistoryClearing"
|
@click="enableHistoryClearing"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
<span>Clear All</span>
|
<span>{{ $t("clear_all") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="'Sort'">
|
<button class="tooltip-target icon" v-tooltip="$t('sort')">
|
||||||
<i class="material-icons">sort</i>
|
<i class="material-icons">sort</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="sort_by_label()" v-close-popover>
|
<button class="icon" @click="sort_by_label()" v-close-popover>
|
||||||
<i class="material-icons">sort_by_alpha</i>
|
<i class="material-icons">sort_by_alpha</i>
|
||||||
<span>Label</span>
|
<span>{{ $t("label") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="sort_by_time()" v-close-popover>
|
<button class="icon" @click="sort_by_time()" v-close-popover>
|
||||||
<i class="material-icons">access_time</i>
|
<i class="material-icons">access_time</i>
|
||||||
<span>Time</span>
|
<span>{{ $t("time") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -200,25 +205,25 @@
|
|||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">assistant</i>
|
<i class="material-icons">assistant</i>
|
||||||
<span>Status</span>
|
<span>{{ $t("status") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="sort_by_url()" v-close-popover>
|
<button class="icon" @click="sort_by_url()" v-close-popover>
|
||||||
<i class="material-icons">language</i>
|
<i class="material-icons">language</i>
|
||||||
<span>URL</span>
|
<span>{{ $t("url") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="sort_by_path()" v-close-popover>
|
<button class="icon" @click="sort_by_path()" v-close-popover>
|
||||||
<i class="material-icons">timeline</i>
|
<i class="material-icons">timeline</i>
|
||||||
<span>Path</span>
|
<span>{{ $t("path") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="showMore">
|
<div v-if="showMore">
|
||||||
<button class="icon" @click="sort_by_duration()" v-close-popover>
|
<button class="icon" @click="sort_by_duration()" v-close-popover>
|
||||||
<i class="material-icons">timer</i>
|
<i class="material-icons">timer</i>
|
||||||
<span>Duration</span>
|
<span>{{ $t("duration") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -226,20 +231,20 @@
|
|||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ !showMore ? "first_page" : "last_page" }}
|
{{ !showMore ? "first_page" : "last_page" }}
|
||||||
</i>
|
</i>
|
||||||
<span>{{ !showMore ? "Show more" : "Hide more" }}</span>
|
<span>{{ !showMore ? $t("show_more") : $t("hide_more") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-popover>
|
</v-popover>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-wrap" v-else>
|
<div class="flex-wrap" v-else>
|
||||||
<label for="clear-history-button" class="info">Are you sure?</label>
|
<label for="clear-history-button" class="info">{{ $t("are_you_sure") }}</label>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
id="confirm-clear-history-button"
|
id="confirm-clear-history-button"
|
||||||
@click="clearHistory"
|
@click="clearHistory"
|
||||||
v-tooltip="'Yes'"
|
v-tooltip="$t('yes')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">done</i>
|
<i class="material-icons">done</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -247,7 +252,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
id="reject-clear-history-button"
|
id="reject-clear-history-button"
|
||||||
@click="disableHistoryClearing"
|
@click="disableHistoryClearing"
|
||||||
v-tooltip="'No'"
|
v-tooltip="$t('no')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -371,7 +376,7 @@ export default {
|
|||||||
this.filterText = "";
|
this.filterText = "";
|
||||||
this.disableHistoryClearing();
|
this.disableHistoryClearing();
|
||||||
updateOnLocalStorage("history", this.history);
|
updateOnLocalStorage("history", this.history);
|
||||||
this.$toast.error("History Deleted", {
|
this.$toast.error(this.$t("history_deleted"), {
|
||||||
icon: "delete"
|
icon: "delete"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -392,7 +397,7 @@ export default {
|
|||||||
this.filterText = "";
|
this.filterText = "";
|
||||||
}
|
}
|
||||||
updateOnLocalStorage("history", this.history);
|
updateOnLocalStorage("history", this.history);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete"
|
icon: "delete"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
137
lang/en-US.js
137
lang/en-US.js
@@ -106,5 +106,140 @@ export default {
|
|||||||
client_id: "Client ID",
|
client_id: "Client ID",
|
||||||
scope: "Scope",
|
scope: "Scope",
|
||||||
state: "State",
|
state: "State",
|
||||||
token_req_list: "Token Request List"
|
token_req_list: "Token Request List",
|
||||||
|
no_path: "No path",
|
||||||
|
no_label: "No label",
|
||||||
|
prerequest_script: "Pre-Request Script",
|
||||||
|
no_prerequest_script: "No pre-request script",
|
||||||
|
search_history: "search history",
|
||||||
|
history_empty: "History is empty",
|
||||||
|
history_deleted: "History Deleted",
|
||||||
|
clear: "Clear",
|
||||||
|
clear_all: "Clear All",
|
||||||
|
cleared: "Cleared",
|
||||||
|
close: "Close",
|
||||||
|
sort: "Sort",
|
||||||
|
time: "Time",
|
||||||
|
duration: "Duration",
|
||||||
|
no_duration: "No duration",
|
||||||
|
show_more: "Show more",
|
||||||
|
hide_more: "Hide more",
|
||||||
|
collection: "Collection",
|
||||||
|
current_collection: "Current Collection",
|
||||||
|
select_collection: "Select a Collection",
|
||||||
|
create_collection: "Create a Collection",
|
||||||
|
new: "New",
|
||||||
|
import_export: "Import / Export",
|
||||||
|
more: "More",
|
||||||
|
folder: "Folder",
|
||||||
|
new_folder: "New Folder",
|
||||||
|
my_new_folder: "My New Folder",
|
||||||
|
folder_empty: "Folder is empty",
|
||||||
|
edit_folder: "Edit Folder",
|
||||||
|
edit: "Edit",
|
||||||
|
delete: "Delete",
|
||||||
|
deleted: "Deleted",
|
||||||
|
undo: "Undo",
|
||||||
|
collection_empty: "Collection is empty",
|
||||||
|
new_collection: "New Collection",
|
||||||
|
my_new_collection: "My New Collection",
|
||||||
|
edit_collection: "Edit Collection",
|
||||||
|
edit_request: "Edit Request",
|
||||||
|
save_request_as: "Save Request As",
|
||||||
|
export: "Export",
|
||||||
|
connecting_to: "Connecting to {name}...",
|
||||||
|
connected: "Connected",
|
||||||
|
connected_to: "Connected to {name}",
|
||||||
|
disconnected: "Disconnected",
|
||||||
|
disconnected_from: "Disconnected from {name}",
|
||||||
|
something_went_wrong: "Something went wrong!",
|
||||||
|
error_occurred: "An error has occurred.",
|
||||||
|
browser_support_sse: "This browser doesn't seems to have Server Sent Events support.",
|
||||||
|
log: "Log",
|
||||||
|
no_url: "No URL",
|
||||||
|
run_query: "Run Query",
|
||||||
|
copy_query: "Copy Query",
|
||||||
|
kinda_dark: "Kinda Dark",
|
||||||
|
clearly_white: "Clearly White",
|
||||||
|
just_black: "Just Black",
|
||||||
|
auto_system: "Auth (system)",
|
||||||
|
green: "Green",
|
||||||
|
yellow: "Yellow",
|
||||||
|
pink: "Pink",
|
||||||
|
red: "Red",
|
||||||
|
purple: "Purple",
|
||||||
|
orange: "Orange",
|
||||||
|
cyan: "Cyan",
|
||||||
|
blue: "Blue",
|
||||||
|
loading: "Loading...",
|
||||||
|
fetching: "Fetching...",
|
||||||
|
waiting_send_req: "(waiting to send request)",
|
||||||
|
cancel: "Cancel",
|
||||||
|
save: "Save",
|
||||||
|
dismiss: "Dismiss",
|
||||||
|
are_you_sure: "Are you sure?",
|
||||||
|
yes: "Yes",
|
||||||
|
no: "No",
|
||||||
|
restore: "Restore",
|
||||||
|
add_star: "Add star",
|
||||||
|
remove_star: "Remove star",
|
||||||
|
nothing_found: "Nothing found",
|
||||||
|
replace_current: "Replace current",
|
||||||
|
replace_json: "Replace with JSON",
|
||||||
|
preserve_current: "Preserve current",
|
||||||
|
import_json: "Import from JSON",
|
||||||
|
download_file: "Download file",
|
||||||
|
upload_file: "Upload file",
|
||||||
|
copy_response: "Copy response",
|
||||||
|
copy_code: "Copy code",
|
||||||
|
copy_schema: "Copy Schema",
|
||||||
|
use_request: "Use request",
|
||||||
|
documentation: "Documentation",
|
||||||
|
docs: "Docs",
|
||||||
|
reset_default: "Reset to default",
|
||||||
|
fields: "FIELDS",
|
||||||
|
deprecated: "DEPRECATED",
|
||||||
|
add_one_header: "(add at least one header)",
|
||||||
|
add_one_parameter: "(add at least one parameter)",
|
||||||
|
header_count: "header {count}",
|
||||||
|
parameter_count: "parameter {count}",
|
||||||
|
variable_count: "variable {count}",
|
||||||
|
value_count: "value {count}",
|
||||||
|
send_request_first: "Send a request first",
|
||||||
|
generate_docs: "Generate Documentation",
|
||||||
|
generate_docs_message: "Import any Postwoman Collection to Generate Documentation on-the-go.",
|
||||||
|
generate_docs_first: "Generate documentation first",
|
||||||
|
docs_generated: "Documentation generated",
|
||||||
|
import_collections: "Import collections",
|
||||||
|
optional: "(optional)",
|
||||||
|
json: "JSON",
|
||||||
|
none: "None",
|
||||||
|
username: "Username",
|
||||||
|
password: "Password",
|
||||||
|
token: "Token",
|
||||||
|
payload: "Payload",
|
||||||
|
choose_file: "Choose a file",
|
||||||
|
file_imported: "File imported",
|
||||||
|
f12_details: "(F12 for details)",
|
||||||
|
we_use_cookies: "We use cookies",
|
||||||
|
copied_to_clipboard: "Copied to clipboard",
|
||||||
|
finished_in: "Finished in {duration}ms",
|
||||||
|
check_console_details: "Check console for details.",
|
||||||
|
download_started: "Download started",
|
||||||
|
url_invalid_format: "URL is not formatted properly",
|
||||||
|
curl_invalid_format: "cURL is not formatted properly",
|
||||||
|
enable_proxy: "Try enabling Proxy",
|
||||||
|
complete_config_urls: "Please complete configuration urls.",
|
||||||
|
token_request_saved: "Token request saved",
|
||||||
|
donate_info1: "If you have enjoyed the productivity of using Postwoman, consider donating as a sign of appreciation.",
|
||||||
|
donate_info2: "You can support Postwoman development via the following methods:",
|
||||||
|
one_time_recurring: "One-time or recurring",
|
||||||
|
one_time: "One-time",
|
||||||
|
recurring: "Recurring",
|
||||||
|
wiki: "Wiki",
|
||||||
|
error: "Error",
|
||||||
|
go_home: "Go Home",
|
||||||
|
reload: "Reload",
|
||||||
|
enter_curl: "Enter cURL",
|
||||||
|
empty: "Empty"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:to="localePath('index')"
|
:to="localePath('index')"
|
||||||
:class="linkActive('/')"
|
:class="linkActive('/')"
|
||||||
v-tooltip.right="$t('home')"
|
v-tooltip.right="$t('home')"
|
||||||
aria-label="Home"
|
:aria-label="$t('home')"
|
||||||
>
|
>
|
||||||
<logo alt class="material-icons" style="height: 24px;"></logo>
|
<logo alt class="material-icons" style="height: 24px;"></logo>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
:to="localePath('graphql')"
|
:to="localePath('graphql')"
|
||||||
:class="linkActive('/graphql')"
|
:class="linkActive('/graphql')"
|
||||||
v-tooltip.right="$t('graphql')"
|
v-tooltip.right="$t('graphql')"
|
||||||
aria-label="GraphQL"
|
:aria-label="$t('graphql')"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
class="material-icons"
|
class="material-icons"
|
||||||
@@ -141,8 +141,8 @@
|
|||||||
<nuxt-link
|
<nuxt-link
|
||||||
:to="localePath('doc')"
|
:to="localePath('doc')"
|
||||||
:class="linkActive('/doc')"
|
:class="linkActive('/doc')"
|
||||||
v-tooltip.right="'Documentation'"
|
v-tooltip.right="$t('documentation')"
|
||||||
aria-label="Documentation"
|
:aria-label="$t('documentation')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">books</i>
|
<i class="material-icons">books</i>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
:to="localePath('settings')"
|
:to="localePath('settings')"
|
||||||
:class="linkActive('/settings')"
|
:class="linkActive('/settings')"
|
||||||
v-tooltip.right="$t('settings')"
|
v-tooltip.right="$t('settings')"
|
||||||
aria-label="Settings"
|
:aria-label="$t('settings')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">settings</i>
|
<i class="material-icons">settings</i>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
<i class="material-icons">offline_bolt</i>
|
<i class="material-icons">offline_bolt</i>
|
||||||
</button>
|
</button>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="icon" v-tooltip="'More'">
|
<button class="icon" v-tooltip="$t('more')">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
</button>
|
</button>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
@@ -454,18 +454,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<p class="info">
|
<p class="info">
|
||||||
If you have enjoyed the productivity of using Postwoman, consider
|
{{ $t("donate_info1") }}
|
||||||
donating as a sign of appreciation.
|
|
||||||
</p>
|
</p>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
You can support Postwoman development via the following methods:
|
{{ $t("donate_info2") }}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
href="https://opencollective.com/postwoman"
|
href="https://opencollective.com/postwoman"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
v-tooltip.right="'One-time or recurring'"
|
v-tooltip.right="$t('one_time_recurring')"
|
||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">donut_large</i>
|
<i class="material-icons">donut_large</i>
|
||||||
@@ -478,7 +477,7 @@
|
|||||||
href="https://www.paypal.me/liyascthomas"
|
href="https://www.paypal.me/liyascthomas"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
v-tooltip.right="'One-time'"
|
v-tooltip.right="$t('one_time')"
|
||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">payment</i>
|
<i class="material-icons">payment</i>
|
||||||
@@ -491,7 +490,7 @@
|
|||||||
href="https://www.patreon.com/liyasthomas"
|
href="https://www.patreon.com/liyasthomas"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
v-tooltip.right="'Recurring'"
|
v-tooltip.right="$t('recurring')"
|
||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">local_parking</i>
|
<i class="material-icons">local_parking</i>
|
||||||
@@ -577,13 +576,13 @@ export default {
|
|||||||
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("We use cookies", {
|
this.$toast.show(this.$t("we_use_cookies"), {
|
||||||
icon: "info",
|
icon: "info",
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
theme: "toasted-primary",
|
theme: "toasted-primary",
|
||||||
action: [
|
action: [
|
||||||
{
|
{
|
||||||
text: "Dismiss",
|
text: this.$t("dismiss"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
localStorage.setItem("cookiesAllowed", "yes");
|
localStorage.setItem("cookiesAllowed", "yes");
|
||||||
toastObject.goAway(0);
|
toastObject.goAway(0);
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page page-error">
|
<div class="page page-error">
|
||||||
<img src="~static/icons/error.svg" alt="Error" class="error_banner" />
|
<img src="~static/icons/error.svg" :alt="$t('error')" class="error_banner" />
|
||||||
<h2>{{ error.statusCode }}</h2>
|
<h2>{{ error.statusCode }}</h2>
|
||||||
<h3>{{ error.message }}</h3>
|
<h3>{{ error.message }}</h3>
|
||||||
<p>
|
<p>
|
||||||
<nuxt-link to="/">
|
<nuxt-link to="/">
|
||||||
<button>Go Home</button>
|
<button>{{ $t("go_home") }}</button>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href @click.prevent="reloadApplication">Reload</a>
|
<a href @click.prevent="reloadApplication">{{ $t("reload") }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -361,6 +361,9 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
defaultLocale: "en",
|
defaultLocale: "en",
|
||||||
|
vueI18n: {
|
||||||
|
fallbackLocale: "en"
|
||||||
|
},
|
||||||
lazy: true,
|
lazy: true,
|
||||||
langDir: "lang/"
|
langDir: "lang/"
|
||||||
},
|
},
|
||||||
|
|||||||
116
pages/doc.vue
116
pages/doc.vue
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<pw-section class="blue" label="Collections" ref="collections">
|
<pw-section class="blue" :label="$t('collections')" ref="collections">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
Import any Postwoman Collection to Generate Documentation on-the-go.
|
{{ $t("generate_docs_message") }}
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -14,10 +14,10 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="$refs.collectionUpload.click()"
|
@click="$refs.collectionUpload.click()"
|
||||||
v-tooltip="'JSON'"
|
v-tooltip="$t('json')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
<span>Import collections</span>
|
<span>{{ $t("import_collections") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<button class="icon" @click="getDoc">
|
<button class="icon" @click="getDoc">
|
||||||
<i class="material-icons">book</i>
|
<i class="material-icons">book</i>
|
||||||
<span>Generate Documentation</span>
|
<span>{{ $t("generate_docs") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<pw-section class="green" label="Documentation" ref="documentation">
|
<pw-section class="green" label="Documentation" ref="documentation">
|
||||||
<p v-if="this.items.length === 0" class="info">
|
<p v-if="this.items.length === 0" class="info">
|
||||||
Generate documentation first
|
{{ $t("generate_docs_first") }}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
{{ collection.name || "None" }}
|
{{ collection.name || $t("none") }}
|
||||||
</h2>
|
</h2>
|
||||||
<span
|
<span
|
||||||
class="folder"
|
class="folder"
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
>
|
>
|
||||||
<h3>
|
<h3>
|
||||||
<i class="material-icons">folder_open</i>
|
<i class="material-icons">folder_open</i>
|
||||||
{{ folder.name || "None" }}
|
{{ folder.name || $t("none") }}
|
||||||
</h3>
|
</h3>
|
||||||
<span
|
<span
|
||||||
class="request"
|
class="request"
|
||||||
@@ -84,46 +84,46 @@
|
|||||||
>
|
>
|
||||||
<h4>
|
<h4>
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
{{ request.name || "None" }}
|
{{ request.name || $t("none") }}
|
||||||
</h4>
|
</h4>
|
||||||
<p class="doc-desc" v-if="request.url">
|
<p class="doc-desc" v-if="request.url">
|
||||||
<span>
|
<span>
|
||||||
URL: <code>{{ request.url || "None" }}</code>
|
{{ $t("url") }}: <code>{{ request.url || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.path">
|
<p class="doc-desc" v-if="request.path">
|
||||||
<span>
|
<span>
|
||||||
Path: <code>{{ request.path || "None" }}</code>
|
{{ $t("path") }}: <code>{{ request.path || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.method">
|
<p class="doc-desc" v-if="request.method">
|
||||||
<span>
|
<span>
|
||||||
Method: <code>{{ request.method || "None" }}</code>
|
{{ $t("method") }}: <code>{{ request.method || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.auth">
|
<p class="doc-desc" v-if="request.auth">
|
||||||
<span>
|
<span>
|
||||||
Authentication:
|
{{ $t("authentication") }}:
|
||||||
<code>{{ request.auth || "None" }}</code>
|
<code>{{ request.auth || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.httpUser">
|
<p class="doc-desc" v-if="request.httpUser">
|
||||||
<span>
|
<span>
|
||||||
Username: <code>{{ request.httpUser || "None" }}</code>
|
{{ $t("username") }}: <code>{{ request.httpUser || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.httpPassword">
|
<p class="doc-desc" v-if="request.httpPassword">
|
||||||
<span>
|
<span>
|
||||||
Password:
|
{{ $t("password") }}:
|
||||||
<code>{{ request.httpPassword || "None" }}</code>
|
<code>{{ request.httpPassword || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.bearerToken">
|
<p class="doc-desc" v-if="request.bearerToken">
|
||||||
<span>
|
<span>
|
||||||
Token: <code>{{ request.bearerToken || "None" }}</code>
|
{{ $t("token") }}: <code>{{ request.bearerToken || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<h4 v-if="request.headers.length > 0">Headers</h4>
|
<h4 v-if="request.headers.length > 0">{{ $t("headers") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.headers"
|
v-if="request.headers"
|
||||||
v-for="header in request.headers"
|
v-for="header in request.headers"
|
||||||
@@ -131,12 +131,12 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ header.key || "None" }}:
|
{{ header.key || $t("none") }}:
|
||||||
<code>{{ header.value || "None" }}</code>
|
<code>{{ header.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.params.length > 0">Parameters</h4>
|
<h4 v-if="request.params.length > 0">{{ $t("parameters") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.params"
|
v-if="request.params"
|
||||||
v-for="parameter in request.params"
|
v-for="parameter in request.params"
|
||||||
@@ -144,12 +144,12 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ parameter.key || "None" }}:
|
{{ parameter.key || $t("none") }}:
|
||||||
<code>{{ parameter.value || "None" }}</code>
|
<code>{{ parameter.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.bodyParam">Payload</h4>
|
<h4 v-if="request.bodyParam">{{ $t("payload") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.bodyParam"
|
v-if="request.bodyParam"
|
||||||
v-for="payload in request.bodyParam"
|
v-for="payload in request.bodyParam"
|
||||||
@@ -157,26 +157,26 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ payload.key || "None" }}:
|
{{ payload.key || $t("none") }}:
|
||||||
<code>{{ payload.value || "None" }}</code>
|
<code>{{ payload.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<p class="doc-desc" v-if="request.rawParams">
|
<p class="doc-desc" v-if="request.rawParams">
|
||||||
<span>
|
<span>
|
||||||
Parameters: <code>{{ request.rawParams || "None" }}</code>
|
{{ $t("parameters") }}: <code>{{ request.rawParams || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.contentType">
|
<p class="doc-desc" v-if="request.contentType">
|
||||||
<span>
|
<span>
|
||||||
Content Type:
|
{{ $t("content_type") }}:
|
||||||
<code>{{ request.contentType || "None" }}</code>
|
<code>{{ request.contentType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.requestType">
|
<p class="doc-desc" v-if="request.requestType">
|
||||||
<span>
|
<span>
|
||||||
Request Type:
|
{{ $t("request_type") }}:
|
||||||
<code>{{ request.requestType || "None" }}</code>
|
<code>{{ request.requestType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
@@ -188,45 +188,45 @@
|
|||||||
>
|
>
|
||||||
<h4>
|
<h4>
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
{{ request.name || "None" }}
|
{{ request.name || $t("none") }}
|
||||||
</h4>
|
</h4>
|
||||||
<p class="doc-desc" v-if="request.url">
|
<p class="doc-desc" v-if="request.url">
|
||||||
<span>
|
<span>
|
||||||
URL: <code>{{ request.url || "None" }}</code>
|
{{ $t("url") }}: <code>{{ request.url || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.path">
|
<p class="doc-desc" v-if="request.path">
|
||||||
<span>
|
<span>
|
||||||
Path: <code>{{ request.path || "None" }}</code>
|
{{ $t("path") }}: <code>{{ request.path || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.method">
|
<p class="doc-desc" v-if="request.method">
|
||||||
<span>
|
<span>
|
||||||
Method: <code>{{ request.method || "None" }}</code>
|
{{ $t("method") }}: <code>{{ request.method || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.auth">
|
<p class="doc-desc" v-if="request.auth">
|
||||||
<span>
|
<span>
|
||||||
Authentication:
|
{{ $t("authentication") }}:
|
||||||
<code>{{ request.auth || "None" }}</code>
|
<code>{{ request.auth || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.httpUser">
|
<p class="doc-desc" v-if="request.httpUser">
|
||||||
<span>
|
<span>
|
||||||
Username: <code>{{ request.httpUser || "None" }}</code>
|
{{ $t("username") }}: <code>{{ request.httpUser || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.httpPassword">
|
<p class="doc-desc" v-if="request.httpPassword">
|
||||||
<span>
|
<span>
|
||||||
Password: <code>{{ request.httpPassword || "None" }}</code>
|
{{ $t("password") }}: <code>{{ request.httpPassword || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.bearerToken">
|
<p class="doc-desc" v-if="request.bearerToken">
|
||||||
<span>
|
<span>
|
||||||
Token: <code>{{ request.bearerToken || "None" }}</code>
|
{{ $t("token") }}: <code>{{ request.bearerToken || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<h4 v-if="request.headers.length > 0">Headers</h4>
|
<h4 v-if="request.headers.length > 0">{{ $t("headers") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.headers"
|
v-if="request.headers"
|
||||||
v-for="header in request.headers"
|
v-for="header in request.headers"
|
||||||
@@ -234,12 +234,12 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ header.key || "None" }}:
|
{{ header.key || $t("none") }}:
|
||||||
<code>{{ header.value || "None" }}</code>
|
<code>{{ header.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.params.length > 0">Parameters</h4>
|
<h4 v-if="request.params.length > 0">{{ $t("parameters") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.params"
|
v-if="request.params"
|
||||||
v-for="parameter in request.params"
|
v-for="parameter in request.params"
|
||||||
@@ -247,12 +247,12 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ parameter.key || "None" }}:
|
{{ parameter.key || $t("none") }}:
|
||||||
<code>{{ parameter.value || "None" }}</code>
|
<code>{{ parameter.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.bodyParam">Payload</h4>
|
<h4 v-if="request.bodyParam">{{ $t("payload") }}</h4>
|
||||||
<span
|
<span
|
||||||
v-if="request.bodyParam"
|
v-if="request.bodyParam"
|
||||||
v-for="payload in request.bodyParam"
|
v-for="payload in request.bodyParam"
|
||||||
@@ -260,26 +260,26 @@
|
|||||||
>
|
>
|
||||||
<p class="doc-desc">
|
<p class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ payload.key || "None" }}:
|
{{ payload.key || $t("none") }}:
|
||||||
<code>{{ payload.value || "None" }}</code>
|
<code>{{ payload.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<p class="doc-desc" v-if="request.rawParams">
|
<p class="doc-desc" v-if="request.rawParams">
|
||||||
<span>
|
<span>
|
||||||
Parameters: <code>{{ request.rawParams || "None" }}</code>
|
{{ $t("parameters") }}: <code>{{ request.rawParams || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.contentType">
|
<p class="doc-desc" v-if="request.contentType">
|
||||||
<span>
|
<span>
|
||||||
Content Type:
|
{{ $t("content_type") }}:
|
||||||
<code>{{ request.contentType || "None" }}</code>
|
<code>{{ request.contentType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="doc-desc" v-if="request.requestType">
|
<p class="doc-desc" v-if="request.requestType">
|
||||||
<span>
|
<span>
|
||||||
Request Type:
|
{{ $t("request_type") }}:
|
||||||
<code>{{ request.requestType || "None" }}</code>
|
<code>{{ request.requestType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
@@ -360,11 +360,11 @@ export default {
|
|||||||
this.collectionJSON = e.target.result;
|
this.collectionJSON = e.target.result;
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
this.$toast.info("File imported", {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: "attach_file"
|
icon: "attach_file"
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$toast.error("Choose a file", {
|
this.$toast.error(this.$t("choose_file"), {
|
||||||
icon: "attach_file"
|
icon: "attach_file"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,7 @@ export default {
|
|||||||
getDoc() {
|
getDoc() {
|
||||||
try {
|
try {
|
||||||
this.items = JSON.parse(this.collectionJSON);
|
this.items = JSON.parse(this.collectionJSON);
|
||||||
this.$toast.info("Documentation generated", {
|
this.$toast.info(this.$t("docs_generated"), {
|
||||||
icon: "book"
|
icon: "book"
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-columns inner-left">
|
<div class="page-columns inner-left">
|
||||||
<pw-section class="blue" label="Endpoint" ref="endpoint">
|
<pw-section class="blue" :label="$t('endpoint')" ref="endpoint">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="url">{{ $t("url") }}</label>
|
<label for="url">{{ $t("url") }}</label>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="orange" label="Headers" ref="headers">
|
<pw-section class="orange" :label="$t('headers')" ref="headers">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="headers = []"
|
@click="headers = []"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
readonly
|
readonly
|
||||||
v-textarea-auto-height="headerString"
|
v-textarea-auto-height="headerString"
|
||||||
v-model="headerString"
|
v-model="headerString"
|
||||||
placeholder="(add at least one header)"
|
:placeholder="$t('add_one_header')"
|
||||||
rows="1"
|
rows="1"
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
</li>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<ul v-for="(header, index) in headers" :key="index">
|
<ul v-for="(header, index) in headers" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<autocomplete
|
<autocomplete
|
||||||
:placeholder="'header ' + (index + 1)"
|
:placeholder="$t('header_count', { count: index + 1 })"
|
||||||
:source="commonHeaders"
|
:source="commonHeaders"
|
||||||
:spellcheck="false"
|
:spellcheck="false"
|
||||||
:value="header.key"
|
:value="header.key"
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'value ' + (index + 1)"
|
:placeholder="$t('value_count', { count: index + 1 })"
|
||||||
:name="'value' + index"
|
:name="'value' + index"
|
||||||
:value="header.value"
|
:value="header.value"
|
||||||
@change="
|
@change="
|
||||||
@@ -85,6 +85,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeRequestHeader(index)"
|
@click="removeRequestHeader(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
id="header"
|
id="header"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="green" label="Schema" ref="schema">
|
<pw-section class="green" :label="$t('schema')" ref="schema">
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label>{{ $t("response") }}</label>
|
<label>{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -112,8 +113,8 @@
|
|||||||
ref="ToggleExpandResponse"
|
ref="ToggleExpandResponse"
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: !expandResponse
|
content: !expandResponse
|
||||||
? 'Expand response'
|
? $t('expand_response')
|
||||||
: 'Collapse response'
|
: $t('collapse_response')
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
@@ -124,7 +125,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
@click="downloadResponse"
|
@click="downloadResponse"
|
||||||
ref="downloadResponse"
|
ref="downloadResponse"
|
||||||
v-tooltip="'Download file'"
|
v-tooltip="$t('download_file')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">get_app</i>
|
<i class="material-icons">get_app</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -132,7 +133,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
ref="copySchemaCode"
|
ref="copySchemaCode"
|
||||||
@click="copySchema"
|
@click="copySchema"
|
||||||
v-tooltip="'Copy Schema'"
|
v-tooltip="$t('copy_schema')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -153,14 +154,14 @@
|
|||||||
/>
|
/>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="cyan" label="Query" ref="query">
|
<pw-section class="cyan" :label="$t('query')" ref="query">
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="gqlQuery">{{ $t("query") }}</label>
|
<label for="gqlQuery">{{ $t("query") }}</label>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="runQuery()"
|
@click="runQuery()"
|
||||||
v-tooltip.bottom="'Run Query'"
|
v-tooltip.bottom="$t('run_query')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">play_arrow</i>
|
<i class="material-icons">play_arrow</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
@click="copyQuery"
|
@click="copyQuery"
|
||||||
ref="copyQueryButton"
|
ref="copyQueryButton"
|
||||||
v-tooltip="'Copy Query'"
|
v-tooltip="$t('copy_query')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -191,7 +192,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="variables = []"
|
@click="variables = []"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -200,7 +201,7 @@
|
|||||||
<ul v-for="(variable, index) in variables" :key="index">
|
<ul v-for="(variable, index) in variables" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'variable ' + (index + 1)"
|
:placeholder="$t('variable_count', { count: index + 1 })"
|
||||||
:name="'variable_key_' + index"
|
:name="'variable_key_' + index"
|
||||||
:value="variable.key"
|
:value="variable.key"
|
||||||
@change="
|
@change="
|
||||||
@@ -214,7 +215,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'value ' + (index + 1)"
|
:placeholder="$t('value_count', { count: index + 1 })"
|
||||||
:name="'variable_value_' + index"
|
:name="'variable_value_' + index"
|
||||||
:value="variable.value"
|
:value="variable.value"
|
||||||
@change="
|
@change="
|
||||||
@@ -228,7 +229,11 @@
|
|||||||
</li>
|
</li>
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<button class="icon" @click="removeQueryVariable(index)">
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="removeQueryVariable(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
@@ -252,7 +257,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
@click="copyResponse"
|
@click="copyResponse"
|
||||||
ref="copyResponseButton"
|
ref="copyResponseButton"
|
||||||
v-tooltip="'Copy Response'"
|
v-tooltip="$t('copy_response')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -274,7 +279,7 @@
|
|||||||
</pw-section>
|
</pw-section>
|
||||||
</div>
|
</div>
|
||||||
<aside class="sticky-inner inner-right">
|
<aside class="sticky-inner inner-right">
|
||||||
<pw-section class="purple" label="Docs" ref="docs">
|
<pw-section class="purple" :label="$t('docs')" ref="docs">
|
||||||
<section>
|
<section>
|
||||||
<input
|
<input
|
||||||
v-if="queryFields.length > 0"
|
v-if="queryFields.length > 0"
|
||||||
@@ -366,7 +371,7 @@
|
|||||||
"
|
"
|
||||||
class="info"
|
class="info"
|
||||||
>
|
>
|
||||||
Send a request first
|
{{ $t("send_request_first") }}
|
||||||
</p>
|
</p>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -605,7 +610,7 @@ export default {
|
|||||||
aux.select();
|
aux.select();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.body.removeChild(aux);
|
document.body.removeChild(aux);
|
||||||
this.$toast.success("Copied to clipboard", {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -621,7 +626,7 @@ export default {
|
|||||||
aux.select();
|
aux.select();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.body.removeChild(aux);
|
document.body.removeChild(aux);
|
||||||
this.$toast.success("Copied to clipboard", {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -637,7 +642,7 @@ export default {
|
|||||||
aux.select();
|
aux.select();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.body.removeChild(aux);
|
document.body.removeChild(aux);
|
||||||
this.$toast.success("Copied to clipboard", {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -705,13 +710,13 @@ export default {
|
|||||||
|
|
||||||
this.$nuxt.$loading.finish();
|
this.$nuxt.$loading.finish();
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
this.$toast.info(`Finished in ${duration}ms`, {
|
this.$toast.info(this.$t("finished_in", { duration }), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$nuxt.$loading.finish();
|
this.$nuxt.$loading.finish();
|
||||||
|
|
||||||
this.$toast.error(error + " (F12 for details)", {
|
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
console.log("Error", error);
|
console.log("Error", error);
|
||||||
@@ -719,7 +724,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async getSchema() {
|
async getSchema() {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
this.schemaString = "Loading...";
|
this.schemaString = this.$t("loading");
|
||||||
this.scrollInto("schema");
|
this.scrollInto("schema");
|
||||||
|
|
||||||
// Start showing the loading bar as soon as possible.
|
// Start showing the loading bar as soon as possible.
|
||||||
@@ -824,13 +829,13 @@ export default {
|
|||||||
|
|
||||||
this.$nuxt.$loading.finish();
|
this.$nuxt.$loading.finish();
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
this.$toast.info(`Finished in ${duration}ms`, {
|
this.$toast.info(this.$t("finished_in", { duration }), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$nuxt.$loading.finish();
|
this.$nuxt.$loading.finish();
|
||||||
this.schemaString = error + ". Check console for details.";
|
this.schemaString = `${error}. ${check_console_details}`;
|
||||||
this.$toast.error(error + " (F12 for details)", {
|
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
console.log("Error", error);
|
console.log("Error", error);
|
||||||
@@ -854,7 +859,7 @@ export default {
|
|||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
||||||
this.$toast.success("Download started", {
|
this.$toast.success(this.$t("download_started"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -875,10 +880,10 @@ export default {
|
|||||||
const oldHeaders = this.headers.slice();
|
const oldHeaders = this.headers.slice();
|
||||||
|
|
||||||
this.$store.commit("removeGQLHeader", index);
|
this.$store.commit("removeGQLHeader", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
duration: 4000,
|
duration: 4000,
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.headers = oldHeaders;
|
this.headers = oldHeaders;
|
||||||
@@ -899,10 +904,10 @@ export default {
|
|||||||
const oldVariables = this.variables.slice();
|
const oldVariables = this.variables.slice();
|
||||||
|
|
||||||
this.$store.commit("removeGQLVariable", index);
|
this.$store.commit("removeGQLVariable", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
duration: 4000,
|
duration: 4000,
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.variables = oldVariables;
|
this.variables = oldVariables;
|
||||||
|
|||||||
129
pages/index.vue
129
pages/index.vue
@@ -18,7 +18,7 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
>
|
>
|
||||||
<button class="icon" v-tooltip="'Wiki'">
|
<button class="icon" v-tooltip="$t('wiki')">
|
||||||
<i class="material-icons">help</i>
|
<i class="material-icons">help</i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
@@ -40,7 +40,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="blue" label="Request" ref="request">
|
<pw-section
|
||||||
|
class="blue"
|
||||||
|
:label="$t('request')"
|
||||||
|
ref="request"
|
||||||
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="method">{{ $t("method") }}</label>
|
<label for="method">{{ $t("method") }}</label>
|
||||||
@@ -86,7 +90,7 @@
|
|||||||
name="label"
|
name="label"
|
||||||
type="text"
|
type="text"
|
||||||
v-model="label"
|
v-model="label"
|
||||||
placeholder="(optional)"
|
:placeholder="$t('optional')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -135,7 +139,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="$refs.payload.click()"
|
@click="$refs.payload.click()"
|
||||||
v-tooltip="'Upload file'"
|
v-tooltip="$t('upload_file')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">attach_file</i>
|
<i class="material-icons">attach_file</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -159,7 +163,7 @@
|
|||||||
readonly
|
readonly
|
||||||
v-textarea-auto-height="rawRequestBody"
|
v-textarea-auto-height="rawRequestBody"
|
||||||
v-model="rawRequestBody"
|
v-model="rawRequestBody"
|
||||||
placeholder="(add at least one parameter)"
|
:placeholder="$t('add_one_parameter')"
|
||||||
rows="1"
|
rows="1"
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
</li>
|
||||||
@@ -200,6 +204,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeRequestBodyParam(index)"
|
@click="removeRequestBodyParam(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
id="delParam"
|
id="delParam"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
@@ -306,7 +311,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('', $event)"
|
@click="clearContent('', $event)"
|
||||||
v-tooltip.bottom="'Clear All'"
|
v-tooltip.bottom="$t('clear_all')"
|
||||||
ref="clearAll"
|
ref="clearAll"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
@@ -321,7 +326,7 @@
|
|||||||
<div class="tab">
|
<div class="tab">
|
||||||
<pw-section
|
<pw-section
|
||||||
class="cyan"
|
class="cyan"
|
||||||
label="Authentication"
|
:label="$t('authentication')"
|
||||||
ref="authentication"
|
ref="authentication"
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -332,7 +337,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('auth', $event)"
|
@click="clearContent('auth', $event)"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -443,14 +448,14 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('access_token', $event)"
|
@click="clearContent('access_token', $event)"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="showTokenRequest = false"
|
@click="showTokenRequest = false"
|
||||||
v-tooltip.bottom="'Close'"
|
v-tooltip.bottom="$t('close')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -458,7 +463,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
id="token-name"
|
id="token-name"
|
||||||
placeholder="(optional)"
|
:placeholder="$t('optional')"
|
||||||
name="token_name"
|
name="token_name"
|
||||||
v-model="accessTokenName"
|
v-model="accessTokenName"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -556,7 +561,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('headers', $event)"
|
@click="clearContent('headers', $event)"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -567,7 +572,7 @@
|
|||||||
readonly
|
readonly
|
||||||
v-textarea-auto-height="headerString"
|
v-textarea-auto-height="headerString"
|
||||||
v-model="headerString"
|
v-model="headerString"
|
||||||
placeholder="(add at least one header)"
|
:placeholder="$t('add_one_header')"
|
||||||
rows="1"
|
rows="1"
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
</li>
|
||||||
@@ -575,7 +580,7 @@
|
|||||||
<ul v-for="(header, index) in headers" :key="index">
|
<ul v-for="(header, index) in headers" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<autocomplete
|
<autocomplete
|
||||||
:placeholder="'header ' + (index + 1)"
|
:placeholder="$t('header_count', { count: index + 1 })"
|
||||||
:source="commonHeaders"
|
:source="commonHeaders"
|
||||||
:spellcheck="false"
|
:spellcheck="false"
|
||||||
:value="header.key"
|
:value="header.key"
|
||||||
@@ -591,7 +596,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'value ' + (index + 1)"
|
:placeholder="$t('value_count', { count: index + 1 })"
|
||||||
:name="'value' + index"
|
:name="'value' + index"
|
||||||
:value="header.value"
|
:value="header.value"
|
||||||
@change="
|
@change="
|
||||||
@@ -608,6 +613,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeRequestHeader(index)"
|
@click="removeRequestHeader(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
id="header"
|
id="header"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
@@ -637,7 +643,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('parameters', $event)"
|
@click="clearContent('parameters', $event)"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -648,7 +654,7 @@
|
|||||||
readonly
|
readonly
|
||||||
v-textarea-auto-height="queryString"
|
v-textarea-auto-height="queryString"
|
||||||
v-model="queryString"
|
v-model="queryString"
|
||||||
placeholder="(add at least one parameter)"
|
:placeholder="$t('add_one_parameter')"
|
||||||
rows="1"
|
rows="1"
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
</li>
|
||||||
@@ -656,7 +662,7 @@
|
|||||||
<ul v-for="(param, index) in params" :key="index">
|
<ul v-for="(param, index) in params" :key="index">
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'parameter ' + (index + 1)"
|
:placeholder="$t('parameter_count', { count: index + 1 })"
|
||||||
:name="'param' + index"
|
:name="'param' + index"
|
||||||
:value="param.key"
|
:value="param.key"
|
||||||
@change="
|
@change="
|
||||||
@@ -670,7 +676,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input
|
<input
|
||||||
:placeholder="'value ' + (index + 1)"
|
:placeholder="$t('value_count', { count: index + 1 })"
|
||||||
:name="'value' + index"
|
:name="'value' + index"
|
||||||
:value="param.value"
|
:value="param.value"
|
||||||
@change="
|
@change="
|
||||||
@@ -686,6 +692,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeRequestParam(index)"
|
@click="removeRequestParam(index)"
|
||||||
|
v-tooltip.bottom="$t('delete')"
|
||||||
id="param"
|
id="param"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
@@ -722,7 +729,7 @@
|
|||||||
<pw-section
|
<pw-section
|
||||||
class="purple"
|
class="purple"
|
||||||
id="response"
|
id="response"
|
||||||
label="Response"
|
:label="$t('response')"
|
||||||
ref="response"
|
ref="response"
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -730,7 +737,7 @@
|
|||||||
<label for="status">{{ $t("status") }}</label>
|
<label for="status">{{ $t("status") }}</label>
|
||||||
<input
|
<input
|
||||||
:class="statusCategory ? statusCategory.className : ''"
|
:class="statusCategory ? statusCategory.className : ''"
|
||||||
:value="response.status || '(waiting to send request)'"
|
:value="response.status || $t('waiting_send_req')"
|
||||||
ref="status"
|
ref="status"
|
||||||
id="status"
|
id="status"
|
||||||
name="status"
|
name="status"
|
||||||
@@ -770,7 +777,7 @@
|
|||||||
@click="downloadResponse"
|
@click="downloadResponse"
|
||||||
ref="downloadResponse"
|
ref="downloadResponse"
|
||||||
v-if="response.body"
|
v-if="response.body"
|
||||||
v-tooltip="'Download file'"
|
v-tooltip="$t('download_file')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">get_app</i>
|
<i class="material-icons">get_app</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -779,7 +786,7 @@
|
|||||||
@click="copyResponse"
|
@click="copyResponse"
|
||||||
ref="copyResponse"
|
ref="copyResponse"
|
||||||
v-if="response.body"
|
v-if="response.body"
|
||||||
v-tooltip="'Copy response'"
|
v-tooltip="$t('copy_response')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -835,7 +842,7 @@
|
|||||||
<input id="collection-tab" type="radio" name="side" />
|
<input id="collection-tab" type="radio" name="side" />
|
||||||
<label for="collection-tab">{{ $t("collections") }}</label>
|
<label for="collection-tab">{{ $t("collections") }}</label>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<pw-section class="yellow" label="Collections" ref="collections">
|
<pw-section class="yellow" :label="$t('collections')" ref="collections">
|
||||||
<collections />
|
<collections />
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</div>
|
</div>
|
||||||
@@ -870,7 +877,7 @@
|
|||||||
id="import-text"
|
id="import-text"
|
||||||
autofocus
|
autofocus
|
||||||
rows="8"
|
rows="8"
|
||||||
placeholder="Enter cURL"
|
:placeholder="$t('enter_curl')"
|
||||||
></textarea>
|
></textarea>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -880,7 +887,7 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="showModal = false">
|
<button class="icon" @click="showModal = false">
|
||||||
Cancel
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="handleImport">
|
<button class="icon primary" @click="handleImport">
|
||||||
{{ $t("import") }}
|
{{ $t("import") }}
|
||||||
@@ -928,7 +935,7 @@
|
|||||||
@click="copyRequestCode"
|
@click="copyRequestCode"
|
||||||
id="copyRequestCode"
|
id="copyRequestCode"
|
||||||
ref="copyRequestCode"
|
ref="copyRequestCode"
|
||||||
v-tooltip="'Copy code'"
|
v-tooltip="$t('copy_code')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -971,7 +978,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="clearContent('tokens', $event)"
|
@click="clearContent('tokens', $event)"
|
||||||
v-tooltip.bottom="'Clear'"
|
v-tooltip.bottom="$t('clear')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -1009,7 +1016,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeOAuthToken(index)"
|
@click="removeOAuthToken(index)"
|
||||||
v-tooltip.bottom="'Delete'"
|
v-tooltip.bottom="$t('delete')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -1017,7 +1024,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-if="tokens.length === 0" class="info">
|
<p v-if="tokens.length === 0" class="info">
|
||||||
Empty
|
{{ $t("empty") }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer"></div>
|
<div slot="footer"></div>
|
||||||
@@ -1059,7 +1066,7 @@
|
|||||||
:disabled="this.tokenReqs.length === 0"
|
:disabled="this.tokenReqs.length === 0"
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="removeOAuthTokenReq"
|
@click="removeOAuthTokenReq"
|
||||||
v-tooltip.bottom="'Delete'"
|
v-tooltip.bottom="$t('delete')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -1389,8 +1396,8 @@ export default {
|
|||||||
},
|
},
|
||||||
"response.body": function(val) {
|
"response.body": function(val) {
|
||||||
if (
|
if (
|
||||||
this.response.body === "(waiting to send request)" ||
|
this.response.body === this.$t("waiting_send_req") ||
|
||||||
this.response.body === "Loading..."
|
this.response.body === this.$t("loading")
|
||||||
) {
|
) {
|
||||||
this.responseBodyText = this.response.body;
|
this.responseBodyText = this.response.body;
|
||||||
this.responseBodyType = "text";
|
this.responseBodyType = "text";
|
||||||
@@ -2005,7 +2012,7 @@ export default {
|
|||||||
this.scrollInto("response");
|
this.scrollInto("response");
|
||||||
|
|
||||||
if (!this.isValidURL) {
|
if (!this.isValidURL) {
|
||||||
this.$toast.error("URL is not formatted properly", {
|
this.$toast.error(this.$t("url_invalid_format"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -2019,8 +2026,8 @@ export default {
|
|||||||
this.$refs.response.$el.classList.toggle("hidden");
|
this.$refs.response.$el.classList.toggle("hidden");
|
||||||
}
|
}
|
||||||
this.previewEnabled = false;
|
this.previewEnabled = false;
|
||||||
this.response.status = "Fetching...";
|
this.response.status = this.$t("fetching");
|
||||||
this.response.body = "Loading...";
|
this.response.body = this.$t("loading");
|
||||||
|
|
||||||
const auth =
|
const auth =
|
||||||
this.auth === "Basic Auth"
|
this.auth === "Basic Auth"
|
||||||
@@ -2081,7 +2088,7 @@ export default {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
this.$toast.info(`Finished in ${duration}ms`, {
|
this.$toast.info(this.$t("finished_in", { duration }), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2134,12 +2141,12 @@ export default {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.response.status = error.message;
|
this.response.status = error.message;
|
||||||
this.response.body = error + ". Check console for details.";
|
this.response.body = `${error}. ${this.$t("check_console_details")}`;
|
||||||
this.$toast.error(error + " (F12 for details)", {
|
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
if (!this.$store.state.postwoman.settings.PROXY_ENABLED) {
|
if (!this.$store.state.postwoman.settings.PROXY_ENABLED) {
|
||||||
this.$toast.info("Try enabling Proxy", {
|
this.$toast.info(this.$t("enable_proxy"), {
|
||||||
icon: "help",
|
icon: "help",
|
||||||
duration: 8000,
|
duration: 8000,
|
||||||
action: {
|
action: {
|
||||||
@@ -2184,10 +2191,10 @@ export default {
|
|||||||
const oldHeaders = this.headers.slice();
|
const oldHeaders = this.headers.slice();
|
||||||
|
|
||||||
this.$store.commit("removeHeaders", index);
|
this.$store.commit("removeHeaders", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.headers = oldHeaders;
|
this.headers = oldHeaders;
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
@@ -2204,10 +2211,10 @@ export default {
|
|||||||
const oldParams = this.params.slice();
|
const oldParams = this.params.slice();
|
||||||
|
|
||||||
this.$store.commit("removeParams", index);
|
this.$store.commit("removeParams", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.params = oldParams;
|
this.params = oldParams;
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
@@ -2224,10 +2231,10 @@ export default {
|
|||||||
const oldBodyParams = this.bodyParams.slice();
|
const oldBodyParams = this.bodyParams.slice();
|
||||||
|
|
||||||
this.$store.commit("removeBodyParams", index);
|
this.$store.commit("removeBodyParams", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.bodyParams = oldBodyParams;
|
this.bodyParams = oldBodyParams;
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
@@ -2255,7 +2262,7 @@ export default {
|
|||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.body.removeChild(dummy);
|
document.body.removeChild(dummy);
|
||||||
this.$refs.copyRequest.innerHTML = this.doneButton;
|
this.$refs.copyRequest.innerHTML = this.doneButton;
|
||||||
this.$toast.info("Copied to clipboard", {
|
this.$toast.info(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -2266,7 +2273,7 @@ export default {
|
|||||||
},
|
},
|
||||||
copyRequestCode() {
|
copyRequestCode() {
|
||||||
this.$refs.copyRequestCode.innerHTML = this.doneButton;
|
this.$refs.copyRequestCode.innerHTML = this.doneButton;
|
||||||
this.$toast.success("Copied to clipboard", {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
this.$refs.generatedCode.select();
|
this.$refs.generatedCode.select();
|
||||||
@@ -2283,7 +2290,7 @@ export default {
|
|||||||
},
|
},
|
||||||
copyResponse() {
|
copyResponse() {
|
||||||
this.$refs.copyResponse.innerHTML = this.doneButton;
|
this.$refs.copyResponse.innerHTML = this.doneButton;
|
||||||
this.$toast.success("Copied to clipboard", {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
const aux = document.createElement("textarea");
|
const aux = document.createElement("textarea");
|
||||||
@@ -2318,7 +2325,7 @@ export default {
|
|||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
this.$refs.downloadResponse.innerHTML = this.doneButton;
|
||||||
this.$toast.success("Download started", {
|
this.$toast.success(this.$t("download_started"), {
|
||||||
icon: "done"
|
icon: "done"
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -2448,7 +2455,7 @@ export default {
|
|||||||
this.showModal = false;
|
this.showModal = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.showModal = false;
|
this.showModal = false;
|
||||||
this.$toast.error("cURL is not formatted properly", {
|
this.$toast.error(this.$t("curl_invalid_format"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2512,7 +2519,7 @@ export default {
|
|||||||
this.scope = "";
|
this.scope = "";
|
||||||
}
|
}
|
||||||
e.target.innerHTML = this.doneButton;
|
e.target.innerHTML = this.doneButton;
|
||||||
this.$toast.info("Cleared", {
|
this.$toast.info(this.$t("cleared"), {
|
||||||
icon: "clear_all"
|
icon: "clear_all"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -2522,7 +2529,7 @@ export default {
|
|||||||
},
|
},
|
||||||
saveRequest() {
|
saveRequest() {
|
||||||
if (!this.checkCollections()) {
|
if (!this.checkCollections()) {
|
||||||
this.$toast.error("Create a Collection", {
|
this.$toast.error(this.$t("create_collection"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -2586,11 +2593,11 @@ export default {
|
|||||||
this.rawParams = e.target.result;
|
this.rawParams = e.target.result;
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
this.$toast.info("File imported", {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: "attach_file"
|
icon: "attach_file"
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$toast.error("Choose a file", {
|
this.$toast.error(this.$t("choose_file"), {
|
||||||
icon: "attach_file"
|
icon: "attach_file"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2600,7 +2607,7 @@ export default {
|
|||||||
this.oidcDiscoveryUrl === "" &&
|
this.oidcDiscoveryUrl === "" &&
|
||||||
(this.authUrl === "" || this.accessTokenUrl === "")
|
(this.authUrl === "" || this.accessTokenUrl === "")
|
||||||
) {
|
) {
|
||||||
this.$toast.error("Please complete configuration urls.", {
|
this.$toast.error(this.$t("complete_config_urls"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -2641,10 +2648,10 @@ export default {
|
|||||||
removeOAuthToken(index) {
|
removeOAuthToken(index) {
|
||||||
const oldTokens = this.tokens.slice();
|
const oldTokens = this.tokens.slice();
|
||||||
this.$store.commit("removeOAuthToken", index);
|
this.$store.commit("removeOAuthToken", index);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.tokens = oldTokens;
|
this.tokens = oldTokens;
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
@@ -2664,7 +2671,7 @@ export default {
|
|||||||
name,
|
name,
|
||||||
details
|
details
|
||||||
});
|
});
|
||||||
this.$toast.info("Token request saved");
|
this.$toast.info(this.$t("token_request_saved"));
|
||||||
this.showTokenRequestList = false;
|
this.showTokenRequestList = false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.$toast.error(e, {
|
this.$toast.error(e, {
|
||||||
@@ -2679,10 +2686,10 @@ export default {
|
|||||||
);
|
);
|
||||||
if (targetReqIndex < 0) return;
|
if (targetReqIndex < 0) return;
|
||||||
this.$store.commit("removeOAuthTokenReq", targetReqIndex);
|
this.$store.commit("removeOAuthTokenReq", targetReqIndex);
|
||||||
this.$toast.error("Deleted", {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: "Undo",
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.tokenReqs = oldTokenReqs;
|
this.tokenReqs = oldTokenReqs;
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<input id="tab-one" type="radio" name="options" checked="checked" />
|
<input id="tab-one" type="radio" name="options" checked="checked" />
|
||||||
<label for="tab-one">{{ $t("websocket") }}</label>
|
<label for="tab-one">{{ $t("websocket") }}</label>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<pw-section class="blue" label="Request" ref="request">
|
<pw-section class="blue" :label="$t('request')" ref="request">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="url">{{ $t("url") }}</label>
|
<label for="url">{{ $t("url") }}</label>
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
|
|
||||||
<pw-section
|
<pw-section
|
||||||
class="purple"
|
class="purple"
|
||||||
label="Communication"
|
:label="$t('communication')"
|
||||||
id="response"
|
id="response"
|
||||||
ref="response"
|
ref="response"
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="log">Log</label>
|
<label for="log">{{ $t("log") }}</label>
|
||||||
<div id="log" name="log" class="log">
|
<div id="log" name="log" class="log">
|
||||||
<span v-if="communication.log">
|
<span v-if="communication.log">
|
||||||
<span
|
<span
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<input id="tab-two" type="radio" name="options" />
|
<input id="tab-two" type="radio" name="options" />
|
||||||
<label for="tab-two">{{ $t("sse") }}</label>
|
<label for="tab-two">{{ $t("sse") }}</label>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<pw-section class="blue" label="Request" ref="request">
|
<pw-section class="blue" :label="$t('request')" ref="request">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="server">{{ $t("server") }}</label>
|
<label for="server">{{ $t("server") }}</label>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
<pw-section
|
<pw-section
|
||||||
class="purple"
|
class="purple"
|
||||||
label="Communication"
|
:label="$t('communication')"
|
||||||
id="response"
|
id="response"
|
||||||
ref="response"
|
ref="response"
|
||||||
>
|
>
|
||||||
@@ -243,7 +243,7 @@ export default {
|
|||||||
connect() {
|
connect() {
|
||||||
this.communication.log = [
|
this.communication.log = [
|
||||||
{
|
{
|
||||||
payload: `Connecting to ${this.url}...`,
|
payload: this.$t("connecting_to", { name: this.url }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "var(--ac-color)"
|
color: "var(--ac-color)"
|
||||||
}
|
}
|
||||||
@@ -254,13 +254,13 @@ export default {
|
|||||||
this.connectionState = true;
|
this.connectionState = true;
|
||||||
this.communication.log = [
|
this.communication.log = [
|
||||||
{
|
{
|
||||||
payload: `Connected to ${this.url}.`,
|
payload: this.$t("connected_to", { name: this.url }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "var(--ac-color)",
|
color: "var(--ac-color)",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.$toast.success("Connected", {
|
this.$toast.success(this.$t("connected"), {
|
||||||
icon: "sync"
|
icon: "sync"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -270,12 +270,12 @@ export default {
|
|||||||
this.socket.onclose = event => {
|
this.socket.onclose = event => {
|
||||||
this.connectionState = false;
|
this.connectionState = false;
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: `Disconnected from ${this.url}.`,
|
payload: this.$t("disconnected_from", { name: this.url }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
});
|
});
|
||||||
this.$toast.error("Disconnected", {
|
this.$toast.error(this.$t("disconnected"), {
|
||||||
icon: "sync_disabled"
|
icon: "sync_disabled"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
};
|
};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.handleError(ex);
|
this.handleError(ex);
|
||||||
this.$toast.error("Something went wrong!", {
|
this.$toast.error(this.$t("something_went_wrong"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ export default {
|
|||||||
this.disconnect();
|
this.disconnect();
|
||||||
this.connectionState = false;
|
this.connectionState = false;
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: `An error has occurred.`,
|
payload: this.$t("error_occurred"),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
@@ -349,7 +349,7 @@ export default {
|
|||||||
start() {
|
start() {
|
||||||
this.events.log = [
|
this.events.log = [
|
||||||
{
|
{
|
||||||
payload: `Connecting to ${this.server}...`,
|
payload: this.$t("connecting_to", { name: this.server }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "var(--ac-color)"
|
color: "var(--ac-color)"
|
||||||
}
|
}
|
||||||
@@ -361,13 +361,13 @@ export default {
|
|||||||
this.connectionSSEState = true;
|
this.connectionSSEState = true;
|
||||||
this.events.log = [
|
this.events.log = [
|
||||||
{
|
{
|
||||||
payload: `Connected to ${this.server}.`,
|
payload: this.$t("connected_to", { name: this.server }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "var(--ac-color)",
|
color: "var(--ac-color)",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.$toast.success("Connected", {
|
this.$toast.success(this.$t("connected"), {
|
||||||
icon: "sync"
|
icon: "sync"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -377,12 +377,12 @@ export default {
|
|||||||
this.sse.onclose = event => {
|
this.sse.onclose = event => {
|
||||||
this.connectionSSEState = false;
|
this.connectionSSEState = false;
|
||||||
this.events.log.push({
|
this.events.log.push({
|
||||||
payload: `Disconnected from ${this.server}.`,
|
payload: this.$t("disconnected_from", { name: this.server }),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
});
|
});
|
||||||
this.$toast.error("Disconnected", {
|
this.$toast.error(this.$t("disconnected"), {
|
||||||
icon: "sync_disabled"
|
icon: "sync_disabled"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -395,14 +395,14 @@ export default {
|
|||||||
};
|
};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.handleSSEError(ex);
|
this.handleSSEError(ex);
|
||||||
this.$toast.error("Something went wrong!", {
|
this.$toast.error(this.$t("something_went_wrong"), {
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.events.log = [
|
this.events.log = [
|
||||||
{
|
{
|
||||||
payload: `This browser doesn't seems to have Server Sent Events support.`,
|
payload: this.$t("browser_support_sse"),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
@@ -414,7 +414,7 @@ export default {
|
|||||||
this.stop();
|
this.stop();
|
||||||
this.connectionSSEState = false;
|
this.connectionSSEState = false;
|
||||||
this.events.log.push({
|
this.events.log.push({
|
||||||
payload: `An error has occurred.`,
|
payload: this.$t("error_occurred"),
|
||||||
source: "info",
|
source: "info",
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString()
|
ts: new Date().toLocaleTimeString()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<pw-section class="cyan" label="Theme" ref="theme">
|
<pw-section class="cyan" :label="$t('theme')" ref="theme">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>{{ $t("background") }}</label>
|
<label>{{ $t("background") }}</label>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="blue" label="Proxy" ref="proxy">
|
<pw-section class="blue" :label="$t('proxy')" ref="proxy">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
>
|
>
|
||||||
<button class="icon" v-tooltip="'Wiki'">
|
<button class="icon" v-tooltip="$t('wiki')">
|
||||||
<i class="material-icons">help</i>
|
<i class="material-icons">help</i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="settings.PROXY_URL = `https://postwoman.apollotv.xyz/`"
|
@click="settings.PROXY_URL = `https://postwoman.apollotv.xyz/`"
|
||||||
v-tooltip.bottom="'Reset to default'"
|
v-tooltip.bottom="$t('reset_default')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -152,26 +152,26 @@ export default {
|
|||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
color: "#202124",
|
color: "#202124",
|
||||||
name: "Kinda Dark",
|
name: this.$t("kinda_dark"),
|
||||||
class: "",
|
class: "",
|
||||||
aceEditor: "twilight"
|
aceEditor: "twilight"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#ffffff",
|
color: "#ffffff",
|
||||||
name: "Clearly White",
|
name: this.$t("clearly_white"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
class: "light",
|
class: "light",
|
||||||
aceEditor: "iplastic"
|
aceEditor: "iplastic"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#000000",
|
color: "#000000",
|
||||||
name: "Just Black",
|
name: this.$t("just_black"),
|
||||||
class: "black",
|
class: "black",
|
||||||
aceEditor: "vibrant_ink"
|
aceEditor: "vibrant_ink"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "var(--bg-color)",
|
color: "var(--bg-color)",
|
||||||
name: "Auto (system)",
|
name: this.$t("auto_system"),
|
||||||
vibrant: window.matchMedia("(prefers-color-scheme: light)").matches,
|
vibrant: window.matchMedia("(prefers-color-scheme: light)").matches,
|
||||||
class: "auto",
|
class: "auto",
|
||||||
aceEditor: window.matchMedia("(prefers-color-scheme: light)").matches
|
aceEditor: window.matchMedia("(prefers-color-scheme: light)").matches
|
||||||
@@ -184,42 +184,42 @@ export default {
|
|||||||
// If the color is vibrant, black is used as the active foreground color.
|
// If the color is vibrant, black is used as the active foreground color.
|
||||||
{
|
{
|
||||||
color: "#50fa7b",
|
color: "#50fa7b",
|
||||||
name: "Green",
|
name: this.$t("green"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#f1fa8c",
|
color: "#f1fa8c",
|
||||||
name: "Yellow",
|
name: this.$t("yellow"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#ff79c6",
|
color: "#ff79c6",
|
||||||
name: "Pink",
|
name: this.$t("pink"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#ff5555",
|
color: "#ff5555",
|
||||||
name: "Red",
|
name: this.$t("red"),
|
||||||
vibrant: false
|
vibrant: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#bd93f9",
|
color: "#bd93f9",
|
||||||
name: "Purple",
|
name: this.$t("purple"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#ffb86c",
|
color: "#ffb86c",
|
||||||
name: "Orange",
|
name: this.$t("orange"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#8be9fd",
|
color: "#8be9fd",
|
||||||
name: "Cyan",
|
name: this.$t("cyan"),
|
||||||
vibrant: true
|
vibrant: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: "#57b5f9",
|
color: "#57b5f9",
|
||||||
name: "Blue",
|
name: this.$t("blue"),
|
||||||
vibrant: false
|
vibrant: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user