⚡ Improving performance
This commit is contained in:
@@ -4,7 +4,7 @@ LABEL maintainer="Liyas Thomas (liyascthomas@gmail.com)"
|
||||
|
||||
# Add git as the prebuild target requires it to parse version information
|
||||
RUN apk add --update --no-cache \
|
||||
git
|
||||
git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
// Layout transitions
|
||||
.layout-enter-active, .layout-leave-active {
|
||||
.layout-enter-active,
|
||||
.layout-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.layout-enter, .layout-leave-active {
|
||||
.layout-enter,
|
||||
.layout-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// Page transitions
|
||||
.page-enter-active, .page-leave-active {
|
||||
.page-enter-active,
|
||||
.page-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.page-enter, .page-leave-to {
|
||||
.page-enter,
|
||||
.page-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as querystring from "querystring";
|
||||
* output this: 'msg1=value1&msg2=value2'
|
||||
* @param dataArguments
|
||||
*/
|
||||
const joinDataArguments = (dataArguments) => {
|
||||
const joinDataArguments = dataArguments => {
|
||||
let data = "";
|
||||
dataArguments.forEach((argument, i) => {
|
||||
if (i === 0) {
|
||||
@@ -17,9 +17,9 @@ const joinDataArguments = (dataArguments) => {
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
|
||||
const parseCurlCommand = (curlCommand) => {
|
||||
const parseCurlCommand = curlCommand => {
|
||||
let newlineFound = /\r|\n/.exec(curlCommand);
|
||||
if (newlineFound) {
|
||||
// remove newlines
|
||||
@@ -47,7 +47,7 @@ const parseCurlCommand = (curlCommand) => {
|
||||
}
|
||||
let headers;
|
||||
|
||||
const parseHeaders = (headerFieldName) => {
|
||||
const parseHeaders = headerFieldName => {
|
||||
if (parsedArguments[headerFieldName]) {
|
||||
if (!headers) {
|
||||
headers = {};
|
||||
@@ -55,7 +55,7 @@ const parseCurlCommand = (curlCommand) => {
|
||||
if (!Array.isArray(parsedArguments[headerFieldName])) {
|
||||
parsedArguments[headerFieldName] = [parsedArguments[headerFieldName]];
|
||||
}
|
||||
parsedArguments[headerFieldName].forEach((header) => {
|
||||
parsedArguments[headerFieldName].forEach(header => {
|
||||
if (header.includes("Cookie")) {
|
||||
// stupid javascript tricks: closure
|
||||
cookieString = header;
|
||||
@@ -95,7 +95,7 @@ const parseCurlCommand = (curlCommand) => {
|
||||
if (!Array.isArray(parsedArguments.F)) {
|
||||
parsedArguments.F = [parsedArguments.F];
|
||||
}
|
||||
parsedArguments.F.forEach((multipartArgument) => {
|
||||
parsedArguments.F.forEach(multipartArgument => {
|
||||
// input looks like key=value. value could be json or a file path prepended with an @
|
||||
const [key, value] = multipartArgument.split("=", 2);
|
||||
multipartUploads[key] = value;
|
||||
@@ -221,6 +221,6 @@ const parseCurlCommand = (curlCommand) => {
|
||||
request.insecure = true;
|
||||
}
|
||||
return request;
|
||||
}
|
||||
};
|
||||
|
||||
export default parseCurlCommand;
|
||||
|
||||
@@ -2,36 +2,39 @@ export default () => {
|
||||
//*** Determine whether or not the PWA has been installed. ***//
|
||||
|
||||
// Step 1: Check local storage
|
||||
let pwaInstalled = localStorage.getItem('pwaInstalled') === 'yes';
|
||||
let pwaInstalled = localStorage.getItem("pwaInstalled") === "yes";
|
||||
|
||||
// Step 2: Check if the display-mode is standalone. (Only permitted for PWAs.)
|
||||
if (!pwaInstalled && window.matchMedia('(display-mode: standalone)').matches) {
|
||||
localStorage.setItem('pwaInstalled', 'yes');
|
||||
if (
|
||||
!pwaInstalled &&
|
||||
window.matchMedia("(display-mode: standalone)").matches
|
||||
) {
|
||||
localStorage.setItem("pwaInstalled", "yes");
|
||||
pwaInstalled = true;
|
||||
}
|
||||
|
||||
// Step 3: Check if the navigator is in standalone mode. (Again, only permitted for PWAs.)
|
||||
if (!pwaInstalled && window.navigator.standalone === true) {
|
||||
localStorage.setItem('pwaInstalled', 'yes');
|
||||
localStorage.setItem("pwaInstalled", "yes");
|
||||
pwaInstalled = true;
|
||||
}
|
||||
|
||||
//*** If the PWA has not been installed, show the install PWA prompt.. ***//
|
||||
let deferredPrompt = null;
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
window.addEventListener("beforeinstallprompt", event => {
|
||||
deferredPrompt = event;
|
||||
|
||||
// Show the install button if the prompt appeared.
|
||||
if (!pwaInstalled) {
|
||||
document.querySelector('#installPWA').style.display = 'inline-flex';
|
||||
document.querySelector("#installPWA").style.display = "inline-flex";
|
||||
}
|
||||
});
|
||||
|
||||
// When the app is installed, remove install prompts.
|
||||
window.addEventListener('appinstalled', (event) => {
|
||||
localStorage.setItem('pwaInstalled', 'yes');
|
||||
window.addEventListener("appinstalled", event => {
|
||||
localStorage.setItem("pwaInstalled", "yes");
|
||||
pwaInstalled = true;
|
||||
document.getElementById('installPWA').style.display = 'none';
|
||||
document.getElementById("installPWA").style.display = "none";
|
||||
});
|
||||
|
||||
// When the app is uninstalled, add the prompts back
|
||||
@@ -40,13 +43,14 @@ export default () => {
|
||||
deferredPrompt.prompt();
|
||||
let outcome = await deferredPrompt.userChoice;
|
||||
|
||||
if (outcome === 'accepted') {
|
||||
console.log('Postwoman was installed successfully.')
|
||||
if (outcome === "accepted") {
|
||||
console.log("Postwoman was installed successfully.");
|
||||
} else {
|
||||
console.log('Postwoman could not be installed. (Installation rejected by user.)')
|
||||
console.log(
|
||||
"Postwoman could not be installed. (Installation rejected by user.)"
|
||||
);
|
||||
}
|
||||
deferredPrompt = null;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
36
build.js
36
build.js
@@ -1,12 +1,10 @@
|
||||
const axios = require("axios");
|
||||
const fs = require("fs");
|
||||
const {
|
||||
spawnSync
|
||||
} = require("child_process");
|
||||
const { spawnSync } = require("child_process");
|
||||
const runCommand = (command, args) =>
|
||||
spawnSync(command, args)
|
||||
.stdout.toString()
|
||||
.replace(/\n/g, "");
|
||||
.stdout.toString()
|
||||
.replace(/\n/g, "");
|
||||
|
||||
const FAIL_ON_ERROR = false;
|
||||
const PW_BUILD_DATA_DIR = "./.postwoman";
|
||||
@@ -21,18 +19,24 @@ try {
|
||||
|
||||
let version = {};
|
||||
// Get the current version name as the tag from Git.
|
||||
version.name = process.env.TRAVIS_TAG || runCommand("git", ["tag --sort=committerdate | tail -1"]);
|
||||
version.name =
|
||||
process.env.TRAVIS_TAG ||
|
||||
runCommand("git", ["tag --sort=committerdate | tail -1"]);
|
||||
|
||||
// FALLBACK: If version.name was unset, let's grab it from GitHub.
|
||||
if (!version.name) {
|
||||
version.name = (await axios
|
||||
.get("https://api.github.com/repos/liyasthomas/postwoman/releases")
|
||||
// If we can't get it from GitHub, we'll resort to getting it from package.json
|
||||
.catch((ex) => ({
|
||||
data: [{
|
||||
tag_name: require("./package.json").version
|
||||
}]
|
||||
}))).data[0]["tag_name"];
|
||||
version.name = (
|
||||
await axios
|
||||
.get("https://api.github.com/repos/liyasthomas/postwoman/releases")
|
||||
// If we can't get it from GitHub, we'll resort to getting it from package.json
|
||||
.catch(ex => ({
|
||||
data: [
|
||||
{
|
||||
tag_name: require("./package.json").version
|
||||
}
|
||||
]
|
||||
}))
|
||||
).data[0]["tag_name"];
|
||||
}
|
||||
|
||||
// Get the current version hash as the short hash from Git.
|
||||
@@ -41,8 +45,8 @@ try {
|
||||
version.variant =
|
||||
process.env.TRAVIS_BRANCH ||
|
||||
runCommand("git", ["branch"])
|
||||
.split("* ")[1]
|
||||
.split(" ")[0] + (IS_DEV_MODE ? " - DEV MODE" : "");
|
||||
.split("* ")[1]
|
||||
.split(" ")[0] + (IS_DEV_MODE ? " - DEV MODE" : "");
|
||||
if (["", "master"].includes(version.variant)) {
|
||||
delete version.variant;
|
||||
}
|
||||
|
||||
14
cypress.json
14
cypress.json
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"integrationFolder": "tests/e2e/integration",
|
||||
"screenshotsFolder": "tests/e2e/screenshots",
|
||||
"fixturesFolder": "tests/e2e/fixtures",
|
||||
"supportFile": "tests/e2e/support",
|
||||
"pluginsFile": false,
|
||||
"video": false
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"integrationFolder": "tests/e2e/integration",
|
||||
"screenshotsFolder": "tests/e2e/screenshots",
|
||||
"fixturesFolder": "tests/e2e/fixtures",
|
||||
"supportFile": "tests/e2e/support",
|
||||
"pluginsFile": false,
|
||||
"video": false
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
/* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
|
||||
"rules": {
|
||||
".read": false,
|
||||
".write": false
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export default {
|
||||
name: "textareaAutoHeight",
|
||||
update({scrollHeight, clientHeight, style}) {
|
||||
update({ scrollHeight, clientHeight, style }) {
|
||||
if (scrollHeight !== clientHeight) {
|
||||
style.minHeight = `${scrollHeight}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,16 +5,16 @@ export default function getEnvironmentVariablesFromScript(script) {
|
||||
// for security and control purposes, this is the only way a pre-request script should modify variables.
|
||||
let pw = {
|
||||
environment: {
|
||||
set: (key, value) => _variables[key] = value,
|
||||
set: (key, value) => (_variables[key] = value)
|
||||
},
|
||||
env: {
|
||||
set: (key, value) => _variables[key] = value,
|
||||
},
|
||||
set: (key, value) => (_variables[key] = value)
|
||||
}
|
||||
// globals that the script is allowed to have access to.
|
||||
};
|
||||
|
||||
// run pre-request script within this function so that it has access to the pw object.
|
||||
(new Function('pw', script))(pw);
|
||||
new Function("pw", script)(pw);
|
||||
|
||||
return _variables;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ export default function parseTemplateString(string, variables) {
|
||||
return string;
|
||||
}
|
||||
const searchTerm = /<<([^>]*)>>/g; // "<<myVariable>>"
|
||||
return string.replace(searchTerm, (match, p1) => variables[p1] || '');
|
||||
return string.replace(searchTerm, (match, p1) => variables[p1] || "");
|
||||
}
|
||||
|
||||
165
lang/en-US.js
165
lang/en-US.js
@@ -1,83 +1,84 @@
|
||||
export default {
|
||||
home: 'Home',
|
||||
realtime: 'Realtime',
|
||||
graphql: 'GraphQL',
|
||||
settings: 'Settings',
|
||||
request: 'Request',
|
||||
install_pwa: 'Install PWA',
|
||||
support_us: 'Support us',
|
||||
tweet: 'Tweet',
|
||||
options: 'Options',
|
||||
communication: 'Communication',
|
||||
endpoint: 'Endpoint',
|
||||
schema: 'Schema',
|
||||
theme: 'Theme',
|
||||
subscribe: 'Subscribe',
|
||||
choose_language: 'Choose Language',
|
||||
shortcuts: 'Shortcuts',
|
||||
send_request: 'Send Request',
|
||||
save_to_collections: 'Save to Collections',
|
||||
copy_request_link: 'Copy Request Link',
|
||||
reset_request: 'Reset Request',
|
||||
support_us_on: 'Support us on',
|
||||
open_collective: 'Open Collective',
|
||||
paypal: 'PayPal',
|
||||
patreon: 'Patreon',
|
||||
javascript_code: 'JavaScript Code',
|
||||
method: 'Method',
|
||||
path: 'Path',
|
||||
label: 'Label',
|
||||
again: 'Again',
|
||||
content_type: 'Content Type',
|
||||
raw_input: 'Raw input',
|
||||
parameter_list: 'Parameter List',
|
||||
raw_request_body: 'Raw Request Body',
|
||||
show_code: 'Show Code',
|
||||
hide_code: 'Hide Code',
|
||||
show_prerequest_script: 'Show Pre-Request Script',
|
||||
hide_prerequest_script: 'Hide Pre-Request Script',
|
||||
authentication: 'Authentication',
|
||||
authentication_type: 'Authentication type',
|
||||
include_in_url: 'Include in URL',
|
||||
parameters: 'Parameters',
|
||||
expand_response: 'Expand response',
|
||||
collapse_response: 'Collapse response',
|
||||
hide_preview: 'Hide Preview',
|
||||
preview_html: 'Preview HTML',
|
||||
history: 'History',
|
||||
collections: 'Collections',
|
||||
import_curl: 'Import cURL',
|
||||
import: 'Import',
|
||||
generate_code: 'Generate code',
|
||||
request_type: 'Request type',
|
||||
generated_code: 'Generated code',
|
||||
status: 'Status',
|
||||
headers: 'Headers',
|
||||
websocket: 'WebSocket',
|
||||
waiting_for_connection: '(waiting for connection)',
|
||||
message: 'Message',
|
||||
sse: 'SSE',
|
||||
server: 'Server',
|
||||
events: 'Events',
|
||||
url: 'URL',
|
||||
get_schema: 'Get schema',
|
||||
header_list: 'Header list',
|
||||
add_new: 'Add new',
|
||||
response: 'Response',
|
||||
query: 'Query',
|
||||
queries: 'Queries',
|
||||
mutations: 'Mutations',
|
||||
subscriptions: 'Subscriptions',
|
||||
types: 'Types',
|
||||
send: 'Send',
|
||||
background: 'Background',
|
||||
color: 'Color',
|
||||
labels: 'Labels',
|
||||
multi_color: 'Multi-color',
|
||||
enabled: 'Enabled',
|
||||
disabled: 'Disabled',
|
||||
proxy: 'Proxy',
|
||||
postwoman_official_proxy_hosting: 'Postwoman\'s Official Proxy is hosted by ApolloTV.',
|
||||
read_the: 'Read the',
|
||||
apollotv_privacy_policy: 'ApolloTV privacy policy'
|
||||
}
|
||||
home: "Home",
|
||||
realtime: "Realtime",
|
||||
graphql: "GraphQL",
|
||||
settings: "Settings",
|
||||
request: "Request",
|
||||
install_pwa: "Install PWA",
|
||||
support_us: "Support us",
|
||||
tweet: "Tweet",
|
||||
options: "Options",
|
||||
communication: "Communication",
|
||||
endpoint: "Endpoint",
|
||||
schema: "Schema",
|
||||
theme: "Theme",
|
||||
subscribe: "Subscribe",
|
||||
choose_language: "Choose Language",
|
||||
shortcuts: "Shortcuts",
|
||||
send_request: "Send Request",
|
||||
save_to_collections: "Save to Collections",
|
||||
copy_request_link: "Copy Request Link",
|
||||
reset_request: "Reset Request",
|
||||
support_us_on: "Support us on",
|
||||
open_collective: "Open Collective",
|
||||
paypal: "PayPal",
|
||||
patreon: "Patreon",
|
||||
javascript_code: "JavaScript Code",
|
||||
method: "Method",
|
||||
path: "Path",
|
||||
label: "Label",
|
||||
again: "Again",
|
||||
content_type: "Content Type",
|
||||
raw_input: "Raw input",
|
||||
parameter_list: "Parameter List",
|
||||
raw_request_body: "Raw Request Body",
|
||||
show_code: "Show Code",
|
||||
hide_code: "Hide Code",
|
||||
show_prerequest_script: "Show Pre-Request Script",
|
||||
hide_prerequest_script: "Hide Pre-Request Script",
|
||||
authentication: "Authentication",
|
||||
authentication_type: "Authentication type",
|
||||
include_in_url: "Include in URL",
|
||||
parameters: "Parameters",
|
||||
expand_response: "Expand response",
|
||||
collapse_response: "Collapse response",
|
||||
hide_preview: "Hide Preview",
|
||||
preview_html: "Preview HTML",
|
||||
history: "History",
|
||||
collections: "Collections",
|
||||
import_curl: "Import cURL",
|
||||
import: "Import",
|
||||
generate_code: "Generate code",
|
||||
request_type: "Request type",
|
||||
generated_code: "Generated code",
|
||||
status: "Status",
|
||||
headers: "Headers",
|
||||
websocket: "WebSocket",
|
||||
waiting_for_connection: "(waiting for connection)",
|
||||
message: "Message",
|
||||
sse: "SSE",
|
||||
server: "Server",
|
||||
events: "Events",
|
||||
url: "URL",
|
||||
get_schema: "Get schema",
|
||||
header_list: "Header list",
|
||||
add_new: "Add new",
|
||||
response: "Response",
|
||||
query: "Query",
|
||||
queries: "Queries",
|
||||
mutations: "Mutations",
|
||||
subscriptions: "Subscriptions",
|
||||
types: "Types",
|
||||
send: "Send",
|
||||
background: "Background",
|
||||
color: "Color",
|
||||
labels: "Labels",
|
||||
multi_color: "Multi-color",
|
||||
enabled: "Enabled",
|
||||
disabled: "Disabled",
|
||||
proxy: "Proxy",
|
||||
postwoman_official_proxy_hosting:
|
||||
"Postwoman's Official Proxy is hosted by ApolloTV.",
|
||||
read_the: "Read the",
|
||||
apollotv_privacy_policy: "ApolloTV privacy policy"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
export default {
|
||||
send: 'Enviar'
|
||||
}
|
||||
home: "home",
|
||||
realtime: "realtime",
|
||||
graphql: "graphql",
|
||||
settings: "settings",
|
||||
request: "request",
|
||||
install_pwa: "install_pwa",
|
||||
support_us: "support_us",
|
||||
tweet: "tweet",
|
||||
options: "options",
|
||||
communication: "communication",
|
||||
endpoint: "endpoint",
|
||||
schema: "schema",
|
||||
theme: "theme",
|
||||
subscribe: "subscribe",
|
||||
choose_language: "choose_language",
|
||||
shortcuts: "shortcuts",
|
||||
send_request: "send_request",
|
||||
save_to_collections: "save_to_collections",
|
||||
copy_request_link: "copy_request_link",
|
||||
reset_request: "reset_request",
|
||||
support_us_on: "support_us_on",
|
||||
open_collective: "open_collective",
|
||||
paypal: "paypal",
|
||||
patreon: "patreon",
|
||||
javascript_code: "javascript_code",
|
||||
method: "method",
|
||||
path: "path",
|
||||
label: "label",
|
||||
again: "again",
|
||||
content_type: "content_type",
|
||||
raw_input: "raw_input",
|
||||
parameter_list: "parameter_list",
|
||||
raw_request_body: "raw_request_body",
|
||||
show_code: "show_code",
|
||||
hide_code: "hide_code",
|
||||
show_prerequest_script: "show_prerequest_script",
|
||||
hide_prerequest_script: "hide_prerequest_script",
|
||||
authentication: "authentication",
|
||||
authentication_type: "authentication_type",
|
||||
include_in_url: "include_in_url",
|
||||
parameters: "parameters",
|
||||
expand_response: "expand_response",
|
||||
collapse_response: "collapse_response",
|
||||
hide_preview: "hide_preview",
|
||||
preview_html: "preview_html",
|
||||
history: "history",
|
||||
collections: "collections",
|
||||
import_curl: "import_curl",
|
||||
import: "import",
|
||||
generate_code: "generate_code",
|
||||
request_type: "request_type",
|
||||
generated_code: "generated_code",
|
||||
status: "status",
|
||||
headers: "headers",
|
||||
websocket: "websocket",
|
||||
waiting_for_connection: "(waiting_for_connection)",
|
||||
message: "message",
|
||||
sse: "sse",
|
||||
server: "server",
|
||||
events: "events",
|
||||
url: "url",
|
||||
get_schema: "get_schema",
|
||||
header_list: "header_list",
|
||||
add_new: "add_new",
|
||||
response: "response",
|
||||
query: "query",
|
||||
queries: "queries",
|
||||
mutations: "mutations",
|
||||
subscriptions: "subscriptions",
|
||||
types: "types",
|
||||
send: "send",
|
||||
background: "background",
|
||||
color: "color",
|
||||
labels: "labels",
|
||||
multi_color: "multi_color",
|
||||
enabled: "enabled",
|
||||
disabled: "disabled",
|
||||
proxy: "proxy",
|
||||
postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting",
|
||||
read_the: "read_the",
|
||||
apollotv_privacy_policy: "apollotv_privacy_policy"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
export default {
|
||||
send: 'ارسال'
|
||||
}
|
||||
home: "home",
|
||||
realtime: "realtime",
|
||||
graphql: "graphql",
|
||||
settings: "settings",
|
||||
request: "request",
|
||||
install_pwa: "install_pwa",
|
||||
support_us: "support_us",
|
||||
tweet: "tweet",
|
||||
options: "options",
|
||||
communication: "communication",
|
||||
endpoint: "endpoint",
|
||||
schema: "schema",
|
||||
theme: "theme",
|
||||
subscribe: "subscribe",
|
||||
choose_language: "choose_language",
|
||||
shortcuts: "shortcuts",
|
||||
send_request: "send_request",
|
||||
save_to_collections: "save_to_collections",
|
||||
copy_request_link: "copy_request_link",
|
||||
reset_request: "reset_request",
|
||||
support_us_on: "support_us_on",
|
||||
open_collective: "open_collective",
|
||||
paypal: "paypal",
|
||||
patreon: "patreon",
|
||||
javascript_code: "javascript_code",
|
||||
method: "method",
|
||||
path: "path",
|
||||
label: "label",
|
||||
again: "again",
|
||||
content_type: "content_type",
|
||||
raw_input: "raw_input",
|
||||
parameter_list: "parameter_list",
|
||||
raw_request_body: "raw_request_body",
|
||||
show_code: "show_code",
|
||||
hide_code: "hide_code",
|
||||
show_prerequest_script: "show_prerequest_script",
|
||||
hide_prerequest_script: "hide_prerequest_script",
|
||||
authentication: "authentication",
|
||||
authentication_type: "authentication_type",
|
||||
include_in_url: "include_in_url",
|
||||
parameters: "parameters",
|
||||
expand_response: "expand_response",
|
||||
collapse_response: "collapse_response",
|
||||
hide_preview: "hide_preview",
|
||||
preview_html: "preview_html",
|
||||
history: "history",
|
||||
collections: "collections",
|
||||
import_curl: "import_curl",
|
||||
import: "import",
|
||||
generate_code: "generate_code",
|
||||
request_type: "request_type",
|
||||
generated_code: "generated_code",
|
||||
status: "status",
|
||||
headers: "headers",
|
||||
websocket: "websocket",
|
||||
waiting_for_connection: "(waiting_for_connection)",
|
||||
message: "message",
|
||||
sse: "sse",
|
||||
server: "server",
|
||||
events: "events",
|
||||
url: "url",
|
||||
get_schema: "get_schema",
|
||||
header_list: "header_list",
|
||||
add_new: "add_new",
|
||||
response: "response",
|
||||
query: "query",
|
||||
queries: "queries",
|
||||
mutations: "mutations",
|
||||
subscriptions: "subscriptions",
|
||||
types: "types",
|
||||
send: "send",
|
||||
background: "background",
|
||||
color: "color",
|
||||
labels: "labels",
|
||||
multi_color: "multi_color",
|
||||
enabled: "enabled",
|
||||
disabled: "disabled",
|
||||
proxy: "proxy",
|
||||
postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting",
|
||||
read_the: "read_the",
|
||||
apollotv_privacy_policy: "apollotv_privacy_policy"
|
||||
};
|
||||
|
||||
165
lang/fr-FR.js
165
lang/fr-FR.js
@@ -1,83 +1,84 @@
|
||||
export default {
|
||||
home: 'Accueil',
|
||||
realtime: 'Temps réel',
|
||||
graphql: 'GraphQL',
|
||||
settings: 'Paramètres',
|
||||
request: 'Request',
|
||||
install_pwa: 'Installer la PWA',
|
||||
support_us: 'Nous supporter',
|
||||
tweet: 'Tweeter',
|
||||
options: 'Options',
|
||||
communication: 'Communication',
|
||||
endpoint: 'Endpoint',
|
||||
schema: 'Schéma',
|
||||
theme: 'Thème',
|
||||
subscribe: 'S\'inscrire',
|
||||
choose_language: 'Sélectionner une langue',
|
||||
shortcuts: 'Raccourcis',
|
||||
send_request: 'Envoyer la requête',
|
||||
save_to_collections: 'Sauvegarder dans les collections',
|
||||
copy_request_link: 'Copier le lien de la requête',
|
||||
reset_request: 'Réinitialiser la requête',
|
||||
support_us_on: 'Supportez-nous sur',
|
||||
open_collective: 'Ouvrir Collective',
|
||||
paypal: 'PayPal',
|
||||
patreon: 'Patreon',
|
||||
javascript_code: 'Code JavaScript',
|
||||
method: 'Méthode',
|
||||
path: 'Chemin d\'accès',
|
||||
label: 'Libellé',
|
||||
again: 'Réessayer',
|
||||
content_type: 'Type de contenu',
|
||||
raw_input: 'Texte brut',
|
||||
parameter_list: 'Liste des paramètres',
|
||||
raw_request_body: 'Corps de la requête en texte brut',
|
||||
show_code: 'Afficher le code',
|
||||
hide_code: 'Masquer le code',
|
||||
show_prerequest_script: 'Afficher le script de pré-requête',
|
||||
hide_prerequest_script: 'Masquer le script de pré-requête',
|
||||
authentication: 'Authentification',
|
||||
authentication_type: 'Type d\'authentification',
|
||||
include_in_url: 'Inclure dans l\'URL',
|
||||
parameters: 'Paramètres',
|
||||
expand_response: 'Agrandir la réponse',
|
||||
collapse_response: 'Réduire la réponse',
|
||||
hide_preview: 'Masquer la prévisualisation',
|
||||
preview_html: 'Prévisualiser le HTML',
|
||||
history: 'Historique',
|
||||
collections: 'Collections',
|
||||
import_curl: 'Importer en cURL',
|
||||
importer: 'Importer',
|
||||
generate_code: 'Générer le code',
|
||||
request_type: 'Type de requête',
|
||||
generated_code: 'Code généré',
|
||||
status: 'Statut',
|
||||
headers: 'En-têtes',
|
||||
websocket: 'WebSocket',
|
||||
waiting_for_connection: '(en attente de connexion)',
|
||||
message: 'Message',
|
||||
sse: 'SSE',
|
||||
server: 'Serveur',
|
||||
events: 'Évènements',
|
||||
url: 'URL',
|
||||
get_schema: 'Récuperer le schéma',
|
||||
header_list: 'Liste d\'en-têtes',
|
||||
add_new: 'Ajouter',
|
||||
response: 'Réponse',
|
||||
query: 'Requête',
|
||||
queries: 'Requêtes',
|
||||
mutations: 'Mutations',
|
||||
subscriptions: 'Abonnements',
|
||||
types: 'Types',
|
||||
send: 'Envoyer',
|
||||
background: 'Arrière-plan',
|
||||
color: 'Couleur',
|
||||
labels: 'Libellés',
|
||||
multi_color: 'Multi-couleurs',
|
||||
enabled: 'Activé',
|
||||
disabled: 'Désactivé',
|
||||
proxy: 'Proxy',
|
||||
postwoman_official_proxy_hosting: 'Le proxy officiel de Postwoman est hébergé par ApolloTV.',
|
||||
read_the: 'Lire la',
|
||||
apollotv_privacy_policy: 'politique de confidentialité ApolloTV'
|
||||
}
|
||||
home: "Accueil",
|
||||
realtime: "Temps réel",
|
||||
graphql: "GraphQL",
|
||||
settings: "Paramètres",
|
||||
request: "Request",
|
||||
install_pwa: "Installer la PWA",
|
||||
support_us: "Nous supporter",
|
||||
tweet: "Tweeter",
|
||||
options: "Options",
|
||||
communication: "Communication",
|
||||
endpoint: "Endpoint",
|
||||
schema: "Schéma",
|
||||
theme: "Thème",
|
||||
subscribe: "S'inscrire",
|
||||
choose_language: "Sélectionner une langue",
|
||||
shortcuts: "Raccourcis",
|
||||
send_request: "Envoyer la requête",
|
||||
save_to_collections: "Sauvegarder dans les collections",
|
||||
copy_request_link: "Copier le lien de la requête",
|
||||
reset_request: "Réinitialiser la requête",
|
||||
support_us_on: "Supportez-nous sur",
|
||||
open_collective: "Ouvrir Collective",
|
||||
paypal: "PayPal",
|
||||
patreon: "Patreon",
|
||||
javascript_code: "Code JavaScript",
|
||||
method: "Méthode",
|
||||
path: "Chemin d'accès",
|
||||
label: "Libellé",
|
||||
again: "Réessayer",
|
||||
content_type: "Type de contenu",
|
||||
raw_input: "Texte brut",
|
||||
parameter_list: "Liste des paramètres",
|
||||
raw_request_body: "Corps de la requête en texte brut",
|
||||
show_code: "Afficher le code",
|
||||
hide_code: "Masquer le code",
|
||||
show_prerequest_script: "Afficher le script de pré-requête",
|
||||
hide_prerequest_script: "Masquer le script de pré-requête",
|
||||
authentication: "Authentification",
|
||||
authentication_type: "Type d'authentification",
|
||||
include_in_url: "Inclure dans l'URL",
|
||||
parameters: "Paramètres",
|
||||
expand_response: "Agrandir la réponse",
|
||||
collapse_response: "Réduire la réponse",
|
||||
hide_preview: "Masquer la prévisualisation",
|
||||
preview_html: "Prévisualiser le HTML",
|
||||
history: "Historique",
|
||||
collections: "Collections",
|
||||
import_curl: "Importer en cURL",
|
||||
importer: "Importer",
|
||||
generate_code: "Générer le code",
|
||||
request_type: "Type de requête",
|
||||
generated_code: "Code généré",
|
||||
status: "Statut",
|
||||
headers: "En-têtes",
|
||||
websocket: "WebSocket",
|
||||
waiting_for_connection: "(en attente de connexion)",
|
||||
message: "Message",
|
||||
sse: "SSE",
|
||||
server: "Serveur",
|
||||
events: "Évènements",
|
||||
url: "URL",
|
||||
get_schema: "Récuperer le schéma",
|
||||
header_list: "Liste d'en-têtes",
|
||||
add_new: "Ajouter",
|
||||
response: "Réponse",
|
||||
query: "Requête",
|
||||
queries: "Requêtes",
|
||||
mutations: "Mutations",
|
||||
subscriptions: "Abonnements",
|
||||
types: "Types",
|
||||
send: "Envoyer",
|
||||
background: "Arrière-plan",
|
||||
color: "Couleur",
|
||||
labels: "Libellés",
|
||||
multi_color: "Multi-couleurs",
|
||||
enabled: "Activé",
|
||||
disabled: "Désactivé",
|
||||
proxy: "Proxy",
|
||||
postwoman_official_proxy_hosting:
|
||||
"Le proxy officiel de Postwoman est hébergé par ApolloTV.",
|
||||
read_the: "Lire la",
|
||||
apollotv_privacy_policy: "politique de confidentialité ApolloTV"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
export default {
|
||||
send: 'Kirim'
|
||||
}
|
||||
home: "home",
|
||||
realtime: "realtime",
|
||||
graphql: "graphql",
|
||||
settings: "settings",
|
||||
request: "request",
|
||||
install_pwa: "install_pwa",
|
||||
support_us: "support_us",
|
||||
tweet: "tweet",
|
||||
options: "options",
|
||||
communication: "communication",
|
||||
endpoint: "endpoint",
|
||||
schema: "schema",
|
||||
theme: "theme",
|
||||
subscribe: "subscribe",
|
||||
choose_language: "choose_language",
|
||||
shortcuts: "shortcuts",
|
||||
send_request: "send_request",
|
||||
save_to_collections: "save_to_collections",
|
||||
copy_request_link: "copy_request_link",
|
||||
reset_request: "reset_request",
|
||||
support_us_on: "support_us_on",
|
||||
open_collective: "open_collective",
|
||||
paypal: "paypal",
|
||||
patreon: "patreon",
|
||||
javascript_code: "javascript_code",
|
||||
method: "method",
|
||||
path: "path",
|
||||
label: "label",
|
||||
again: "again",
|
||||
content_type: "content_type",
|
||||
raw_input: "raw_input",
|
||||
parameter_list: "parameter_list",
|
||||
raw_request_body: "raw_request_body",
|
||||
show_code: "show_code",
|
||||
hide_code: "hide_code",
|
||||
show_prerequest_script: "show_prerequest_script",
|
||||
hide_prerequest_script: "hide_prerequest_script",
|
||||
authentication: "authentication",
|
||||
authentication_type: "authentication_type",
|
||||
include_in_url: "include_in_url",
|
||||
parameters: "parameters",
|
||||
expand_response: "expand_response",
|
||||
collapse_response: "collapse_response",
|
||||
hide_preview: "hide_preview",
|
||||
preview_html: "preview_html",
|
||||
history: "history",
|
||||
collections: "collections",
|
||||
import_curl: "import_curl",
|
||||
import: "import",
|
||||
generate_code: "generate_code",
|
||||
request_type: "request_type",
|
||||
generated_code: "generated_code",
|
||||
status: "status",
|
||||
headers: "headers",
|
||||
websocket: "websocket",
|
||||
waiting_for_connection: "(waiting_for_connection)",
|
||||
message: "message",
|
||||
sse: "sse",
|
||||
server: "server",
|
||||
events: "events",
|
||||
url: "url",
|
||||
get_schema: "get_schema",
|
||||
header_list: "header_list",
|
||||
add_new: "add_new",
|
||||
response: "response",
|
||||
query: "query",
|
||||
queries: "queries",
|
||||
mutations: "mutations",
|
||||
subscriptions: "subscriptions",
|
||||
types: "types",
|
||||
send: "send",
|
||||
background: "background",
|
||||
color: "color",
|
||||
labels: "labels",
|
||||
multi_color: "multi_color",
|
||||
enabled: "enabled",
|
||||
disabled: "disabled",
|
||||
proxy: "proxy",
|
||||
postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting",
|
||||
read_the: "read_the",
|
||||
apollotv_privacy_policy: "apollotv_privacy_policy"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
export default {
|
||||
send: 'Enviar'
|
||||
}
|
||||
home: "home",
|
||||
realtime: "realtime",
|
||||
graphql: "graphql",
|
||||
settings: "settings",
|
||||
request: "request",
|
||||
install_pwa: "install_pwa",
|
||||
support_us: "support_us",
|
||||
tweet: "tweet",
|
||||
options: "options",
|
||||
communication: "communication",
|
||||
endpoint: "endpoint",
|
||||
schema: "schema",
|
||||
theme: "theme",
|
||||
subscribe: "subscribe",
|
||||
choose_language: "choose_language",
|
||||
shortcuts: "shortcuts",
|
||||
send_request: "send_request",
|
||||
save_to_collections: "save_to_collections",
|
||||
copy_request_link: "copy_request_link",
|
||||
reset_request: "reset_request",
|
||||
support_us_on: "support_us_on",
|
||||
open_collective: "open_collective",
|
||||
paypal: "paypal",
|
||||
patreon: "patreon",
|
||||
javascript_code: "javascript_code",
|
||||
method: "method",
|
||||
path: "path",
|
||||
label: "label",
|
||||
again: "again",
|
||||
content_type: "content_type",
|
||||
raw_input: "raw_input",
|
||||
parameter_list: "parameter_list",
|
||||
raw_request_body: "raw_request_body",
|
||||
show_code: "show_code",
|
||||
hide_code: "hide_code",
|
||||
show_prerequest_script: "show_prerequest_script",
|
||||
hide_prerequest_script: "hide_prerequest_script",
|
||||
authentication: "authentication",
|
||||
authentication_type: "authentication_type",
|
||||
include_in_url: "include_in_url",
|
||||
parameters: "parameters",
|
||||
expand_response: "expand_response",
|
||||
collapse_response: "collapse_response",
|
||||
hide_preview: "hide_preview",
|
||||
preview_html: "preview_html",
|
||||
history: "history",
|
||||
collections: "collections",
|
||||
import_curl: "import_curl",
|
||||
import: "import",
|
||||
generate_code: "generate_code",
|
||||
request_type: "request_type",
|
||||
generated_code: "generated_code",
|
||||
status: "status",
|
||||
headers: "headers",
|
||||
websocket: "websocket",
|
||||
waiting_for_connection: "(waiting_for_connection)",
|
||||
message: "message",
|
||||
sse: "sse",
|
||||
server: "server",
|
||||
events: "events",
|
||||
url: "url",
|
||||
get_schema: "get_schema",
|
||||
header_list: "header_list",
|
||||
add_new: "add_new",
|
||||
response: "response",
|
||||
query: "query",
|
||||
queries: "queries",
|
||||
mutations: "mutations",
|
||||
subscriptions: "subscriptions",
|
||||
types: "types",
|
||||
send: "send",
|
||||
background: "background",
|
||||
color: "color",
|
||||
labels: "labels",
|
||||
multi_color: "multi_color",
|
||||
enabled: "enabled",
|
||||
disabled: "disabled",
|
||||
proxy: "proxy",
|
||||
postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting",
|
||||
read_the: "read_the",
|
||||
apollotv_privacy_policy: "apollotv_privacy_policy"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
export default {
|
||||
send: '发送'
|
||||
}
|
||||
home: "home",
|
||||
realtime: "realtime",
|
||||
graphql: "graphql",
|
||||
settings: "settings",
|
||||
request: "request",
|
||||
install_pwa: "install_pwa",
|
||||
support_us: "support_us",
|
||||
tweet: "tweet",
|
||||
options: "options",
|
||||
communication: "communication",
|
||||
endpoint: "endpoint",
|
||||
schema: "schema",
|
||||
theme: "theme",
|
||||
subscribe: "subscribe",
|
||||
choose_language: "choose_language",
|
||||
shortcuts: "shortcuts",
|
||||
send_request: "send_request",
|
||||
save_to_collections: "save_to_collections",
|
||||
copy_request_link: "copy_request_link",
|
||||
reset_request: "reset_request",
|
||||
support_us_on: "support_us_on",
|
||||
open_collective: "open_collective",
|
||||
paypal: "paypal",
|
||||
patreon: "patreon",
|
||||
javascript_code: "javascript_code",
|
||||
method: "method",
|
||||
path: "path",
|
||||
label: "label",
|
||||
again: "again",
|
||||
content_type: "content_type",
|
||||
raw_input: "raw_input",
|
||||
parameter_list: "parameter_list",
|
||||
raw_request_body: "raw_request_body",
|
||||
show_code: "show_code",
|
||||
hide_code: "hide_code",
|
||||
show_prerequest_script: "show_prerequest_script",
|
||||
hide_prerequest_script: "hide_prerequest_script",
|
||||
authentication: "authentication",
|
||||
authentication_type: "authentication_type",
|
||||
include_in_url: "include_in_url",
|
||||
parameters: "parameters",
|
||||
expand_response: "expand_response",
|
||||
collapse_response: "collapse_response",
|
||||
hide_preview: "hide_preview",
|
||||
preview_html: "preview_html",
|
||||
history: "history",
|
||||
collections: "collections",
|
||||
import_curl: "import_curl",
|
||||
import: "import",
|
||||
generate_code: "generate_code",
|
||||
request_type: "request_type",
|
||||
generated_code: "generated_code",
|
||||
status: "status",
|
||||
headers: "headers",
|
||||
websocket: "websocket",
|
||||
waiting_for_connection: "(waiting_for_connection)",
|
||||
message: "message",
|
||||
sse: "sse",
|
||||
server: "server",
|
||||
events: "events",
|
||||
url: "url",
|
||||
get_schema: "get_schema",
|
||||
header_list: "header_list",
|
||||
add_new: "add_new",
|
||||
response: "response",
|
||||
query: "query",
|
||||
queries: "queries",
|
||||
mutations: "mutations",
|
||||
subscriptions: "subscriptions",
|
||||
types: "types",
|
||||
send: "send",
|
||||
background: "background",
|
||||
color: "color",
|
||||
labels: "labels",
|
||||
multi_color: "multi_color",
|
||||
enabled: "enabled",
|
||||
disabled: "disabled",
|
||||
proxy: "proxy",
|
||||
postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting",
|
||||
read_the: "read_the",
|
||||
apollotv_privacy_policy: "apollotv_privacy_policy"
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
v-close-popover
|
||||
>
|
||||
<i class="material-icons">keyboard</i>
|
||||
<span>{{ $t('shortcuts') }}</span>
|
||||
<span>{{ $t("shortcuts") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
@@ -57,7 +57,7 @@
|
||||
v-close-popover
|
||||
>
|
||||
<i class="material-icons">favorite</i>
|
||||
<span>{{ $t('support_us') }}</span>
|
||||
<span>{{ $t("support_us") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
@@ -76,7 +76,7 @@
|
||||
d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"
|
||||
/>
|
||||
</svg>
|
||||
<span>{{ $t('tweet') }}</span>
|
||||
<span>{{ $t("tweet") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -248,16 +248,13 @@
|
||||
<i class="material-icons">translate</i>
|
||||
</button>
|
||||
<template slot="popover">
|
||||
<div v-for="locale in availableLocales"
|
||||
:key="locale.code">
|
||||
<nuxt-link
|
||||
:to="switchLocalePath(locale.code)"
|
||||
>
|
||||
<button class="icon" v-close-popover>
|
||||
{{ locale.name }}
|
||||
</button>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<div v-for="locale in availableLocales" :key="locale.code">
|
||||
<nuxt-link :to="switchLocalePath(locale.code)">
|
||||
<button class="icon" v-close-popover>
|
||||
{{ locale.name }}
|
||||
</button>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</template>
|
||||
</v-popover>
|
||||
</div>
|
||||
@@ -268,7 +265,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<h3 class="title">{{ $t('shortcuts') }}</h3>
|
||||
<h3 class="title">{{ $t("shortcuts") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showShortcuts = false">
|
||||
<i class="material-icons">close</i>
|
||||
@@ -281,22 +278,22 @@
|
||||
<div slot="body">
|
||||
<br />
|
||||
<div>
|
||||
<label>{{ $t('send_request') }}</label>
|
||||
<label>{{ $t("send_request") }}</label>
|
||||
<kbd>⌘ G</kbd>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label>{{ $t('save_to_collections') }}</label>
|
||||
<label>{{ $t("save_to_collections") }}</label>
|
||||
<kbd>⌘ S</kbd>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label>{{ $t('copy_request_link') }}</label>
|
||||
<label>{{ $t("copy_request_link") }}</label>
|
||||
<kbd>⌘ K</kbd>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label>{{ $t('reset_request') }}</label>
|
||||
<label>{{ $t("reset_request") }}</label>
|
||||
<kbd>⌘ L</kbd>
|
||||
</div>
|
||||
<br />
|
||||
@@ -308,7 +305,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<h3 class="title">{{ $t('support_us_on') }}</h3>
|
||||
<h3 class="title">{{ $t("support_us_on") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showSupport = false">
|
||||
<i class="material-icons">close</i>
|
||||
@@ -327,7 +324,7 @@
|
||||
>
|
||||
<button class="icon">
|
||||
<i class="material-icons">favorite</i>
|
||||
<span>{{ $t('open_collective') }}</span>
|
||||
<span>{{ $t("open_collective") }}</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@@ -339,7 +336,7 @@
|
||||
>
|
||||
<button class="icon">
|
||||
<i class="material-icons">favorite</i>
|
||||
<span>{{ $t('paypal') }}</span>
|
||||
<span>{{ $t("paypal") }}</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@@ -351,7 +348,7 @@
|
||||
>
|
||||
<button class="icon">
|
||||
<i class="material-icons">favorite</i>
|
||||
<span>{{ $t('patreon') }}</span>
|
||||
<span>{{ $t("patreon") }}</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
export default function ({
|
||||
route,
|
||||
redirect
|
||||
}) {
|
||||
if (route.fullPath !== '/') {
|
||||
return redirect('/');
|
||||
export default function({ route, redirect }) {
|
||||
if (route.fullPath !== "/") {
|
||||
return redirect("/");
|
||||
}
|
||||
}
|
||||
|
||||
269
nuxt.config.js
269
nuxt.config.js
@@ -3,50 +3,57 @@
|
||||
export const meta = {
|
||||
name: "Postwoman",
|
||||
shortDescription: "API request builder",
|
||||
description: "The Postwoman API request builder helps you create your requests faster, saving you precious time on your development."
|
||||
description:
|
||||
"The Postwoman API request builder helps you create your requests faster, saving you precious time on your development."
|
||||
};
|
||||
// Sets the base path for the router.
|
||||
// Important for deploying to GitHub pages.
|
||||
// -- Travis includes the author in the repo slug,
|
||||
// so if there's a /, we need to get everything after it.
|
||||
let repoName = (process.env.TRAVIS_REPO_SLUG || '').split('/').pop();
|
||||
export const routerBase = process.env.DEPLOY_ENV === 'GH_PAGES' ? {
|
||||
router: {
|
||||
base: `/${repoName}/`
|
||||
}
|
||||
} : {
|
||||
router: {
|
||||
base: '/'
|
||||
}
|
||||
};
|
||||
let repoName = (process.env.TRAVIS_REPO_SLUG || "").split("/").pop();
|
||||
export const routerBase =
|
||||
process.env.DEPLOY_ENV === "GH_PAGES"
|
||||
? {
|
||||
router: {
|
||||
base: `/${repoName}/`
|
||||
}
|
||||
}
|
||||
: {
|
||||
router: {
|
||||
base: "/"
|
||||
}
|
||||
};
|
||||
export default {
|
||||
mode: 'spa',
|
||||
mode: "spa",
|
||||
/*
|
||||
** Headers of the page
|
||||
*/
|
||||
server: {
|
||||
host: '0.0.0.0', // default: localhost
|
||||
host: "0.0.0.0" // default: localhost
|
||||
},
|
||||
head: {
|
||||
title: `${meta.name} \u2022 ${meta.shortDescription}`,
|
||||
meta: [{
|
||||
charset: 'utf-8'
|
||||
meta: [
|
||||
{
|
||||
charset: "utf-8"
|
||||
},
|
||||
{
|
||||
name: 'viewport',
|
||||
content: 'width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui'
|
||||
name: "viewport",
|
||||
content:
|
||||
"width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui"
|
||||
},
|
||||
{
|
||||
hid: 'description',
|
||||
name: 'description',
|
||||
content: meta.description || ''
|
||||
hid: "description",
|
||||
name: "description",
|
||||
content: meta.description || ""
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql'
|
||||
name: "keywords",
|
||||
content:
|
||||
"postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql"
|
||||
},
|
||||
{
|
||||
name: 'X-UA-Compatible',
|
||||
name: "X-UA-Compatible",
|
||||
content: "IE=edge, chrome=1"
|
||||
},
|
||||
{
|
||||
@@ -63,152 +70,154 @@ export default {
|
||||
},
|
||||
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
||||
{
|
||||
name: 'application-name',
|
||||
name: "application-name",
|
||||
content: meta.name
|
||||
},
|
||||
// Add to homescreen for Safari on iOS
|
||||
{
|
||||
name: 'apple-mobile-web-app-capable',
|
||||
content: 'yes'
|
||||
name: "apple-mobile-web-app-capable",
|
||||
content: "yes"
|
||||
},
|
||||
{
|
||||
name: 'apple-mobile-web-app-status-bar-style',
|
||||
content: 'black-translucent'
|
||||
name: "apple-mobile-web-app-status-bar-style",
|
||||
content: "black-translucent"
|
||||
},
|
||||
{
|
||||
name: 'apple-mobile-web-app-title',
|
||||
name: "apple-mobile-web-app-title",
|
||||
content: meta.name
|
||||
},
|
||||
// Windows phone tile icon
|
||||
{
|
||||
name: 'msapplication-TileImage',
|
||||
name: "msapplication-TileImage",
|
||||
content: `${routerBase.router.base}icons/icon-144x144.png`
|
||||
},
|
||||
{
|
||||
name: 'msapplication-TileColor',
|
||||
content: '#252628'
|
||||
name: "msapplication-TileColor",
|
||||
content: "#252628"
|
||||
},
|
||||
{
|
||||
name: 'msapplication-tap-highlight',
|
||||
content: 'no'
|
||||
name: "msapplication-tap-highlight",
|
||||
content: "no"
|
||||
},
|
||||
// OpenGraph
|
||||
{
|
||||
property: 'og:site_name',
|
||||
property: "og:site_name",
|
||||
content: meta.name
|
||||
},
|
||||
{
|
||||
property: 'og:url',
|
||||
content: 'https://postwoman.io'
|
||||
property: "og:url",
|
||||
content: "https://postwoman.io"
|
||||
},
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website'
|
||||
property: "og:type",
|
||||
content: "website"
|
||||
},
|
||||
{
|
||||
property: 'og:title',
|
||||
property: "og:title",
|
||||
content: `${meta.name} \u2022 ${meta.shortDescription}`
|
||||
},
|
||||
{
|
||||
property: 'og:description',
|
||||
property: "og:description",
|
||||
content: meta.description
|
||||
},
|
||||
{
|
||||
property: 'og:image',
|
||||
property: "og:image",
|
||||
content: `${routerBase.router.base}logo.jpg`
|
||||
},
|
||||
// Twitter
|
||||
{
|
||||
name: 'twitter:card',
|
||||
name: "twitter:card",
|
||||
content: "summary_large_image"
|
||||
},
|
||||
{
|
||||
name: 'twitter:site',
|
||||
name: "twitter:site",
|
||||
content: "@liyasthomas"
|
||||
},
|
||||
{
|
||||
name: 'twitter:creator',
|
||||
name: "twitter:creator",
|
||||
content: "@liyasthomas"
|
||||
},
|
||||
{
|
||||
name: 'twitter:url',
|
||||
name: "twitter:url",
|
||||
content: "https://postwoman.io"
|
||||
},
|
||||
{
|
||||
name: 'twitter:title',
|
||||
name: "twitter:title",
|
||||
content: `${meta.name} \u2022 ${meta.shortDescription}`
|
||||
},
|
||||
{
|
||||
name: 'twitter:description',
|
||||
name: "twitter:description",
|
||||
content: meta.description
|
||||
},
|
||||
{
|
||||
name: 'twitter:image',
|
||||
name: "twitter:image",
|
||||
content: `${routerBase.router.base}logo.jpg`
|
||||
},
|
||||
}
|
||||
],
|
||||
link: [{
|
||||
rel: 'icon',
|
||||
type: 'image/x-icon',
|
||||
link: [
|
||||
{
|
||||
rel: "icon",
|
||||
type: "image/x-icon",
|
||||
href: `${routerBase.router.base}favicon.ico`
|
||||
},
|
||||
// Home-screen icons (iOS)
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
rel: "apple-touch-icon",
|
||||
href: `${routerBase.router.base}icons/icon-48x48.png`
|
||||
},
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
sizes: '72x72',
|
||||
rel: "apple-touch-icon",
|
||||
sizes: "72x72",
|
||||
href: `${routerBase.router.base}icons/icon-72x72.png`
|
||||
},
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
sizes: '96x96',
|
||||
rel: "apple-touch-icon",
|
||||
sizes: "96x96",
|
||||
href: `${routerBase.router.base}icons/icon-96x96.png`
|
||||
},
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
sizes: '144x144',
|
||||
rel: "apple-touch-icon",
|
||||
sizes: "144x144",
|
||||
href: `${routerBase.router.base}icons/icon-144x144.png`
|
||||
},
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
sizes: '192x192',
|
||||
rel: "apple-touch-icon",
|
||||
sizes: "192x192",
|
||||
href: `${routerBase.router.base}icons/icon-192x192.png`
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
/*
|
||||
** Customize the progress-bar color
|
||||
*/
|
||||
loading: {
|
||||
color: 'var(--ac-color)'
|
||||
color: "var(--ac-color)"
|
||||
},
|
||||
/*
|
||||
** Customize the loading indicator
|
||||
*/
|
||||
loadingIndicator: {
|
||||
name: 'pulse',
|
||||
color: 'var(--ac-color)',
|
||||
background: 'var(--bg-color)'
|
||||
name: "pulse",
|
||||
color: "var(--ac-color)",
|
||||
background: "var(--bg-color)"
|
||||
},
|
||||
/*
|
||||
** Global CSS
|
||||
*/
|
||||
css: [
|
||||
'~/assets/css/styles.scss',
|
||||
'~/assets/css/themes.scss',
|
||||
'~/assets/css/fonts.scss'
|
||||
"~/assets/css/styles.scss",
|
||||
"~/assets/css/themes.scss",
|
||||
"~/assets/css/fonts.scss"
|
||||
],
|
||||
/*
|
||||
** Plugins to load before mounting the App
|
||||
*/
|
||||
plugins: [{
|
||||
src: '~/plugins/vuex-persist'
|
||||
plugins: [
|
||||
{
|
||||
src: "~/plugins/vuex-persist"
|
||||
},
|
||||
{
|
||||
src: '~/plugins/v-tooltip'
|
||||
src: "~/plugins/v-tooltip"
|
||||
}
|
||||
],
|
||||
/*
|
||||
@@ -220,16 +229,19 @@ export default {
|
||||
*/
|
||||
modules: [
|
||||
// See https://goo.gl/OOhYW5
|
||||
['@nuxtjs/pwa'],
|
||||
['@nuxtjs/axios'],
|
||||
['@nuxtjs/toast'],
|
||||
['@nuxtjs/google-analytics'],
|
||||
['@nuxtjs/sitemap'],
|
||||
['@nuxtjs/google-tag-manager', {
|
||||
id: process.env.GTM_ID || 'GTM-MXWD8NQ'
|
||||
}],
|
||||
['@nuxtjs/robots'],
|
||||
['nuxt-i18n']
|
||||
["@nuxtjs/pwa"],
|
||||
["@nuxtjs/axios"],
|
||||
["@nuxtjs/toast"],
|
||||
["@nuxtjs/google-analytics"],
|
||||
["@nuxtjs/sitemap"],
|
||||
[
|
||||
"@nuxtjs/google-tag-manager",
|
||||
{
|
||||
id: process.env.GTM_ID || "GTM-MXWD8NQ"
|
||||
}
|
||||
],
|
||||
["@nuxtjs/robots"],
|
||||
["nuxt-i18n"]
|
||||
],
|
||||
pwa: {
|
||||
manifest: {
|
||||
@@ -245,86 +257,87 @@ export default {
|
||||
|
||||
meta: {
|
||||
description: meta.shortDescription,
|
||||
theme_color: "#252628",
|
||||
theme_color: "#252628"
|
||||
},
|
||||
|
||||
icons: ((sizes) => {
|
||||
icons: (sizes => {
|
||||
let icons = [];
|
||||
for (let size of sizes) {
|
||||
icons.push({
|
||||
"src": `${routerBase.router.base}icons/icon-${size}x${size}.png`,
|
||||
"type": "image/png",
|
||||
"sizes": `${size}x${size}`
|
||||
src: `${routerBase.router.base}icons/icon-${size}x${size}.png`,
|
||||
type: "image/png",
|
||||
sizes: `${size}x${size}`
|
||||
});
|
||||
}
|
||||
return icons;
|
||||
})([48, 72, 96, 144, 192, 512])
|
||||
},
|
||||
toast: {
|
||||
position: 'bottom-center',
|
||||
position: "bottom-center",
|
||||
duration: 3000,
|
||||
theme: 'bubble',
|
||||
theme: "bubble",
|
||||
keepOnHover: true
|
||||
},
|
||||
googleAnalytics: {
|
||||
id: process.env.GA_ID || 'UA-61422507-2'
|
||||
id: process.env.GA_ID || "UA-61422507-2"
|
||||
},
|
||||
sitemap: {
|
||||
hostname: 'https://postwoman.io'
|
||||
hostname: "https://postwoman.io"
|
||||
},
|
||||
robots: {
|
||||
UserAgent: '*',
|
||||
Disallow: '',
|
||||
Allow: '/',
|
||||
Sitemap: 'https://postwoman.io/sitemap.xml'
|
||||
UserAgent: "*",
|
||||
Disallow: "",
|
||||
Allow: "/",
|
||||
Sitemap: "https://postwoman.io/sitemap.xml"
|
||||
},
|
||||
i18n: {
|
||||
locales: [{
|
||||
code: 'en',
|
||||
name: 'English',
|
||||
iso: 'en-US',
|
||||
file: 'en-US.js'
|
||||
locales: [
|
||||
{
|
||||
code: "en",
|
||||
name: "English",
|
||||
iso: "en-US",
|
||||
file: "en-US.js"
|
||||
},
|
||||
{
|
||||
code: 'es',
|
||||
name: 'Español',
|
||||
iso: 'es-ES',
|
||||
file: 'es-ES.js'
|
||||
code: "es",
|
||||
name: "Español",
|
||||
iso: "es-ES",
|
||||
file: "es-ES.js"
|
||||
},
|
||||
{
|
||||
code: 'fr',
|
||||
name: 'Français',
|
||||
iso: 'fr-FR',
|
||||
file: 'fr-FR.js'
|
||||
code: "fr",
|
||||
name: "Français",
|
||||
iso: "fr-FR",
|
||||
file: "fr-FR.js"
|
||||
},
|
||||
{
|
||||
code: 'fa',
|
||||
name: 'Farsi',
|
||||
iso: 'fa-IR',
|
||||
file: 'fa-IR.js'
|
||||
code: "fa",
|
||||
name: "Farsi",
|
||||
iso: "fa-IR",
|
||||
file: "fa-IR.js"
|
||||
},
|
||||
{
|
||||
code: 'pt',
|
||||
name: 'Português Brasileiro',
|
||||
iso: 'pt-BR',
|
||||
file: 'pt-BR.js'
|
||||
code: "pt",
|
||||
name: "Português Brasileiro",
|
||||
iso: "pt-BR",
|
||||
file: "pt-BR.js"
|
||||
},
|
||||
{
|
||||
code: 'cn',
|
||||
name: '简体中文',
|
||||
iso: 'zh-CN',
|
||||
file: 'zh-CN.js'
|
||||
code: "cn",
|
||||
name: "简体中文",
|
||||
iso: "zh-CN",
|
||||
file: "zh-CN.js"
|
||||
},
|
||||
{
|
||||
code: 'id',
|
||||
name: 'Bahasa Indonesia',
|
||||
iso: 'id-ID',
|
||||
file: 'id-ID.js'
|
||||
code: "id",
|
||||
name: "Bahasa Indonesia",
|
||||
iso: "id-ID",
|
||||
file: "id-ID.js"
|
||||
}
|
||||
],
|
||||
defaultLocale: 'en',
|
||||
defaultLocale: "en",
|
||||
lazy: true,
|
||||
langDir: 'lang/'
|
||||
langDir: "lang/"
|
||||
},
|
||||
/*
|
||||
** Build configuration
|
||||
@@ -345,4 +358,4 @@ export default {
|
||||
** Router configuration
|
||||
*/
|
||||
...routerBase
|
||||
}
|
||||
};
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
|
||||
<section id="options">
|
||||
<input id="tab-one" type="radio" name="options" checked="checked" />
|
||||
<label for="tab-one">{{ $t('authentication') }}</label>
|
||||
<label for="tab-one">{{ $t("authentication") }}</label>
|
||||
<div class="tab">
|
||||
<pw-section
|
||||
class="cyan"
|
||||
@@ -323,7 +323,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<label for="auth">{{ $t('authentication') }}</label>
|
||||
<label for="auth">{{ $t("authentication") }}</label>
|
||||
<div>
|
||||
<button
|
||||
class="icon"
|
||||
@@ -392,19 +392,19 @@
|
||||
<pw-toggle
|
||||
:on="!urlExcludes.auth"
|
||||
@change="setExclude('auth', !$event)"
|
||||
>{{ $t('include_in_url') }}</pw-toggle
|
||||
>{{ $t("include_in_url") }}</pw-toggle
|
||||
>
|
||||
</div>
|
||||
</pw-section>
|
||||
</div>
|
||||
<input id="tab-two" type="radio" name="options" />
|
||||
<label for="tab-two">{{ $t('headers') }}</label>
|
||||
<label for="tab-two">{{ $t("headers") }}</label>
|
||||
<div class="tab">
|
||||
<pw-section class="orange" label="Headers" ref="headers">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<label for="headerList">{{ $t('header_list') }}</label>
|
||||
<label for="headerList">{{ $t("header_list") }}</label>
|
||||
<div>
|
||||
<button
|
||||
class="icon"
|
||||
@@ -471,20 +471,20 @@
|
||||
<li>
|
||||
<button class="icon" @click="addRequestHeader">
|
||||
<i class="material-icons">add</i>
|
||||
<span>{{ $t('add_new') }}</span>
|
||||
<span>{{ $t("add_new") }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</pw-section>
|
||||
</div>
|
||||
<input id="tab-three" type="radio" name="options" />
|
||||
<label for="tab-three">{{ $t('parameters') }}</label>
|
||||
<label for="tab-three">{{ $t("parameters") }}</label>
|
||||
<div class="tab">
|
||||
<pw-section class="pink" label="Parameters" ref="parameters">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<label for="paramList">{{ $t('parameter_list') }}</label>
|
||||
<label for="paramList">{{ $t("parameter_list") }}</label>
|
||||
<div>
|
||||
<button
|
||||
class="icon"
|
||||
@@ -549,7 +549,7 @@
|
||||
<li>
|
||||
<button class="icon" @click="addRequestParam">
|
||||
<i class="material-icons">add</i>
|
||||
<span>{{ $t('add_new') }}</span>
|
||||
<span>{{ $t("add_new") }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -565,7 +565,7 @@
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="status">{{ $t('status') }}</label>
|
||||
<label for="status">{{ $t("status") }}</label>
|
||||
<input
|
||||
:class="statusCategory ? statusCategory.className : ''"
|
||||
:value="response.status || '(waiting to send request)'"
|
||||
@@ -586,7 +586,7 @@
|
||||
<ul v-if="response.body">
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<label for="body">{{ $t('response') }}</label>
|
||||
<label for="body">{{ $t("response") }}</label>
|
||||
<div>
|
||||
<button
|
||||
class="icon"
|
||||
@@ -655,7 +655,7 @@
|
||||
>
|
||||
<i class="material-icons" v-else>visibility_off</i>
|
||||
<span>{{
|
||||
previewEnabled ? $t('hide_preview') : $t('preview_html')
|
||||
previewEnabled ? $t("hide_preview") : $t("preview_html")
|
||||
}}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -667,7 +667,7 @@
|
||||
<aside class="sticky-inner inner-right">
|
||||
<section>
|
||||
<input id="history-tab" type="radio" name="side" checked="checked" />
|
||||
<label for="history-tab">{{ $t('history') }}</label>
|
||||
<label for="history-tab">{{ $t("history") }}</label>
|
||||
<div class="tab">
|
||||
<history
|
||||
@useHistory="handleUseHistory"
|
||||
@@ -675,7 +675,7 @@
|
||||
></history>
|
||||
</div>
|
||||
<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">
|
||||
<pw-section class="yellow" label="Collections" ref="collections">
|
||||
<collections />
|
||||
@@ -695,7 +695,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<h3 class="title">{{ $t('import_curl') }}</h3>
|
||||
<h3 class="title">{{ $t("import_curl") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showModal = false">
|
||||
<i class="material-icons">close</i>
|
||||
@@ -722,7 +722,7 @@
|
||||
<li>
|
||||
<button class="icon" @click="handleImport">
|
||||
<i class="material-icons">get_app</i>
|
||||
<span>{{ $t('import') }}</span>
|
||||
<span>{{ $t("import") }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -734,7 +734,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<h3 class="title">{{ $t('generate_code') }}</h3>
|
||||
<h3 class="title">{{ $t("generate_code") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="isHidden = true">
|
||||
<i class="material-icons">close</i>
|
||||
@@ -747,7 +747,7 @@
|
||||
<div slot="body">
|
||||
<ul>
|
||||
<li>
|
||||
<label for="requestType">{{ $t('request_type') }}</label>
|
||||
<label for="requestType">{{ $t("request_type") }}</label>
|
||||
<select id="requestType" v-model="requestType">
|
||||
<option>JavaScript XHR</option>
|
||||
<option>Fetch</option>
|
||||
@@ -758,7 +758,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="flex-wrap">
|
||||
<label for="generatedCode">{{ $t('generated_code') }}</label>
|
||||
<label for="generatedCode">{{ $t("generated_code") }}</label>
|
||||
<div>
|
||||
<button
|
||||
class="icon"
|
||||
@@ -1483,7 +1483,7 @@ export default {
|
||||
headers = Object.assign(
|
||||
// Clone the app headers object first, we don't want to
|
||||
// mutate it with the request headers added by default.
|
||||
Object.assign({}, this.headers),
|
||||
Object.assign({}, this.headers)
|
||||
|
||||
// We make our temporary headers object the source so
|
||||
// that you can override the added headers if you
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
:on="settings.PROXY_ENABLED"
|
||||
@change="toggleSetting('PROXY_ENABLED')"
|
||||
>{{ $t("proxy") }}
|
||||
{{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }}</pw-toggle
|
||||
{{
|
||||
settings.PROXY_ENABLED ? $t("enabled") : $t("disabled")
|
||||
}}</pw-toggle
|
||||
>
|
||||
</span>
|
||||
<a
|
||||
@@ -106,7 +108,10 @@
|
||||
{{ $t("postwoman_official_proxy_hosting") }}
|
||||
<br />
|
||||
{{ $t("read_the") }}
|
||||
<a href="https://apollotv.xyz/legal" target="_blank" rel="noopener"
|
||||
<a
|
||||
href="https://apollotv.xyz/legal"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>{{ $t("apollotv_privacy_policy") }}</a
|
||||
>.
|
||||
</p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import VTooltip from 'v-tooltip';
|
||||
import Vue from "vue";
|
||||
import VTooltip from "v-tooltip";
|
||||
|
||||
Vue.use(VTooltip);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import VuexPersistence from "vuex-persist";
|
||||
|
||||
export default ({
|
||||
store
|
||||
}) => {
|
||||
export default ({ store }) => {
|
||||
new VuexPersistence().plugin(store);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import Vuex from 'vuex';
|
||||
import state from './state';
|
||||
import VuexPersist from 'vuex-persist'
|
||||
import Vuex from "vuex";
|
||||
import state from "./state";
|
||||
import VuexPersist from "vuex-persist";
|
||||
|
||||
export default {
|
||||
install(Vue) {
|
||||
Vue.use(Vuex);
|
||||
|
||||
const vuexLocalStorage = new VuexPersist({
|
||||
key: 'vuex',
|
||||
key: "vuex",
|
||||
storage: window.localStorage,
|
||||
reducer: ({
|
||||
...request
|
||||
}) => ({
|
||||
reducer: ({ ...request }) => ({
|
||||
...request
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state,
|
||||
@@ -22,5 +20,5 @@ export default {
|
||||
});
|
||||
|
||||
Vue.prototype.$store = store;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
export default {
|
||||
setState({request}, {attribute, value}) {
|
||||
request[attribute] = value
|
||||
setState({ request }, { attribute, value }) {
|
||||
request[attribute] = value;
|
||||
},
|
||||
|
||||
setGQLState({gql}, {attribute, value}) {
|
||||
setGQLState({ gql }, { attribute, value }) {
|
||||
gql[attribute] = value;
|
||||
},
|
||||
|
||||
addGQLHeader({gql}, object) {
|
||||
addGQLHeader({ gql }, object) {
|
||||
gql.headers.push(object);
|
||||
},
|
||||
|
||||
removeGQLHeader({gql}, index) {
|
||||
removeGQLHeader({ gql }, index) {
|
||||
gql.headers.splice(index, 1);
|
||||
},
|
||||
|
||||
setGQLHeaderKey({gql}, {index, value}) {
|
||||
setGQLHeaderKey({ gql }, { index, value }) {
|
||||
gql.headers[index].key = value;
|
||||
},
|
||||
|
||||
setGQLHeaderValue({gql}, {index, value}) {
|
||||
setGQLHeaderValue({ gql }, { index, value }) {
|
||||
gql.headers[index].value = value;
|
||||
},
|
||||
|
||||
addHeaders({request}, value) {
|
||||
addHeaders({ request }, value) {
|
||||
request.headers.push(value);
|
||||
},
|
||||
|
||||
removeHeaders({request}, index) {
|
||||
request.headers.splice(index, 1)
|
||||
removeHeaders({ request }, index) {
|
||||
request.headers.splice(index, 1);
|
||||
},
|
||||
|
||||
setKeyHeader({request}, {index, value}) {
|
||||
request.headers[index].key = value
|
||||
setKeyHeader({ request }, { index, value }) {
|
||||
request.headers[index].key = value;
|
||||
},
|
||||
|
||||
setValueHeader({request}, {index, value}) {
|
||||
request.headers[index].value = value
|
||||
setValueHeader({ request }, { index, value }) {
|
||||
request.headers[index].value = value;
|
||||
},
|
||||
|
||||
addParams({request}, value) {
|
||||
addParams({ request }, value) {
|
||||
request.params.push(value);
|
||||
},
|
||||
|
||||
removeParams({request}, index) {
|
||||
request.params.splice(index, 1)
|
||||
removeParams({ request }, index) {
|
||||
request.params.splice(index, 1);
|
||||
},
|
||||
|
||||
setKeyParams({request}, {index, value}) {
|
||||
request.params[index].key = value
|
||||
setKeyParams({ request }, { index, value }) {
|
||||
request.params[index].key = value;
|
||||
},
|
||||
|
||||
setValueParams({request}, {index, value}) {
|
||||
request.params[index].value = value
|
||||
setValueParams({ request }, { index, value }) {
|
||||
request.params[index].value = value;
|
||||
},
|
||||
|
||||
addBodyParams({request}, value) {
|
||||
addBodyParams({ request }, value) {
|
||||
request.bodyParams.push(value);
|
||||
},
|
||||
|
||||
removeBodyParams({request}, index) {
|
||||
request.bodyParams.splice(index, 1)
|
||||
removeBodyParams({ request }, index) {
|
||||
request.bodyParams.splice(index, 1);
|
||||
},
|
||||
|
||||
setKeyBodyParams({request}, {index, value}) {
|
||||
request.bodyParams[index].key = value
|
||||
setKeyBodyParams({ request }, { index, value }) {
|
||||
request.bodyParams[index].key = value;
|
||||
},
|
||||
|
||||
setValueBodyParams({request}, {index, value}) {
|
||||
request.bodyParams[index].value = value
|
||||
},
|
||||
setValueBodyParams({ request }, { index, value }) {
|
||||
request.bodyParams[index].value = value;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import Vue from "vue";
|
||||
|
||||
export const SETTINGS_KEYS = [
|
||||
/**
|
||||
@@ -61,20 +61,27 @@ export const SETTINGS_KEYS = [
|
||||
|
||||
export const state = () => ({
|
||||
settings: {},
|
||||
collections: [{
|
||||
name: 'My Collection',
|
||||
folders: [],
|
||||
requests: [],
|
||||
}],
|
||||
collections: [
|
||||
{
|
||||
name: "My Collection",
|
||||
folders: [],
|
||||
requests: []
|
||||
}
|
||||
],
|
||||
selectedRequest: {},
|
||||
editingRequest: {},
|
||||
editingRequest: {}
|
||||
});
|
||||
|
||||
export const mutations = {
|
||||
|
||||
applySetting({settings}, setting) {
|
||||
if (setting == null || !(setting instanceof Array) || setting.length !== 2) {
|
||||
throw new Error("You must provide a setting (array in the form [key, value])");
|
||||
applySetting({ settings }, setting) {
|
||||
if (
|
||||
setting == null ||
|
||||
!(setting instanceof Array) ||
|
||||
setting.length !== 2
|
||||
) {
|
||||
throw new Error(
|
||||
"You must provide a setting (array in the form [key, value])"
|
||||
);
|
||||
}
|
||||
|
||||
const [key, value] = setting;
|
||||
@@ -103,151 +110,160 @@ export const mutations = {
|
||||
}
|
||||
},
|
||||
|
||||
addNewCollection({collections}, collection) {
|
||||
addNewCollection({ collections }, collection) {
|
||||
collections.push({
|
||||
name: '',
|
||||
name: "",
|
||||
folders: [],
|
||||
requests: [],
|
||||
...collection,
|
||||
})
|
||||
},
|
||||
|
||||
removeCollection({collections}, payload) {
|
||||
const {
|
||||
collectionIndex
|
||||
} = payload;
|
||||
collections.splice(collectionIndex, 1)
|
||||
},
|
||||
|
||||
editCollection({collections}, payload) {
|
||||
const {
|
||||
collection,
|
||||
collectionIndex
|
||||
} = payload
|
||||
collections[collectionIndex] = collection
|
||||
},
|
||||
|
||||
addNewFolder({collections}, payload) {
|
||||
const {
|
||||
collectionIndex,
|
||||
folder
|
||||
} = payload;
|
||||
collections[collectionIndex].folders.push({
|
||||
name: '',
|
||||
requests: [],
|
||||
...folder,
|
||||
...collection
|
||||
});
|
||||
},
|
||||
|
||||
editFolder({collections}, payload) {
|
||||
const {
|
||||
collectionIndex,
|
||||
folder,
|
||||
folderIndex
|
||||
} = payload;
|
||||
Vue.set(collections[collectionIndex].folders, folderIndex, folder)
|
||||
removeCollection({ collections }, payload) {
|
||||
const { collectionIndex } = payload;
|
||||
collections.splice(collectionIndex, 1);
|
||||
},
|
||||
|
||||
removeFolder({collections}, payload) {
|
||||
const {
|
||||
collectionIndex,
|
||||
folderIndex
|
||||
} = payload;
|
||||
collections[collectionIndex].folders.splice(folderIndex, 1)
|
||||
editCollection({ collections }, payload) {
|
||||
const { collection, collectionIndex } = payload;
|
||||
collections[collectionIndex] = collection;
|
||||
},
|
||||
|
||||
addRequest({collections}, payload) {
|
||||
const {
|
||||
request
|
||||
} = payload;
|
||||
addNewFolder({ collections }, payload) {
|
||||
const { collectionIndex, folder } = payload;
|
||||
collections[collectionIndex].folders.push({
|
||||
name: "",
|
||||
requests: [],
|
||||
...folder
|
||||
});
|
||||
},
|
||||
|
||||
editFolder({ collections }, payload) {
|
||||
const { collectionIndex, folder, folderIndex } = payload;
|
||||
Vue.set(collections[collectionIndex].folders, folderIndex, folder);
|
||||
},
|
||||
|
||||
removeFolder({ collections }, payload) {
|
||||
const { collectionIndex, folderIndex } = payload;
|
||||
collections[collectionIndex].folders.splice(folderIndex, 1);
|
||||
},
|
||||
|
||||
addRequest({ collections }, payload) {
|
||||
const { request } = payload;
|
||||
|
||||
// Request that is directly attached to collection
|
||||
if (request.folder === -1) {
|
||||
collections[request.collection].requests.push(request);
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
collections[request.collection].folders[request.folder].requests.push(request);
|
||||
collections[request.collection].folders[request.folder].requests.push(
|
||||
request
|
||||
);
|
||||
},
|
||||
|
||||
editRequest({collections}, payload) {
|
||||
editRequest({ collections }, payload) {
|
||||
const {
|
||||
requestOldCollectionIndex,
|
||||
requestOldFolderIndex,
|
||||
requestOldIndex,
|
||||
requestNew,
|
||||
requestNewCollectionIndex,
|
||||
requestNewFolderIndex,
|
||||
} = payload
|
||||
requestNewFolderIndex
|
||||
} = payload;
|
||||
|
||||
const changedCollection = requestOldCollectionIndex !== requestNewCollectionIndex
|
||||
const changedFolder = requestOldFolderIndex !== requestNewFolderIndex
|
||||
const changedPlace = changedCollection || changedFolder
|
||||
const changedCollection =
|
||||
requestOldCollectionIndex !== requestNewCollectionIndex;
|
||||
const changedFolder = requestOldFolderIndex !== requestNewFolderIndex;
|
||||
const changedPlace = changedCollection || changedFolder;
|
||||
|
||||
// set new request
|
||||
if (requestNewFolderIndex !== undefined) {
|
||||
Vue.set(collections[requestNewCollectionIndex].folders[requestNewFolderIndex].requests, requestOldIndex, requestNew)
|
||||
}
|
||||
else {
|
||||
Vue.set(collections[requestNewCollectionIndex].requests, requestOldIndex, requestNew)
|
||||
Vue.set(
|
||||
collections[requestNewCollectionIndex].folders[requestNewFolderIndex]
|
||||
.requests,
|
||||
requestOldIndex,
|
||||
requestNew
|
||||
);
|
||||
} else {
|
||||
Vue.set(
|
||||
collections[requestNewCollectionIndex].requests,
|
||||
requestOldIndex,
|
||||
requestNew
|
||||
);
|
||||
}
|
||||
|
||||
// remove old request
|
||||
if (changedPlace) {
|
||||
if (requestOldFolderIndex !== undefined) {
|
||||
collections[requestOldCollectionIndex].folders[requestOldFolderIndex].requests.splice(requestOldIndex, 1)
|
||||
}
|
||||
else {
|
||||
collections[requestOldCollectionIndex].requests.splice(requestOldIndex, 1)
|
||||
collections[requestOldCollectionIndex].folders[
|
||||
requestOldFolderIndex
|
||||
].requests.splice(requestOldIndex, 1);
|
||||
} else {
|
||||
collections[requestOldCollectionIndex].requests.splice(
|
||||
requestOldIndex,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
saveRequestAs({collections}, payload) {
|
||||
const {
|
||||
request,
|
||||
collectionIndex,
|
||||
folderIndex,
|
||||
requestIndex,
|
||||
} = payload
|
||||
saveRequestAs({ collections }, payload) {
|
||||
const { request, collectionIndex, folderIndex, requestIndex } = payload;
|
||||
|
||||
const specifiedCollection = collectionIndex !== undefined
|
||||
const specifiedFolder = folderIndex !== undefined
|
||||
const specifiedRequest = requestIndex !== undefined
|
||||
const specifiedCollection = collectionIndex !== undefined;
|
||||
const specifiedFolder = folderIndex !== undefined;
|
||||
const specifiedRequest = requestIndex !== undefined;
|
||||
|
||||
if (specifiedCollection && specifiedFolder && specifiedRequest) {
|
||||
Vue.set(collections[collectionIndex].folders[folderIndex].requests, requestIndex, request)
|
||||
}
|
||||
else if (specifiedCollection && specifiedFolder && !specifiedRequest) {
|
||||
const requests = collections[collectionIndex].folders[folderIndex].requests
|
||||
Vue.set(
|
||||
collections[collectionIndex].folders[folderIndex].requests,
|
||||
requestIndex,
|
||||
request
|
||||
);
|
||||
} else if (specifiedCollection && specifiedFolder && !specifiedRequest) {
|
||||
const requests =
|
||||
collections[collectionIndex].folders[folderIndex].requests;
|
||||
const lastRequestIndex = requests.length - 1;
|
||||
Vue.set(requests, lastRequestIndex + 1, request)
|
||||
Vue.set(requests, lastRequestIndex + 1, request);
|
||||
} else if (specifiedCollection && !specifiedFolder && specifiedRequest) {
|
||||
const requests = collections[collectionIndex].requests
|
||||
Vue.set(requests, requestIndex, request)
|
||||
const requests = collections[collectionIndex].requests;
|
||||
Vue.set(requests, requestIndex, request);
|
||||
} else if (specifiedCollection && !specifiedFolder && !specifiedRequest) {
|
||||
const requests = collections[collectionIndex].requests
|
||||
const requests = collections[collectionIndex].requests;
|
||||
const lastRequestIndex = requests.length - 1;
|
||||
Vue.set(requests, lastRequestIndex + 1, request)
|
||||
Vue.set(requests, lastRequestIndex + 1, request);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
saveRequest({collections}, payload) {
|
||||
const {
|
||||
request
|
||||
} = payload;
|
||||
saveRequest({ collections }, payload) {
|
||||
const { request } = payload;
|
||||
|
||||
// Remove the old request from collection
|
||||
if (request.hasOwnProperty('oldCollection') && request.oldCollection > -1) {
|
||||
const folder = request.hasOwnProperty('oldFolder') && request.oldFolder >= -1 ? request.oldFolder : request.folder;
|
||||
if (request.hasOwnProperty("oldCollection") && request.oldCollection > -1) {
|
||||
const folder =
|
||||
request.hasOwnProperty("oldFolder") && request.oldFolder >= -1
|
||||
? request.oldFolder
|
||||
: request.folder;
|
||||
if (folder > -1) {
|
||||
collections[request.oldCollection].folders[folder].requests.splice(request.requestIndex, 1)
|
||||
collections[request.oldCollection].folders[folder].requests.splice(
|
||||
request.requestIndex,
|
||||
1
|
||||
);
|
||||
} else {
|
||||
collections[request.oldCollection].requests.splice(request.requestIndex, 1)
|
||||
collections[request.oldCollection].requests.splice(
|
||||
request.requestIndex,
|
||||
1
|
||||
);
|
||||
}
|
||||
} else if (request.hasOwnProperty('oldFolder') && request.oldFolder !== -1) {
|
||||
collections[request.collection].folders[folder].requests.splice(request.requestIndex, 1)
|
||||
} else if (
|
||||
request.hasOwnProperty("oldFolder") &&
|
||||
request.oldFolder !== -1
|
||||
) {
|
||||
collections[request.collection].folders[folder].requests.splice(
|
||||
request.requestIndex,
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
delete request.oldCollection;
|
||||
@@ -255,31 +271,37 @@ export const mutations = {
|
||||
|
||||
// Request that is directly attached to collection
|
||||
if (request.folder === -1) {
|
||||
Vue.set(collections[request.collection].requests, request.requestIndex, request)
|
||||
return
|
||||
Vue.set(
|
||||
collections[request.collection].requests,
|
||||
request.requestIndex,
|
||||
request
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Vue.set(collections[request.collection].folders[request.folder].requests, request.requestIndex, request)
|
||||
Vue.set(
|
||||
collections[request.collection].folders[request.folder].requests,
|
||||
request.requestIndex,
|
||||
request
|
||||
);
|
||||
},
|
||||
|
||||
removeRequest({collections}, payload) {
|
||||
const {
|
||||
collectionIndex,
|
||||
folderIndex,
|
||||
requestIndex
|
||||
} = payload;
|
||||
removeRequest({ collections }, payload) {
|
||||
const { collectionIndex, folderIndex, requestIndex } = payload;
|
||||
|
||||
// Request that is directly attached to collection
|
||||
if (folderIndex === -1) {
|
||||
collections[collectionIndex].requests.splice(requestIndex, 1)
|
||||
return
|
||||
collections[collectionIndex].requests.splice(requestIndex, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
collections[collectionIndex].folders[folderIndex].requests.splice(requestIndex, 1)
|
||||
collections[collectionIndex].folders[folderIndex].requests.splice(
|
||||
requestIndex,
|
||||
1
|
||||
);
|
||||
},
|
||||
|
||||
selectRequest(state, {request}) {
|
||||
selectRequest(state, { request }) {
|
||||
state.selectedRequest = Object.assign({}, request);
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
export default () => ({
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: 'https://reqres.in',
|
||||
path: '/api/users',
|
||||
label: '',
|
||||
auth: 'None',
|
||||
httpUser: '',
|
||||
httpPassword: '',
|
||||
passwordFieldType: 'password',
|
||||
bearerToken: '',
|
||||
method: "GET",
|
||||
url: "https://reqres.in",
|
||||
path: "/api/users",
|
||||
label: "",
|
||||
auth: "None",
|
||||
httpUser: "",
|
||||
httpPassword: "",
|
||||
passwordFieldType: "password",
|
||||
bearerToken: "",
|
||||
headers: [],
|
||||
params: [],
|
||||
bodyParams: [],
|
||||
rawParams: '',
|
||||
rawParams: "",
|
||||
rawInput: false,
|
||||
requestType: '',
|
||||
contentType: '',
|
||||
requestType: "",
|
||||
contentType: ""
|
||||
},
|
||||
gql: {
|
||||
url: 'https://rickandmortyapi.com/graphql',
|
||||
url: "https://rickandmortyapi.com/graphql",
|
||||
headers: [],
|
||||
query: ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user