Commit code with double quotes instead of single quotes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import * as cookie from 'cookie'
|
import * as cookie from "cookie"
|
||||||
import * as URL from 'url'
|
import * as URL from "url"
|
||||||
import * as querystring from 'querystring'
|
import * as querystring from "querystring"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* given this: [ 'msg1=value1', 'msg2=value2' ]
|
* given this: [ 'msg1=value1', 'msg2=value2' ]
|
||||||
@@ -8,7 +8,7 @@ import * as querystring from 'querystring'
|
|||||||
* @param dataArguments
|
* @param dataArguments
|
||||||
*/
|
*/
|
||||||
const joinDataArguments = dataArguments => {
|
const joinDataArguments = dataArguments => {
|
||||||
let data = ''
|
let data = ""
|
||||||
dataArguments.forEach((argument, i) => {
|
dataArguments.forEach((argument, i) => {
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
data += argument
|
data += argument
|
||||||
@@ -23,23 +23,23 @@ const parseCurlCommand = curlCommand => {
|
|||||||
let newlineFound = /\r|\n/.exec(curlCommand)
|
let newlineFound = /\r|\n/.exec(curlCommand)
|
||||||
if (newlineFound) {
|
if (newlineFound) {
|
||||||
// remove newlines
|
// remove newlines
|
||||||
curlCommand = curlCommand.replace(/\r|\n/g, '')
|
curlCommand = curlCommand.replace(/\r|\n/g, "")
|
||||||
}
|
}
|
||||||
// yargs parses -XPOST as separate arguments. just prescreen for it.
|
// yargs parses -XPOST as separate arguments. just prescreen for it.
|
||||||
curlCommand = curlCommand.replace(/ -XPOST/, ' -X POST')
|
curlCommand = curlCommand.replace(/ -XPOST/, " -X POST")
|
||||||
curlCommand = curlCommand.replace(/ -XGET/, ' -X GET')
|
curlCommand = curlCommand.replace(/ -XGET/, " -X GET")
|
||||||
curlCommand = curlCommand.replace(/ -XPUT/, ' -X PUT')
|
curlCommand = curlCommand.replace(/ -XPUT/, " -X PUT")
|
||||||
curlCommand = curlCommand.replace(/ -XPATCH/, ' -X PATCH')
|
curlCommand = curlCommand.replace(/ -XPATCH/, " -X PATCH")
|
||||||
curlCommand = curlCommand.replace(/ -XDELETE/, ' -X DELETE')
|
curlCommand = curlCommand.replace(/ -XDELETE/, " -X DELETE")
|
||||||
curlCommand = curlCommand.trim()
|
curlCommand = curlCommand.trim()
|
||||||
let parsedArguments = require('yargs-parser')(curlCommand)
|
let parsedArguments = require("yargs-parser")(curlCommand)
|
||||||
let cookieString
|
let cookieString
|
||||||
let cookies
|
let cookies
|
||||||
let url = parsedArguments._[1]
|
let url = parsedArguments._[1]
|
||||||
if (!url) {
|
if (!url) {
|
||||||
for (let argName in parsedArguments) {
|
for (let argName in parsedArguments) {
|
||||||
if (typeof parsedArguments[argName] === 'string') {
|
if (typeof parsedArguments[argName] === "string") {
|
||||||
if (['http', 'www.'].includes(parsedArguments[argName])) {
|
if (["http", "www."].includes(parsedArguments[argName])) {
|
||||||
url = parsedArguments[argName]
|
url = parsedArguments[argName]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,11 +56,11 @@ const parseCurlCommand = curlCommand => {
|
|||||||
parsedArguments[headerFieldName] = [parsedArguments[headerFieldName]]
|
parsedArguments[headerFieldName] = [parsedArguments[headerFieldName]]
|
||||||
}
|
}
|
||||||
parsedArguments[headerFieldName].forEach(header => {
|
parsedArguments[headerFieldName].forEach(header => {
|
||||||
if (header.includes('Cookie')) {
|
if (header.includes("Cookie")) {
|
||||||
// stupid javascript tricks: closure
|
// stupid javascript tricks: closure
|
||||||
cookieString = header
|
cookieString = header
|
||||||
} else {
|
} else {
|
||||||
let colonIndex = header.indexOf(':')
|
let colonIndex = header.indexOf(":")
|
||||||
let headerName = header.substring(0, colonIndex)
|
let headerName = header.substring(0, colonIndex)
|
||||||
let headerValue = header.substring(colonIndex + 1).trim()
|
let headerValue = header.substring(colonIndex + 1).trim()
|
||||||
headers[headerName] = headerValue
|
headers[headerName] = headerValue
|
||||||
@@ -69,18 +69,18 @@ const parseCurlCommand = curlCommand => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parseHeaders('H')
|
parseHeaders("H")
|
||||||
parseHeaders('header')
|
parseHeaders("header")
|
||||||
if (parsedArguments.A) {
|
if (parsedArguments.A) {
|
||||||
if (!headers) {
|
if (!headers) {
|
||||||
headers = []
|
headers = []
|
||||||
}
|
}
|
||||||
headers['User-Agent'] = parsedArguments.A
|
headers["User-Agent"] = parsedArguments.A
|
||||||
} else if (parsedArguments['user-agent']) {
|
} else if (parsedArguments["user-agent"]) {
|
||||||
if (!headers) {
|
if (!headers) {
|
||||||
headers = []
|
headers = []
|
||||||
}
|
}
|
||||||
headers['User-Agent'] = parsedArguments['user-agent']
|
headers["User-Agent"] = parsedArguments["user-agent"]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedArguments.b) {
|
if (parsedArguments.b) {
|
||||||
@@ -97,7 +97,7 @@ const parseCurlCommand = curlCommand => {
|
|||||||
}
|
}
|
||||||
parsedArguments.F.forEach(multipartArgument => {
|
parsedArguments.F.forEach(multipartArgument => {
|
||||||
// input looks like key=value. value could be json or a file path prepended with an @
|
// input looks like key=value. value could be json or a file path prepended with an @
|
||||||
const [key, value] = multipartArgument.split('=', 2)
|
const [key, value] = multipartArgument.split("=", 2)
|
||||||
multipartUploads[key] = value
|
multipartUploads[key] = value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -107,33 +107,33 @@ const parseCurlCommand = curlCommand => {
|
|||||||
}
|
}
|
||||||
// separate out cookie headers into separate data structure
|
// separate out cookie headers into separate data structure
|
||||||
// note: cookie is case insensitive
|
// note: cookie is case insensitive
|
||||||
cookies = cookie.parse(cookieString.replace(/^Cookie: /gi, ''), cookieParseOptions)
|
cookies = cookie.parse(cookieString.replace(/^Cookie: /gi, ""), cookieParseOptions)
|
||||||
}
|
}
|
||||||
let method
|
let method
|
||||||
if (parsedArguments.X === 'POST') {
|
if (parsedArguments.X === "POST") {
|
||||||
method = 'post'
|
method = "post"
|
||||||
} else if (parsedArguments.X === 'PUT' || parsedArguments['T']) {
|
} else if (parsedArguments.X === "PUT" || parsedArguments["T"]) {
|
||||||
method = 'put'
|
method = "put"
|
||||||
} else if (parsedArguments.X === 'PATCH') {
|
} else if (parsedArguments.X === "PATCH") {
|
||||||
method = 'patch'
|
method = "patch"
|
||||||
} else if (parsedArguments.X === 'DELETE') {
|
} else if (parsedArguments.X === "DELETE") {
|
||||||
method = 'delete'
|
method = "delete"
|
||||||
} else if (parsedArguments.X === 'OPTIONS') {
|
} else if (parsedArguments.X === "OPTIONS") {
|
||||||
method = 'options'
|
method = "options"
|
||||||
} else if (
|
} else if (
|
||||||
(parsedArguments['d'] ||
|
(parsedArguments["d"] ||
|
||||||
parsedArguments['data'] ||
|
parsedArguments["data"] ||
|
||||||
parsedArguments['data-ascii'] ||
|
parsedArguments["data-ascii"] ||
|
||||||
parsedArguments['data-binary'] ||
|
parsedArguments["data-binary"] ||
|
||||||
parsedArguments['F'] ||
|
parsedArguments["F"] ||
|
||||||
parsedArguments['form']) &&
|
parsedArguments["form"]) &&
|
||||||
!(parsedArguments['G'] || parsedArguments['get'])
|
!(parsedArguments["G"] || parsedArguments["get"])
|
||||||
) {
|
) {
|
||||||
method = 'post'
|
method = "post"
|
||||||
} else if (parsedArguments['I'] || parsedArguments['head']) {
|
} else if (parsedArguments["I"] || parsedArguments["head"]) {
|
||||||
method = 'head'
|
method = "head"
|
||||||
} else {
|
} else {
|
||||||
method = 'get'
|
method = "get"
|
||||||
}
|
}
|
||||||
|
|
||||||
let compressed = !!parsedArguments.compressed
|
let compressed = !!parsedArguments.compressed
|
||||||
@@ -141,20 +141,20 @@ const parseCurlCommand = curlCommand => {
|
|||||||
|
|
||||||
// if GET request with data, convert data to query string
|
// if GET request with data, convert data to query string
|
||||||
// NB: the -G flag does not change the http verb. It just moves the data into the url.
|
// NB: the -G flag does not change the http verb. It just moves the data into the url.
|
||||||
if (parsedArguments['G'] || parsedArguments['get']) {
|
if (parsedArguments["G"] || parsedArguments["get"]) {
|
||||||
urlObject.query = urlObject.query ? urlObject.query : ''
|
urlObject.query = urlObject.query ? urlObject.query : ""
|
||||||
let option = 'd' in parsedArguments ? 'd' : 'data' in parsedArguments ? 'data' : null
|
let option = "d" in parsedArguments ? "d" : "data" in parsedArguments ? "data" : null
|
||||||
if (option) {
|
if (option) {
|
||||||
let urlQueryString = ''
|
let urlQueryString = ""
|
||||||
|
|
||||||
if (!url.includes('?')) {
|
if (!url.includes("?")) {
|
||||||
url += '?'
|
url += "?"
|
||||||
} else {
|
} else {
|
||||||
urlQueryString += '&'
|
urlQueryString += "&"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof parsedArguments[option] === 'object') {
|
if (typeof parsedArguments[option] === "object") {
|
||||||
urlQueryString += parsedArguments[option].join('&')
|
urlQueryString += parsedArguments[option].join("&")
|
||||||
} else {
|
} else {
|
||||||
urlQueryString += parsedArguments[option]
|
urlQueryString += parsedArguments[option]
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ const parseCurlCommand = curlCommand => {
|
|||||||
urlWithoutQuery: URL.format(urlObject),
|
urlWithoutQuery: URL.format(urlObject),
|
||||||
}
|
}
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
request['compressed'] = true
|
request["compressed"] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Object.keys(query).length > 0) {
|
if (Object.keys(query).length > 0) {
|
||||||
@@ -182,38 +182,38 @@ const parseCurlCommand = curlCommand => {
|
|||||||
if (headers) {
|
if (headers) {
|
||||||
request.headers = headers
|
request.headers = headers
|
||||||
}
|
}
|
||||||
request['method'] = method
|
request["method"] = method
|
||||||
|
|
||||||
if (cookies) {
|
if (cookies) {
|
||||||
request.cookies = cookies
|
request.cookies = cookies
|
||||||
request.cookieString = cookieString.replace('Cookie: ', '')
|
request.cookieString = cookieString.replace("Cookie: ", "")
|
||||||
}
|
}
|
||||||
if (multipartUploads) {
|
if (multipartUploads) {
|
||||||
request.multipartUploads = multipartUploads
|
request.multipartUploads = multipartUploads
|
||||||
}
|
}
|
||||||
if (parsedArguments.data) {
|
if (parsedArguments.data) {
|
||||||
request.data = parsedArguments.data
|
request.data = parsedArguments.data
|
||||||
} else if (parsedArguments['data-binary']) {
|
} else if (parsedArguments["data-binary"]) {
|
||||||
request.data = parsedArguments['data-binary']
|
request.data = parsedArguments["data-binary"]
|
||||||
request.isDataBinary = true
|
request.isDataBinary = true
|
||||||
} else if (parsedArguments['d']) {
|
} else if (parsedArguments["d"]) {
|
||||||
request.data = parsedArguments['d']
|
request.data = parsedArguments["d"]
|
||||||
} else if (parsedArguments['data-ascii']) {
|
} else if (parsedArguments["data-ascii"]) {
|
||||||
request.data = parsedArguments['data-ascii']
|
request.data = parsedArguments["data-ascii"]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedArguments['u']) {
|
if (parsedArguments["u"]) {
|
||||||
request.auth = parsedArguments['u']
|
request.auth = parsedArguments["u"]
|
||||||
}
|
}
|
||||||
if (parsedArguments['user']) {
|
if (parsedArguments["user"]) {
|
||||||
request.auth = parsedArguments['user']
|
request.auth = parsedArguments["user"]
|
||||||
}
|
}
|
||||||
if (Array.isArray(request.data)) {
|
if (Array.isArray(request.data)) {
|
||||||
request.dataArray = request.data
|
request.dataArray = request.data
|
||||||
request.data = joinDataArguments(request.data)
|
request.data = joinDataArguments(request.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedArguments['k'] || parsedArguments['insecure']) {
|
if (parsedArguments["k"] || parsedArguments["insecure"]) {
|
||||||
request.insecure = true
|
request.insecure = true
|
||||||
}
|
}
|
||||||
return request
|
return request
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ const redirectUri = `${window.location.origin}/`
|
|||||||
const sendPostRequest = async (url, params) => {
|
const sendPostRequest = async (url, params) => {
|
||||||
const body = Object.keys(params)
|
const body = Object.keys(params)
|
||||||
.map(key => `${key}=${params[key]}`)
|
.map(key => `${key}=${params[key]}`)
|
||||||
.join('&')
|
.join("&")
|
||||||
const options = {
|
const options = {
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
},
|
},
|
||||||
body,
|
body,
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ const sendPostRequest = async (url, params) => {
|
|||||||
const data = await response.json()
|
const data = await response.json()
|
||||||
return data
|
return data
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Request failed', err)
|
console.error("Request failed", err)
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,10 +39,10 @@ const sendPostRequest = async (url, params) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const parseQueryString = searchQuery => {
|
const parseQueryString = searchQuery => {
|
||||||
if (searchQuery === '') {
|
if (searchQuery === "") {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
const segments = searchQuery.split('&').map(s => s.split('='))
|
const segments = searchQuery.split("&").map(s => s.split("="))
|
||||||
const queryString = segments.reduce((obj, el) => ({ ...obj, [el[0]]: el[1] }), {})
|
const queryString = segments.reduce((obj, el) => ({ ...obj, [el[0]]: el[1] }), {})
|
||||||
return queryString
|
return queryString
|
||||||
}
|
}
|
||||||
@@ -55,9 +55,9 @@ const parseQueryString = searchQuery => {
|
|||||||
|
|
||||||
const getTokenConfiguration = async endpoint => {
|
const getTokenConfiguration = async endpoint => {
|
||||||
const options = {
|
const options = {
|
||||||
method: 'GET',
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/json',
|
"Content-type": "application/json",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -65,7 +65,7 @@ const getTokenConfiguration = async endpoint => {
|
|||||||
const config = await response.json()
|
const config = await response.json()
|
||||||
return config
|
return config
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Request failed', err)
|
console.error("Request failed", err)
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +81,7 @@ const getTokenConfiguration = async endpoint => {
|
|||||||
const generateRandomString = () => {
|
const generateRandomString = () => {
|
||||||
const array = new Uint32Array(28)
|
const array = new Uint32Array(28)
|
||||||
window.crypto.getRandomValues(array)
|
window.crypto.getRandomValues(array)
|
||||||
return Array.from(array, dec => `0${dec.toString(16)}`.substr(-2)).join('')
|
return Array.from(array, dec => `0${dec.toString(16)}`.substr(-2)).join("")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,7 +93,7 @@ const generateRandomString = () => {
|
|||||||
const sha256 = plain => {
|
const sha256 = plain => {
|
||||||
const encoder = new TextEncoder()
|
const encoder = new TextEncoder()
|
||||||
const data = encoder.encode(plain)
|
const data = encoder.encode(plain)
|
||||||
return window.crypto.subtle.digest('SHA-256', data)
|
return window.crypto.subtle.digest("SHA-256", data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,9 +110,9 @@ const base64urlencode = (
|
|||||||
// Then convert the base64 encoded to base64url encoded
|
// Then convert the base64 encoded to base64url encoded
|
||||||
// (replace + with -, replace / with _, trim trailing =)
|
// (replace + with -, replace / with _, trim trailing =)
|
||||||
btoa(String.fromCharCode.apply(null, new Uint8Array(str)))
|
btoa(String.fromCharCode.apply(null, new Uint8Array(str)))
|
||||||
.replace(/\+/g, '-')
|
.replace(/\+/g, "-")
|
||||||
.replace(/\//g, '_')
|
.replace(/\//g, "_")
|
||||||
.replace(/=+$/, '')
|
.replace(/=+$/, "")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the base64-urlencoded sha256 hash for the PKCE challenge
|
* Return the base64-urlencoded sha256 hash for the PKCE challenge
|
||||||
@@ -144,23 +144,23 @@ const tokenRequest = async ({
|
|||||||
scope,
|
scope,
|
||||||
}) => {
|
}) => {
|
||||||
// Check oauth configuration
|
// Check oauth configuration
|
||||||
if (oidcDiscoveryUrl !== '') {
|
if (oidcDiscoveryUrl !== "") {
|
||||||
const { authorization_endpoint, token_endpoint } = await getTokenConfiguration(oidcDiscoveryUrl)
|
const { authorization_endpoint, token_endpoint } = await getTokenConfiguration(oidcDiscoveryUrl)
|
||||||
authUrl = authorization_endpoint
|
authUrl = authorization_endpoint
|
||||||
accessTokenUrl = token_endpoint
|
accessTokenUrl = token_endpoint
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store oauth information
|
// Store oauth information
|
||||||
localStorage.setItem('token_endpoint', accessTokenUrl)
|
localStorage.setItem("token_endpoint", accessTokenUrl)
|
||||||
localStorage.setItem('client_id', clientId)
|
localStorage.setItem("client_id", clientId)
|
||||||
|
|
||||||
// Create and store a random state value
|
// Create and store a random state value
|
||||||
const state = generateRandomString()
|
const state = generateRandomString()
|
||||||
localStorage.setItem('pkce_state', state)
|
localStorage.setItem("pkce_state", state)
|
||||||
|
|
||||||
// Create and store a new PKCE code_verifier (the plaintext random secret)
|
// Create and store a new PKCE code_verifier (the plaintext random secret)
|
||||||
const code_verifier = generateRandomString()
|
const code_verifier = generateRandomString()
|
||||||
localStorage.setItem('pkce_code_verifier', code_verifier)
|
localStorage.setItem("pkce_code_verifier", code_verifier)
|
||||||
|
|
||||||
// Hash and base64-urlencode the secret to use as the challenge
|
// Hash and base64-urlencode the secret to use as the challenge
|
||||||
const code_challenge = await pkceChallengeFromVerifier(code_verifier)
|
const code_challenge = await pkceChallengeFromVerifier(code_verifier)
|
||||||
@@ -189,7 +189,7 @@ const tokenRequest = async ({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const oauthRedirect = async () => {
|
const oauthRedirect = async () => {
|
||||||
let tokenResponse = ''
|
let tokenResponse = ""
|
||||||
let q = parseQueryString(window.location.search.substring(1))
|
let q = parseQueryString(window.location.search.substring(1))
|
||||||
// Check if the server returned an error string
|
// Check if the server returned an error string
|
||||||
if (q.error) {
|
if (q.error) {
|
||||||
@@ -198,27 +198,27 @@ const oauthRedirect = async () => {
|
|||||||
// If the server returned an authorization code, attempt to exchange it for an access token
|
// If the server returned an authorization code, attempt to exchange it for an access token
|
||||||
if (q.code) {
|
if (q.code) {
|
||||||
// Verify state matches what we set at the beginning
|
// Verify state matches what we set at the beginning
|
||||||
if (localStorage.getItem('pkce_state') != q.state) {
|
if (localStorage.getItem("pkce_state") != q.state) {
|
||||||
alert('Invalid state')
|
alert("Invalid state")
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
// Exchange the authorization code for an access token
|
// Exchange the authorization code for an access token
|
||||||
tokenResponse = await sendPostRequest(localStorage.getItem('token_endpoint'), {
|
tokenResponse = await sendPostRequest(localStorage.getItem("token_endpoint"), {
|
||||||
grant_type: 'authorization_code',
|
grant_type: "authorization_code",
|
||||||
code: q.code,
|
code: q.code,
|
||||||
client_id: localStorage.getItem('client_id'),
|
client_id: localStorage.getItem("client_id"),
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
code_verifier: localStorage.getItem('pkce_code_verifier'),
|
code_verifier: localStorage.getItem("pkce_code_verifier"),
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`${error.error}\n\n${error.error_description}`)
|
console.log(`${error.error}\n\n${error.error_description}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Clean these up since we don't need them anymore
|
// Clean these up since we don't need them anymore
|
||||||
localStorage.removeItem('pkce_state')
|
localStorage.removeItem("pkce_state")
|
||||||
localStorage.removeItem('pkce_code_verifier')
|
localStorage.removeItem("pkce_code_verifier")
|
||||||
localStorage.removeItem('token_endpoint')
|
localStorage.removeItem("token_endpoint")
|
||||||
localStorage.removeItem('client_id')
|
localStorage.removeItem("client_id")
|
||||||
return tokenResponse
|
return tokenResponse
|
||||||
}
|
}
|
||||||
return tokenResponse
|
return tokenResponse
|
||||||
|
|||||||
@@ -2,36 +2,36 @@ export default () => {
|
|||||||
//*** Determine whether or not the PWA has been installed. ***//
|
//*** Determine whether or not the PWA has been installed. ***//
|
||||||
|
|
||||||
// Step 1: Check local storage
|
// 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.)
|
// Step 2: Check if the display-mode is standalone. (Only permitted for PWAs.)
|
||||||
if (!pwaInstalled && window.matchMedia('(display-mode: standalone)').matches) {
|
if (!pwaInstalled && window.matchMedia("(display-mode: standalone)").matches) {
|
||||||
localStorage.setItem('pwaInstalled', 'yes')
|
localStorage.setItem("pwaInstalled", "yes")
|
||||||
pwaInstalled = true
|
pwaInstalled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 3: Check if the navigator is in standalone mode. (Again, only permitted for PWAs.)
|
// Step 3: Check if the navigator is in standalone mode. (Again, only permitted for PWAs.)
|
||||||
if (!pwaInstalled && window.navigator.standalone === true) {
|
if (!pwaInstalled && window.navigator.standalone === true) {
|
||||||
localStorage.setItem('pwaInstalled', 'yes')
|
localStorage.setItem("pwaInstalled", "yes")
|
||||||
pwaInstalled = true
|
pwaInstalled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
//*** If the PWA has not been installed, show the install PWA prompt.. ***//
|
//*** If the PWA has not been installed, show the install PWA prompt.. ***//
|
||||||
let deferredPrompt = null
|
let deferredPrompt = null
|
||||||
window.addEventListener('beforeinstallprompt', event => {
|
window.addEventListener("beforeinstallprompt", event => {
|
||||||
deferredPrompt = event
|
deferredPrompt = event
|
||||||
|
|
||||||
// Show the install button if the prompt appeared.
|
// Show the install button if the prompt appeared.
|
||||||
if (!pwaInstalled) {
|
if (!pwaInstalled) {
|
||||||
document.querySelector('#installPWA').style.display = 'inline-flex'
|
document.querySelector("#installPWA").style.display = "inline-flex"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// When the app is installed, remove install prompts.
|
// When the app is installed, remove install prompts.
|
||||||
window.addEventListener('appinstalled', event => {
|
window.addEventListener("appinstalled", event => {
|
||||||
localStorage.setItem('pwaInstalled', 'yes')
|
localStorage.setItem("pwaInstalled", "yes")
|
||||||
pwaInstalled = true
|
pwaInstalled = true
|
||||||
document.getElementById('installPWA').style.display = 'none'
|
document.getElementById("installPWA").style.display = "none"
|
||||||
})
|
})
|
||||||
|
|
||||||
// When the app is uninstalled, add the prompts back
|
// When the app is uninstalled, add the prompts back
|
||||||
@@ -40,10 +40,10 @@ export default () => {
|
|||||||
deferredPrompt.prompt()
|
deferredPrompt.prompt()
|
||||||
let outcome = await deferredPrompt.userChoice
|
let outcome = await deferredPrompt.userChoice
|
||||||
|
|
||||||
if (outcome === 'accepted') {
|
if (outcome === "accepted") {
|
||||||
console.log('Postwoman was installed successfully.')
|
console.log("Postwoman was installed successfully.")
|
||||||
} else {
|
} 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
|
deferredPrompt = null
|
||||||
}
|
}
|
||||||
|
|||||||
30
build.js
30
build.js
@@ -1,14 +1,14 @@
|
|||||||
const axios = require('axios')
|
const axios = require("axios")
|
||||||
const fs = require('fs')
|
const fs = require("fs")
|
||||||
const { spawnSync } = require('child_process')
|
const { spawnSync } = require("child_process")
|
||||||
const runCommand = (command, args) =>
|
const runCommand = (command, args) =>
|
||||||
spawnSync(command, args)
|
spawnSync(command, args)
|
||||||
.stdout.toString()
|
.stdout.toString()
|
||||||
.replace(/\n/g, '')
|
.replace(/\n/g, "")
|
||||||
|
|
||||||
const FAIL_ON_ERROR = false
|
const FAIL_ON_ERROR = false
|
||||||
const PW_BUILD_DATA_DIR = './.postwoman'
|
const PW_BUILD_DATA_DIR = "./.postwoman"
|
||||||
const IS_DEV_MODE = process.argv.includes('--dev')
|
const IS_DEV_MODE = process.argv.includes("--dev")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
;(async () => {
|
;(async () => {
|
||||||
@@ -20,33 +20,33 @@ try {
|
|||||||
let version = {}
|
let version = {}
|
||||||
// Get the current version name as the tag from Git.
|
// Get the current version name as the tag from Git.
|
||||||
version.name =
|
version.name =
|
||||||
process.env.TRAVIS_TAG || runCommand('git', ['tag --sort=committerdate | tail -1'])
|
process.env.TRAVIS_TAG || runCommand("git", ["tag --sort=committerdate | tail -1"])
|
||||||
|
|
||||||
// FALLBACK: If version.name was unset, let's grab it from GitHub.
|
// FALLBACK: If version.name was unset, let's grab it from GitHub.
|
||||||
if (!version.name) {
|
if (!version.name) {
|
||||||
version.name = (
|
version.name = (
|
||||||
await axios
|
await axios
|
||||||
.get('https://api.github.com/repos/liyasthomas/postwoman/releases')
|
.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
|
// If we can't get it from GitHub, we'll resort to getting it from package.json
|
||||||
.catch(ex => ({
|
.catch(ex => ({
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
tag_name: require('./package.json').version,
|
tag_name: require("./package.json").version,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}))
|
}))
|
||||||
).data[0]['tag_name']
|
).data[0]["tag_name"]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the current version hash as the short hash from Git.
|
// Get the current version hash as the short hash from Git.
|
||||||
version.hash = runCommand('git', ['rev-parse', '--short', 'HEAD'])
|
version.hash = runCommand("git", ["rev-parse", "--short", "HEAD"])
|
||||||
// Get the 'variant' name as the branch, if it's not master.
|
// Get the 'variant' name as the branch, if it's not master.
|
||||||
version.variant =
|
version.variant =
|
||||||
process.env.TRAVIS_BRANCH ||
|
process.env.TRAVIS_BRANCH ||
|
||||||
runCommand('git', ['branch'])
|
runCommand("git", ["branch"])
|
||||||
.split('* ')[1]
|
.split("* ")[1]
|
||||||
.split(' ')[0] + (IS_DEV_MODE ? ' - DEV MODE' : '')
|
.split(" ")[0] + (IS_DEV_MODE ? " - DEV MODE" : "")
|
||||||
if (['', 'master'].includes(version.variant)) {
|
if (["", "master"].includes(version.variant)) {
|
||||||
delete version.variant
|
delete version.variant
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const DEFAULT_THEME = 'twilight'
|
const DEFAULT_THEME = "twilight"
|
||||||
|
|
||||||
import ace from 'ace-builds'
|
import ace from "ace-builds"
|
||||||
import 'ace-builds/webpack-resolver'
|
import "ace-builds/webpack-resolver"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: "",
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -20,7 +20,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lang: {
|
lang: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'json',
|
default: "json",
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -31,7 +31,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editor: null,
|
editor: null,
|
||||||
cacheValue: '',
|
cacheValue: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -43,10 +43,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
theme() {
|
theme() {
|
||||||
this.editor.setTheme('ace/theme/' + this.defineTheme())
|
this.editor.setTheme("ace/theme/" + this.defineTheme())
|
||||||
},
|
},
|
||||||
lang(value) {
|
lang(value) {
|
||||||
this.editor.getSession().setMode('ace/mode/' + value)
|
this.editor.getSession().setMode("ace/mode/" + value)
|
||||||
},
|
},
|
||||||
options(value) {
|
options(value) {
|
||||||
this.editor.setOptions(value)
|
this.editor.setOptions(value)
|
||||||
@@ -65,9 +65,9 @@ export default {
|
|||||||
this.editor = editor
|
this.editor = editor
|
||||||
this.cacheValue = this.value
|
this.cacheValue = this.value
|
||||||
|
|
||||||
editor.on('change', () => {
|
editor.on("change", () => {
|
||||||
const content = editor.getValue()
|
const content = editor.getValue()
|
||||||
this.$emit('input', content)
|
this.$emit("input", content)
|
||||||
this.cacheValue = content
|
this.cacheValue = content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: "Roboto Mono", monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
|
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: "",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -103,14 +103,14 @@ export default {
|
|||||||
|
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: "",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
text() {
|
text() {
|
||||||
this.$emit('input', this.text)
|
this.$emit("input", this.text)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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>
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="addNewCollection">
|
<button class="icon primary" @click="addNewCollection">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -67,17 +67,17 @@ export default {
|
|||||||
},
|
},
|
||||||
addNewCollection() {
|
addNewCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info($t('invalid_collection_name'))
|
this.$toast.info($t("invalid_collection_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.commit('postwoman/addNewCollection', {
|
this.$store.commit("postwoman/addNewCollection", {
|
||||||
name: this.$data.name,
|
name: this.$data.name,
|
||||||
})
|
})
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
this.syncCollections()
|
this.syncCollections()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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>
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="addNewFolder">
|
<button class="icon primary" @click="addNewFolder">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +50,7 @@ export default {
|
|||||||
collectionIndex: Number,
|
collectionIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -59,14 +59,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addNewFolder() {
|
addNewFolder() {
|
||||||
this.$store.commit('postwoman/addNewFolder', {
|
this.$store.commit("postwoman/addNewFolder", {
|
||||||
folder: { name: this.$data.name },
|
folder: { name: this.$data.name },
|
||||||
collectionIndex: this.$props.collectionIndex,
|
collectionIndex: this.$props.collectionIndex,
|
||||||
})
|
})
|
||||||
this.hideModal()
|
this.hideModal()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,19 +17,19 @@
|
|||||||
<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>{{ $t('new_folder') }}</span>
|
<span>{{ $t("new_folder") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="$emit('edit-collection')" v-close-popover>
|
<button class="icon" @click="$emit('edit-collection')" v-close-popover>
|
||||||
<i class="material-icons">create</i>
|
<i class="material-icons">create</i>
|
||||||
<span>{{ $t('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>{{ $t('delete') }}</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.folders.length === 0 && collection.requests.length === 0">
|
<li v-if="collection.folders.length === 0 && collection.requests.length === 0">
|
||||||
<label>{{ $t('collection_empty') }}</label>
|
<label>{{ $t("collection_empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -89,8 +89,8 @@ ul li {
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
folder: () => import('./folder'),
|
folder: () => import("./folder"),
|
||||||
request: () => import('./request'),
|
request: () => import("./request"),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
collectionIndex: Number,
|
collectionIndex: Number,
|
||||||
@@ -107,13 +107,13 @@ export default {
|
|||||||
this.showChildren = !this.showChildren
|
this.showChildren = !this.showChildren
|
||||||
},
|
},
|
||||||
removeCollection() {
|
removeCollection() {
|
||||||
if (!confirm('Are you sure you want to remove this Collection?')) return
|
if (!confirm("Are you sure you want to remove this Collection?")) return
|
||||||
this.$store.commit('postwoman/removeCollection', {
|
this.$store.commit("postwoman/removeCollection", {
|
||||||
collectionIndex: this.collectionIndex,
|
collectionIndex: this.collectionIndex,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editFolder(collectionIndex, folder, folderIndex) {
|
editFolder(collectionIndex, folder, folderIndex) {
|
||||||
this.$emit('edit-folder', { collectionIndex, folder, folderIndex })
|
this.$emit("edit-folder", { collectionIndex, folder, folderIndex })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveCollection">
|
<button class="icon primary" @click="saveCollection">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +50,7 @@ export default {
|
|||||||
editingCollectionIndex: Number,
|
editingCollectionIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -60,21 +60,21 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
saveCollection() {
|
saveCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info($t('invalid_collection_name'))
|
this.$toast.info($t("invalid_collection_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const collectionUpdated = {
|
const collectionUpdated = {
|
||||||
...this.$props.editingCollection,
|
...this.$props.editingCollection,
|
||||||
name: this.$data.name,
|
name: this.$data.name,
|
||||||
}
|
}
|
||||||
this.$store.commit('postwoman/editCollection', {
|
this.$store.commit("postwoman/editCollection", {
|
||||||
collection: collectionUpdated,
|
collection: collectionUpdated,
|
||||||
collectionIndex: this.$props.editingCollectionIndex,
|
collectionIndex: this.$props.editingCollectionIndex,
|
||||||
})
|
})
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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>
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="editFolder">
|
<button class="icon primary" @click="editFolder">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
folderIndex: Number,
|
folderIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
editFolder() {
|
editFolder() {
|
||||||
this.$store.commit('postwoman/editFolder', {
|
this.$store.commit("postwoman/editFolder", {
|
||||||
collectionIndex: this.$props.collectionIndex,
|
collectionIndex: this.$props.collectionIndex,
|
||||||
folder: { ...this.$props.folder, name: this.$data.name },
|
folder: { ...this.$props.folder, name: this.$data.name },
|
||||||
folderIndex: this.$props.folderIndex,
|
folderIndex: this.$props.folderIndex,
|
||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
this.hideModal()
|
this.hideModal()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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">{{ $t('label') }}</label>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="selectLabel"
|
id="selectLabel"
|
||||||
@@ -25,11 +25,11 @@
|
|||||||
@keyup.enter="saveRequest"
|
@keyup.enter="saveRequest"
|
||||||
:placeholder="request.name"
|
:placeholder="request.name"
|
||||||
/>
|
/>
|
||||||
<label for="selectCollection">{{ $t('collection') }}</label>
|
<label for="selectCollection">{{ $t("collection") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectCollection" v-model="requestUpdateData.collectionIndex">
|
<select type="text" id="selectCollection" v-model="requestUpdateData.collectionIndex">
|
||||||
<option :key="undefined" :value="undefined" hidden disabled selected>{{
|
<option :key="undefined" :value="undefined" hidden disabled selected>{{
|
||||||
$t('current_collection')
|
$t("current_collection")
|
||||||
}}</option>
|
}}</option>
|
||||||
<option
|
<option
|
||||||
v-for="(collection, index) in $store.state.postwoman.collections"
|
v-for="(collection, index) in $store.state.postwoman.collections"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectFolder">{{ $t('folder') }}</label>
|
<label for="selectFolder">{{ $t("folder") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectFolder" v-model="requestUpdateData.folderIndex">
|
<select type="text" id="selectFolder" v-model="requestUpdateData.folderIndex">
|
||||||
<option :key="undefined" :value="undefined">/</option>
|
<option :key="undefined" :value="undefined">/</option>
|
||||||
@@ -57,10 +57,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveRequest">
|
<button class="icon primary" @click="saveRequest">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
requestIndex: Number,
|
requestIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'requestUpdateData.collectionIndex': function resetFolderIndex() {
|
"requestUpdateData.collectionIndex": function resetFolderIndex() {
|
||||||
// if user choosen some folder, than selected other collection, which doesn't have any folders
|
// if user choosen some folder, than selected other collection, which doesn't have any folders
|
||||||
// than `requestUpdateData.folderIndex` won't be reseted
|
// than `requestUpdateData.folderIndex` won't be reseted
|
||||||
this.$data.requestUpdateData.folderIndex = undefined
|
this.$data.requestUpdateData.folderIndex = undefined
|
||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
|
|
||||||
// pass data separately to don't depend on request's collection, folder fields
|
// pass data separately to don't depend on request's collection, folder fields
|
||||||
// probably, they should be deprecated because they don't describe request itself
|
// probably, they should be deprecated because they don't describe request itself
|
||||||
this.$store.commit('postwoman/editRequest', {
|
this.$store.commit("postwoman/editRequest", {
|
||||||
requestOldCollectionIndex: this.$props.collectionIndex,
|
requestOldCollectionIndex: this.$props.collectionIndex,
|
||||||
requestOldFolderIndex: this.$props.folderIndex,
|
requestOldFolderIndex: this.$props.folderIndex,
|
||||||
requestOldIndex: this.$props.requestIndex,
|
requestOldIndex: this.$props.requestIndex,
|
||||||
@@ -132,7 +132,7 @@ export default {
|
|||||||
this.hideModal()
|
this.hideModal()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
<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>{{ $t('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>{{ $t('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>{{ $t('folder_empty') }}</label>
|
<label>{{ $t("folder_empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,7 +77,7 @@ export default {
|
|||||||
folderIndex: Number,
|
folderIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
request: () => import('./request'),
|
request: () => import("./request"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -89,17 +89,17 @@ export default {
|
|||||||
this.showChildren = !this.showChildren
|
this.showChildren = !this.showChildren
|
||||||
},
|
},
|
||||||
selectRequest(request) {
|
selectRequest(request) {
|
||||||
this.$store.commit('postwoman/selectRequest', { request })
|
this.$store.commit("postwoman/selectRequest", { request })
|
||||||
},
|
},
|
||||||
removeFolder() {
|
removeFolder() {
|
||||||
if (!confirm('Are you sure you want to remove this folder?')) return
|
if (!confirm("Are you sure you want to remove this folder?")) return
|
||||||
this.$store.commit('postwoman/removeFolder', {
|
this.$store.commit("postwoman/removeFolder", {
|
||||||
collectionIndex: this.collectionIndex,
|
collectionIndex: this.collectionIndex,
|
||||||
folderIndex: this.folderIndex,
|
folderIndex: this.folderIndex,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editFolder() {
|
editFolder() {
|
||||||
this.$emit('edit-folder')
|
this.$emit("edit-folder")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
>
|
>
|
||||||
<button :disabled="!fb.currentUser" class="icon" @click="syncCollections">
|
<button :disabled="!fb.currentUser" class="icon" @click="syncCollections">
|
||||||
<i class="material-icons">folder_shared</i>
|
<i class="material-icons">folder_shared</i>
|
||||||
<span>{{ $t('import_from_sync') }}</span>
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
v-tooltip="$t('replace_current')"
|
v-tooltip="$t('replace_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">create_new_folder</i>
|
<i class="material-icons">create_new_folder</i>
|
||||||
<span>{{ $t('replace_json') }}</span>
|
<span>{{ $t("replace_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="replaceWithJSON"
|
@change="replaceWithJSON"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
v-tooltip="$t('preserve_current')"
|
v-tooltip="$t('preserve_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">folder_special</i>
|
<i class="material-icons">folder_special</i>
|
||||||
<span>{{ $t('import_json') }}</span>
|
<span>{{ $t("import_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="importFromJSON"
|
@change="importFromJSON"
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="exportJSON" v-tooltip="$t('download_file')">
|
<button class="icon primary" @click="exportJSON" v-tooltip="$t('download_file')">
|
||||||
{{ $t('export') }}
|
{{ $t("export") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
show: Boolean,
|
show: Boolean,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
collectionJson() {
|
collectionJson() {
|
||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
openDialogChooseFileToReplaceWith() {
|
openDialogChooseFileToReplaceWith() {
|
||||||
this.$refs.inputChooseFileToReplaceWith.click()
|
this.$refs.inputChooseFileToReplaceWith.click()
|
||||||
@@ -112,15 +112,15 @@ export default {
|
|||||||
let collections = JSON.parse(content)
|
let collections = JSON.parse(content)
|
||||||
if (collections[0]) {
|
if (collections[0]) {
|
||||||
let [name, folders, requests] = Object.keys(collections[0])
|
let [name, folders, requests] = Object.keys(collections[0])
|
||||||
if (name === 'name' && folders === 'folders' && requests === 'requests') {
|
if (name === "name" && folders === "folders" && requests === "requests") {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
} else if (collections.info && collections.info.schema.includes('v2.1.0')) {
|
} else if (collections.info && collections.info.schema.includes("v2.1.0")) {
|
||||||
collections = this.parsePostmanCollection(collections)
|
collections = this.parsePostmanCollection(collections)
|
||||||
} else {
|
} else {
|
||||||
return this.failedImport()
|
return this.failedImport()
|
||||||
}
|
}
|
||||||
this.$store.commit('postwoman/importCollections', collections)
|
this.$store.commit("postwoman/importCollections", collections)
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
||||||
@@ -132,71 +132,71 @@ export default {
|
|||||||
let collections = JSON.parse(content)
|
let collections = JSON.parse(content)
|
||||||
if (collections[0]) {
|
if (collections[0]) {
|
||||||
let [name, folders, requests] = Object.keys(collections[0])
|
let [name, folders, requests] = Object.keys(collections[0])
|
||||||
if (name === 'name' && folders === 'folders' && requests === 'requests') {
|
if (name === "name" && folders === "folders" && requests === "requests") {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
} else if (collections.info && collections.info.schema.includes('v2.1.0')) {
|
} else if (collections.info && collections.info.schema.includes("v2.1.0")) {
|
||||||
collections = this.parsePostmanCollection(collections)
|
collections = this.parsePostmanCollection(collections)
|
||||||
} else {
|
} else {
|
||||||
return this.failedImport()
|
return this.failedImport()
|
||||||
}
|
}
|
||||||
this.$store.commit('postwoman/importCollections', collections)
|
this.$store.commit("postwoman/importCollections", collections)
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
||||||
},
|
},
|
||||||
exportJSON() {
|
exportJSON() {
|
||||||
let text = this.collectionJson
|
let text = this.collectionJson
|
||||||
text = text.replace(/\n/g, '\r\n')
|
text = text.replace(/\n/g, "\r\n")
|
||||||
let blob = new Blob([text], {
|
let blob = new Blob([text], {
|
||||||
type: 'text/json',
|
type: "text/json",
|
||||||
})
|
})
|
||||||
let anchor = document.createElement('a')
|
let anchor = document.createElement("a")
|
||||||
anchor.download = 'postwoman-collection.json'
|
anchor.download = "postwoman-collection.json"
|
||||||
anchor.href = window.URL.createObjectURL(blob)
|
anchor.href = window.URL.createObjectURL(blob)
|
||||||
anchor.target = '_blank'
|
anchor.target = "_blank"
|
||||||
anchor.style.display = 'none'
|
anchor.style.display = "none"
|
||||||
document.body.appendChild(anchor)
|
document.body.appendChild(anchor)
|
||||||
anchor.click()
|
anchor.click()
|
||||||
document.body.removeChild(anchor)
|
document.body.removeChild(anchor)
|
||||||
this.$toast.success(this.$t('download_started'), {
|
this.$toast.success(this.$t("download_started"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
this.$store.commit('postwoman/replaceCollections', fb.currentCollections)
|
this.$store.commit("postwoman/replaceCollections", fb.currentCollections)
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
},
|
},
|
||||||
fileImported() {
|
fileImported() {
|
||||||
this.$toast.info(this.$t('file_imported'), {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: 'folder_shared',
|
icon: "folder_shared",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
failedImport() {
|
failedImport() {
|
||||||
this.$toast.error(this.$t('import_failed'), {
|
this.$toast.error(this.$t("import_failed"), {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
parsePostmanCollection(collection, folders = true) {
|
parsePostmanCollection(collection, folders = true) {
|
||||||
let postwomanCollection = folders
|
let postwomanCollection = folders
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
name: '',
|
name: "",
|
||||||
folders: [],
|
folders: [],
|
||||||
requests: [],
|
requests: [],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: {
|
: {
|
||||||
name: '',
|
name: "",
|
||||||
requests: [],
|
requests: [],
|
||||||
}
|
}
|
||||||
for (let collectionItem of collection.item) {
|
for (let collectionItem of collection.item) {
|
||||||
if (collectionItem.request) {
|
if (collectionItem.request) {
|
||||||
if (postwomanCollection[0]) {
|
if (postwomanCollection[0]) {
|
||||||
postwomanCollection[0].name = collection.info ? collection.info.name : ''
|
postwomanCollection[0].name = collection.info ? collection.info.name : ""
|
||||||
postwomanCollection[0].requests.push(this.parsePostmanRequest(collectionItem))
|
postwomanCollection[0].requests.push(this.parsePostmanRequest(collectionItem))
|
||||||
} else {
|
} else {
|
||||||
postwomanCollection.name = collection.name ? collection.name : ''
|
postwomanCollection.name = collection.name ? collection.name : ""
|
||||||
postwomanCollection.requests.push(this.parsePostmanRequest(collectionItem))
|
postwomanCollection.requests.push(this.parsePostmanRequest(collectionItem))
|
||||||
}
|
}
|
||||||
} else if (collectionItem.item) {
|
} else if (collectionItem.item) {
|
||||||
@@ -209,22 +209,22 @@ export default {
|
|||||||
},
|
},
|
||||||
parsePostmanRequest(requestObject) {
|
parsePostmanRequest(requestObject) {
|
||||||
let pwRequest = {
|
let pwRequest = {
|
||||||
url: '',
|
url: "",
|
||||||
path: '',
|
path: "",
|
||||||
method: '',
|
method: "",
|
||||||
auth: '',
|
auth: "",
|
||||||
httpUser: '',
|
httpUser: "",
|
||||||
httpPassword: '',
|
httpPassword: "",
|
||||||
passwordFieldType: 'password',
|
passwordFieldType: "password",
|
||||||
bearerToken: '',
|
bearerToken: "",
|
||||||
headers: [],
|
headers: [],
|
||||||
params: [],
|
params: [],
|
||||||
bodyParams: [],
|
bodyParams: [],
|
||||||
rawParams: '',
|
rawParams: "",
|
||||||
rawInput: false,
|
rawInput: false,
|
||||||
contentType: '',
|
contentType: "",
|
||||||
requestType: '',
|
requestType: "",
|
||||||
name: '',
|
name: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
pwRequest.name = requestObject.name
|
pwRequest.name = requestObject.name
|
||||||
@@ -232,24 +232,24 @@ export default {
|
|||||||
/^(.+:\/\/[^\/]+|{[^\/]+})(\/[^\?]+|).*$/
|
/^(.+:\/\/[^\/]+|{[^\/]+})(\/[^\?]+|).*$/
|
||||||
)
|
)
|
||||||
pwRequest.url = requestObjectUrl[1]
|
pwRequest.url = requestObjectUrl[1]
|
||||||
pwRequest.path = requestObjectUrl[2] ? requestObjectUrl[2] : ''
|
pwRequest.path = requestObjectUrl[2] ? requestObjectUrl[2] : ""
|
||||||
pwRequest.method = requestObject.request.method
|
pwRequest.method = requestObject.request.method
|
||||||
let itemAuth = requestObject.request.auth ? requestObject.request.auth : ''
|
let itemAuth = requestObject.request.auth ? requestObject.request.auth : ""
|
||||||
let authType = itemAuth ? itemAuth.type : ''
|
let authType = itemAuth ? itemAuth.type : ""
|
||||||
if (authType === 'basic') {
|
if (authType === "basic") {
|
||||||
pwRequest.auth = 'Basic Auth'
|
pwRequest.auth = "Basic Auth"
|
||||||
pwRequest.httpUser =
|
pwRequest.httpUser =
|
||||||
itemAuth.basic[0].key === 'username' ? itemAuth.basic[0].value : itemAuth.basic[1].value
|
itemAuth.basic[0].key === "username" ? itemAuth.basic[0].value : itemAuth.basic[1].value
|
||||||
pwRequest.httpPassword =
|
pwRequest.httpPassword =
|
||||||
itemAuth.basic[0].key === 'password' ? itemAuth.basic[0].value : itemAuth.basic[1].value
|
itemAuth.basic[0].key === "password" ? itemAuth.basic[0].value : itemAuth.basic[1].value
|
||||||
} else if (authType === 'oauth2') {
|
} else if (authType === "oauth2") {
|
||||||
pwRequest.auth = 'OAuth 2.0'
|
pwRequest.auth = "OAuth 2.0"
|
||||||
pwRequest.bearerToken =
|
pwRequest.bearerToken =
|
||||||
itemAuth.oauth2[0].key === 'accessToken'
|
itemAuth.oauth2[0].key === "accessToken"
|
||||||
? itemAuth.oauth2[0].value
|
? itemAuth.oauth2[0].value
|
||||||
: itemAuth.oauth2[1].value
|
: itemAuth.oauth2[1].value
|
||||||
} else if (authType === 'bearer') {
|
} else if (authType === "bearer") {
|
||||||
pwRequest.auth = 'Bearer Token'
|
pwRequest.auth = "Bearer Token"
|
||||||
pwRequest.bearerToken = itemAuth.bearer[0].value
|
pwRequest.bearerToken = itemAuth.bearer[0].value
|
||||||
}
|
}
|
||||||
let requestObjectHeaders = requestObject.request.header
|
let requestObjectHeaders = requestObject.request.header
|
||||||
@@ -268,13 +268,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (requestObject.request.body) {
|
if (requestObject.request.body) {
|
||||||
if (requestObject.request.body.mode === 'urlencoded') {
|
if (requestObject.request.body.mode === "urlencoded") {
|
||||||
let params = requestObject.request.body.urlencoded
|
let params = requestObject.request.body.urlencoded
|
||||||
pwRequest.bodyParams = params ? params : []
|
pwRequest.bodyParams = params ? params : []
|
||||||
for (let param of pwRequest.bodyParams) {
|
for (let param of pwRequest.bodyParams) {
|
||||||
delete param.type
|
delete param.type
|
||||||
}
|
}
|
||||||
} else if (requestObject.request.body.mode === 'raw') {
|
} else if (requestObject.request.body.mode === "raw") {
|
||||||
pwRequest.rawInput = true
|
pwRequest.rawInput = true
|
||||||
pwRequest.rawParams = requestObject.request.body.raw
|
pwRequest.rawParams = requestObject.request.body.raw
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ 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>{{ $t('new') }}</span>
|
<span>{{ $t("new") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="displayModalImportExport(true)">
|
<button class="icon" @click="displayModalImportExport(true)">
|
||||||
{{ $t('import_export') }}
|
{{ $t("import_export") }}
|
||||||
</button>
|
</button>
|
||||||
<!-- <a
|
<!-- <a
|
||||||
href="https://github.com/liyasthomas/postwoman/wiki/Collections"
|
href="https://github.com/liyasthomas/postwoman/wiki/Collections"
|
||||||
@@ -89,7 +89,7 @@ TODO:
|
|||||||
<nuxt-link :to="localePath('doc')" :aria-label="$t('documentation')">
|
<nuxt-link :to="localePath('doc')" :aria-label="$t('documentation')">
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">books</i>
|
<i class="material-icons">books</i>
|
||||||
<span>{{ $t('generate_docs') }}</span>
|
<span>{{ $t("generate_docs") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
@@ -107,20 +107,20 @@ ul {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import collection from './collection'
|
import collection from "./collection"
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
collection,
|
collection,
|
||||||
'pw-section': () => import('../section'),
|
"pw-section": () => import("../section"),
|
||||||
addCollection: () => import('./addCollection'),
|
addCollection: () => import("./addCollection"),
|
||||||
addFolder: () => import('./addFolder'),
|
addFolder: () => import("./addFolder"),
|
||||||
editCollection: () => import('./editCollection'),
|
editCollection: () => import("./editCollection"),
|
||||||
editFolder: () => import('./editFolder'),
|
editFolder: () => import("./editFolder"),
|
||||||
editRequest: () => import('./editRequest'),
|
editRequest: () => import("./editRequest"),
|
||||||
importExportCollections: () => import('./importExportCollections'),
|
importExportCollections: () => import("./importExportCollections"),
|
||||||
VirtualList: () => import('vue-virtual-scroll-list'),
|
VirtualList: () => import("vue-virtual-scroll-list"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -145,12 +145,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this._keyListener = function(e) {
|
this._keyListener = function(e) {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === "Escape") {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.showModalAdd = this.showModalEdit = this.showModalImportExport = this.showModalAddFolder = this.showModalEditFolder = this.showModalEditRequest = false
|
this.showModalAdd = this.showModalEdit = this.showModalImportExport = this.showModalAddFolder = this.showModalEditFolder = this.showModalEditRequest = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener('keydown', this._keyListener.bind(this))
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
displayModalAdd(shouldDisplay) {
|
displayModalAdd(shouldDisplay) {
|
||||||
@@ -226,7 +226,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.removeEventListener('keydown', this._keyListener)
|
document.removeEventListener("keydown", this._keyListener)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
<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>{{ $t('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>{{ $t('delete') }}</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,11 +51,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectRequest() {
|
selectRequest() {
|
||||||
this.$store.commit('postwoman/selectRequest', { request: this.request })
|
this.$store.commit("postwoman/selectRequest", { request: this.request })
|
||||||
},
|
},
|
||||||
removeRequest() {
|
removeRequest() {
|
||||||
if (!confirm('Are you sure you want to remove this request?')) return
|
if (!confirm("Are you sure you want to remove this request?")) return
|
||||||
this.$store.commit('postwoman/removeRequest', {
|
this.$store.commit("postwoman/removeRequest", {
|
||||||
collectionIndex: this.collectionIndex,
|
collectionIndex: this.collectionIndex,
|
||||||
folderIndex: this.folderIndex,
|
folderIndex: this.folderIndex,
|
||||||
requestIndex: this.requestIndex,
|
requestIndex: this.requestIndex,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('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">{{ $t('label') }}</label>
|
<label for="selectLabel">{{ $t("label") }}</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="selectLabel"
|
id="selectLabel"
|
||||||
@@ -25,11 +25,11 @@
|
|||||||
:placeholder="defaultRequestName"
|
:placeholder="defaultRequestName"
|
||||||
@keyup.enter="saveRequestAs"
|
@keyup.enter="saveRequestAs"
|
||||||
/>
|
/>
|
||||||
<label for="selectCollection">{{ $t('collection') }}</label>
|
<label for="selectCollection">{{ $t("collection") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectCollection" v-model="requestData.collectionIndex">
|
<select type="text" id="selectCollection" v-model="requestData.collectionIndex">
|
||||||
<option :key="undefined" :value="undefined" hidden disabled selected>{{
|
<option :key="undefined" :value="undefined" hidden disabled selected>{{
|
||||||
$t('select_collection')
|
$t("select_collection")
|
||||||
}}</option>
|
}}</option>
|
||||||
<option
|
<option
|
||||||
v-for="(collection, index) in $store.state.postwoman.collections"
|
v-for="(collection, index) in $store.state.postwoman.collections"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectFolder">{{ $t('folder') }}</label>
|
<label for="selectFolder">{{ $t("folder") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectFolder" v-model="requestData.folderIndex">
|
<select type="text" id="selectFolder" v-model="requestData.folderIndex">
|
||||||
<option :key="undefined" :value="undefined">/</option>
|
<option :key="undefined" :value="undefined">/</option>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<label for="selectRequest">{{ $t('request') }}</label>
|
<label for="selectRequest">{{ $t("request") }}</label>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<select type="text" id="selectRequest" v-model="requestData.requestIndex">
|
<select type="text" id="selectRequest" v-model="requestData.requestIndex">
|
||||||
<option :key="undefined" :value="undefined">/</option>
|
<option :key="undefined" :value="undefined">/</option>
|
||||||
@@ -66,10 +66,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveRequestAs">
|
<button class="icon primary" @click="saveRequestAs">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -86,11 +86,11 @@ export default {
|
|||||||
editingRequest: Object,
|
editingRequest: Object,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
defaultRequestName: 'My Request',
|
defaultRequestName: "My Request",
|
||||||
requestData: {
|
requestData: {
|
||||||
name: undefined,
|
name: undefined,
|
||||||
collectionIndex: undefined,
|
collectionIndex: undefined,
|
||||||
@@ -100,13 +100,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'requestData.collectionIndex': function resetFolderAndRequestIndex() {
|
"requestData.collectionIndex": function resetFolderAndRequestIndex() {
|
||||||
// if user choosen some folder, than selected other collection, which doesn't have any folders
|
// if user choosen some folder, than selected other collection, which doesn't have any folders
|
||||||
// than `requestUpdateData.folderIndex` won't be reseted
|
// than `requestUpdateData.folderIndex` won't be reseted
|
||||||
this.$data.requestData.folderIndex = undefined
|
this.$data.requestData.folderIndex = undefined
|
||||||
this.$data.requestData.requestIndex = undefined
|
this.$data.requestData.requestIndex = undefined
|
||||||
},
|
},
|
||||||
'requestData.folderIndex': function resetRequestIndex() {
|
"requestData.folderIndex": function resetRequestIndex() {
|
||||||
this.$data.requestData.requestIndex = undefined
|
this.$data.requestData.requestIndex = undefined
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -159,8 +159,8 @@ export default {
|
|||||||
saveRequestAs() {
|
saveRequestAs() {
|
||||||
const userDidntSpecifyCollection = this.$data.requestData.collectionIndex === undefined
|
const userDidntSpecifyCollection = this.$data.requestData.collectionIndex === undefined
|
||||||
if (userDidntSpecifyCollection) {
|
if (userDidntSpecifyCollection) {
|
||||||
this.$toast.error(this.$t('select_collection'), {
|
this.$toast.error(this.$t("select_collection"), {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ export default {
|
|||||||
collection: this.$data.requestData.collectionIndex,
|
collection: this.$data.requestData.collectionIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.commit('postwoman/saveRequestAs', {
|
this.$store.commit("postwoman/saveRequestAs", {
|
||||||
request: requestUpdated,
|
request: requestUpdated,
|
||||||
collectionIndex: this.$data.requestData.collectionIndex,
|
collectionIndex: this.$data.requestData.collectionIndex,
|
||||||
folderIndex: this.$data.requestData.folderIndex,
|
folderIndex: this.$data.requestData.folderIndex,
|
||||||
@@ -182,8 +182,8 @@ export default {
|
|||||||
this.syncCollections()
|
this.syncCollections()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
this.$emit('hide-model') // for backward compatibility // TODO: use fixed event
|
this.$emit("hide-model") // for backward compatibility // TODO: use fixed event
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('new_environment') }}</h3>
|
<h3 class="title">{{ $t("new_environment") }}</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">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="addNewEnvironment">
|
<button class="icon primary" @click="addNewEnvironment">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -67,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
addNewEnvironment() {
|
addNewEnvironment() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info(this.$t('invalid_environment_name'))
|
this.$toast.info(this.$t("invalid_environment_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let newEnvironment = [
|
let newEnvironment = [
|
||||||
@@ -76,16 +76,16 @@ export default {
|
|||||||
variables: [],
|
variables: [],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
this.$store.commit('postwoman/importAddEnvironments', {
|
this.$store.commit("postwoman/importAddEnvironments", {
|
||||||
environments: newEnvironment,
|
environments: newEnvironment,
|
||||||
confirmation: 'Environment added',
|
confirmation: "Environment added",
|
||||||
})
|
})
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
this.syncEnvironments()
|
this.syncEnvironments()
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$data.name = undefined
|
this.$data.name = undefined
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('edit_environment') }}</h3>
|
<h3 class="title">{{ $t("edit_environment") }}</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>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="variableList">{{ $t('env_variable_list') }}</label>
|
<label for="variableList">{{ $t("env_variable_list") }}</label>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="clearContent($event)" v-tooltip.bottom="$t('clear')">
|
<button class="icon" @click="clearContent($event)" v-tooltip.bottom="$t('clear')">
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<button class="icon" @click="addEnvironmentVariable">
|
<button class="icon" @click="addEnvironmentVariable">
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
<span>{{ $t('add_new') }}</span>
|
<span>{{ $t("add_new") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -102,10 +102,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="saveEnvironment">
|
<button class="icon primary" @click="saveEnvironment">
|
||||||
{{ $t('save') }}
|
{{ $t("save") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import textareaAutoHeight from '../../directives/textareaAutoHeight'
|
import textareaAutoHeight from "../../directives/textareaAutoHeight"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
directives: {
|
directives: {
|
||||||
@@ -126,7 +126,7 @@ export default {
|
|||||||
editingEnvironmentIndex: Number,
|
editingEnvironmentIndex: Number,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -139,7 +139,7 @@ export default {
|
|||||||
this.$props.editingEnvironment && this.$props.editingEnvironment.name
|
this.$props.editingEnvironment && this.$props.editingEnvironment.name
|
||||||
? this.$props.editingEnvironment.name
|
? this.$props.editingEnvironment.name
|
||||||
: undefined
|
: undefined
|
||||||
this.$store.commit('postwoman/setEditingEnvironment', this.$props.editingEnvironment)
|
this.$store.commit("postwoman/setEditingEnvironment", this.$props.editingEnvironment)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -148,21 +148,21 @@ export default {
|
|||||||
},
|
},
|
||||||
variableString() {
|
variableString() {
|
||||||
const result = this.editingEnvCopy.variables
|
const result = this.editingEnvCopy.variables
|
||||||
return result === '' ? '' : JSON.stringify(result)
|
return result === "" ? "" : JSON.stringify(result)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clearContent(e) {
|
clearContent(e) {
|
||||||
this.$store.commit('postwoman/removeVariables', [])
|
this.$store.commit("postwoman/removeVariables", [])
|
||||||
e.target.innerHTML = this.doneButton
|
e.target.innerHTML = this.doneButton
|
||||||
this.$toast.info(this.$t('cleared'), {
|
this.$toast.info(this.$t("cleared"), {
|
||||||
icon: 'clear_all',
|
icon: "clear_all",
|
||||||
})
|
})
|
||||||
setTimeout(() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
setTimeout(() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
||||||
},
|
},
|
||||||
addEnvironmentVariable() {
|
addEnvironmentVariable() {
|
||||||
let value = { key: '', value: '' }
|
let value = { key: "", value: "" }
|
||||||
this.$store.commit('postwoman/addVariable', value)
|
this.$store.commit("postwoman/addVariable", value)
|
||||||
},
|
},
|
||||||
removeEnvironmentVariable(index) {
|
removeEnvironmentVariable(index) {
|
||||||
let variableIndex = index
|
let variableIndex = index
|
||||||
@@ -171,13 +171,13 @@ export default {
|
|||||||
(variable, index) => variableIndex !== index
|
(variable, index) => variableIndex !== index
|
||||||
)
|
)
|
||||||
|
|
||||||
this.$store.commit('postwoman/removeVariable', newVariables)
|
this.$store.commit("postwoman/removeVariable", newVariables)
|
||||||
this.$toast.error(this.$t('deleted'), {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: 'delete',
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('undo'),
|
text: this.$t("undo"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.$store.commit('postwoman/removeVariable', oldVariables)
|
this.$store.commit("postwoman/removeVariable", oldVariables)
|
||||||
toastObject.remove()
|
toastObject.remove()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -185,22 +185,22 @@ export default {
|
|||||||
},
|
},
|
||||||
saveEnvironment() {
|
saveEnvironment() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info(this.$t('invalid_environment_name'))
|
this.$toast.info(this.$t("invalid_environment_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const environmentUpdated = {
|
const environmentUpdated = {
|
||||||
...this.editingEnvCopy,
|
...this.editingEnvCopy,
|
||||||
name: this.$data.name,
|
name: this.$data.name,
|
||||||
}
|
}
|
||||||
this.$store.commit('postwoman/saveEnvironment', {
|
this.$store.commit("postwoman/saveEnvironment", {
|
||||||
environment: environmentUpdated,
|
environment: environmentUpdated,
|
||||||
environmentIndex: this.$props.editingEnvironmentIndex,
|
environmentIndex: this.$props.editingEnvironmentIndex,
|
||||||
})
|
})
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$data.name = undefined
|
this.$data.name = undefined
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="$emit('edit-environment')" v-close-popover>
|
<button class="icon" @click="$emit('edit-environment')" v-close-popover>
|
||||||
<i class="material-icons">create</i>
|
<i class="material-icons">create</i>
|
||||||
<span>{{ $t('edit') }}</span>
|
<span>{{ $t("edit") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="removeEnvironment" v-close-popover>
|
<button class="icon" @click="removeEnvironment" v-close-popover>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>{{ $t('delete') }}</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -49,8 +49,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeEnvironment() {
|
removeEnvironment() {
|
||||||
if (!confirm('Are you sure you want to remove this environment?')) return
|
if (!confirm("Are you sure you want to remove this environment?")) return
|
||||||
this.$store.commit('postwoman/removeEnvironment', this.environmentIndex)
|
this.$store.commit("postwoman/removeEnvironment", this.environmentIndex)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
>
|
>
|
||||||
<button :disabled="!fb.currentUser" class="icon" @click="syncEnvironments">
|
<button :disabled="!fb.currentUser" class="icon" @click="syncEnvironments">
|
||||||
<i class="material-icons">folder_shared</i>
|
<i class="material-icons">folder_shared</i>
|
||||||
<span>{{ $t('import_from_sync') }}</span>
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
v-tooltip="$t('replace_current')"
|
v-tooltip="$t('replace_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">create_new_folder</i>
|
<i class="material-icons">create_new_folder</i>
|
||||||
<span>{{ $t('replace_json') }}</span>
|
<span>{{ $t("replace_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="replaceWithJSON"
|
@change="replaceWithJSON"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
v-tooltip="$t('preserve_current')"
|
v-tooltip="$t('preserve_current')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">folder_special</i>
|
<i class="material-icons">folder_special</i>
|
||||||
<span>{{ $t('import_json') }}</span>
|
<span>{{ $t("import_json") }}</span>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="importFromJSON"
|
@change="importFromJSON"
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
<button class="icon" @click="hideModal">
|
<button class="icon" @click="hideModal">
|
||||||
{{ $t('cancel') }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="icon primary" @click="exportJSON" v-tooltip="$t('download_file')">
|
<button class="icon primary" @click="exportJSON" v-tooltip="$t('download_file')">
|
||||||
{{ $t('export') }}
|
{{ $t("export") }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
show: Boolean,
|
show: Boolean,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
modal: () => import('../../components/modal'),
|
modal: () => import("../../components/modal"),
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
environmentJson() {
|
environmentJson() {
|
||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$emit('hide-modal')
|
this.$emit("hide-modal")
|
||||||
},
|
},
|
||||||
openDialogChooseFileToReplaceWith() {
|
openDialogChooseFileToReplaceWith() {
|
||||||
this.$refs.inputChooseFileToReplaceWith.click()
|
this.$refs.inputChooseFileToReplaceWith.click()
|
||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
reader.onload = event => {
|
reader.onload = event => {
|
||||||
let content = event.target.result
|
let content = event.target.result
|
||||||
let environments = JSON.parse(content)
|
let environments = JSON.parse(content)
|
||||||
this.$store.commit('postwoman/replaceEnvironments', environments)
|
this.$store.commit("postwoman/replaceEnvironments", environments)
|
||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
@@ -120,8 +120,8 @@ export default {
|
|||||||
reader.onload = event => {
|
reader.onload = event => {
|
||||||
let content = event.target.result
|
let content = event.target.result
|
||||||
let environments = JSON.parse(content)
|
let environments = JSON.parse(content)
|
||||||
let confirmation = this.$t('file_imported')
|
let confirmation = this.$t("file_imported")
|
||||||
this.$store.commit('postwoman/importAddEnvironments', {
|
this.$store.commit("postwoman/importAddEnvironments", {
|
||||||
environments,
|
environments,
|
||||||
confirmation,
|
confirmation,
|
||||||
})
|
})
|
||||||
@@ -130,29 +130,29 @@ export default {
|
|||||||
},
|
},
|
||||||
exportJSON() {
|
exportJSON() {
|
||||||
let text = this.environmentJson
|
let text = this.environmentJson
|
||||||
text = text.replace(/\n/g, '\r\n')
|
text = text.replace(/\n/g, "\r\n")
|
||||||
let blob = new Blob([text], {
|
let blob = new Blob([text], {
|
||||||
type: 'text/json',
|
type: "text/json",
|
||||||
})
|
})
|
||||||
let anchor = document.createElement('a')
|
let anchor = document.createElement("a")
|
||||||
anchor.download = 'postwoman-environment.json'
|
anchor.download = "postwoman-environment.json"
|
||||||
anchor.href = window.URL.createObjectURL(blob)
|
anchor.href = window.URL.createObjectURL(blob)
|
||||||
anchor.target = '_blank'
|
anchor.target = "_blank"
|
||||||
anchor.style.display = 'none'
|
anchor.style.display = "none"
|
||||||
document.body.appendChild(anchor)
|
document.body.appendChild(anchor)
|
||||||
anchor.click()
|
anchor.click()
|
||||||
document.body.removeChild(anchor)
|
document.body.removeChild(anchor)
|
||||||
this.$toast.success(this.$t('download_started'), {
|
this.$toast.success(this.$t("download_started"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
this.$store.commit('postwoman/replaceEnvironments', fb.currentEnvironments)
|
this.$store.commit("postwoman/replaceEnvironments", fb.currentEnvironments)
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
},
|
},
|
||||||
fileImported() {
|
fileImported() {
|
||||||
this.$toast.info(this.$t('file_imported'), {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: 'folder_shared',
|
icon: "folder_shared",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
<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>{{ $t('new') }}</span>
|
<span>{{ $t("new") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="displayModalImportExport(true)">
|
<button class="icon" @click="displayModalImportExport(true)">
|
||||||
{{ $t('import_export') }}
|
{{ $t("import_export") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,8 +62,8 @@ ul {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import environment from './environment'
|
import environment from "./environment"
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
const updateOnLocalStorage = (propertyName, property) =>
|
const updateOnLocalStorage = (propertyName, property) =>
|
||||||
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
||||||
@@ -71,11 +71,11 @@ const updateOnLocalStorage = (propertyName, property) =>
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
environment,
|
environment,
|
||||||
'pw-section': () => import('../section'),
|
"pw-section": () => import("../section"),
|
||||||
addEnvironment: () => import('./addEnvironment'),
|
addEnvironment: () => import("./addEnvironment"),
|
||||||
editEnvironment: () => import('./editEnvironment'),
|
editEnvironment: () => import("./editEnvironment"),
|
||||||
importExportEnvironment: () => import('./importExportEnvironment'),
|
importExportEnvironment: () => import("./importExportEnvironment"),
|
||||||
VirtualList: () => import('vue-virtual-scroll-list'),
|
VirtualList: () => import("vue-virtual-scroll-list"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -93,12 +93,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this._keyListener = function(e) {
|
this._keyListener = function(e) {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === "Escape") {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.showModalImportExport = false
|
this.showModalImportExport = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener('keydown', this._keyListener.bind(this))
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
displayModalAdd(shouldDisplay) {
|
displayModalAdd(shouldDisplay) {
|
||||||
@@ -131,7 +131,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.removeEventListener('keydown', this._keyListener)
|
document.removeEventListener("keydown", this._keyListener)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li class="info">
|
<li class="info">
|
||||||
<label>
|
<label>
|
||||||
{{ feed.label || $t('no_label') }}
|
{{ feed.label || $t("no_label") }}
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<button class="icon" @click="deleteFeed(feed)">
|
<button class="icon" @click="deleteFeed(feed)">
|
||||||
@@ -19,14 +19,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="show-on-large-screen">
|
<div class="show-on-large-screen">
|
||||||
<li class="info clamb-3">
|
<li class="info clamb-3">
|
||||||
<label>{{ feed.message || $t('empty') }}</label>
|
<label>{{ feed.message || $t("empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</virtual-list>
|
</virtual-list>
|
||||||
<ul v-else>
|
<ul v-else>
|
||||||
<li>
|
<li>
|
||||||
<label class="info">{{ $t('empty') }}</label>
|
<label class="info">{{ $t("empty") }}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
@@ -55,11 +55,11 @@ ol {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
VirtualList: () => import('vue-virtual-scroll-list'),
|
VirtualList: () => import("vue-virtual-scroll-list"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -69,8 +69,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
deleteFeed(feed) {
|
deleteFeed(feed) {
|
||||||
fb.deleteFeed(feed.id)
|
fb.deleteFeed(feed.id)
|
||||||
this.$toast.error(this.$t('deleted'), {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: 'delete',
|
icon: "delete",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ ol {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import firebase from 'firebase/app'
|
import firebase from "firebase/app"
|
||||||
import { fb } from '../../functions/fb'
|
import { fb } from "../../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -59,16 +59,16 @@ export default {
|
|||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(({ additionalUserInfo }) => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('yes'),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings('syncHistory', false)
|
fb.writeSettings("syncHistory", false)
|
||||||
fb.writeSettings('syncCollections', true)
|
fb.writeSettings("syncCollections", true)
|
||||||
this.$router.push({ path: '/settings' })
|
this.$router.push({ path: "/settings" })
|
||||||
toastObject.remove()
|
toastObject.remove()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -77,7 +77,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -88,16 +88,16 @@ export default {
|
|||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(({ additionalUserInfo }) => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('yes'),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings('syncHistory', false)
|
fb.writeSettings("syncHistory", false)
|
||||||
fb.writeSettings('syncCollections', true)
|
fb.writeSettings("syncCollections", true)
|
||||||
this.$router.push({ path: '/settings' })
|
this.$router.push({ path: "/settings" })
|
||||||
toastObject.remove()
|
toastObject.remove()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import typelink from './typelink'
|
import typelink from "./typelink"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-deprecated" v-if="gqlField.isDeprecated">
|
<div class="field-deprecated" v-if="gqlField.isDeprecated">
|
||||||
{{ $t('deprecated') }}
|
{{ $t("deprecated") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import typelink from './typelink'
|
import typelink from "./typelink"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -68,11 +68,11 @@ export default {
|
|||||||
return (
|
return (
|
||||||
acc +
|
acc +
|
||||||
`${arg.name}: ${arg.type.toString()}${
|
`${arg.name}: ${arg.type.toString()}${
|
||||||
index !== this.gqlField.args.length - 1 ? ', ' : ''
|
index !== this.gqlField.args.length - 1 ? ", " : ""
|
||||||
}`
|
}`
|
||||||
)
|
)
|
||||||
}, '')
|
}, "")
|
||||||
const argsString = args.length > 0 ? `(${args})` : ''
|
const argsString = args.length > 0 ? `(${args})` : ""
|
||||||
return `${this.gqlField.name}${argsString}: ${this.gqlField.type.toString()}`
|
return `${this.gqlField.name}${argsString}: ${this.gqlField.type.toString()}`
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -3,20 +3,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const DEFAULT_THEME = 'twilight'
|
const DEFAULT_THEME = "twilight"
|
||||||
|
|
||||||
import ace from 'ace-builds'
|
import ace from "ace-builds"
|
||||||
import * as gql from 'graphql'
|
import * as gql from "graphql"
|
||||||
import { getAutocompleteSuggestions } from 'graphql-language-service-interface'
|
import { getAutocompleteSuggestions } from "graphql-language-service-interface"
|
||||||
import 'ace-builds/webpack-resolver'
|
import "ace-builds/webpack-resolver"
|
||||||
import 'ace-builds/src-noconflict/ext-language_tools'
|
import "ace-builds/src-noconflict/ext-language_tools"
|
||||||
import debounce from '../../functions/utils/debounce'
|
import debounce from "../../functions/utils/debounce"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: "",
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lang: {
|
lang: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'json',
|
default: "json",
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editor: null,
|
editor: null,
|
||||||
cacheValue: '',
|
cacheValue: "",
|
||||||
validationSchema: null,
|
validationSchema: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
let langTools = ace.require('ace/ext/language_tools')
|
let langTools = ace.require("ace/ext/language_tools")
|
||||||
|
|
||||||
const editor = ace.edit(this.$refs.editor, {
|
const editor = ace.edit(this.$refs.editor, {
|
||||||
theme: `ace/theme/${this.defineTheme()}`,
|
theme: `ace/theme/${this.defineTheme()}`,
|
||||||
@@ -99,9 +99,9 @@ export default {
|
|||||||
this.editor = editor
|
this.editor = editor
|
||||||
this.cacheValue = this.value
|
this.cacheValue = this.value
|
||||||
|
|
||||||
editor.on('change', () => {
|
editor.on("change", () => {
|
||||||
const content = editor.getValue()
|
const content = editor.getValue()
|
||||||
this.$emit('input', content)
|
this.$emit("input", content)
|
||||||
this.parseContents(content)
|
this.parseContents(content)
|
||||||
this.cacheValue = content
|
this.cacheValue = content
|
||||||
})
|
})
|
||||||
@@ -124,7 +124,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
parseContents: debounce(function(content) {
|
parseContents: debounce(function(content) {
|
||||||
if (content !== '') {
|
if (content !== "") {
|
||||||
try {
|
try {
|
||||||
const doc = gql.parse(content)
|
const doc = gql.parse(content)
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
row: locations[0].line - 1,
|
row: locations[0].line - 1,
|
||||||
column: locations[0].column - 1,
|
column: locations[0].column - 1,
|
||||||
text: message,
|
text: message,
|
||||||
type: 'error',
|
type: "error",
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
row: e.locations[0].line - 1,
|
row: e.locations[0].line - 1,
|
||||||
column: e.locations[0].column - 1,
|
column: e.locations[0].column - 1,
|
||||||
text: e.message,
|
text: e.message,
|
||||||
type: 'error',
|
type: "error",
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="gqlType.getFields">
|
<div v-if="gqlType.getFields">
|
||||||
<h5>{{ $t('fields') }}</h5>
|
<h5>{{ $t("fields") }}</h5>
|
||||||
<div v-for="field in gqlType.getFields()" :key="field.name">
|
<div v-for="field in gqlType.getFields()" :key="field.name">
|
||||||
<gql-field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
|
<gql-field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
|
||||||
</div>
|
</div>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
'gql-field': () => import('./field'),
|
"gql-field": () => import("./field"),
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.typelink {
|
.typelink {
|
||||||
color: var(--ac-color);
|
color: var(--ac-color);
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: "Roboto Mono", monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ entry.star ? 'star' : 'star_border' }}
|
{{ entry.star ? "star" : "star_border" }}
|
||||||
</i>
|
</i>
|
||||||
</button>
|
</button>
|
||||||
<li>
|
<li>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">restore</i>
|
<i class="material-icons">restore</i>
|
||||||
<span>{{ $t('restore') }}</span>
|
<span>{{ $t("restore") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
<span>{{ $t('delete') }}</span>
|
<span>{{ $t("delete") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -164,11 +164,11 @@
|
|||||||
</virtual-list>
|
</virtual-list>
|
||||||
<ul :class="{ hidden: filteredHistory.length != 0 || history.length === 0 }">
|
<ul :class="{ hidden: filteredHistory.length != 0 || history.length === 0 }">
|
||||||
<li>
|
<li>
|
||||||
<label>{{ $t('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">
|
||||||
{{ $t('history_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">
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
@click="enableHistoryClearing"
|
@click="enableHistoryClearing"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
<span>{{ $t('clear_all') }}</span>
|
<span>{{ $t("clear_all") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<button class="tooltip-target icon" v-tooltip="$t('sort')">
|
<button class="tooltip-target icon" v-tooltip="$t('sort')">
|
||||||
@@ -189,45 +189,45 @@
|
|||||||
<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>{{ $t('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>{{ $t('time') }}</span>
|
<span>{{ $t("time") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="sort_by_status_code()" v-close-popover>
|
<button class="icon" @click="sort_by_status_code()" v-close-popover>
|
||||||
<i class="material-icons">assistant</i>
|
<i class="material-icons">assistant</i>
|
||||||
<span>{{ $t('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>{{ $t('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>{{ $t('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>{{ $t('duration') }}</span>
|
<span>{{ $t("duration") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="toggleCollapse()">
|
<button class="icon" @click="toggleCollapse()">
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ !showMore ? 'first_page' : 'last_page' }}
|
{{ !showMore ? "first_page" : "last_page" }}
|
||||||
</i>
|
</i>
|
||||||
<span>{{ !showMore ? $t('show_more') : $t('hide_more') }}</span>
|
<span>{{ !showMore ? $t("show_more") : $t("hide_more") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-wrap" v-else>
|
<div class="flex-wrap" v-else>
|
||||||
<label for="clear-history-button" class="info">
|
<label for="clear-history-button" class="info">
|
||||||
{{ $t('are_you_sure') }}
|
{{ $t("are_you_sure") }}
|
||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
@@ -295,7 +295,7 @@ ol {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: "Roboto Mono", monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
@@ -320,24 +320,24 @@ ol {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { findStatusGroup } from '../pages/index'
|
import { findStatusGroup } from "../pages/index"
|
||||||
import { fb } from '../functions/fb'
|
import { fb } from "../functions/fb"
|
||||||
|
|
||||||
const updateOnLocalStorage = (propertyName, property) =>
|
const updateOnLocalStorage = (propertyName, property) =>
|
||||||
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
'pw-section': () => import('./section'),
|
"pw-section": () => import("./section"),
|
||||||
VirtualList: () => import('vue-virtual-scroll-list'),
|
VirtualList: () => import("vue-virtual-scroll-list"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
history:
|
history:
|
||||||
fb.currentUser !== null
|
fb.currentUser !== null
|
||||||
? fb.currentHistory
|
? fb.currentHistory
|
||||||
: JSON.parse(window.localStorage.getItem('history')) || [],
|
: JSON.parse(window.localStorage.getItem("history")) || [],
|
||||||
filterText: '',
|
filterText: "",
|
||||||
showFilter: false,
|
showFilter: false,
|
||||||
isClearingHistory: false,
|
isClearingHistory: false,
|
||||||
reverse_sort_label: false,
|
reverse_sort_label: false,
|
||||||
@@ -353,12 +353,12 @@ export default {
|
|||||||
this.history =
|
this.history =
|
||||||
fb.currentUser !== null
|
fb.currentUser !== null
|
||||||
? fb.currentHistory
|
? fb.currentHistory
|
||||||
: JSON.parse(window.localStorage.getItem('history')) || []
|
: JSON.parse(window.localStorage.getItem("history")) || []
|
||||||
return this.history.filter(entry => {
|
return this.history.filter(entry => {
|
||||||
const filterText = this.filterText.toLowerCase()
|
const filterText = this.filterText.toLowerCase()
|
||||||
return Object.keys(entry).some(key => {
|
return Object.keys(entry).some(key => {
|
||||||
let value = entry[key]
|
let value = entry[key]
|
||||||
value = typeof value !== 'string' ? value.toString() : value
|
value = typeof value !== "string" ? value.toString() : value
|
||||||
return value.toLowerCase().includes(filterText)
|
return value.toLowerCase().includes(filterText)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -370,21 +370,21 @@ export default {
|
|||||||
fb.clearHistory()
|
fb.clearHistory()
|
||||||
}
|
}
|
||||||
this.history = []
|
this.history = []
|
||||||
this.filterText = ''
|
this.filterText = ""
|
||||||
this.disableHistoryClearing()
|
this.disableHistoryClearing()
|
||||||
updateOnLocalStorage('history', this.history)
|
updateOnLocalStorage("history", this.history)
|
||||||
this.$toast.error(this.$t('history_deleted'), {
|
this.$toast.error(this.$t("history_deleted"), {
|
||||||
icon: 'delete',
|
icon: "delete",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
useHistory(entry) {
|
useHistory(entry) {
|
||||||
this.$emit('useHistory', entry)
|
this.$emit("useHistory", entry)
|
||||||
},
|
},
|
||||||
findEntryStatus(entry) {
|
findEntryStatus(entry) {
|
||||||
const foundStatusGroup = findStatusGroup(entry.status)
|
const foundStatusGroup = findStatusGroup(entry.status)
|
||||||
return (
|
return (
|
||||||
foundStatusGroup || {
|
foundStatusGroup || {
|
||||||
className: '',
|
className: "",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -394,16 +394,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.history.splice(this.history.indexOf(entry), 1)
|
this.history.splice(this.history.indexOf(entry), 1)
|
||||||
if (this.history.length === 0) {
|
if (this.history.length === 0) {
|
||||||
this.filterText = ''
|
this.filterText = ""
|
||||||
}
|
}
|
||||||
updateOnLocalStorage('history', this.history)
|
updateOnLocalStorage("history", this.history)
|
||||||
this.$toast.error(this.$t('deleted'), {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: 'delete',
|
icon: "delete",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addEntry(entry) {
|
addEntry(entry) {
|
||||||
this.history.push(entry)
|
this.history.push(entry)
|
||||||
updateOnLocalStorage('history', this.history)
|
updateOnLocalStorage("history", this.history)
|
||||||
},
|
},
|
||||||
enableHistoryClearing() {
|
enableHistoryClearing() {
|
||||||
if (!this.history || !this.history.length) return
|
if (!this.history || !this.history.length) return
|
||||||
@@ -415,10 +415,10 @@ export default {
|
|||||||
sort_by_time() {
|
sort_by_time() {
|
||||||
let byDate = this.history.slice(0)
|
let byDate = this.history.slice(0)
|
||||||
byDate.sort((a, b) => {
|
byDate.sort((a, b) => {
|
||||||
let date_a = a.date.split('/')
|
let date_a = a.date.split("/")
|
||||||
let date_b = b.date.split('/')
|
let date_b = b.date.split("/")
|
||||||
let time_a = a.time.split(':')
|
let time_a = a.time.split(":")
|
||||||
let time_b = b.time.split(':')
|
let time_b = b.time.split(":")
|
||||||
let final_a = new Date(date_a[2], date_a[1], date_a[0], time_a[0], time_a[1], time_a[2])
|
let final_a = new Date(date_a[2], date_a[1], date_a[0], time_a[0], time_a[1], time_a[2])
|
||||||
let final_b = new Date(date_b[2], date_b[1], date_b[0], time_b[0], time_b[1], time_b[2])
|
let final_b = new Date(date_b[2], date_b[1], date_b[0], time_b[0], time_b[1], time_b[2])
|
||||||
if (this.reverse_sort_time) return final_b - final_a
|
if (this.reverse_sort_time) return final_b - final_a
|
||||||
@@ -481,7 +481,7 @@ export default {
|
|||||||
fb.toggleStar(entry, !entry.star)
|
fb.toggleStar(entry, !entry.star)
|
||||||
}
|
}
|
||||||
entry.star = !entry.star
|
entry.star = !entry.star
|
||||||
updateOnLocalStorage('history', this.history)
|
updateOnLocalStorage("history", this.history)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<legend @click.prevent="collapse">
|
<legend @click.prevent="collapse">
|
||||||
<span>{{ label }}</span>
|
<span>{{ label }}</span>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ isCollapsed ? 'expand_more' : 'expand_less' }}
|
{{ isCollapsed ? "expand_more" : "expand_less" }}
|
||||||
</i>
|
</i>
|
||||||
</legend>
|
</legend>
|
||||||
<div class="collapsible" :class="{ hidden: collapsed }">
|
<div class="collapsible" :class="{ hidden: collapsed }">
|
||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'Section',
|
default: "Section",
|
||||||
},
|
},
|
||||||
collapsed: {
|
collapsed: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
collapse({ target }) {
|
collapse({ target }) {
|
||||||
const parent = target.parentNode.parentNode
|
const parent = target.parentNode.parentNode
|
||||||
parent.querySelector('.collapsible').classList.toggle('hidden')
|
parent.querySelector(".collapsible").classList.toggle("hidden")
|
||||||
this.isCollapsed = !this.isCollapsed
|
this.isCollapsed = !this.isCollapsed
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toggle() {
|
toggle() {
|
||||||
const containsOnClass = this.$refs.toggle.classList.toggle('on')
|
const containsOnClass = this.$refs.toggle.classList.toggle("on")
|
||||||
this.$emit('change', containsOnClass)
|
this.$emit("change", containsOnClass)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'textareaAutoHeight',
|
name: "textareaAutoHeight",
|
||||||
update({ scrollHeight, clientHeight, style }) {
|
update({ scrollHeight, clientHeight, style }) {
|
||||||
if (scrollHeight !== clientHeight) {
|
if (scrollHeight !== clientHeight) {
|
||||||
style.minHeight = `${scrollHeight}px`
|
style.minHeight = `${scrollHeight}px`
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
const mimeToMode = {
|
const mimeToMode = {
|
||||||
'text/plain': 'plain_text',
|
"text/plain": "plain_text",
|
||||||
'text/html': 'html',
|
"text/html": "html",
|
||||||
'application/xml': 'xml',
|
"application/xml": "xml",
|
||||||
'application/hal+json': 'json',
|
"application/hal+json": "json",
|
||||||
'application/json': 'json',
|
"application/json": "json",
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEditorLangForMimeType(mimeType) {
|
export function getEditorLangForMimeType(mimeType) {
|
||||||
return mimeToMode[mimeType] || 'plain_text'
|
return mimeToMode[mimeType] || "plain_text"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import firebase from 'firebase/app'
|
import firebase from "firebase/app"
|
||||||
import 'firebase/firestore'
|
import "firebase/firestore"
|
||||||
import 'firebase/auth'
|
import "firebase/auth"
|
||||||
|
|
||||||
// Initialize Firebase, copied from cloud console
|
// Initialize Firebase, copied from cloud console
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
apiKey: 'AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM',
|
apiKey: "AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM",
|
||||||
authDomain: 'postwoman-api.firebaseapp.com',
|
authDomain: "postwoman-api.firebaseapp.com",
|
||||||
databaseURL: 'https://postwoman-api.firebaseio.com',
|
databaseURL: "https://postwoman-api.firebaseio.com",
|
||||||
projectId: 'postwoman-api',
|
projectId: "postwoman-api",
|
||||||
storageBucket: 'postwoman-api.appspot.com',
|
storageBucket: "postwoman-api.appspot.com",
|
||||||
messagingSenderId: '421993993223',
|
messagingSenderId: "421993993223",
|
||||||
appId: '1:421993993223:web:ec0baa8ee8c02ffa1fc6a2',
|
appId: "1:421993993223:web:ec0baa8ee8c02ffa1fc6a2",
|
||||||
measurementId: 'G-ERJ6025CEB',
|
measurementId: "G-ERJ6025CEB",
|
||||||
}
|
}
|
||||||
firebase.initializeApp(firebaseConfig)
|
firebase.initializeApp(firebaseConfig)
|
||||||
|
|
||||||
// a reference to the users collection
|
// a reference to the users collection
|
||||||
const usersCollection = firebase.firestore().collection('users')
|
const usersCollection = firebase.firestore().collection("users")
|
||||||
|
|
||||||
// the shared state object that any vue component
|
// the shared state object that any vue component
|
||||||
// can get access to
|
// can get access to
|
||||||
@@ -38,17 +38,17 @@ export const fb = {
|
|||||||
}
|
}
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('feeds')
|
.collection("feeds")
|
||||||
.add(dt)
|
.add(dt)
|
||||||
.catch(e => console.error('error inserting', dt, e))
|
.catch(e => console.error("error inserting", dt, e))
|
||||||
},
|
},
|
||||||
deleteFeed: id => {
|
deleteFeed: id => {
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('feeds')
|
.collection("feeds")
|
||||||
.doc(id)
|
.doc(id)
|
||||||
.delete()
|
.delete()
|
||||||
.catch(e => console.error('error deleting', id, e))
|
.catch(e => console.error("error deleting", id, e))
|
||||||
},
|
},
|
||||||
writeSettings: async (setting, value) => {
|
writeSettings: async (setting, value) => {
|
||||||
const st = {
|
const st = {
|
||||||
@@ -61,31 +61,31 @@ export const fb = {
|
|||||||
}
|
}
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('settings')
|
.collection("settings")
|
||||||
.doc(setting)
|
.doc(setting)
|
||||||
.set(st)
|
.set(st)
|
||||||
.catch(e => console.error('error updating', st, e))
|
.catch(e => console.error("error updating", st, e))
|
||||||
},
|
},
|
||||||
writeHistory: async entry => {
|
writeHistory: async entry => {
|
||||||
const hs = entry
|
const hs = entry
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('history')
|
.collection("history")
|
||||||
.add(hs)
|
.add(hs)
|
||||||
.catch(e => console.error('error inserting', hs, e))
|
.catch(e => console.error("error inserting", hs, e))
|
||||||
},
|
},
|
||||||
deleteHistory: entry => {
|
deleteHistory: entry => {
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('history')
|
.collection("history")
|
||||||
.doc(entry.id)
|
.doc(entry.id)
|
||||||
.delete()
|
.delete()
|
||||||
.catch(e => console.error('error deleting', entry, e))
|
.catch(e => console.error("error deleting", entry, e))
|
||||||
},
|
},
|
||||||
clearHistory: () => {
|
clearHistory: () => {
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('history')
|
.collection("history")
|
||||||
.get()
|
.get()
|
||||||
.then(({ docs }) => {
|
.then(({ docs }) => {
|
||||||
docs.forEach(e => fb.deleteHistory(e))
|
docs.forEach(e => fb.deleteHistory(e))
|
||||||
@@ -94,10 +94,10 @@ export const fb = {
|
|||||||
toggleStar: (entry, value) => {
|
toggleStar: (entry, value) => {
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('history')
|
.collection("history")
|
||||||
.doc(entry.id)
|
.doc(entry.id)
|
||||||
.update({ star: value })
|
.update({ star: value })
|
||||||
.catch(e => console.error('error deleting', entry, e))
|
.catch(e => console.error("error deleting", entry, e))
|
||||||
},
|
},
|
||||||
writeCollections: async collection => {
|
writeCollections: async collection => {
|
||||||
const cl = {
|
const cl = {
|
||||||
@@ -109,10 +109,10 @@ export const fb = {
|
|||||||
}
|
}
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('collections')
|
.collection("collections")
|
||||||
.doc('sync')
|
.doc("sync")
|
||||||
.set(cl)
|
.set(cl)
|
||||||
.catch(e => console.error('error updating', cl, e))
|
.catch(e => console.error("error updating", cl, e))
|
||||||
},
|
},
|
||||||
writeEnvironments: async environment => {
|
writeEnvironments: async environment => {
|
||||||
const ev = {
|
const ev = {
|
||||||
@@ -124,10 +124,10 @@ export const fb = {
|
|||||||
}
|
}
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('environments')
|
.collection("environments")
|
||||||
.doc('sync')
|
.doc("sync")
|
||||||
.set(ev)
|
.set(ev)
|
||||||
.catch(e => console.error('error updating', ev, e))
|
.catch(e => console.error("error updating", ev, e))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,13 +147,13 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.set(us)
|
.set(us)
|
||||||
.catch(e => console.error('error updating', us, e))
|
.catch(e => console.error("error updating", us, e))
|
||||||
})
|
})
|
||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('feeds')
|
.collection("feeds")
|
||||||
.orderBy('createdOn', 'desc')
|
.orderBy("createdOn", "desc")
|
||||||
.onSnapshot(feedsRef => {
|
.onSnapshot(feedsRef => {
|
||||||
const feeds = []
|
const feeds = []
|
||||||
feedsRef.forEach(doc => {
|
feedsRef.forEach(doc => {
|
||||||
@@ -166,7 +166,7 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('settings')
|
.collection("settings")
|
||||||
.onSnapshot(settingsRef => {
|
.onSnapshot(settingsRef => {
|
||||||
const settings = []
|
const settings = []
|
||||||
settingsRef.forEach(doc => {
|
settingsRef.forEach(doc => {
|
||||||
@@ -179,7 +179,7 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('history')
|
.collection("history")
|
||||||
.onSnapshot(historyRef => {
|
.onSnapshot(historyRef => {
|
||||||
const history = []
|
const history = []
|
||||||
historyRef.forEach(doc => {
|
historyRef.forEach(doc => {
|
||||||
@@ -192,7 +192,7 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('collections')
|
.collection("collections")
|
||||||
.onSnapshot(collectionsRef => {
|
.onSnapshot(collectionsRef => {
|
||||||
const collections = []
|
const collections = []
|
||||||
collectionsRef.forEach(doc => {
|
collectionsRef.forEach(doc => {
|
||||||
@@ -205,7 +205,7 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
.doc(fb.currentUser.uid)
|
.doc(fb.currentUser.uid)
|
||||||
.collection('environments')
|
.collection("environments")
|
||||||
.onSnapshot(environmentsRef => {
|
.onSnapshot(environmentsRef => {
|
||||||
const environments = []
|
const environments = []
|
||||||
environmentsRef.forEach(doc => {
|
environmentsRef.forEach(doc => {
|
||||||
|
|||||||
@@ -1,124 +1,124 @@
|
|||||||
export const commonHeaders = [
|
export const commonHeaders = [
|
||||||
'WWW-Authenticate',
|
"WWW-Authenticate",
|
||||||
'Authorization',
|
"Authorization",
|
||||||
'Proxy-Authenticate',
|
"Proxy-Authenticate",
|
||||||
'Proxy-Authorization',
|
"Proxy-Authorization",
|
||||||
'Age',
|
"Age",
|
||||||
'Cache-Control',
|
"Cache-Control",
|
||||||
'Clear-Site-Data',
|
"Clear-Site-Data",
|
||||||
'Expires',
|
"Expires",
|
||||||
'Pragma',
|
"Pragma",
|
||||||
'Warning',
|
"Warning",
|
||||||
'Accept-CH',
|
"Accept-CH",
|
||||||
'Accept-CH-Lifetime',
|
"Accept-CH-Lifetime",
|
||||||
'Early-Data',
|
"Early-Data",
|
||||||
'Content-DPR',
|
"Content-DPR",
|
||||||
'DPR',
|
"DPR",
|
||||||
'Device-Memory',
|
"Device-Memory",
|
||||||
'Save-Data',
|
"Save-Data",
|
||||||
'Viewport-Width',
|
"Viewport-Width",
|
||||||
'Width',
|
"Width",
|
||||||
'Last-Modified',
|
"Last-Modified",
|
||||||
'ETag',
|
"ETag",
|
||||||
'If-Match',
|
"If-Match",
|
||||||
'If-None-Match',
|
"If-None-Match",
|
||||||
'If-Modified-Since',
|
"If-Modified-Since",
|
||||||
'If-Unmodified-Since',
|
"If-Unmodified-Since",
|
||||||
'Vary',
|
"Vary",
|
||||||
'Connection',
|
"Connection",
|
||||||
'Keep-Alive',
|
"Keep-Alive",
|
||||||
'Accept',
|
"Accept",
|
||||||
'Accept-Charset',
|
"Accept-Charset",
|
||||||
'Accept-Encoding',
|
"Accept-Encoding",
|
||||||
'Accept-Language',
|
"Accept-Language",
|
||||||
'Expect',
|
"Expect",
|
||||||
'Max-Forwards',
|
"Max-Forwards",
|
||||||
'Cookie',
|
"Cookie",
|
||||||
'Set-Cookie',
|
"Set-Cookie",
|
||||||
'Cookie2',
|
"Cookie2",
|
||||||
'Set-Cookie2',
|
"Set-Cookie2",
|
||||||
'Access-Control-Allow-Origin',
|
"Access-Control-Allow-Origin",
|
||||||
'Access-Control-Allow-Credentials',
|
"Access-Control-Allow-Credentials",
|
||||||
'Access-Control-Allow-Headers',
|
"Access-Control-Allow-Headers",
|
||||||
'Access-Control-Allow-Methods',
|
"Access-Control-Allow-Methods",
|
||||||
'Access-Control-Expose-Headers',
|
"Access-Control-Expose-Headers",
|
||||||
'Access-Control-Max-Age',
|
"Access-Control-Max-Age",
|
||||||
'Access-Control-Request-Headers',
|
"Access-Control-Request-Headers",
|
||||||
'Access-Control-Request-Method',
|
"Access-Control-Request-Method",
|
||||||
'Origin',
|
"Origin",
|
||||||
'Service-Worker-Allowed',
|
"Service-Worker-Allowed",
|
||||||
'Timing-Allow-Origin',
|
"Timing-Allow-Origin",
|
||||||
'X-Permitted-Cross-Domain-Policies',
|
"X-Permitted-Cross-Domain-Policies",
|
||||||
'DNT',
|
"DNT",
|
||||||
'Tk',
|
"Tk",
|
||||||
'Content-Disposition',
|
"Content-Disposition",
|
||||||
'Content-Length',
|
"Content-Length",
|
||||||
'Content-Type',
|
"Content-Type",
|
||||||
'Content-Encoding',
|
"Content-Encoding",
|
||||||
'Content-Language',
|
"Content-Language",
|
||||||
'Content-Location',
|
"Content-Location",
|
||||||
'Forwarded',
|
"Forwarded",
|
||||||
'X-Forwarded-For',
|
"X-Forwarded-For",
|
||||||
'X-Forwarded-Host',
|
"X-Forwarded-Host",
|
||||||
'X-Forwarded-Proto',
|
"X-Forwarded-Proto",
|
||||||
'Via',
|
"Via",
|
||||||
'Location',
|
"Location",
|
||||||
'From',
|
"From",
|
||||||
'Host',
|
"Host",
|
||||||
'Referer',
|
"Referer",
|
||||||
'Referrer-Policy',
|
"Referrer-Policy",
|
||||||
'User-Agent',
|
"User-Agent",
|
||||||
'Allow',
|
"Allow",
|
||||||
'Server',
|
"Server",
|
||||||
'Accept-Ranges',
|
"Accept-Ranges",
|
||||||
'Range',
|
"Range",
|
||||||
'If-Range',
|
"If-Range",
|
||||||
'Content-Range',
|
"Content-Range",
|
||||||
'Cross-Origin-Opener-Policy',
|
"Cross-Origin-Opener-Policy",
|
||||||
'Cross-Origin-Resource-Policy',
|
"Cross-Origin-Resource-Policy",
|
||||||
'Content-Security-Policy',
|
"Content-Security-Policy",
|
||||||
'Content-Security-Policy-Report-Only',
|
"Content-Security-Policy-Report-Only",
|
||||||
'Expect-CT',
|
"Expect-CT",
|
||||||
'Feature-Policy',
|
"Feature-Policy",
|
||||||
'Public-Key-Pins',
|
"Public-Key-Pins",
|
||||||
'Public-Key-Pins-Report-Only',
|
"Public-Key-Pins-Report-Only",
|
||||||
'Strict-Transport-Security',
|
"Strict-Transport-Security",
|
||||||
'Upgrade-Insecure-Requests',
|
"Upgrade-Insecure-Requests",
|
||||||
'X-Content-Type-Options',
|
"X-Content-Type-Options",
|
||||||
'X-Download-Options',
|
"X-Download-Options",
|
||||||
'X-Frame-Options',
|
"X-Frame-Options",
|
||||||
'X-Powered-By',
|
"X-Powered-By",
|
||||||
'X-XSS-Protection',
|
"X-XSS-Protection",
|
||||||
'Last-Event-ID',
|
"Last-Event-ID",
|
||||||
'NEL',
|
"NEL",
|
||||||
'Ping-From',
|
"Ping-From",
|
||||||
'Ping-To',
|
"Ping-To",
|
||||||
'Report-To',
|
"Report-To",
|
||||||
'Transfer-Encoding',
|
"Transfer-Encoding",
|
||||||
'TE',
|
"TE",
|
||||||
'Trailer',
|
"Trailer",
|
||||||
'Sec-WebSocket-Key',
|
"Sec-WebSocket-Key",
|
||||||
'Sec-WebSocket-Extensions',
|
"Sec-WebSocket-Extensions",
|
||||||
'Sec-WebSocket-Accept',
|
"Sec-WebSocket-Accept",
|
||||||
'Sec-WebSocket-Protocol',
|
"Sec-WebSocket-Protocol",
|
||||||
'Sec-WebSocket-Version',
|
"Sec-WebSocket-Version",
|
||||||
'Accept-Push-Policy',
|
"Accept-Push-Policy",
|
||||||
'Accept-Signature',
|
"Accept-Signature",
|
||||||
'Alt-Svc',
|
"Alt-Svc",
|
||||||
'Date',
|
"Date",
|
||||||
'Large-Allocation',
|
"Large-Allocation",
|
||||||
'Link',
|
"Link",
|
||||||
'Push-Policy',
|
"Push-Policy",
|
||||||
'Retry-After',
|
"Retry-After",
|
||||||
'Signature',
|
"Signature",
|
||||||
'Signed-Headers',
|
"Signed-Headers",
|
||||||
'Server-Timing',
|
"Server-Timing",
|
||||||
'SourceMap',
|
"SourceMap",
|
||||||
'Upgrade',
|
"Upgrade",
|
||||||
'X-DNS-Prefetch-Control',
|
"X-DNS-Prefetch-Control",
|
||||||
'X-Firefox-Spdy',
|
"X-Firefox-Spdy",
|
||||||
'X-Pingback',
|
"X-Pingback",
|
||||||
'X-Requested-With',
|
"X-Requested-With",
|
||||||
'X-Robots-Tag',
|
"X-Robots-Tag",
|
||||||
'X-UA-Compatible',
|
"X-UA-Compatible",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import AxiosStrategy from './strategies/AxiosStrategy'
|
import AxiosStrategy from "./strategies/AxiosStrategy"
|
||||||
import ExtensionStrategy, { hasExtensionInstalled } from './strategies/ExtensionStrategy'
|
import ExtensionStrategy, { hasExtensionInstalled } from "./strategies/ExtensionStrategy"
|
||||||
import FirefoxStrategy from './strategies/FirefoxStrategy'
|
import FirefoxStrategy from "./strategies/FirefoxStrategy"
|
||||||
import ChromeStrategy, { hasChromeExtensionInstalled } from './strategies/ChromeStrategy'
|
import ChromeStrategy, { hasChromeExtensionInstalled } from "./strategies/ChromeStrategy"
|
||||||
|
|
||||||
const isExtensionsAllowed = ({ state }) =>
|
const isExtensionsAllowed = ({ state }) =>
|
||||||
typeof state.postwoman.settings.EXTENSIONS_ENABLED === 'undefined' ||
|
typeof state.postwoman.settings.EXTENSIONS_ENABLED === "undefined" ||
|
||||||
state.postwoman.settings.EXTENSIONS_ENABLED
|
state.postwoman.settings.EXTENSIONS_ENABLED
|
||||||
|
|
||||||
const runAppropriateStrategy = (req, store) => {
|
const runAppropriateStrategy = (req, store) => {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
const PASS = 'PASS'
|
const PASS = "PASS"
|
||||||
const FAIL = 'FAIL'
|
const FAIL = "FAIL"
|
||||||
const ERROR = 'ERROR'
|
const ERROR = "ERROR"
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
[PASS]: { icon: 'check', class: 'success-response' },
|
[PASS]: { icon: "check", class: "success-response" },
|
||||||
[FAIL]: { icon: 'close', class: 'cl-error-response' },
|
[FAIL]: { icon: "close", class: "cl-error-response" },
|
||||||
[ERROR]: { icon: 'close', class: 'cl-error-response' },
|
[ERROR]: { icon: "close", class: "cl-error-response" },
|
||||||
none: { icon: '', class: '' },
|
none: { icon: "", class: "" },
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: probably have to use a more global state for `test`
|
// TODO: probably have to use a more global state for `test`
|
||||||
@@ -15,7 +15,7 @@ export default function runTestScriptWithVariables(script, variables) {
|
|||||||
let pw = {
|
let pw = {
|
||||||
_errors: [],
|
_errors: [],
|
||||||
_testReports: [],
|
_testReports: [],
|
||||||
_report: '',
|
_report: "",
|
||||||
expect(value) {
|
expect(value) {
|
||||||
try {
|
try {
|
||||||
return expect(value, this._testReports)
|
return expect(value, this._testReports)
|
||||||
@@ -29,7 +29,7 @@ export default function runTestScriptWithVariables(script, variables) {
|
|||||||
Object.assign(pw, variables)
|
Object.assign(pw, variables)
|
||||||
|
|
||||||
// run pre-request script within this function so that it has access to the pw object.
|
// 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)
|
||||||
//
|
//
|
||||||
const testReports = pw._testReports.map(item => {
|
const testReports = pw._testReports.map(item => {
|
||||||
if (item.result) {
|
if (item.result) {
|
||||||
@@ -83,9 +83,9 @@ class Expectation {
|
|||||||
_fmtNot(message) {
|
_fmtNot(message) {
|
||||||
// given a string with "(not)" in it, replaces with "not" or "", depending if the expectation is expecting the positive or inverse (this._not)
|
// given a string with "(not)" in it, replaces with "not" or "", depending if the expectation is expecting the positive or inverse (this._not)
|
||||||
if (this.not === true) {
|
if (this.not === true) {
|
||||||
return message.replace('(not)', 'not ')
|
return message.replace("(not)", "not ")
|
||||||
} else {
|
} else {
|
||||||
return message.replace('(not)', '')
|
return message.replace("(not)", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_fail(message) {
|
_fail(message) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default function getEnvironmentVariablesFromScript(script) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// run pre-request script within this function so that it has access to the pw object.
|
// 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
|
return _variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import axios from 'axios'
|
import axios from "axios"
|
||||||
|
|
||||||
const axiosWithProxy = async (req, { state }) => {
|
const axiosWithProxy = async (req, { state }) => {
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
|
state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
req
|
req
|
||||||
)
|
)
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
const EXTENSION_ID = 'amknoiejhlmhancpahfcfcfhllgkpbld'
|
const EXTENSION_ID = "amknoiejhlmhancpahfcfcfhllgkpbld"
|
||||||
|
|
||||||
// Check if the Chrome Extension is present
|
// Check if the Chrome Extension is present
|
||||||
// The Chrome extension injects an empty span to help detection.
|
// The Chrome extension injects an empty span to help detection.
|
||||||
// Also check for the presence of window.chrome object to confirm smooth operations
|
// Also check for the presence of window.chrome object to confirm smooth operations
|
||||||
export const hasChromeExtensionInstalled = () =>
|
export const hasChromeExtensionInstalled = () =>
|
||||||
document.getElementById('chromePWExtensionDetect') !== null
|
document.getElementById("chromePWExtensionDetect") !== null
|
||||||
|
|
||||||
const chromeWithoutProxy = (req, _store) =>
|
const chromeWithoutProxy = (req, _store) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome.runtime.sendMessage(
|
||||||
EXTENSION_ID,
|
EXTENSION_ID,
|
||||||
{
|
{
|
||||||
messageType: 'send-req',
|
messageType: "send-req",
|
||||||
data: {
|
data: {
|
||||||
config: req,
|
config: req,
|
||||||
},
|
},
|
||||||
@@ -31,11 +31,11 @@ const chromeWithProxy = (req, { state }) =>
|
|||||||
chrome.runtime.sendMessage(
|
chrome.runtime.sendMessage(
|
||||||
EXTENSION_ID,
|
EXTENSION_ID,
|
||||||
{
|
{
|
||||||
messageType: 'send-req',
|
messageType: "send-req",
|
||||||
data: {
|
data: {
|
||||||
config: {
|
config: {
|
||||||
method: 'post',
|
method: "post",
|
||||||
url: state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
|
url: state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
data: req,
|
data: req,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
export const hasExtensionInstalled = () =>
|
export const hasExtensionInstalled = () =>
|
||||||
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== 'undefined'
|
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== "undefined"
|
||||||
|
|
||||||
const extensionWithProxy = async (req, { state }) => {
|
const extensionWithProxy = async (req, { state }) => {
|
||||||
const { data } = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest({
|
const { data } = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest({
|
||||||
method: 'post',
|
method: "post",
|
||||||
url: state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
|
url: state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
data: req,
|
data: req,
|
||||||
})
|
})
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const firefoxWithProxy = (req, { state }) =>
|
const firefoxWithProxy = (req, { state }) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const eventListener = event => {
|
const eventListener = event => {
|
||||||
window.removeEventListener('firefoxExtSendRequestComplete', event)
|
window.removeEventListener("firefoxExtSendRequestComplete", event)
|
||||||
|
|
||||||
if (event.detail.error) {
|
if (event.detail.error) {
|
||||||
reject(JSON.parse(event.detail.error))
|
reject(JSON.parse(event.detail.error))
|
||||||
@@ -10,11 +10,11 @@ const firefoxWithProxy = (req, { state }) =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('firefoxExtSendRequestComplete', eventListener)
|
window.addEventListener("firefoxExtSendRequestComplete", eventListener)
|
||||||
|
|
||||||
window.firefoxExtSendRequest({
|
window.firefoxExtSendRequest({
|
||||||
method: 'post',
|
method: "post",
|
||||||
url: state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
|
url: state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
data: req,
|
data: req,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -22,7 +22,7 @@ const firefoxWithProxy = (req, { state }) =>
|
|||||||
const firefoxWithoutProxy = (req, _store) =>
|
const firefoxWithoutProxy = (req, _store) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const eventListener = ({ detail }) => {
|
const eventListener = ({ detail }) => {
|
||||||
window.removeEventListener('firefoxExtSendRequestComplete', eventListener)
|
window.removeEventListener("firefoxExtSendRequestComplete", eventListener)
|
||||||
|
|
||||||
if (detail.error) {
|
if (detail.error) {
|
||||||
reject(JSON.parse(detail.error))
|
reject(JSON.parse(detail.error))
|
||||||
@@ -31,7 +31,7 @@ const firefoxWithoutProxy = (req, _store) =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('firefoxExtSendRequestComplete', eventListener)
|
window.addEventListener("firefoxExtSendRequestComplete", eventListener)
|
||||||
|
|
||||||
window.firefoxExtSendRequest(req)
|
window.firefoxExtSendRequest(req)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ export default function parseTemplateString(string, variables) {
|
|||||||
return string
|
return string
|
||||||
}
|
}
|
||||||
const searchTerm = /<<([^>]*)>>/g // "<<myVariable>>"
|
const searchTerm = /<<([^>]*)>>/g // "<<myVariable>>"
|
||||||
return string.replace(searchTerm, (match, p1) => variables[p1] || '')
|
return string.replace(searchTerm, (match, p1) => variables[p1] || "")
|
||||||
}
|
}
|
||||||
|
|||||||
174
lang/de-DE.js
174
lang/de-DE.js
@@ -1,90 +1,90 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Startseite',
|
home: "Startseite",
|
||||||
realtime: 'Echtzeit',
|
realtime: "Echtzeit",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Einstellungen',
|
settings: "Einstellungen",
|
||||||
request: 'Anfrage',
|
request: "Anfrage",
|
||||||
install_pwa: 'PWA installieren',
|
install_pwa: "PWA installieren",
|
||||||
support_us: 'Unterstütze uns',
|
support_us: "Unterstütze uns",
|
||||||
tweet: 'Twittern',
|
tweet: "Twittern",
|
||||||
options: 'Optionen',
|
options: "Optionen",
|
||||||
communication: 'Kommunikation',
|
communication: "Kommunikation",
|
||||||
endpoint: 'Endpunkt',
|
endpoint: "Endpunkt",
|
||||||
schema: 'Schema',
|
schema: "Schema",
|
||||||
theme: 'Design',
|
theme: "Design",
|
||||||
subscribe: 'Abonnieren',
|
subscribe: "Abonnieren",
|
||||||
choose_language: 'Sprache auswählen',
|
choose_language: "Sprache auswählen",
|
||||||
shortcuts: 'Tastenkombinationen',
|
shortcuts: "Tastenkombinationen",
|
||||||
send_request: 'Anfrage senden',
|
send_request: "Anfrage senden",
|
||||||
save_to_collections: 'In Sammlungen speichern',
|
save_to_collections: "In Sammlungen speichern",
|
||||||
copy_request_link: 'Anfragelink kopieren',
|
copy_request_link: "Anfragelink kopieren",
|
||||||
reset_request: 'Anfrage zurücksetzen',
|
reset_request: "Anfrage zurücksetzen",
|
||||||
support_us_on: 'Unterstütze uns auf',
|
support_us_on: "Unterstütze uns auf",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'JavaScript-Code',
|
javascript_code: "JavaScript-Code",
|
||||||
method: 'Methode',
|
method: "Methode",
|
||||||
path: 'Pfad',
|
path: "Pfad",
|
||||||
label: 'Beschriftung',
|
label: "Beschriftung",
|
||||||
again: 'Wiederholen',
|
again: "Wiederholen",
|
||||||
content_type: 'Content-Typ',
|
content_type: "Content-Typ",
|
||||||
raw_input: 'Rohdaten-Eingabe',
|
raw_input: "Rohdaten-Eingabe",
|
||||||
parameter_list: 'Parameterliste',
|
parameter_list: "Parameterliste",
|
||||||
raw_request_body: 'Rohdaten der Anfrage',
|
raw_request_body: "Rohdaten der Anfrage",
|
||||||
show_code: 'Code zeigen',
|
show_code: "Code zeigen",
|
||||||
hide_code: 'Code ausblenden',
|
hide_code: "Code ausblenden",
|
||||||
show_prerequest_script: 'Preanfrageskript anzeigen',
|
show_prerequest_script: "Preanfrageskript anzeigen",
|
||||||
hide_prerequest_script: 'Preanfrageskript ausblenden',
|
hide_prerequest_script: "Preanfrageskript ausblenden",
|
||||||
authentication: 'Authentifizierung',
|
authentication: "Authentifizierung",
|
||||||
authentication_type: 'Authentifizierungs-Typ',
|
authentication_type: "Authentifizierungs-Typ",
|
||||||
include_in_url: 'In URL einfügen',
|
include_in_url: "In URL einfügen",
|
||||||
parameters: 'Parameter',
|
parameters: "Parameter",
|
||||||
expand_response: 'Antwort ausklappen',
|
expand_response: "Antwort ausklappen",
|
||||||
collapse_response: 'Antwort einklappen',
|
collapse_response: "Antwort einklappen",
|
||||||
hide_preview: 'Vorschau verstecken',
|
hide_preview: "Vorschau verstecken",
|
||||||
preview_html: 'HTML-Vorschau',
|
preview_html: "HTML-Vorschau",
|
||||||
history: 'Verlauf',
|
history: "Verlauf",
|
||||||
collections: 'Kollektionen',
|
collections: "Kollektionen",
|
||||||
import_curl: 'cURL importieren',
|
import_curl: "cURL importieren",
|
||||||
import: 'Importieren',
|
import: "Importieren",
|
||||||
generate_code: 'Code generieren',
|
generate_code: "Code generieren",
|
||||||
request_type: 'Anfrage-Typ',
|
request_type: "Anfrage-Typ",
|
||||||
generated_code: 'Generierter Code',
|
generated_code: "Generierter Code",
|
||||||
status: 'Status',
|
status: "Status",
|
||||||
headers: 'Headers',
|
headers: "Headers",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(warte auf Verbindung)',
|
waiting_for_connection: "(warte auf Verbindung)",
|
||||||
message: 'Nachricht',
|
message: "Nachricht",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Server',
|
server: "Server",
|
||||||
events: 'Ereignisse',
|
events: "Ereignisse",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Schema abrufen',
|
get_schema: "Schema abrufen",
|
||||||
header_list: 'Headerliste',
|
header_list: "Headerliste",
|
||||||
add_new: 'Neu hinzufügen',
|
add_new: "Neu hinzufügen",
|
||||||
response: 'Antwort',
|
response: "Antwort",
|
||||||
query: 'Abfrage',
|
query: "Abfrage",
|
||||||
queries: 'Abfragen',
|
queries: "Abfragen",
|
||||||
query_variables: 'Variablen',
|
query_variables: "Variablen",
|
||||||
mutations: 'Mutationen',
|
mutations: "Mutationen",
|
||||||
subscriptions: 'Abonnements',
|
subscriptions: "Abonnements",
|
||||||
types: 'Typen',
|
types: "Typen",
|
||||||
send: 'Senden',
|
send: "Senden",
|
||||||
background: 'Hintergrund',
|
background: "Hintergrund",
|
||||||
color: 'Farbe',
|
color: "Farbe",
|
||||||
labels: 'Bezeichner',
|
labels: "Bezeichner",
|
||||||
multi_color: 'Mehrfarbig',
|
multi_color: "Mehrfarbig",
|
||||||
enabled: 'Aktiviert',
|
enabled: "Aktiviert",
|
||||||
disabled: 'Deaktiviert',
|
disabled: "Deaktiviert",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting:
|
postwoman_official_proxy_hosting:
|
||||||
'Postwomans offizieller Proxy wird durch ApolloTV bereitgestellt.',
|
"Postwomans offizieller Proxy wird durch ApolloTV bereitgestellt.",
|
||||||
read_the: 'Lies die',
|
read_the: "Lies die",
|
||||||
apollotv_privacy_policy: 'ApolloTV Datenschutzerklärung',
|
apollotv_privacy_policy: "ApolloTV Datenschutzerklärung",
|
||||||
contact_us: 'Kontaktiere uns',
|
contact_us: "Kontaktiere uns",
|
||||||
connect: 'Verbinden',
|
connect: "Verbinden",
|
||||||
disconnect: 'Trennen',
|
disconnect: "Trennen",
|
||||||
start: 'Start',
|
start: "Start",
|
||||||
stop: 'Stopp',
|
stop: "Stopp",
|
||||||
}
|
}
|
||||||
|
|||||||
536
lang/en-US.js
536
lang/en-US.js
@@ -1,273 +1,273 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Home',
|
home: "Home",
|
||||||
realtime: 'Realtime',
|
realtime: "Realtime",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Settings',
|
settings: "Settings",
|
||||||
request: 'Request',
|
request: "Request",
|
||||||
install_pwa: 'Install PWA',
|
install_pwa: "Install PWA",
|
||||||
support_us: 'Support us',
|
support_us: "Support us",
|
||||||
tweet: 'Tweet',
|
tweet: "Tweet",
|
||||||
options: 'Options',
|
options: "Options",
|
||||||
communication: 'Communication',
|
communication: "Communication",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Schema',
|
schema: "Schema",
|
||||||
theme: 'Theme',
|
theme: "Theme",
|
||||||
subscribe: 'Subscribe',
|
subscribe: "Subscribe",
|
||||||
choose_language: 'Choose Language',
|
choose_language: "Choose Language",
|
||||||
shortcuts: 'Shortcuts',
|
shortcuts: "Shortcuts",
|
||||||
send_request: 'Send Request',
|
send_request: "Send Request",
|
||||||
save_to_collections: 'Save to Collections',
|
save_to_collections: "Save to Collections",
|
||||||
copy_request_link: 'Copy Request Link',
|
copy_request_link: "Copy Request Link",
|
||||||
reset_request: 'Reset Request',
|
reset_request: "Reset Request",
|
||||||
support_us_on: 'Support us on',
|
support_us_on: "Support us on",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'JavaScript Code',
|
javascript_code: "JavaScript Code",
|
||||||
method: 'Method',
|
method: "Method",
|
||||||
path: 'Path',
|
path: "Path",
|
||||||
label: 'Label',
|
label: "Label",
|
||||||
content_type: 'Content Type',
|
content_type: "Content Type",
|
||||||
raw_input: 'Raw input',
|
raw_input: "Raw input",
|
||||||
parameter_list: 'Parameter List',
|
parameter_list: "Parameter List",
|
||||||
raw_request_body: 'Raw Request Body',
|
raw_request_body: "Raw Request Body",
|
||||||
show_code: 'Show Code',
|
show_code: "Show Code",
|
||||||
hide_code: 'Hide Code',
|
hide_code: "Hide Code",
|
||||||
show_prerequest_script: 'Show Pre-Request Script',
|
show_prerequest_script: "Show Pre-Request Script",
|
||||||
hide_prerequest_script: 'Hide Pre-Request Script',
|
hide_prerequest_script: "Hide Pre-Request Script",
|
||||||
authentication: 'Authentication',
|
authentication: "Authentication",
|
||||||
authentication_type: 'Authentication type',
|
authentication_type: "Authentication type",
|
||||||
include_in_url: 'Include in URL',
|
include_in_url: "Include in URL",
|
||||||
parameters: 'Parameters',
|
parameters: "Parameters",
|
||||||
expand_response: 'Expand response',
|
expand_response: "Expand response",
|
||||||
collapse_response: 'Collapse response',
|
collapse_response: "Collapse response",
|
||||||
hide_preview: 'Hide Preview',
|
hide_preview: "Hide Preview",
|
||||||
preview_html: 'Preview HTML',
|
preview_html: "Preview HTML",
|
||||||
history: 'History',
|
history: "History",
|
||||||
collections: 'Collections',
|
collections: "Collections",
|
||||||
environment: 'Environment',
|
environment: "Environment",
|
||||||
new_environment: 'New Environment',
|
new_environment: "New Environment",
|
||||||
my_new_environment: 'My New Environment',
|
my_new_environment: "My New Environment",
|
||||||
edit_environment: 'Edit Environment',
|
edit_environment: "Edit Environment",
|
||||||
env_variable_list: 'Variable List',
|
env_variable_list: "Variable List",
|
||||||
invalid_environment_name: 'Please provide a valid name for the environment',
|
invalid_environment_name: "Please provide a valid name for the environment",
|
||||||
use_environment: 'Use Environment',
|
use_environment: "Use Environment",
|
||||||
add_one_variable: '(add at least one variable)',
|
add_one_variable: "(add at least one variable)",
|
||||||
import_curl: 'Import cURL',
|
import_curl: "Import cURL",
|
||||||
import: 'Import',
|
import: "Import",
|
||||||
generate_code: 'Generate code',
|
generate_code: "Generate code",
|
||||||
request_type: 'Request type',
|
request_type: "Request type",
|
||||||
generated_code: 'Generated code',
|
generated_code: "Generated code",
|
||||||
status: 'Status',
|
status: "Status",
|
||||||
headers: 'Headers',
|
headers: "Headers",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(waiting for connection)',
|
waiting_for_connection: "(waiting for connection)",
|
||||||
message: 'Message',
|
message: "Message",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Server',
|
server: "Server",
|
||||||
events: 'Events',
|
events: "Events",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Get schema',
|
get_schema: "Get schema",
|
||||||
header_list: 'Header list',
|
header_list: "Header list",
|
||||||
add_new: 'Add new',
|
add_new: "Add new",
|
||||||
response: 'Response',
|
response: "Response",
|
||||||
query: 'Query',
|
query: "Query",
|
||||||
queries: 'Queries',
|
queries: "Queries",
|
||||||
query_variables: 'Variables',
|
query_variables: "Variables",
|
||||||
mutations: 'Mutations',
|
mutations: "Mutations",
|
||||||
subscriptions: 'Subscriptions',
|
subscriptions: "Subscriptions",
|
||||||
types: 'Types',
|
types: "Types",
|
||||||
send: 'Send',
|
send: "Send",
|
||||||
background: 'Background',
|
background: "Background",
|
||||||
color: 'Color',
|
color: "Color",
|
||||||
labels: 'Labels',
|
labels: "Labels",
|
||||||
multi_color: 'Multi-color',
|
multi_color: "Multi-color",
|
||||||
enabled: 'Enabled',
|
enabled: "Enabled",
|
||||||
disabled: 'Disabled',
|
disabled: "Disabled",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting: "Postwoman's Official Proxy is hosted by ApolloTV.",
|
postwoman_official_proxy_hosting: "Postwoman's Official Proxy is hosted by ApolloTV.",
|
||||||
read_the: 'Read the',
|
read_the: "Read the",
|
||||||
apollotv_privacy_policy: 'ApolloTV privacy policy',
|
apollotv_privacy_policy: "ApolloTV privacy policy",
|
||||||
contact_us: 'Contact us',
|
contact_us: "Contact us",
|
||||||
connect: 'Connect',
|
connect: "Connect",
|
||||||
disconnect: 'Disconnect',
|
disconnect: "Disconnect",
|
||||||
start: 'Start',
|
start: "Start",
|
||||||
stop: 'Stop',
|
stop: "Stop",
|
||||||
access_token: 'Access Token',
|
access_token: "Access Token",
|
||||||
token_list: 'Token List',
|
token_list: "Token List",
|
||||||
get_token: 'Get New Token',
|
get_token: "Get New Token",
|
||||||
manage_token: 'Manage Access Token',
|
manage_token: "Manage Access Token",
|
||||||
save_token: 'Save Access Token',
|
save_token: "Save Access Token",
|
||||||
use_token: 'Use Saved Token',
|
use_token: "Use Saved Token",
|
||||||
request_token: 'Request Token',
|
request_token: "Request Token",
|
||||||
save_token_req: 'Save Token Request',
|
save_token_req: "Save Token Request",
|
||||||
manage_token_req: 'Manage Token Request',
|
manage_token_req: "Manage Token Request",
|
||||||
use_token_req: 'Use Token Request',
|
use_token_req: "Use Token Request",
|
||||||
token_req_name: 'Request Name',
|
token_req_name: "Request Name",
|
||||||
token_req_details: 'Request Details',
|
token_req_details: "Request Details",
|
||||||
token_name: 'Token Name',
|
token_name: "Token Name",
|
||||||
oidc_discovery_url: 'OIDC Discovery URL',
|
oidc_discovery_url: "OIDC Discovery URL",
|
||||||
auth_url: 'Auth URL',
|
auth_url: "Auth URL",
|
||||||
access_token_url: 'Access Token URL',
|
access_token_url: "Access Token URL",
|
||||||
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_path: "No path",
|
||||||
no_label: 'No label',
|
no_label: "No label",
|
||||||
prerequest_script: 'Pre-Request Script',
|
prerequest_script: "Pre-Request Script",
|
||||||
no_prerequest_script: 'No pre-request script',
|
no_prerequest_script: "No pre-request script",
|
||||||
search: 'Search',
|
search: "Search",
|
||||||
history_empty: 'History is empty',
|
history_empty: "History is empty",
|
||||||
history_deleted: 'History Deleted',
|
history_deleted: "History Deleted",
|
||||||
clear: 'Clear',
|
clear: "Clear",
|
||||||
clear_all: 'Clear All',
|
clear_all: "Clear All",
|
||||||
cleared: 'Cleared',
|
cleared: "Cleared",
|
||||||
close: 'Close',
|
close: "Close",
|
||||||
sort: 'Sort',
|
sort: "Sort",
|
||||||
time: 'Time',
|
time: "Time",
|
||||||
duration: 'Duration',
|
duration: "Duration",
|
||||||
no_duration: 'No duration',
|
no_duration: "No duration",
|
||||||
show_more: 'Show more',
|
show_more: "Show more",
|
||||||
hide_more: 'Hide more',
|
hide_more: "Hide more",
|
||||||
collection: 'Collection',
|
collection: "Collection",
|
||||||
current_collection: 'Current Collection',
|
current_collection: "Current Collection",
|
||||||
select_collection: 'Select a Collection',
|
select_collection: "Select a Collection",
|
||||||
create_collection: 'Create a Collection',
|
create_collection: "Create a Collection",
|
||||||
new: 'New',
|
new: "New",
|
||||||
import_export: 'Import / Export',
|
import_export: "Import / Export",
|
||||||
more: 'More',
|
more: "More",
|
||||||
folder: 'Folder',
|
folder: "Folder",
|
||||||
new_folder: 'New Folder',
|
new_folder: "New Folder",
|
||||||
my_new_folder: 'My New Folder',
|
my_new_folder: "My New Folder",
|
||||||
folder_empty: 'Folder is empty',
|
folder_empty: "Folder is empty",
|
||||||
edit_folder: 'Edit Folder',
|
edit_folder: "Edit Folder",
|
||||||
edit: 'Edit',
|
edit: "Edit",
|
||||||
delete: 'Delete',
|
delete: "Delete",
|
||||||
deleted: 'Deleted',
|
deleted: "Deleted",
|
||||||
undo: 'Undo',
|
undo: "Undo",
|
||||||
collection_empty: 'Collection is empty',
|
collection_empty: "Collection is empty",
|
||||||
invalid_collection_name: 'Please provide a valid name for the collection',
|
invalid_collection_name: "Please provide a valid name for the collection",
|
||||||
new_collection: 'New Collection',
|
new_collection: "New Collection",
|
||||||
my_new_collection: 'My New Collection',
|
my_new_collection: "My New Collection",
|
||||||
edit_collection: 'Edit Collection',
|
edit_collection: "Edit Collection",
|
||||||
edit_request: 'Edit Request',
|
edit_request: "Edit Request",
|
||||||
save_request_as: 'Save Request As',
|
save_request_as: "Save Request As",
|
||||||
export: 'Export',
|
export: "Export",
|
||||||
connecting_to: 'Connecting to {name}...',
|
connecting_to: "Connecting to {name}...",
|
||||||
connected: 'Connected',
|
connected: "Connected",
|
||||||
connected_to: 'Connected to {name}',
|
connected_to: "Connected to {name}",
|
||||||
disconnected: 'Disconnected',
|
disconnected: "Disconnected",
|
||||||
disconnected_from: 'Disconnected from {name}',
|
disconnected_from: "Disconnected from {name}",
|
||||||
something_went_wrong: 'Something went wrong!',
|
something_went_wrong: "Something went wrong!",
|
||||||
error_occurred: 'An error has occurred.',
|
error_occurred: "An error has occurred.",
|
||||||
browser_support_sse: "This browser doesn't seems to have Server Sent Events support.",
|
browser_support_sse: "This browser doesn't seems to have Server Sent Events support.",
|
||||||
log: 'Log',
|
log: "Log",
|
||||||
no_url: 'No URL',
|
no_url: "No URL",
|
||||||
run_query: 'Run Query',
|
run_query: "Run Query",
|
||||||
copy_query: 'Copy Query',
|
copy_query: "Copy Query",
|
||||||
kinda_dark: 'Kinda Dark',
|
kinda_dark: "Kinda Dark",
|
||||||
clearly_white: 'Clearly White',
|
clearly_white: "Clearly White",
|
||||||
just_black: 'Just Black',
|
just_black: "Just Black",
|
||||||
auto_system: 'Auto (system)',
|
auto_system: "Auto (system)",
|
||||||
green: 'Green',
|
green: "Green",
|
||||||
yellow: 'Yellow',
|
yellow: "Yellow",
|
||||||
pink: 'Pink',
|
pink: "Pink",
|
||||||
red: 'Red',
|
red: "Red",
|
||||||
purple: 'Purple',
|
purple: "Purple",
|
||||||
orange: 'Orange',
|
orange: "Orange",
|
||||||
cyan: 'Cyan',
|
cyan: "Cyan",
|
||||||
blue: 'Blue',
|
blue: "Blue",
|
||||||
loading: 'Loading...',
|
loading: "Loading...",
|
||||||
fetching: 'Fetching...',
|
fetching: "Fetching...",
|
||||||
waiting_send_req: '(waiting to send request)',
|
waiting_send_req: "(waiting to send request)",
|
||||||
cancel: 'Cancel',
|
cancel: "Cancel",
|
||||||
save: 'Save',
|
save: "Save",
|
||||||
dismiss: 'Dismiss',
|
dismiss: "Dismiss",
|
||||||
are_you_sure: 'Are you sure?',
|
are_you_sure: "Are you sure?",
|
||||||
yes: 'Yes',
|
yes: "Yes",
|
||||||
no: 'No',
|
no: "No",
|
||||||
restore: 'Restore',
|
restore: "Restore",
|
||||||
add_star: 'Add star',
|
add_star: "Add star",
|
||||||
remove_star: 'Remove star',
|
remove_star: "Remove star",
|
||||||
nothing_found: 'Nothing found',
|
nothing_found: "Nothing found",
|
||||||
replace_current: 'Replace current',
|
replace_current: "Replace current",
|
||||||
replace_json: 'Replace with JSON',
|
replace_json: "Replace with JSON",
|
||||||
preserve_current: 'Preserve current',
|
preserve_current: "Preserve current",
|
||||||
import_json: 'Import from JSON',
|
import_json: "Import from JSON",
|
||||||
download_file: 'Download file',
|
download_file: "Download file",
|
||||||
upload_file: 'Upload file',
|
upload_file: "Upload file",
|
||||||
copy_response: 'Copy response',
|
copy_response: "Copy response",
|
||||||
copy_code: 'Copy code',
|
copy_code: "Copy code",
|
||||||
copy_schema: 'Copy Schema',
|
copy_schema: "Copy Schema",
|
||||||
use_request: 'Use request',
|
use_request: "Use request",
|
||||||
documentation: 'Documentation',
|
documentation: "Documentation",
|
||||||
docs: 'Docs',
|
docs: "Docs",
|
||||||
reset_default: 'Reset to default',
|
reset_default: "Reset to default",
|
||||||
fields: 'FIELDS',
|
fields: "FIELDS",
|
||||||
deprecated: 'DEPRECATED',
|
deprecated: "DEPRECATED",
|
||||||
add_one_header: '(add at least one header)',
|
add_one_header: "(add at least one header)",
|
||||||
add_one_parameter: '(add at least one parameter)',
|
add_one_parameter: "(add at least one parameter)",
|
||||||
header_count: 'header {count}',
|
header_count: "header {count}",
|
||||||
parameter_count: 'parameter {count}',
|
parameter_count: "parameter {count}",
|
||||||
variable_count: 'variable {count}',
|
variable_count: "variable {count}",
|
||||||
value_count: 'value {count}',
|
value_count: "value {count}",
|
||||||
send_request_first: 'Send a request first',
|
send_request_first: "Send a request first",
|
||||||
generate_docs: 'Generate Documentation',
|
generate_docs: "Generate Documentation",
|
||||||
generate_docs_message: 'Import any Postwoman Collection to Generate Documentation on-the-go.',
|
generate_docs_message: "Import any Postwoman Collection to Generate Documentation on-the-go.",
|
||||||
generate_docs_first: 'Generate documentation first',
|
generate_docs_first: "Generate documentation first",
|
||||||
docs_generated: 'Documentation generated',
|
docs_generated: "Documentation generated",
|
||||||
import_collections: 'Import collections',
|
import_collections: "Import collections",
|
||||||
optional: '(optional)',
|
optional: "(optional)",
|
||||||
json: 'JSON',
|
json: "JSON",
|
||||||
none: 'None',
|
none: "None",
|
||||||
username: 'Username',
|
username: "Username",
|
||||||
password: 'Password',
|
password: "Password",
|
||||||
token: 'Token',
|
token: "Token",
|
||||||
payload: 'Payload',
|
payload: "Payload",
|
||||||
choose_file: 'Choose a file',
|
choose_file: "Choose a file",
|
||||||
file_imported: 'File imported',
|
file_imported: "File imported",
|
||||||
import_failed: 'Import failed',
|
import_failed: "Import failed",
|
||||||
f12_details: '(F12 for details)',
|
f12_details: "(F12 for details)",
|
||||||
we_use_cookies: 'We use cookies',
|
we_use_cookies: "We use cookies",
|
||||||
copied_to_clipboard: 'Copied to clipboard',
|
copied_to_clipboard: "Copied to clipboard",
|
||||||
finished_in: 'Finished in {duration}ms',
|
finished_in: "Finished in {duration}ms",
|
||||||
check_console_details: 'Check console for details.',
|
check_console_details: "Check console for details.",
|
||||||
download_started: 'Download started',
|
download_started: "Download started",
|
||||||
url_invalid_format: 'URL is not formatted properly',
|
url_invalid_format: "URL is not formatted properly",
|
||||||
curl_invalid_format: 'cURL is not formatted properly',
|
curl_invalid_format: "cURL is not formatted properly",
|
||||||
enable_proxy: 'Try enabling Proxy',
|
enable_proxy: "Try enabling Proxy",
|
||||||
complete_config_urls: 'Please complete configuration urls.',
|
complete_config_urls: "Please complete configuration urls.",
|
||||||
token_request_saved: 'Token request saved',
|
token_request_saved: "Token request saved",
|
||||||
donate_info1:
|
donate_info1:
|
||||||
'If you have enjoyed the productivity of using Postwoman, consider donating as a sign of appreciation.',
|
"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:',
|
donate_info2: "You can support Postwoman development via the following methods:",
|
||||||
one_time_recurring: 'One-time or recurring',
|
one_time_recurring: "One-time or recurring",
|
||||||
one_time: 'One-time',
|
one_time: "One-time",
|
||||||
recurring: 'Recurring',
|
recurring: "Recurring",
|
||||||
wiki: 'Wiki',
|
wiki: "Wiki",
|
||||||
error: 'Error',
|
error: "Error",
|
||||||
go_home: 'Go Home',
|
go_home: "Go Home",
|
||||||
reload: 'Reload',
|
reload: "Reload",
|
||||||
enter_curl: 'Enter cURL',
|
enter_curl: "Enter cURL",
|
||||||
empty: 'Empty',
|
empty: "Empty",
|
||||||
extensions: 'Extensions',
|
extensions: "Extensions",
|
||||||
extensions_use_toggle: 'Use the browser extension to send requests (if present)',
|
extensions_use_toggle: "Use the browser extension to send requests (if present)",
|
||||||
extensions_info1: 'Browser extension that simplifies access to Postwoman',
|
extensions_info1: "Browser extension that simplifies access to Postwoman",
|
||||||
extensions_info2: 'Get Postwoman browser extension!',
|
extensions_info2: "Get Postwoman browser extension!",
|
||||||
installed: 'Installed',
|
installed: "Installed",
|
||||||
login_with: 'Login with',
|
login_with: "Login with",
|
||||||
logged_out: 'Logged out',
|
logged_out: "Logged out",
|
||||||
logout: 'Logout',
|
logout: "Logout",
|
||||||
account: 'Account',
|
account: "Account",
|
||||||
scrollInto_use_toggle: 'Auto scroll',
|
scrollInto_use_toggle: "Auto scroll",
|
||||||
sync: 'Sync',
|
sync: "Sync",
|
||||||
syncHistory: 'History',
|
syncHistory: "History",
|
||||||
syncCollections: 'Collections',
|
syncCollections: "Collections",
|
||||||
syncEnvironments: 'Environments',
|
syncEnvironments: "Environments",
|
||||||
turn_on: 'Turn on',
|
turn_on: "Turn on",
|
||||||
login_first: 'Login first',
|
login_first: "Login first",
|
||||||
paste_a_note: 'Paste a note',
|
paste_a_note: "Paste a note",
|
||||||
import_from_sync: 'Import from Sync',
|
import_from_sync: "Import from Sync",
|
||||||
notes: 'Notes',
|
notes: "Notes",
|
||||||
}
|
}
|
||||||
|
|||||||
514
lang/es-ES.js
514
lang/es-ES.js
@@ -1,262 +1,262 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Inicio',
|
home: "Inicio",
|
||||||
realtime: 'Tiempo real',
|
realtime: "Tiempo real",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Ajustes',
|
settings: "Ajustes",
|
||||||
request: 'Petición',
|
request: "Petición",
|
||||||
install_pwa: 'Instalar PWA',
|
install_pwa: "Instalar PWA",
|
||||||
support_us: 'Ayúdanos',
|
support_us: "Ayúdanos",
|
||||||
tweet: 'Tweet',
|
tweet: "Tweet",
|
||||||
options: 'Opciones',
|
options: "Opciones",
|
||||||
communication: 'Comunicación',
|
communication: "Comunicación",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Esquema',
|
schema: "Esquema",
|
||||||
theme: 'Tema',
|
theme: "Tema",
|
||||||
subscribe: 'Subscribirse',
|
subscribe: "Subscribirse",
|
||||||
choose_language: 'Seleccione un idioma',
|
choose_language: "Seleccione un idioma",
|
||||||
shortcuts: 'Atajos',
|
shortcuts: "Atajos",
|
||||||
send_request: 'Enviar petición',
|
send_request: "Enviar petición",
|
||||||
save_to_collections: 'Guardar en las Colecciones',
|
save_to_collections: "Guardar en las Colecciones",
|
||||||
copy_request_link: 'Copiar enlace de la petición',
|
copy_request_link: "Copiar enlace de la petición",
|
||||||
reset_request: 'Reiniciar Petición',
|
reset_request: "Reiniciar Petición",
|
||||||
support_us_on: 'Ayúdanos en',
|
support_us_on: "Ayúdanos en",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'Código JavaScript',
|
javascript_code: "Código JavaScript",
|
||||||
method: 'Método',
|
method: "Método",
|
||||||
path: 'Ruta',
|
path: "Ruta",
|
||||||
label: 'Etiqueta',
|
label: "Etiqueta",
|
||||||
again: 'De nuevo',
|
again: "De nuevo",
|
||||||
content_type: 'Tipo de Contenido',
|
content_type: "Tipo de Contenido",
|
||||||
raw_input: 'Datos sin Procesar',
|
raw_input: "Datos sin Procesar",
|
||||||
parameter_list: 'Lista de Parámetros',
|
parameter_list: "Lista de Parámetros",
|
||||||
raw_request_body: 'Cuerpo de la Solicitud sin Procesar',
|
raw_request_body: "Cuerpo de la Solicitud sin Procesar",
|
||||||
show_code: 'Mostrar el código',
|
show_code: "Mostrar el código",
|
||||||
hide_code: 'Ocultar el código',
|
hide_code: "Ocultar el código",
|
||||||
show_prerequest_script: 'Mostrar Script pre solicitud',
|
show_prerequest_script: "Mostrar Script pre solicitud",
|
||||||
hide_prerequest_script: 'Ocultar Script pre solicitud',
|
hide_prerequest_script: "Ocultar Script pre solicitud",
|
||||||
authentication: 'Autenticación',
|
authentication: "Autenticación",
|
||||||
authentication_type: 'Tipo de autenticación',
|
authentication_type: "Tipo de autenticación",
|
||||||
include_in_url: 'Incluir en el URL',
|
include_in_url: "Incluir en el URL",
|
||||||
parameters: 'Parámetros',
|
parameters: "Parámetros",
|
||||||
expand_response: 'Ampliar Respuesta',
|
expand_response: "Ampliar Respuesta",
|
||||||
collapse_response: 'Contraer Respuesta',
|
collapse_response: "Contraer Respuesta",
|
||||||
hide_preview: 'Ocultar la vista previa',
|
hide_preview: "Ocultar la vista previa",
|
||||||
preview_html: 'Vista Previa del HTML',
|
preview_html: "Vista Previa del HTML",
|
||||||
history: 'Historial',
|
history: "Historial",
|
||||||
collections: 'Colecciones',
|
collections: "Colecciones",
|
||||||
import_curl: 'Importar cURL',
|
import_curl: "Importar cURL",
|
||||||
import: 'Importar',
|
import: "Importar",
|
||||||
generate_code: 'Generar código',
|
generate_code: "Generar código",
|
||||||
request_type: 'Tipo de Petición',
|
request_type: "Tipo de Petición",
|
||||||
generated_code: 'Código Generado',
|
generated_code: "Código Generado",
|
||||||
status: 'Estado',
|
status: "Estado",
|
||||||
headers: 'Cabeceras',
|
headers: "Cabeceras",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(esperando por conexión)',
|
waiting_for_connection: "(esperando por conexión)",
|
||||||
message: 'Mensaje',
|
message: "Mensaje",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Servidor',
|
server: "Servidor",
|
||||||
events: 'Eventos',
|
events: "Eventos",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Obtener esquema',
|
get_schema: "Obtener esquema",
|
||||||
header_list: 'Lista de Cabeceras',
|
header_list: "Lista de Cabeceras",
|
||||||
add_new: 'Agregar nuevo',
|
add_new: "Agregar nuevo",
|
||||||
response: 'Respuesta',
|
response: "Respuesta",
|
||||||
query: 'Consulta',
|
query: "Consulta",
|
||||||
queries: 'Consultas',
|
queries: "Consultas",
|
||||||
query_variables: 'Variables',
|
query_variables: "Variables",
|
||||||
mutations: 'Mutaciones',
|
mutations: "Mutaciones",
|
||||||
subscriptions: 'Subscripciones',
|
subscriptions: "Subscripciones",
|
||||||
types: 'Tipos',
|
types: "Tipos",
|
||||||
send: 'Enviar',
|
send: "Enviar",
|
||||||
background: 'Fondo',
|
background: "Fondo",
|
||||||
color: 'Color',
|
color: "Color",
|
||||||
labels: 'Etiquetas',
|
labels: "Etiquetas",
|
||||||
multi_color: 'Multicolor',
|
multi_color: "Multicolor",
|
||||||
enabled: 'Habilitado',
|
enabled: "Habilitado",
|
||||||
disabled: 'Deshabilitado',
|
disabled: "Deshabilitado",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting: 'Proxy Oficial de Postwoman está hospedado en ApolloTV.',
|
postwoman_official_proxy_hosting: "Proxy Oficial de Postwoman está hospedado en ApolloTV.",
|
||||||
read_the: 'Leer la',
|
read_the: "Leer la",
|
||||||
apollotv_privacy_policy: 'Política de Privacidad de ApolloTV',
|
apollotv_privacy_policy: "Política de Privacidad de ApolloTV",
|
||||||
contact_us: 'Contáctenos',
|
contact_us: "Contáctenos",
|
||||||
connect: 'Conectar',
|
connect: "Conectar",
|
||||||
disconnect: 'Desconectar',
|
disconnect: "Desconectar",
|
||||||
start: 'Comienzo',
|
start: "Comienzo",
|
||||||
stop: 'Detener',
|
stop: "Detener",
|
||||||
access_token: 'Token de acceso',
|
access_token: "Token de acceso",
|
||||||
token_list: 'Lista de token',
|
token_list: "Lista de token",
|
||||||
get_token: 'Obtener un nuevo token',
|
get_token: "Obtener un nuevo token",
|
||||||
manage_token: 'Gestionar el token de acceso',
|
manage_token: "Gestionar el token de acceso",
|
||||||
save_token: 'Guardar el token de acceso',
|
save_token: "Guardar el token de acceso",
|
||||||
use_token: 'Usar token guardado',
|
use_token: "Usar token guardado",
|
||||||
request_token: 'Petición del token',
|
request_token: "Petición del token",
|
||||||
save_token_req: 'Guardar la petición del token',
|
save_token_req: "Guardar la petición del token",
|
||||||
manage_token_req: 'Gestionar la petición del token',
|
manage_token_req: "Gestionar la petición del token",
|
||||||
use_token_req: 'Usar el token de la petición',
|
use_token_req: "Usar el token de la petición",
|
||||||
token_req_name: 'Nombre de la petición',
|
token_req_name: "Nombre de la petición",
|
||||||
token_req_details: 'Petición de detalles',
|
token_req_details: "Petición de detalles",
|
||||||
token_name: 'Nombre del token',
|
token_name: "Nombre del token",
|
||||||
oidc_discovery_url: 'URL de descubrimiento de OIDC',
|
oidc_discovery_url: "URL de descubrimiento de OIDC",
|
||||||
auth_url: 'URL de autenticación',
|
auth_url: "URL de autenticación",
|
||||||
access_token_url: 'URL de token de acceso',
|
access_token_url: "URL de token de acceso",
|
||||||
client_id: 'ID del cliente',
|
client_id: "ID del cliente",
|
||||||
scope: 'Alcance',
|
scope: "Alcance",
|
||||||
state: 'Estado',
|
state: "Estado",
|
||||||
token_req_list: 'Lista de solicitud de token',
|
token_req_list: "Lista de solicitud de token",
|
||||||
no_path: 'Sin ruta',
|
no_path: "Sin ruta",
|
||||||
no_label: 'Sin etiqueta',
|
no_label: "Sin etiqueta",
|
||||||
prerequest_script: 'Pre-Request Script',
|
prerequest_script: "Pre-Request Script",
|
||||||
no_prerequest_script: 'Script sin pre-requisito',
|
no_prerequest_script: "Script sin pre-requisito",
|
||||||
search: 'buscar historial',
|
search: "buscar historial",
|
||||||
history_empty: 'Historial vacío',
|
history_empty: "Historial vacío",
|
||||||
history_deleted: 'Historial borrado',
|
history_deleted: "Historial borrado",
|
||||||
clear: 'Limpiar',
|
clear: "Limpiar",
|
||||||
clear_all: 'Limpiar todo',
|
clear_all: "Limpiar todo",
|
||||||
cleared: 'Limpiado',
|
cleared: "Limpiado",
|
||||||
close: 'Cerrar',
|
close: "Cerrar",
|
||||||
sort: 'Ordenar',
|
sort: "Ordenar",
|
||||||
time: 'Tiempo',
|
time: "Tiempo",
|
||||||
duration: 'Duración',
|
duration: "Duración",
|
||||||
no_duration: 'Sin duración',
|
no_duration: "Sin duración",
|
||||||
show_more: 'Mostrar más',
|
show_more: "Mostrar más",
|
||||||
hide_more: 'Ocultar más',
|
hide_more: "Ocultar más",
|
||||||
collection: 'Colección',
|
collection: "Colección",
|
||||||
current_collection: 'Actual colección',
|
current_collection: "Actual colección",
|
||||||
select_collection: 'Seleccionar una colección',
|
select_collection: "Seleccionar una colección",
|
||||||
create_collection: 'Crear una colección',
|
create_collection: "Crear una colección",
|
||||||
new: 'Nuevo',
|
new: "Nuevo",
|
||||||
import_export: 'Importar / Exportar',
|
import_export: "Importar / Exportar",
|
||||||
more: 'Más',
|
more: "Más",
|
||||||
folder: 'Directorio',
|
folder: "Directorio",
|
||||||
new_folder: 'Nuevo directorio',
|
new_folder: "Nuevo directorio",
|
||||||
my_new_folder: 'Mi nuevo directorio',
|
my_new_folder: "Mi nuevo directorio",
|
||||||
folder_empty: 'Directorio vacío',
|
folder_empty: "Directorio vacío",
|
||||||
edit_folder: 'Editar directorio',
|
edit_folder: "Editar directorio",
|
||||||
edit: 'Editar',
|
edit: "Editar",
|
||||||
delete: 'Borrar',
|
delete: "Borrar",
|
||||||
deleted: 'Borrado',
|
deleted: "Borrado",
|
||||||
undo: 'Deshacer',
|
undo: "Deshacer",
|
||||||
collection_empty: 'Colección vacía',
|
collection_empty: "Colección vacía",
|
||||||
new_collection: 'Nueva colección',
|
new_collection: "Nueva colección",
|
||||||
my_new_collection: 'Mi nueva colección',
|
my_new_collection: "Mi nueva colección",
|
||||||
edit_collection: 'Editar colección',
|
edit_collection: "Editar colección",
|
||||||
edit_request: 'Editar petición',
|
edit_request: "Editar petición",
|
||||||
save_request_as: 'Guardar petición como',
|
save_request_as: "Guardar petición como",
|
||||||
export: 'Exportar',
|
export: "Exportar",
|
||||||
connecting_to: 'Conectando a {name}...',
|
connecting_to: "Conectando a {name}...",
|
||||||
connected: 'Conectado',
|
connected: "Conectado",
|
||||||
connected_to: 'Conectado a {name}',
|
connected_to: "Conectado a {name}",
|
||||||
disconnected: 'Desconectado',
|
disconnected: "Desconectado",
|
||||||
disconnected_from: 'Desconectado desde {name}',
|
disconnected_from: "Desconectado desde {name}",
|
||||||
something_went_wrong: 'Algo ha salido mal!',
|
something_went_wrong: "Algo ha salido mal!",
|
||||||
error_occurred: 'Ha ocurrido un error.',
|
error_occurred: "Ha ocurrido un error.",
|
||||||
browser_support_sse:
|
browser_support_sse:
|
||||||
'Este navegador parace no tener soporte a los eventos enviados desde el servidor.',
|
"Este navegador parace no tener soporte a los eventos enviados desde el servidor.",
|
||||||
log: 'Bitácora',
|
log: "Bitácora",
|
||||||
no_url: 'Sin URL',
|
no_url: "Sin URL",
|
||||||
run_query: 'Ejecutar consulta',
|
run_query: "Ejecutar consulta",
|
||||||
copy_query: 'Copiar consulta',
|
copy_query: "Copiar consulta",
|
||||||
kinda_dark: 'Un poco oscúro',
|
kinda_dark: "Un poco oscúro",
|
||||||
clearly_white: 'Claramento blanco',
|
clearly_white: "Claramento blanco",
|
||||||
just_black: 'Solo Negro',
|
just_black: "Solo Negro",
|
||||||
auto_system: 'Autenticación (sistema)',
|
auto_system: "Autenticación (sistema)",
|
||||||
green: 'Verde',
|
green: "Verde",
|
||||||
yellow: 'Amarillo',
|
yellow: "Amarillo",
|
||||||
pink: 'Rosado',
|
pink: "Rosado",
|
||||||
red: 'Rojo',
|
red: "Rojo",
|
||||||
purple: 'Púrpura',
|
purple: "Púrpura",
|
||||||
orange: 'Anaranjado',
|
orange: "Anaranjado",
|
||||||
cyan: 'Cian',
|
cyan: "Cian",
|
||||||
blue: 'Azul',
|
blue: "Azul",
|
||||||
loading: 'Cargando...',
|
loading: "Cargando...",
|
||||||
fetching: 'Recuperando...',
|
fetching: "Recuperando...",
|
||||||
waiting_send_req: '(esperando para enviar la petición)',
|
waiting_send_req: "(esperando para enviar la petición)",
|
||||||
cancel: 'Cancelar',
|
cancel: "Cancelar",
|
||||||
save: 'Guardar',
|
save: "Guardar",
|
||||||
dismiss: 'Descartar',
|
dismiss: "Descartar",
|
||||||
are_you_sure: 'Está seguro?',
|
are_you_sure: "Está seguro?",
|
||||||
yes: 'Sí',
|
yes: "Sí",
|
||||||
no: 'No',
|
no: "No",
|
||||||
restore: 'Restaurar',
|
restore: "Restaurar",
|
||||||
add_star: 'Agregar estrella',
|
add_star: "Agregar estrella",
|
||||||
remove_star: 'Eliminar estrella',
|
remove_star: "Eliminar estrella",
|
||||||
nothing_found: 'No se encontró nada',
|
nothing_found: "No se encontró nada",
|
||||||
replace_current: 'Reemplaza el actual',
|
replace_current: "Reemplaza el actual",
|
||||||
replace_json: 'Reemplazar con JSON',
|
replace_json: "Reemplazar con JSON",
|
||||||
preserve_current: 'Preservar el actual',
|
preserve_current: "Preservar el actual",
|
||||||
import_json: 'Importar desde JSON',
|
import_json: "Importar desde JSON",
|
||||||
download_file: 'Descargar archivo',
|
download_file: "Descargar archivo",
|
||||||
upload_file: 'Cargar archivo',
|
upload_file: "Cargar archivo",
|
||||||
copy_response: 'Copiar respuesta',
|
copy_response: "Copiar respuesta",
|
||||||
copy_code: 'Copiar codigo',
|
copy_code: "Copiar codigo",
|
||||||
copy_schema: 'Copiar Esquema',
|
copy_schema: "Copiar Esquema",
|
||||||
use_request: 'Usar la petición',
|
use_request: "Usar la petición",
|
||||||
documentation: 'Documentación',
|
documentation: "Documentación",
|
||||||
docs: 'Documentos',
|
docs: "Documentos",
|
||||||
reset_default: 'Reiniciar valores por defecto',
|
reset_default: "Reiniciar valores por defecto",
|
||||||
fields: 'CAMPOS',
|
fields: "CAMPOS",
|
||||||
deprecated: 'OBSOLETO',
|
deprecated: "OBSOLETO",
|
||||||
add_one_header: '(agregar al menos una cabecera)',
|
add_one_header: "(agregar al menos una cabecera)",
|
||||||
add_one_parameter: '(agregar al menos un parámetro)',
|
add_one_parameter: "(agregar al menos un parámetro)",
|
||||||
header_count: 'cabecera {count}',
|
header_count: "cabecera {count}",
|
||||||
parameter_count: 'parámetro {count}',
|
parameter_count: "parámetro {count}",
|
||||||
variable_count: 'variable {count}',
|
variable_count: "variable {count}",
|
||||||
value_count: 'valor {count}',
|
value_count: "valor {count}",
|
||||||
send_request_first: 'Enviar primero la petición',
|
send_request_first: "Enviar primero la petición",
|
||||||
generate_docs: 'Generar la Documentación',
|
generate_docs: "Generar la Documentación",
|
||||||
generate_docs_message:
|
generate_docs_message:
|
||||||
'Importar cualquier Colección de Postwoman para Generar la Documentación sobre la marcha.',
|
"Importar cualquier Colección de Postwoman para Generar la Documentación sobre la marcha.",
|
||||||
generate_docs_first: 'Generar primero la documentación',
|
generate_docs_first: "Generar primero la documentación",
|
||||||
docs_generated: 'Documentación generada',
|
docs_generated: "Documentación generada",
|
||||||
import_collections: 'Importar colecciones',
|
import_collections: "Importar colecciones",
|
||||||
optional: '(opcional)',
|
optional: "(opcional)",
|
||||||
json: 'JSON',
|
json: "JSON",
|
||||||
none: 'Nada',
|
none: "Nada",
|
||||||
username: 'Nombre de usuario',
|
username: "Nombre de usuario",
|
||||||
password: 'Contrasaeña',
|
password: "Contrasaeña",
|
||||||
token: 'Token',
|
token: "Token",
|
||||||
payload: 'Carga',
|
payload: "Carga",
|
||||||
choose_file: 'Seleccione un archivo',
|
choose_file: "Seleccione un archivo",
|
||||||
file_imported: 'Archivo imporado',
|
file_imported: "Archivo imporado",
|
||||||
f12_details: '(F12 para ver detalles)',
|
f12_details: "(F12 para ver detalles)",
|
||||||
we_use_cookies: 'Usamos las cookies',
|
we_use_cookies: "Usamos las cookies",
|
||||||
copied_to_clipboard: 'Copiado al portapapeles',
|
copied_to_clipboard: "Copiado al portapapeles",
|
||||||
finished_in: 'Terminado en {duration}ms',
|
finished_in: "Terminado en {duration}ms",
|
||||||
check_console_details: 'Verifique la consola para más detalles.',
|
check_console_details: "Verifique la consola para más detalles.",
|
||||||
download_started: 'Inició la descarga',
|
download_started: "Inició la descarga",
|
||||||
url_invalid_format: 'La URL no está formateado apropiadamente',
|
url_invalid_format: "La URL no está formateado apropiadamente",
|
||||||
curl_invalid_format: 'El cURL no está formateado apropiadamente',
|
curl_invalid_format: "El cURL no está formateado apropiadamente",
|
||||||
enable_proxy: 'Pruebe habilitando el Proxy',
|
enable_proxy: "Pruebe habilitando el Proxy",
|
||||||
complete_config_urls: 'Por favor, termine la configuración de las urls.',
|
complete_config_urls: "Por favor, termine la configuración de las urls.",
|
||||||
token_request_saved: 'La petición de tToken ha sido guardada',
|
token_request_saved: "La petición de tToken ha sido guardada",
|
||||||
donate_info1:
|
donate_info1:
|
||||||
'Si le ha gustado su productividad usando Postwoman, considere hacer una donación como un signo de su apreciación.',
|
"Si le ha gustado su productividad usando Postwoman, considere hacer una donación como un signo de su apreciación.",
|
||||||
donate_info2: 'Puede ayudar al desarrollo de Postwoman mediante los siguientes métodos:',
|
donate_info2: "Puede ayudar al desarrollo de Postwoman mediante los siguientes métodos:",
|
||||||
one_time_recurring: 'Una vez o recurrente',
|
one_time_recurring: "Una vez o recurrente",
|
||||||
one_time: 'Una vez',
|
one_time: "Una vez",
|
||||||
recurring: 'Recurrente',
|
recurring: "Recurrente",
|
||||||
wiki: 'Wiki',
|
wiki: "Wiki",
|
||||||
error: 'Error',
|
error: "Error",
|
||||||
go_home: 'Ir al inicio',
|
go_home: "Ir al inicio",
|
||||||
reload: 'Recargar',
|
reload: "Recargar",
|
||||||
enter_curl: 'Intruduzca cURL',
|
enter_curl: "Intruduzca cURL",
|
||||||
empty: 'Vacío',
|
empty: "Vacío",
|
||||||
extensions: 'Extensiones',
|
extensions: "Extensiones",
|
||||||
extensions_info1: 'Extensión del navegador que simplifica el acceso a Postwoman',
|
extensions_info1: "Extensión del navegador que simplifica el acceso a Postwoman",
|
||||||
extensions_info2: 'Obtener la extensión del navegador de Postwoman!',
|
extensions_info2: "Obtener la extensión del navegador de Postwoman!",
|
||||||
installed: 'Instalado',
|
installed: "Instalado",
|
||||||
login_with: 'Iniciar sesión con',
|
login_with: "Iniciar sesión con",
|
||||||
logged_out: 'Sesión cerreda',
|
logged_out: "Sesión cerreda",
|
||||||
logout: 'Cerrar sesión',
|
logout: "Cerrar sesión",
|
||||||
account: 'Cuenta',
|
account: "Cuenta",
|
||||||
sync: 'Sync',
|
sync: "Sync",
|
||||||
syncHistory: 'Historial',
|
syncHistory: "Historial",
|
||||||
syncCollections: 'Colecciones',
|
syncCollections: "Colecciones",
|
||||||
turn_on: 'Encender',
|
turn_on: "Encender",
|
||||||
login_first: 'Inicie sesión primero',
|
login_first: "Inicie sesión primero",
|
||||||
paste_a_collection: 'Pegar una Colección',
|
paste_a_collection: "Pegar una Colección",
|
||||||
import_from_sync: 'Importar desde Sync',
|
import_from_sync: "Importar desde Sync",
|
||||||
}
|
}
|
||||||
|
|||||||
174
lang/fa-IR.js
174
lang/fa-IR.js
@@ -1,89 +1,89 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'خانه',
|
home: "خانه",
|
||||||
realtime: 'بلادرنگ',
|
realtime: "بلادرنگ",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'تنظیمات',
|
settings: "تنظیمات",
|
||||||
request: 'درخواست',
|
request: "درخواست",
|
||||||
install_pwa: 'نصب PWA',
|
install_pwa: "نصب PWA",
|
||||||
support_us: 'از ما حمایت کنید',
|
support_us: "از ما حمایت کنید",
|
||||||
tweet: 'Tweet',
|
tweet: "Tweet",
|
||||||
options: 'گزینهها',
|
options: "گزینهها",
|
||||||
communication: 'ارتباط',
|
communication: "ارتباط",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Schema',
|
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',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'کد JavaScript',
|
javascript_code: "کد JavaScript",
|
||||||
method: 'متد',
|
method: "متد",
|
||||||
path: 'مسیر',
|
path: "مسیر",
|
||||||
label: 'برچسب',
|
label: "برچسب",
|
||||||
again: 'دوباره',
|
again: "دوباره",
|
||||||
content_type: 'Content Type',
|
content_type: "Content Type",
|
||||||
raw_input: 'ورودی raw',
|
raw_input: "ورودی raw",
|
||||||
parameter_list: 'لیست پارامترها',
|
parameter_list: "لیست پارامترها",
|
||||||
raw_request_body: 'Raw Request Body',
|
raw_request_body: "Raw Request Body",
|
||||||
show_code: 'نمایش کد',
|
show_code: "نمایش کد",
|
||||||
hide_code: 'عدم نمایش کد',
|
hide_code: "عدم نمایش کد",
|
||||||
show_prerequest_script: 'Show Pre-Request Script',
|
show_prerequest_script: "Show Pre-Request Script",
|
||||||
hide_prerequest_script: 'Hide Pre-Request Script',
|
hide_prerequest_script: "Hide Pre-Request Script",
|
||||||
authentication: 'Authentication',
|
authentication: "Authentication",
|
||||||
authentication_type: 'Authentication type',
|
authentication_type: "Authentication type",
|
||||||
include_in_url: 'در URL گنجانده شود',
|
include_in_url: "در URL گنجانده شود",
|
||||||
parameters: 'پارامترها',
|
parameters: "پارامترها",
|
||||||
expand_response: 'نمایش کامل پاسخ',
|
expand_response: "نمایش کامل پاسخ",
|
||||||
collapse_response: 'نمایش مختصر پاسخ',
|
collapse_response: "نمایش مختصر پاسخ",
|
||||||
hide_preview: 'مخفی کردن نمایش',
|
hide_preview: "مخفی کردن نمایش",
|
||||||
preview_html: 'نمایش HTML',
|
preview_html: "نمایش HTML",
|
||||||
history: 'تاریخچه',
|
history: "تاریخچه",
|
||||||
collections: 'کلکسیون',
|
collections: "کلکسیون",
|
||||||
import_curl: 'وارد کردن cURL',
|
import_curl: "وارد کردن cURL",
|
||||||
import: 'وارد کردن',
|
import: "وارد کردن",
|
||||||
generate_code: 'تولید کد',
|
generate_code: "تولید کد",
|
||||||
request_type: 'Request type',
|
request_type: "Request type",
|
||||||
generated_code: 'کد تولید شده',
|
generated_code: "کد تولید شده",
|
||||||
status: 'Status',
|
status: "Status",
|
||||||
headers: 'Headers',
|
headers: "Headers",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(منتظر برقراری اتصال)',
|
waiting_for_connection: "(منتظر برقراری اتصال)",
|
||||||
message: 'پیام',
|
message: "پیام",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'سرور',
|
server: "سرور",
|
||||||
events: 'رویداد',
|
events: "رویداد",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'دریافت Schema',
|
get_schema: "دریافت Schema",
|
||||||
header_list: 'لیست Header',
|
header_list: "لیست Header",
|
||||||
add_new: 'افزودن',
|
add_new: "افزودن",
|
||||||
response: 'Response',
|
response: "Response",
|
||||||
query: 'Query',
|
query: "Query",
|
||||||
queries: 'Queries',
|
queries: "Queries",
|
||||||
query_variables: 'Variables',
|
query_variables: "Variables",
|
||||||
mutations: 'Mutations',
|
mutations: "Mutations",
|
||||||
subscriptions: 'Subscriptions',
|
subscriptions: "Subscriptions",
|
||||||
types: 'Types',
|
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 برروی هاست ApolloTV قرار دارد.',
|
postwoman_official_proxy_hosting: "پراکسی Postwoman برروی هاست ApolloTV قرار دارد.",
|
||||||
read_the: 'بخوانید',
|
read_the: "بخوانید",
|
||||||
apollotv_privacy_policy: 'خط مشی رازداری ApolloTV',
|
apollotv_privacy_policy: "خط مشی رازداری ApolloTV",
|
||||||
contact_us: 'Contact us',
|
contact_us: "Contact us",
|
||||||
connect: 'Connect',
|
connect: "Connect",
|
||||||
disconnect: 'Disconnect',
|
disconnect: "Disconnect",
|
||||||
start: 'Start',
|
start: "Start",
|
||||||
stop: 'Stop',
|
stop: "Stop",
|
||||||
}
|
}
|
||||||
|
|||||||
462
lang/fr-FR.js
462
lang/fr-FR.js
@@ -1,262 +1,262 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Accueil',
|
home: "Accueil",
|
||||||
realtime: 'Temps réel',
|
realtime: "Temps réel",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Paramètres',
|
settings: "Paramètres",
|
||||||
request: 'Request',
|
request: "Request",
|
||||||
install_pwa: 'Installer la PWA',
|
install_pwa: "Installer la PWA",
|
||||||
support_us: 'Nous supporter',
|
support_us: "Nous supporter",
|
||||||
tweet: 'Tweeter',
|
tweet: "Tweeter",
|
||||||
options: 'Options',
|
options: "Options",
|
||||||
communication: 'Communication',
|
communication: "Communication",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Schéma',
|
schema: "Schéma",
|
||||||
theme: 'Thème',
|
theme: "Thème",
|
||||||
subscribe: "S'inscrire",
|
subscribe: "S'inscrire",
|
||||||
choose_language: 'Sélectionner une langue',
|
choose_language: "Sélectionner une langue",
|
||||||
shortcuts: 'Raccourcis',
|
shortcuts: "Raccourcis",
|
||||||
send_request: 'Envoyer la requête',
|
send_request: "Envoyer la requête",
|
||||||
save_to_collections: 'Sauvegarder dans les collections',
|
save_to_collections: "Sauvegarder dans les collections",
|
||||||
copy_request_link: 'Copier le lien de la requête',
|
copy_request_link: "Copier le lien de la requête",
|
||||||
reset_request: 'Réinitialiser la requête',
|
reset_request: "Réinitialiser la requête",
|
||||||
support_us_on: 'Supportez-nous sur',
|
support_us_on: "Supportez-nous sur",
|
||||||
open_collective: 'Ouvrir Collective',
|
open_collective: "Ouvrir Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'Code JavaScript',
|
javascript_code: "Code JavaScript",
|
||||||
method: 'Méthode',
|
method: "Méthode",
|
||||||
path: "Chemin d'accès",
|
path: "Chemin d'accès",
|
||||||
label: 'Libellé',
|
label: "Libellé",
|
||||||
again: 'Réessayer',
|
again: "Réessayer",
|
||||||
content_type: 'Type de contenu',
|
content_type: "Type de contenu",
|
||||||
raw_input: 'Texte brut',
|
raw_input: "Texte brut",
|
||||||
parameter_list: 'Liste des paramètres',
|
parameter_list: "Liste des paramètres",
|
||||||
raw_request_body: 'Corps de la requête en texte brut',
|
raw_request_body: "Corps de la requête en texte brut",
|
||||||
show_code: 'Afficher le code',
|
show_code: "Afficher le code",
|
||||||
hide_code: 'Masquer le code',
|
hide_code: "Masquer le code",
|
||||||
show_prerequest_script: 'Afficher le script de pré-requête',
|
show_prerequest_script: "Afficher le script de pré-requête",
|
||||||
hide_prerequest_script: 'Masquer le script de pré-requête',
|
hide_prerequest_script: "Masquer le script de pré-requête",
|
||||||
authentication: 'Authentification',
|
authentication: "Authentification",
|
||||||
authentication_type: "Type d'authentification",
|
authentication_type: "Type d'authentification",
|
||||||
include_in_url: "Inclure dans l'URL",
|
include_in_url: "Inclure dans l'URL",
|
||||||
parameters: 'Paramètres',
|
parameters: "Paramètres",
|
||||||
expand_response: 'Agrandir la réponse',
|
expand_response: "Agrandir la réponse",
|
||||||
collapse_response: 'Réduire la réponse',
|
collapse_response: "Réduire la réponse",
|
||||||
hide_preview: 'Masquer la prévisualisation',
|
hide_preview: "Masquer la prévisualisation",
|
||||||
preview_html: 'Prévisualiser le HTML',
|
preview_html: "Prévisualiser le HTML",
|
||||||
history: 'Historique',
|
history: "Historique",
|
||||||
collections: 'Collections',
|
collections: "Collections",
|
||||||
import_curl: 'Importer en cURL',
|
import_curl: "Importer en cURL",
|
||||||
importer: 'Importer',
|
importer: "Importer",
|
||||||
generate_code: 'Générer le code',
|
generate_code: "Générer le code",
|
||||||
request_type: 'Type de requête',
|
request_type: "Type de requête",
|
||||||
generated_code: 'Code généré',
|
generated_code: "Code généré",
|
||||||
status: 'Statut',
|
status: "Statut",
|
||||||
headers: 'En-têtes',
|
headers: "En-têtes",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(en attente de connexion)',
|
waiting_for_connection: "(en attente de connexion)",
|
||||||
message: 'Message',
|
message: "Message",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Serveur',
|
server: "Serveur",
|
||||||
events: 'Évènements',
|
events: "Évènements",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Récuperer le schéma',
|
get_schema: "Récuperer le schéma",
|
||||||
header_list: "Liste d'en-têtes",
|
header_list: "Liste d'en-têtes",
|
||||||
add_new: 'Ajouter',
|
add_new: "Ajouter",
|
||||||
response: 'Réponse',
|
response: "Réponse",
|
||||||
query: 'Requête',
|
query: "Requête",
|
||||||
queries: 'Requêtes',
|
queries: "Requêtes",
|
||||||
query_variables: 'Variables',
|
query_variables: "Variables",
|
||||||
mutations: 'Mutations',
|
mutations: "Mutations",
|
||||||
subscriptions: 'Abonnements',
|
subscriptions: "Abonnements",
|
||||||
types: 'Types',
|
types: "Types",
|
||||||
send: 'Envoyer',
|
send: "Envoyer",
|
||||||
background: 'Arrière-plan',
|
background: "Arrière-plan",
|
||||||
color: 'Couleur',
|
color: "Couleur",
|
||||||
labels: 'Libellés',
|
labels: "Libellés",
|
||||||
multi_color: 'Multi-couleurs',
|
multi_color: "Multi-couleurs",
|
||||||
enabled: 'Activé',
|
enabled: "Activé",
|
||||||
disabled: 'Désactivé',
|
disabled: "Désactivé",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting: 'Le proxy officiel de Postwoman est hébergé par ApolloTV.',
|
postwoman_official_proxy_hosting: "Le proxy officiel de Postwoman est hébergé par ApolloTV.",
|
||||||
read_the: 'Lire la',
|
read_the: "Lire la",
|
||||||
apollotv_privacy_policy: 'politique de confidentialité ApolloTV',
|
apollotv_privacy_policy: "politique de confidentialité ApolloTV",
|
||||||
contact_us: 'Contactez nous',
|
contact_us: "Contactez nous",
|
||||||
connect: 'Relier',
|
connect: "Relier",
|
||||||
disconnect: 'Déconnecter',
|
disconnect: "Déconnecter",
|
||||||
start: 'Début',
|
start: "Début",
|
||||||
stop: 'Arrêtez',
|
stop: "Arrêtez",
|
||||||
access_token: "Token d'accès",
|
access_token: "Token d'accès",
|
||||||
token_list: 'Liste des Tokens',
|
token_list: "Liste des Tokens",
|
||||||
get_token: 'Obtenir un nouveau Token',
|
get_token: "Obtenir un nouveau Token",
|
||||||
manage_token: 'Gérer le Token',
|
manage_token: "Gérer le Token",
|
||||||
save_token: 'Sauvegarder le Token',
|
save_token: "Sauvegarder le Token",
|
||||||
use_token: 'Utiliser un Token',
|
use_token: "Utiliser un Token",
|
||||||
request_token: 'Demander un Token',
|
request_token: "Demander un Token",
|
||||||
save_token_req: 'Sauvegarder la requête ',
|
save_token_req: "Sauvegarder la requête ",
|
||||||
manage_token_req: 'Gérer la requête avec Token',
|
manage_token_req: "Gérer la requête avec Token",
|
||||||
use_token_req: 'Utiliser la requête avec Token',
|
use_token_req: "Utiliser la requête avec Token",
|
||||||
token_req_name: 'Nom de la requête',
|
token_req_name: "Nom de la requête",
|
||||||
token_req_details: 'Détails de la requête',
|
token_req_details: "Détails de la requête",
|
||||||
token_name: 'Nom du Token',
|
token_name: "Nom du Token",
|
||||||
oidc_discovery_url: 'OIDC Discovery URL',
|
oidc_discovery_url: "OIDC Discovery URL",
|
||||||
auth_url: 'Auth URL',
|
auth_url: "Auth URL",
|
||||||
access_token_url: "URL du Token d'accès",
|
access_token_url: "URL du Token d'accès",
|
||||||
client_id: 'Client ID',
|
client_id: "Client ID",
|
||||||
scope: 'Scope',
|
scope: "Scope",
|
||||||
state: 'État',
|
state: "État",
|
||||||
token_req_list: 'Liste des requêtes avec Token',
|
token_req_list: "Liste des requêtes avec Token",
|
||||||
no_path: 'Aucun chemin',
|
no_path: "Aucun chemin",
|
||||||
no_label: 'Aucun label',
|
no_label: "Aucun label",
|
||||||
prerequest_script: 'Pre-Request Script',
|
prerequest_script: "Pre-Request Script",
|
||||||
no_prerequest_script: 'No pre-request script',
|
no_prerequest_script: "No pre-request script",
|
||||||
search: 'Historique de la recherche',
|
search: "Historique de la recherche",
|
||||||
history_empty: "L'historique est vide",
|
history_empty: "L'historique est vide",
|
||||||
history_deleted: 'Historique supprimé',
|
history_deleted: "Historique supprimé",
|
||||||
clear: 'Nettoyer',
|
clear: "Nettoyer",
|
||||||
clear_all: 'Tout nettoyer',
|
clear_all: "Tout nettoyer",
|
||||||
cleared: 'Nettoyé',
|
cleared: "Nettoyé",
|
||||||
close: 'Fermer',
|
close: "Fermer",
|
||||||
sort: 'Trier',
|
sort: "Trier",
|
||||||
time: 'Temps',
|
time: "Temps",
|
||||||
duration: 'Durée',
|
duration: "Durée",
|
||||||
no_duration: 'Aucune durée',
|
no_duration: "Aucune durée",
|
||||||
show_more: "Plus d'informations",
|
show_more: "Plus d'informations",
|
||||||
hide_more: "Moins d'informations",
|
hide_more: "Moins d'informations",
|
||||||
collection: 'Collection',
|
collection: "Collection",
|
||||||
current_collection: 'Collection Actuelle',
|
current_collection: "Collection Actuelle",
|
||||||
select_collection: 'Selectionner une Collection',
|
select_collection: "Selectionner une Collection",
|
||||||
create_collection: 'Créer une Collection',
|
create_collection: "Créer une Collection",
|
||||||
new: 'Nouveau',
|
new: "Nouveau",
|
||||||
import_export: 'Importer / Exporter',
|
import_export: "Importer / Exporter",
|
||||||
more: 'Plus',
|
more: "Plus",
|
||||||
folder: 'Dossier',
|
folder: "Dossier",
|
||||||
new_folder: 'Nouveau Dossier',
|
new_folder: "Nouveau Dossier",
|
||||||
my_new_folder: 'Mon Nouveau Dossier',
|
my_new_folder: "Mon Nouveau Dossier",
|
||||||
folder_empty: 'Ce Dossier est vide',
|
folder_empty: "Ce Dossier est vide",
|
||||||
edit_folder: 'Éditer le Dossier',
|
edit_folder: "Éditer le Dossier",
|
||||||
edit: 'Éditer',
|
edit: "Éditer",
|
||||||
delete: 'Supprimer',
|
delete: "Supprimer",
|
||||||
deleted: 'Supprimé',
|
deleted: "Supprimé",
|
||||||
undo: 'Annuler',
|
undo: "Annuler",
|
||||||
collection_empty: 'Cette Collection est vide',
|
collection_empty: "Cette Collection est vide",
|
||||||
new_collection: 'Nouvelle Collection',
|
new_collection: "Nouvelle Collection",
|
||||||
my_new_collection: 'Ma Nouvelle Collection',
|
my_new_collection: "Ma Nouvelle Collection",
|
||||||
edit_collection: 'Éditer la Collection',
|
edit_collection: "Éditer la Collection",
|
||||||
edit_request: 'Éditer ma requête',
|
edit_request: "Éditer ma requête",
|
||||||
save_request_as: 'Sauvegarder ma requête sous',
|
save_request_as: "Sauvegarder ma requête sous",
|
||||||
export: 'Exporter',
|
export: "Exporter",
|
||||||
connecting_to: 'Connexion à {name}...',
|
connecting_to: "Connexion à {name}...",
|
||||||
connected: 'Connecté',
|
connected: "Connecté",
|
||||||
connected_to: 'Connecté à {name}',
|
connected_to: "Connecté à {name}",
|
||||||
disconnected: 'Déconnecté',
|
disconnected: "Déconnecté",
|
||||||
disconnected_from: 'Déconnecté sur {name}',
|
disconnected_from: "Déconnecté sur {name}",
|
||||||
something_went_wrong: "Quelque chose n'a pas marché!",
|
something_went_wrong: "Quelque chose n'a pas marché!",
|
||||||
error_occurred: "Une erreur s'est produite.",
|
error_occurred: "Une erreur s'est produite.",
|
||||||
browser_support_sse:
|
browser_support_sse:
|
||||||
'Ce navigateur ne semble pas prendre en charge les événements envoyés par le serveur.',
|
"Ce navigateur ne semble pas prendre en charge les événements envoyés par le serveur.",
|
||||||
log: 'Log',
|
log: "Log",
|
||||||
no_url: 'Aucune URL',
|
no_url: "Aucune URL",
|
||||||
run_query: 'Lancer une recherche',
|
run_query: "Lancer une recherche",
|
||||||
copy_query: 'Copier la recherche',
|
copy_query: "Copier la recherche",
|
||||||
kinda_dark: 'Plutôt Sombre',
|
kinda_dark: "Plutôt Sombre",
|
||||||
clearly_white: 'Clairement Blanc',
|
clearly_white: "Clairement Blanc",
|
||||||
just_black: 'Seulement Noir',
|
just_black: "Seulement Noir",
|
||||||
auto_system: 'Auth (système)',
|
auto_system: "Auth (système)",
|
||||||
green: 'Vert',
|
green: "Vert",
|
||||||
yellow: 'Jaune',
|
yellow: "Jaune",
|
||||||
pink: 'Rose',
|
pink: "Rose",
|
||||||
red: 'Rouge',
|
red: "Rouge",
|
||||||
purple: 'Violet',
|
purple: "Violet",
|
||||||
orange: 'Orange',
|
orange: "Orange",
|
||||||
cyan: 'Cyan',
|
cyan: "Cyan",
|
||||||
blue: 'Bleue',
|
blue: "Bleue",
|
||||||
loading: 'Chargement...',
|
loading: "Chargement...",
|
||||||
fetching: 'Récupération...',
|
fetching: "Récupération...",
|
||||||
waiting_send_req: "(en attente de l'envoi de la demande)",
|
waiting_send_req: "(en attente de l'envoi de la demande)",
|
||||||
cancel: 'Annuler',
|
cancel: "Annuler",
|
||||||
save: 'Sauvarder',
|
save: "Sauvarder",
|
||||||
dismiss: 'Dismiss',
|
dismiss: "Dismiss",
|
||||||
are_you_sure: 'Êtes-vous sûr?',
|
are_you_sure: "Êtes-vous sûr?",
|
||||||
yes: 'Oui',
|
yes: "Oui",
|
||||||
no: 'Non',
|
no: "Non",
|
||||||
restore: 'Restaurer',
|
restore: "Restaurer",
|
||||||
add_star: 'Ajouter une étoile',
|
add_star: "Ajouter une étoile",
|
||||||
remove_star: 'Supprimer une étoile',
|
remove_star: "Supprimer une étoile",
|
||||||
nothing_found: "Rien n'a été trouvé",
|
nothing_found: "Rien n'a été trouvé",
|
||||||
replace_current: "Remplacer l'actuel",
|
replace_current: "Remplacer l'actuel",
|
||||||
replace_json: 'Replacer avec du JSON',
|
replace_json: "Replacer avec du JSON",
|
||||||
preserve_current: "Conserver l'actuel",
|
preserve_current: "Conserver l'actuel",
|
||||||
import_json: 'Importer depuis un JSON',
|
import_json: "Importer depuis un JSON",
|
||||||
download_file: 'Télécharger un fichier',
|
download_file: "Télécharger un fichier",
|
||||||
upload_file: 'Charger un fichier',
|
upload_file: "Charger un fichier",
|
||||||
copy_response: 'Copier la réponse',
|
copy_response: "Copier la réponse",
|
||||||
copy_code: 'Copier le code',
|
copy_code: "Copier le code",
|
||||||
copy_schema: 'Copier le Schéma',
|
copy_schema: "Copier le Schéma",
|
||||||
use_request: 'Utiliser cette requête',
|
use_request: "Utiliser cette requête",
|
||||||
documentation: 'Documentation',
|
documentation: "Documentation",
|
||||||
docs: 'Docs',
|
docs: "Docs",
|
||||||
reset_default: 'Rétablir la valeur par défaut',
|
reset_default: "Rétablir la valeur par défaut",
|
||||||
fields: 'CHAMPS',
|
fields: "CHAMPS",
|
||||||
deprecated: 'DÉPRÉCIÉ',
|
deprecated: "DÉPRÉCIÉ",
|
||||||
add_one_header: '(ajouter au moins un en-tête)',
|
add_one_header: "(ajouter au moins un en-tête)",
|
||||||
add_one_parameter: '(ajouter au moins un paramètre)',
|
add_one_parameter: "(ajouter au moins un paramètre)",
|
||||||
header_count: '{count} en-tête',
|
header_count: "{count} en-tête",
|
||||||
parameter_count: '{count} paramètre',
|
parameter_count: "{count} paramètre",
|
||||||
variable_count: '{count} variable',
|
variable_count: "{count} variable",
|
||||||
value_count: '{count} valeur',
|
value_count: "{count} valeur",
|
||||||
send_request_first: "Envoyez d'abord une requête",
|
send_request_first: "Envoyez d'abord une requête",
|
||||||
generate_docs: 'Genérer une Documentation',
|
generate_docs: "Genérer une Documentation",
|
||||||
generate_docs_message:
|
generate_docs_message:
|
||||||
"Importer n'importe quelle collection de Postwoman pour générer de la documentation en déplacement.",
|
"Importer n'importe quelle collection de Postwoman pour générer de la documentation en déplacement.",
|
||||||
generate_docs_first: "Générer la documentation d'abord",
|
generate_docs_first: "Générer la documentation d'abord",
|
||||||
docs_generated: 'Documentation générée',
|
docs_generated: "Documentation générée",
|
||||||
import_collections: 'Importer les collections',
|
import_collections: "Importer les collections",
|
||||||
optional: '(optionnel)',
|
optional: "(optionnel)",
|
||||||
json: 'JSON',
|
json: "JSON",
|
||||||
none: 'Aucun',
|
none: "Aucun",
|
||||||
username: 'Username',
|
username: "Username",
|
||||||
password: 'Password',
|
password: "Password",
|
||||||
token: 'Token',
|
token: "Token",
|
||||||
payload: 'Payload',
|
payload: "Payload",
|
||||||
choose_file: 'Choisir un fichier',
|
choose_file: "Choisir un fichier",
|
||||||
file_imported: 'Fichier importé',
|
file_imported: "Fichier importé",
|
||||||
f12_details: '(F12 pour voir les détails)',
|
f12_details: "(F12 pour voir les détails)",
|
||||||
we_use_cookies: 'Nous utilisons des cookies',
|
we_use_cookies: "Nous utilisons des cookies",
|
||||||
copied_to_clipboard: 'Copié dans le presse-papier',
|
copied_to_clipboard: "Copié dans le presse-papier",
|
||||||
finished_in: 'Fini en {duration}ms',
|
finished_in: "Fini en {duration}ms",
|
||||||
check_console_details: 'Consultez la console pour plus de détails.',
|
check_console_details: "Consultez la console pour plus de détails.",
|
||||||
download_started: 'Téléchargement démarré',
|
download_started: "Téléchargement démarré",
|
||||||
url_invalid_format: "L'URL n'est pas formatée correctement",
|
url_invalid_format: "L'URL n'est pas formatée correctement",
|
||||||
curl_invalid_format: "cURL n'est pas formaté correctement",
|
curl_invalid_format: "cURL n'est pas formaté correctement",
|
||||||
enable_proxy: 'Essayez en activant le Proxy',
|
enable_proxy: "Essayez en activant le Proxy",
|
||||||
complete_config_urls: 'Veuillez compléter les urls de configuration.',
|
complete_config_urls: "Veuillez compléter les urls de configuration.",
|
||||||
token_request_saved: 'Requête de Token sauvegardé',
|
token_request_saved: "Requête de Token sauvegardé",
|
||||||
donate_info1:
|
donate_info1:
|
||||||
"Si vous avez apprécié la productivité de l'utilisation de Postwoman, considérez le don comme un signe d'appréciation.",
|
"Si vous avez apprécié la productivité de l'utilisation de Postwoman, considérez le don comme un signe d'appréciation.",
|
||||||
donate_info2: 'Vous pouvez soutenir le développement de Postwoman par les méthodes suivantes :',
|
donate_info2: "Vous pouvez soutenir le développement de Postwoman par les méthodes suivantes :",
|
||||||
one_time_recurring: 'Ponctuel ou récurrent',
|
one_time_recurring: "Ponctuel ou récurrent",
|
||||||
one_time: 'Une fois',
|
one_time: "Une fois",
|
||||||
recurring: 'Récurrent',
|
recurring: "Récurrent",
|
||||||
wiki: 'Wiki',
|
wiki: "Wiki",
|
||||||
error: 'Erreur',
|
error: "Erreur",
|
||||||
go_home: "Aller à l'accueil",
|
go_home: "Aller à l'accueil",
|
||||||
reload: 'Recharger',
|
reload: "Recharger",
|
||||||
enter_curl: 'Entrer cURL',
|
enter_curl: "Entrer cURL",
|
||||||
empty: 'Vide',
|
empty: "Vide",
|
||||||
extensions: 'Extensions',
|
extensions: "Extensions",
|
||||||
extensions_info1: "Extension pour navigateur qui simplifie l'accès à Postwoman",
|
extensions_info1: "Extension pour navigateur qui simplifie l'accès à Postwoman",
|
||||||
extensions_info2: "Obtenez l'extension Postwoman pour navigateur !",
|
extensions_info2: "Obtenez l'extension Postwoman pour navigateur !",
|
||||||
installed: 'Installé',
|
installed: "Installé",
|
||||||
login_with: 'Se connecter avec',
|
login_with: "Se connecter avec",
|
||||||
logged_out: 'Se déconnecter',
|
logged_out: "Se déconnecter",
|
||||||
logout: 'Déconnexion',
|
logout: "Déconnexion",
|
||||||
account: 'Compte',
|
account: "Compte",
|
||||||
sync: 'Synchroniser',
|
sync: "Synchroniser",
|
||||||
syncHistory: 'Historique',
|
syncHistory: "Historique",
|
||||||
syncCollections: 'Collections',
|
syncCollections: "Collections",
|
||||||
turn_on: 'Activer',
|
turn_on: "Activer",
|
||||||
login_first: "Se connecter d'abord",
|
login_first: "Se connecter d'abord",
|
||||||
paste_a_collection: 'Coller une collection',
|
paste_a_collection: "Coller une collection",
|
||||||
import_from_sync: 'Importer depuis la synchronisation',
|
import_from_sync: "Importer depuis la synchronisation",
|
||||||
}
|
}
|
||||||
|
|||||||
174
lang/id-ID.js
174
lang/id-ID.js
@@ -1,89 +1,89 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Beranda',
|
home: "Beranda",
|
||||||
realtime: 'Waktu Nyata',
|
realtime: "Waktu Nyata",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Pengaturan',
|
settings: "Pengaturan",
|
||||||
request: 'Permintaan',
|
request: "Permintaan",
|
||||||
install_pwa: 'Pasang PWA',
|
install_pwa: "Pasang PWA",
|
||||||
support_us: 'Dukung kami',
|
support_us: "Dukung kami",
|
||||||
tweet: 'Cuitkan',
|
tweet: "Cuitkan",
|
||||||
options: 'Opsi',
|
options: "Opsi",
|
||||||
communication: 'Komunikasi',
|
communication: "Komunikasi",
|
||||||
endpoint: 'Titik Akhir',
|
endpoint: "Titik Akhir",
|
||||||
schema: 'Skema',
|
schema: "Skema",
|
||||||
theme: 'Tema',
|
theme: "Tema",
|
||||||
subscribe: 'Berlangganan',
|
subscribe: "Berlangganan",
|
||||||
choose_language: 'Pilih Bahasa',
|
choose_language: "Pilih Bahasa",
|
||||||
shortcuts: 'Pintasan',
|
shortcuts: "Pintasan",
|
||||||
send_request: 'Kirim Permintaan',
|
send_request: "Kirim Permintaan",
|
||||||
save_to_collections: 'Simpan ke Koleksi',
|
save_to_collections: "Simpan ke Koleksi",
|
||||||
copy_request_link: 'Salin Tautan Permintaan',
|
copy_request_link: "Salin Tautan Permintaan",
|
||||||
reset_request: 'Atur Ulang Permintaan',
|
reset_request: "Atur Ulang Permintaan",
|
||||||
support_us_on: 'Dukung kami di',
|
support_us_on: "Dukung kami di",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'Paypal',
|
paypal: "Paypal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'Kode Javascript',
|
javascript_code: "Kode Javascript",
|
||||||
method: 'Metode',
|
method: "Metode",
|
||||||
path: 'Lintasan',
|
path: "Lintasan",
|
||||||
label: 'Label',
|
label: "Label",
|
||||||
again: 'Lagi',
|
again: "Lagi",
|
||||||
content_type: 'Jenis Konten',
|
content_type: "Jenis Konten",
|
||||||
raw_input: 'Masukan mentah',
|
raw_input: "Masukan mentah",
|
||||||
parameter_list: 'Daftar parameter',
|
parameter_list: "Daftar parameter",
|
||||||
raw_request_body: 'Badan Permintaan Mentah',
|
raw_request_body: "Badan Permintaan Mentah",
|
||||||
show_code: 'Tampilkan Kode',
|
show_code: "Tampilkan Kode",
|
||||||
hide_code: 'Sembunyikan Kode',
|
hide_code: "Sembunyikan Kode",
|
||||||
show_prerequest_script: 'Tampilkan Skrip Pra-Permintaan',
|
show_prerequest_script: "Tampilkan Skrip Pra-Permintaan",
|
||||||
hide_prerequest_script: 'Sembunyikan Skrip Pra-Permintaan',
|
hide_prerequest_script: "Sembunyikan Skrip Pra-Permintaan",
|
||||||
authentication: 'Autentikasi',
|
authentication: "Autentikasi",
|
||||||
authentication_type: 'Jenis Autentikasi',
|
authentication_type: "Jenis Autentikasi",
|
||||||
include_in_url: 'Sertakan di URL',
|
include_in_url: "Sertakan di URL",
|
||||||
parameters: 'Parameter',
|
parameters: "Parameter",
|
||||||
expand_response: 'Bentangkan Balasan',
|
expand_response: "Bentangkan Balasan",
|
||||||
collapse_response: 'Ciutkan Balasan',
|
collapse_response: "Ciutkan Balasan",
|
||||||
hide_preview: 'Sembunyikan Pratinjau',
|
hide_preview: "Sembunyikan Pratinjau",
|
||||||
preview_html: 'Pratinjau HTML',
|
preview_html: "Pratinjau HTML",
|
||||||
history: 'Riwayat',
|
history: "Riwayat",
|
||||||
collections: 'Koleksi',
|
collections: "Koleksi",
|
||||||
import_curl: 'Impor cURL',
|
import_curl: "Impor cURL",
|
||||||
import: 'Impor',
|
import: "Impor",
|
||||||
generate_code: 'Hasilkan kode',
|
generate_code: "Hasilkan kode",
|
||||||
request_type: 'Jenis permintaan',
|
request_type: "Jenis permintaan",
|
||||||
generated_code: 'Kode yang dihasilkan',
|
generated_code: "Kode yang dihasilkan",
|
||||||
status: 'Status',
|
status: "Status",
|
||||||
headers: 'Header',
|
headers: "Header",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(Menunggu sambungan)',
|
waiting_for_connection: "(Menunggu sambungan)",
|
||||||
message: 'Pesan',
|
message: "Pesan",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Peladen',
|
server: "Peladen",
|
||||||
events: 'Kejadian',
|
events: "Kejadian",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Ambil skema',
|
get_schema: "Ambil skema",
|
||||||
header_list: 'Daftar header',
|
header_list: "Daftar header",
|
||||||
add_new: 'Tambah baru',
|
add_new: "Tambah baru",
|
||||||
response: 'Balasan',
|
response: "Balasan",
|
||||||
query: 'Kueri',
|
query: "Kueri",
|
||||||
queries: 'Kueri',
|
queries: "Kueri",
|
||||||
query_variables: 'Variables',
|
query_variables: "Variables",
|
||||||
mutations: 'Mutasi',
|
mutations: "Mutasi",
|
||||||
subscriptions: 'Langganan',
|
subscriptions: "Langganan",
|
||||||
types: 'Jenis',
|
types: "Jenis",
|
||||||
send: 'Kirim',
|
send: "Kirim",
|
||||||
background: 'Latar belakang',
|
background: "Latar belakang",
|
||||||
color: 'Warna',
|
color: "Warna",
|
||||||
labels: 'Label',
|
labels: "Label",
|
||||||
multi_color: 'Warna beragam',
|
multi_color: "Warna beragam",
|
||||||
enabled: 'diaktifkan',
|
enabled: "diaktifkan",
|
||||||
disabled: 'dinonaktifkan',
|
disabled: "dinonaktifkan",
|
||||||
proxy: 'Proksi',
|
proxy: "Proksi",
|
||||||
postwoman_official_proxy_hosting: 'Proksi Resmi Postwoman dalam penginangan ApolloTV.',
|
postwoman_official_proxy_hosting: "Proksi Resmi Postwoman dalam penginangan ApolloTV.",
|
||||||
read_the: 'Bacalah',
|
read_the: "Bacalah",
|
||||||
apollotv_privacy_policy: 'kebijakan privasi ApolloTV',
|
apollotv_privacy_policy: "kebijakan privasi ApolloTV",
|
||||||
contact_us: 'Hubungi kami',
|
contact_us: "Hubungi kami",
|
||||||
connect: 'Menghubungkan',
|
connect: "Menghubungkan",
|
||||||
disconnect: 'Memutuskan',
|
disconnect: "Memutuskan",
|
||||||
start: 'Mulai',
|
start: "Mulai",
|
||||||
stop: 'Berhenti',
|
stop: "Berhenti",
|
||||||
}
|
}
|
||||||
|
|||||||
484
lang/ja-JP.js
484
lang/ja-JP.js
@@ -1,245 +1,245 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'ホーム',
|
home: "ホーム",
|
||||||
realtime: 'リアルタイム',
|
realtime: "リアルタイム",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: '設定',
|
settings: "設定",
|
||||||
request: 'リクエスト',
|
request: "リクエスト",
|
||||||
install_pwa: 'PWAをインストール',
|
install_pwa: "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: 'リクエストURLをコピー',
|
copy_request_link: "リクエストURLをコピー",
|
||||||
reset_request: 'リクエストをリセット',
|
reset_request: "リクエストをリセット",
|
||||||
support_us_on: '以下より寄付',
|
support_us_on: "以下より寄付",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'JavaScriptコード',
|
javascript_code: "JavaScriptコード",
|
||||||
method: 'メソッド',
|
method: "メソッド",
|
||||||
path: 'パス',
|
path: "パス",
|
||||||
label: 'ラベル',
|
label: "ラベル",
|
||||||
again: '',
|
again: "",
|
||||||
content_type: 'Content Type',
|
content_type: "Content Type",
|
||||||
raw_input: 'Raw入力',
|
raw_input: "Raw入力",
|
||||||
parameter_list: 'パラメータリスト',
|
parameter_list: "パラメータリスト",
|
||||||
raw_request_body: 'Rawリクエストボディー',
|
raw_request_body: "Rawリクエストボディー",
|
||||||
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: 'URLに含む',
|
include_in_url: "URLに含む",
|
||||||
parameters: 'パラメータ',
|
parameters: "パラメータ",
|
||||||
expand_response: 'レスポンスを広げる',
|
expand_response: "レスポンスを広げる",
|
||||||
collapse_response: 'レスポンスを狭める',
|
collapse_response: "レスポンスを狭める",
|
||||||
hide_preview: 'プレビューしない',
|
hide_preview: "プレビューしない",
|
||||||
preview_html: 'HTMLプレビュー表示',
|
preview_html: "HTMLプレビュー表示",
|
||||||
history: '履歴',
|
history: "履歴",
|
||||||
collections: 'コレクション',
|
collections: "コレクション",
|
||||||
import_curl: 'cURLをインポート',
|
import_curl: "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',
|
sse: "SSE",
|
||||||
server: 'サーバ',
|
server: "サーバ",
|
||||||
events: 'イベント',
|
events: "イベント",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'スキーマを取得',
|
get_schema: "スキーマを取得",
|
||||||
header_list: 'ヘッダーリスト',
|
header_list: "ヘッダーリスト",
|
||||||
add_new: '追加',
|
add_new: "追加",
|
||||||
response: 'レスポンス',
|
response: "レスポンス",
|
||||||
query: 'クエリ',
|
query: "クエリ",
|
||||||
queries: 'クエリ',
|
queries: "クエリ",
|
||||||
query_variables: '変数',
|
query_variables: "変数",
|
||||||
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の公式プロキシは、Apollo TVがホストしています。',
|
postwoman_official_proxy_hosting: "Postwomanの公式プロキシは、Apollo TVがホストしています。",
|
||||||
read_the: 'プライバシーポリシー',
|
read_the: "プライバシーポリシー",
|
||||||
apollotv_privacy_policy: 'を読む',
|
apollotv_privacy_policy: "を読む",
|
||||||
contact_us: 'お問い合わせ',
|
contact_us: "お問い合わせ",
|
||||||
connect: '接続',
|
connect: "接続",
|
||||||
disconnect: '切断',
|
disconnect: "切断",
|
||||||
start: '開始',
|
start: "開始",
|
||||||
stop: '停止',
|
stop: "停止",
|
||||||
access_token: 'アクセストークン',
|
access_token: "アクセストークン",
|
||||||
token_list: 'トークンリスト',
|
token_list: "トークンリスト",
|
||||||
get_token: '新しいトークンを取得',
|
get_token: "新しいトークンを取得",
|
||||||
manage_token: 'アクセストークンを管理',
|
manage_token: "アクセストークンを管理",
|
||||||
save_token: 'アクセストークンを保存',
|
save_token: "アクセストークンを保存",
|
||||||
use_token: 'アクセストークンを使用',
|
use_token: "アクセストークンを使用",
|
||||||
request_token: 'トークンをリクエスト',
|
request_token: "トークンをリクエスト",
|
||||||
save_token_req: 'トークンリクエストを保存',
|
save_token_req: "トークンリクエストを保存",
|
||||||
manage_token_req: 'トークンリクエストを管理',
|
manage_token_req: "トークンリクエストを管理",
|
||||||
use_token_req: 'トークンリクエストを使用',
|
use_token_req: "トークンリクエストを使用",
|
||||||
token_req_name: 'リクエスト名',
|
token_req_name: "リクエスト名",
|
||||||
token_req_details: 'リクエスト詳細',
|
token_req_details: "リクエスト詳細",
|
||||||
token_name: 'トークン名',
|
token_name: "トークン名",
|
||||||
oidc_discovery_url: 'OIDC Discovery URL',
|
oidc_discovery_url: "OIDC Discovery URL",
|
||||||
auth_url: '認証URL',
|
auth_url: "認証URL",
|
||||||
access_token_url: 'アクセストークンURL',
|
access_token_url: "アクセストークンURL",
|
||||||
client_id: 'クライアントID',
|
client_id: "クライアントID",
|
||||||
scope: 'スコープ',
|
scope: "スコープ",
|
||||||
state: 'ステート',
|
state: "ステート",
|
||||||
token_req_list: 'トークンリクエストリスト',
|
token_req_list: "トークンリクエストリスト",
|
||||||
no_path: 'パス無し',
|
no_path: "パス無し",
|
||||||
no_label: 'ラベル無し',
|
no_label: "ラベル無し",
|
||||||
prerequest_script: 'プレリクエストスクリプト',
|
prerequest_script: "プレリクエストスクリプト",
|
||||||
no_prerequest_script: 'プレリクエストスクリプト無し',
|
no_prerequest_script: "プレリクエストスクリプト無し",
|
||||||
search: '検索履歴',
|
search: "検索履歴",
|
||||||
history_empty: '履歴が空です',
|
history_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_collection: "コレクションを選択",
|
||||||
create_collection: 'コレクションを作成',
|
create_collection: "コレクションを作成",
|
||||||
new: '新規',
|
new: "新規",
|
||||||
import_export: 'インポート・エクスポート',
|
import_export: "インポート・エクスポート",
|
||||||
more: 'More',
|
more: "More",
|
||||||
folder: 'フォルダ',
|
folder: "フォルダ",
|
||||||
new_folder: '新しいフォルダー',
|
new_folder: "新しいフォルダー",
|
||||||
my_new_folder: '私の新しいフォルダー',
|
my_new_folder: "私の新しいフォルダー",
|
||||||
folder_empty: 'フォルダーが空です',
|
folder_empty: "フォルダーが空です",
|
||||||
edit_folder: 'フォルダーを編集',
|
edit_folder: "フォルダーを編集",
|
||||||
edit: '編集',
|
edit: "編集",
|
||||||
delete: '削除',
|
delete: "削除",
|
||||||
deleted: '削除された',
|
deleted: "削除された",
|
||||||
undo: '元に戻す',
|
undo: "元に戻す",
|
||||||
collection_empty: 'コレクションが空です',
|
collection_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: '{name}に接続中...',
|
connecting_to: "{name}に接続中...",
|
||||||
connected: '接続した',
|
connected: "接続した",
|
||||||
connected_to: '{name}に接続した',
|
connected_to: "{name}に接続した",
|
||||||
disconnected: '切断された',
|
disconnected: "切断された",
|
||||||
disconnected_from: '{name}から切断された',
|
disconnected_from: "{name}から切断された",
|
||||||
something_went_wrong: '何かの問題が起きた',
|
something_went_wrong: "何かの問題が起きた",
|
||||||
error_occurred: 'エラーが発生した',
|
error_occurred: "エラーが発生した",
|
||||||
browser_support_sse: 'このブラウザはサーバー送信イベントのサポートがないようです。',
|
browser_support_sse: "このブラウザはサーバー送信イベントのサポートがないようです。",
|
||||||
log: 'ログ',
|
log: "ログ",
|
||||||
no_url: 'URL無し',
|
no_url: "URL無し",
|
||||||
run_query: 'クエリを実行',
|
run_query: "クエリを実行",
|
||||||
copy_query: 'クエリをコピー',
|
copy_query: "クエリをコピー",
|
||||||
kinda_dark: 'ちょっと暗い',
|
kinda_dark: "ちょっと暗い",
|
||||||
clearly_white: '明らかに白',
|
clearly_white: "明らかに白",
|
||||||
just_black: 'ただの黒',
|
just_black: "ただの黒",
|
||||||
auto_system: 'オート(システム)',
|
auto_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_send_req: "(リクエスト送信待ち)",
|
||||||
cancel: 'キャンセル',
|
cancel: "キャンセル",
|
||||||
save: '保存',
|
save: "保存",
|
||||||
dismiss: 'Dismiss',
|
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: 'JSONに置換',
|
replace_json: "JSONに置換",
|
||||||
preserve_current: '保持',
|
preserve_current: "保持",
|
||||||
import_json: 'JSONをインポート',
|
import_json: "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_default: "デフォルトにリセット",
|
||||||
fields: 'FIELDS',
|
fields: "FIELDS",
|
||||||
deprecated: 'DEPRECATED',
|
deprecated: "DEPRECATED",
|
||||||
add_one_header: '(ヘッダーを少なくとも1つ追加してください)',
|
add_one_header: "(ヘッダーを少なくとも1つ追加してください)",
|
||||||
add_one_parameter: '(パラメータを少なくとも1つ追加してください)',
|
add_one_parameter: "(パラメータを少なくとも1つ追加してください)",
|
||||||
header_count: 'ヘッダー {count}',
|
header_count: "ヘッダー {count}",
|
||||||
parameter_count: 'パラメータ {count}',
|
parameter_count: "パラメータ {count}",
|
||||||
variable_count: '変数 {count}',
|
variable_count: "変数 {count}",
|
||||||
value_count: '値 {count}',
|
value_count: "値 {count}",
|
||||||
send_request_first: 'リクエストを先に送信してください',
|
send_request_first: "リクエストを先に送信してください",
|
||||||
generate_docs: 'ドキュメンテーションを生成',
|
generate_docs: "ドキュメンテーションを生成",
|
||||||
generate_docs_message: 'Postwomanのコレクションをインポートし、直ちにドキュメンテーションを生成',
|
generate_docs_message: "Postwomanのコレクションをインポートし、直ちにドキュメンテーションを生成",
|
||||||
generate_docs_first: 'ドキュメントを先に生成してください',
|
generate_docs_first: "ドキュメントを先に生成してください",
|
||||||
docs_generated: 'ドキュメンテーションを生成した',
|
docs_generated: "ドキュメンテーションを生成した",
|
||||||
import_collections: 'コレクションをインポート',
|
import_collections: "コレクションをインポート",
|
||||||
optional: '(オプション)',
|
optional: "(オプション)",
|
||||||
json: 'JSON',
|
json: "JSON",
|
||||||
none: 'なし',
|
none: "なし",
|
||||||
username: 'ユーザー名',
|
username: "ユーザー名",
|
||||||
password: 'パスワード',
|
password: "パスワード",
|
||||||
token: 'トークン',
|
token: "トークン",
|
||||||
payload: 'ペイロード',
|
payload: "ペイロード",
|
||||||
choose_file: 'ファイルを選択',
|
choose_file: "ファイルを選択",
|
||||||
file_imported: 'ファイルをインポートした',
|
file_imported: "ファイルをインポートした",
|
||||||
f12_details: '(F12を押して詳細を確認してください)',
|
f12_details: "(F12を押して詳細を確認してください)",
|
||||||
we_use_cookies: 'クッキーを使用します。',
|
we_use_cookies: "クッキーを使用します。",
|
||||||
copied_to_clipboard: 'クリップボードにコピーした',
|
copied_to_clipboard: "クリップボードにコピーした",
|
||||||
finished_in: '{duration}msで終了した',
|
finished_in: "{duration}msで終了した",
|
||||||
check_console_details: 'コンソールより詳細を確認してください',
|
check_console_details: "コンソールより詳細を確認してください",
|
||||||
download_started: 'ダウンロードを開始した',
|
download_started: "ダウンロードを開始した",
|
||||||
url_invalid_format: 'URLが正しくフォーマットされていない',
|
url_invalid_format: "URLが正しくフォーマットされていない",
|
||||||
curl_invalid_format: 'cURLが正しくフォーマットされていない',
|
curl_invalid_format: "cURLが正しくフォーマットされていない",
|
||||||
enable_proxy: 'プロキシを有効にしてみてください',
|
enable_proxy: "プロキシを有効にしてみてください",
|
||||||
complete_config_urls: '設定URLsを入力してください',
|
complete_config_urls: "設定URLsを入力してください",
|
||||||
token_request_saved: 'トークンリクエストを保存した',
|
token_request_saved: "トークンリクエストを保存した",
|
||||||
donate_info1:
|
donate_info1:
|
||||||
'Postwomanを非常に役に立つと思われる場合、感謝の印として寄付のご検討をお願いします。',
|
"Postwomanを非常に役に立つと思われる場合、感謝の印として寄付のご検討をお願いします。",
|
||||||
donate_info2: '以下の方法でPostwomanの開発をサポートできます:',
|
donate_info2: "以下の方法でPostwomanの開発をサポートできます:",
|
||||||
one_time_recurring: '一度又は定期的',
|
one_time_recurring: "一度又は定期的",
|
||||||
one_time: '一度',
|
one_time: "一度",
|
||||||
recurring: '定期的',
|
recurring: "定期的",
|
||||||
wiki: 'Wiki',
|
wiki: "Wiki",
|
||||||
error: 'エラー',
|
error: "エラー",
|
||||||
go_home: 'ホームに戻る',
|
go_home: "ホームに戻る",
|
||||||
reload: 'リロード',
|
reload: "リロード",
|
||||||
enter_curl: 'cURLを入力',
|
enter_curl: "cURLを入力",
|
||||||
empty: '空',
|
empty: "空",
|
||||||
}
|
}
|
||||||
|
|||||||
172
lang/pt-BR.js
172
lang/pt-BR.js
@@ -1,89 +1,89 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Home',
|
home: "Home",
|
||||||
realtime: 'Tempo real',
|
realtime: "Tempo real",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Configurações',
|
settings: "Configurações",
|
||||||
request: 'Request',
|
request: "Request",
|
||||||
install_pwa: 'Instalar PWA',
|
install_pwa: "Instalar PWA",
|
||||||
support_us: 'Nos ajude',
|
support_us: "Nos ajude",
|
||||||
tweet: 'Tweet',
|
tweet: "Tweet",
|
||||||
options: 'Opções',
|
options: "Opções",
|
||||||
communication: 'Comunicação',
|
communication: "Comunicação",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Schema',
|
schema: "Schema",
|
||||||
theme: 'Tema',
|
theme: "Tema",
|
||||||
subscribe: 'Subscribe',
|
subscribe: "Subscribe",
|
||||||
choose_language: 'Escolher idioma',
|
choose_language: "Escolher idioma",
|
||||||
shortcuts: 'Atalhos',
|
shortcuts: "Atalhos",
|
||||||
send_request: 'Enviar request',
|
send_request: "Enviar request",
|
||||||
save_to_collections: 'Salvar nas coleções',
|
save_to_collections: "Salvar nas coleções",
|
||||||
copy_request_link: 'Copiar link da request',
|
copy_request_link: "Copiar link da request",
|
||||||
reset_request: 'Reiniciar request',
|
reset_request: "Reiniciar request",
|
||||||
support_us_on: 'Nos ajude no',
|
support_us_on: "Nos ajude no",
|
||||||
open_collective: 'Abrir coletivamente',
|
open_collective: "Abrir coletivamente",
|
||||||
paypal: 'Paypal',
|
paypal: "Paypal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'Codigo JavaScript',
|
javascript_code: "Codigo JavaScript",
|
||||||
method: 'Método',
|
method: "Método",
|
||||||
path: 'Caminho',
|
path: "Caminho",
|
||||||
label: 'Label',
|
label: "Label",
|
||||||
again: 'Novamente',
|
again: "Novamente",
|
||||||
content_type: 'Content Type',
|
content_type: "Content Type",
|
||||||
raw_input: 'Raw input',
|
raw_input: "Raw input",
|
||||||
parameter_list: 'Lista de parâmetros',
|
parameter_list: "Lista de parâmetros",
|
||||||
raw_request_body: 'Raw request body',
|
raw_request_body: "Raw request body",
|
||||||
show_code: 'Mostrar código',
|
show_code: "Mostrar código",
|
||||||
hide_code: 'Esconder código',
|
hide_code: "Esconder código",
|
||||||
show_prerequest_script: 'Mostrar script de pré-request',
|
show_prerequest_script: "Mostrar script de pré-request",
|
||||||
hide_prerequest_script: 'Esconder script de pré-request',
|
hide_prerequest_script: "Esconder script de pré-request",
|
||||||
authentication: 'Autenticação',
|
authentication: "Autenticação",
|
||||||
authentication_type: 'Tipo de autenticação',
|
authentication_type: "Tipo de autenticação",
|
||||||
include_in_url: 'Incluir na url',
|
include_in_url: "Incluir na url",
|
||||||
parameters: 'Parâmetros',
|
parameters: "Parâmetros",
|
||||||
expand_response: 'Expandir response',
|
expand_response: "Expandir response",
|
||||||
collapse_response: 'Esconder response',
|
collapse_response: "Esconder response",
|
||||||
hide_preview: 'Esconder preview',
|
hide_preview: "Esconder preview",
|
||||||
preview_html: 'Preview html',
|
preview_html: "Preview html",
|
||||||
history: 'Histórico',
|
history: "Histórico",
|
||||||
collections: 'Coleções',
|
collections: "Coleções",
|
||||||
import_curl: 'Importar curl',
|
import_curl: "Importar curl",
|
||||||
import: 'Importar',
|
import: "Importar",
|
||||||
generate_code: 'Gerar código',
|
generate_code: "Gerar código",
|
||||||
request_type: 'Tipo de request',
|
request_type: "Tipo de request",
|
||||||
generated_code: 'Código gerado',
|
generated_code: "Código gerado",
|
||||||
status: 'Status',
|
status: "Status",
|
||||||
headers: 'Headers',
|
headers: "Headers",
|
||||||
websocket: 'Websocket',
|
websocket: "Websocket",
|
||||||
waiting_for_connection: '(aguardando conexão)',
|
waiting_for_connection: "(aguardando conexão)",
|
||||||
message: 'Mensagem',
|
message: "Mensagem",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Servidor',
|
server: "Servidor",
|
||||||
events: 'Eventos',
|
events: "Eventos",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Get schema',
|
get_schema: "Get schema",
|
||||||
header_list: 'Lista de headers',
|
header_list: "Lista de headers",
|
||||||
add_new: 'Adicionar novo',
|
add_new: "Adicionar novo",
|
||||||
response: 'Response',
|
response: "Response",
|
||||||
query: 'Query',
|
query: "Query",
|
||||||
queries: 'Queries',
|
queries: "Queries",
|
||||||
query_variables: 'Variáveis',
|
query_variables: "Variáveis",
|
||||||
mutations: 'Mutações',
|
mutations: "Mutações",
|
||||||
subscriptions: 'Assinaturas',
|
subscriptions: "Assinaturas",
|
||||||
types: 'Tipos',
|
types: "Tipos",
|
||||||
send: 'Enviar',
|
send: "Enviar",
|
||||||
background: 'Fundo',
|
background: "Fundo",
|
||||||
color: 'Cor',
|
color: "Cor",
|
||||||
labels: 'Labels',
|
labels: "Labels",
|
||||||
multi_color: 'Multi cor',
|
multi_color: "Multi cor",
|
||||||
enabled: 'Ativado',
|
enabled: "Ativado",
|
||||||
disabled: 'Desativado',
|
disabled: "Desativado",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting: "Postwoman's alojamento proxy oficial",
|
postwoman_official_proxy_hosting: "Postwoman's alojamento proxy oficial",
|
||||||
read_the: 'Leia o',
|
read_the: "Leia o",
|
||||||
apollotv_privacy_policy: 'ApolloTV Política de Privacidade',
|
apollotv_privacy_policy: "ApolloTV Política de Privacidade",
|
||||||
contact_us: 'Contate-Nos',
|
contact_us: "Contate-Nos",
|
||||||
connect: 'Conectar',
|
connect: "Conectar",
|
||||||
disconnect: 'Desconectar',
|
disconnect: "Desconectar",
|
||||||
start: 'Começar',
|
start: "Começar",
|
||||||
stop: 'Pare',
|
stop: "Pare",
|
||||||
}
|
}
|
||||||
|
|||||||
172
lang/tr-TR.js
172
lang/tr-TR.js
@@ -1,89 +1,89 @@
|
|||||||
export default {
|
export default {
|
||||||
home: 'Ana Sayfa',
|
home: "Ana Sayfa",
|
||||||
realtime: 'Realtime',
|
realtime: "Realtime",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: 'Ayarlar',
|
settings: "Ayarlar",
|
||||||
request: 'İstek',
|
request: "İstek",
|
||||||
install_pwa: 'PWA yükle',
|
install_pwa: "PWA yükle",
|
||||||
support_us: 'Bize destek ol',
|
support_us: "Bize destek ol",
|
||||||
tweet: 'Tweet',
|
tweet: "Tweet",
|
||||||
options: 'Options',
|
options: "Options",
|
||||||
communication: 'İletişim',
|
communication: "İletişim",
|
||||||
endpoint: 'Endpoint',
|
endpoint: "Endpoint",
|
||||||
schema: 'Taslak',
|
schema: "Taslak",
|
||||||
theme: 'Tema',
|
theme: "Tema",
|
||||||
subscribe: 'Abonelik',
|
subscribe: "Abonelik",
|
||||||
choose_language: 'Dil seç',
|
choose_language: "Dil seç",
|
||||||
shortcuts: 'Kısayollar',
|
shortcuts: "Kısayollar",
|
||||||
send_request: 'İstek gönder',
|
send_request: "İstek gönder",
|
||||||
save_to_collections: 'Koleksiyonları kaydet',
|
save_to_collections: "Koleksiyonları kaydet",
|
||||||
copy_request_link: 'İstek adresini kopyala',
|
copy_request_link: "İstek adresini kopyala",
|
||||||
reset_request: 'İstekleri resetle',
|
reset_request: "İstekleri resetle",
|
||||||
support_us_on: 'Bizi destekle',
|
support_us_on: "Bizi destekle",
|
||||||
open_collective: 'Open Collective',
|
open_collective: "Open Collective",
|
||||||
paypal: 'PayPal',
|
paypal: "PayPal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'JavaScript code',
|
javascript_code: "JavaScript code",
|
||||||
method: 'Metot',
|
method: "Metot",
|
||||||
path: 'Yol',
|
path: "Yol",
|
||||||
label: 'Etiket',
|
label: "Etiket",
|
||||||
again: 'Yeniden',
|
again: "Yeniden",
|
||||||
content_type: 'İçerik tipi',
|
content_type: "İçerik tipi",
|
||||||
raw_input: 'Raw giriş',
|
raw_input: "Raw giriş",
|
||||||
parameter_list: 'Parametre listesi',
|
parameter_list: "Parametre listesi",
|
||||||
raw_request_body: 'Raw istek içeriği',
|
raw_request_body: "Raw istek içeriği",
|
||||||
show_code: 'Kodu göster',
|
show_code: "Kodu göster",
|
||||||
hide_code: 'Kodu gizle',
|
hide_code: "Kodu gizle",
|
||||||
show_prerequest_script: 'Pre-Request scriptini göster',
|
show_prerequest_script: "Pre-Request scriptini göster",
|
||||||
hide_prerequest_script: 'Pre-Request scriptini gizle',
|
hide_prerequest_script: "Pre-Request scriptini gizle",
|
||||||
authentication: 'Authentication',
|
authentication: "Authentication",
|
||||||
authentication_type: 'Authentication tipi',
|
authentication_type: "Authentication tipi",
|
||||||
include_in_url: "URL'den içeri aktar",
|
include_in_url: "URL'den içeri aktar",
|
||||||
parameters: 'Parametre',
|
parameters: "Parametre",
|
||||||
expand_response: 'Cevabı genişlet',
|
expand_response: "Cevabı genişlet",
|
||||||
collapse_response: 'Cevap daralt',
|
collapse_response: "Cevap daralt",
|
||||||
hide_preview: 'Görüntülemeyi gizle',
|
hide_preview: "Görüntülemeyi gizle",
|
||||||
preview_html: 'HTML formatında görüntüle',
|
preview_html: "HTML formatında görüntüle",
|
||||||
history: 'Geçmiş',
|
history: "Geçmiş",
|
||||||
collections: 'Koleksiyonlar',
|
collections: "Koleksiyonlar",
|
||||||
import_curl: 'cURL içeri aktar',
|
import_curl: "cURL içeri aktar",
|
||||||
import: 'İçeri Aktar',
|
import: "İçeri Aktar",
|
||||||
generate_code: 'Kod Üret',
|
generate_code: "Kod Üret",
|
||||||
request_type: 'Request tipi',
|
request_type: "Request tipi",
|
||||||
generated_code: 'Üretilen Kod',
|
generated_code: "Üretilen Kod",
|
||||||
status: 'Durum',
|
status: "Durum",
|
||||||
headers: 'Headers',
|
headers: "Headers",
|
||||||
websocket: 'WebSocket',
|
websocket: "WebSocket",
|
||||||
waiting_for_connection: '(esperando por conexión)',
|
waiting_for_connection: "(esperando por conexión)",
|
||||||
message: 'Mesaj',
|
message: "Mesaj",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Server',
|
server: "Server",
|
||||||
events: 'Events',
|
events: "Events",
|
||||||
url: 'URL',
|
url: "URL",
|
||||||
get_schema: 'Taslak',
|
get_schema: "Taslak",
|
||||||
header_list: 'Header listesi',
|
header_list: "Header listesi",
|
||||||
add_new: 'Yeni Ekle',
|
add_new: "Yeni Ekle",
|
||||||
response: 'Cevap',
|
response: "Cevap",
|
||||||
query: 'Sorgu',
|
query: "Sorgu",
|
||||||
queries: 'Sorgular',
|
queries: "Sorgular",
|
||||||
query_variables: 'Değişkenler',
|
query_variables: "Değişkenler",
|
||||||
mutations: 'Değişimler',
|
mutations: "Değişimler",
|
||||||
subscriptions: 'Aboneler',
|
subscriptions: "Aboneler",
|
||||||
types: 'Tipler',
|
types: "Tipler",
|
||||||
send: 'Gönder',
|
send: "Gönder",
|
||||||
background: 'Arka Plan',
|
background: "Arka Plan",
|
||||||
color: 'Renk',
|
color: "Renk",
|
||||||
labels: 'Etiketler',
|
labels: "Etiketler",
|
||||||
multi_color: 'Çoklu renk',
|
multi_color: "Çoklu renk",
|
||||||
enabled: 'Aktif',
|
enabled: "Aktif",
|
||||||
disabled: 'Aktif değil',
|
disabled: "Aktif değil",
|
||||||
proxy: 'Proxy',
|
proxy: "Proxy",
|
||||||
postwoman_official_proxy_hosting: 'Proxy Oficial de Postwoman está hospedado en ApolloTV.',
|
postwoman_official_proxy_hosting: "Proxy Oficial de Postwoman está hospedado en ApolloTV.",
|
||||||
read_the: 'Leer la',
|
read_the: "Leer la",
|
||||||
apollotv_privacy_policy: 'ApolloTV gizlilik politikaları',
|
apollotv_privacy_policy: "ApolloTV gizlilik politikaları",
|
||||||
contact_us: 'Bizimle iletişime geçin',
|
contact_us: "Bizimle iletişime geçin",
|
||||||
connect: 'Bağlan',
|
connect: "Bağlan",
|
||||||
disconnect: 'Kesmek',
|
disconnect: "Kesmek",
|
||||||
start: 'Başla',
|
start: "Başla",
|
||||||
stop: 'Durdurmak',
|
stop: "Durdurmak",
|
||||||
}
|
}
|
||||||
|
|||||||
174
lang/zh-CN.js
174
lang/zh-CN.js
@@ -1,89 +1,89 @@
|
|||||||
export default {
|
export default {
|
||||||
home: '主页',
|
home: "主页",
|
||||||
realtime: '长连接',
|
realtime: "长连接",
|
||||||
graphql: 'GraphQL',
|
graphql: "GraphQL",
|
||||||
settings: '设置',
|
settings: "设置",
|
||||||
request: '请求',
|
request: "请求",
|
||||||
install_pwa: '安装PWA应用',
|
install_pwa: "安装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',
|
open_collective: "Open Collective",
|
||||||
paypal: 'Paypal',
|
paypal: "Paypal",
|
||||||
patreon: 'Patreon',
|
patreon: "Patreon",
|
||||||
javascript_code: 'JavaScript代码',
|
javascript_code: "JavaScript代码",
|
||||||
method: '方法',
|
method: "方法",
|
||||||
path: '路径',
|
path: "路径",
|
||||||
label: '标签',
|
label: "标签",
|
||||||
again: '重试',
|
again: "重试",
|
||||||
content_type: '内容类型',
|
content_type: "内容类型",
|
||||||
raw_input: 'raw数据',
|
raw_input: "raw数据",
|
||||||
parameter_list: '参数列表',
|
parameter_list: "参数列表",
|
||||||
raw_request_body: 'raw请求主体',
|
raw_request_body: "raw请求主体",
|
||||||
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: '包含在URL中',
|
include_in_url: "包含在URL中",
|
||||||
parameters: '参数',
|
parameters: "参数",
|
||||||
expand_response: '展开显示响应内容',
|
expand_response: "展开显示响应内容",
|
||||||
collapse_response: '折叠显示响应内容',
|
collapse_response: "折叠显示响应内容",
|
||||||
hide_preview: '隐藏预览',
|
hide_preview: "隐藏预览",
|
||||||
preview_html: '预览HTML',
|
preview_html: "预览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',
|
websocket: "Websocket",
|
||||||
waiting_for_connection: '(等待连接)',
|
waiting_for_connection: "(等待连接)",
|
||||||
message: '消息内容',
|
message: "消息内容",
|
||||||
sse: 'SSE',
|
sse: "SSE",
|
||||||
server: 'Server',
|
server: "Server",
|
||||||
events: '事件',
|
events: "事件",
|
||||||
url: '地址',
|
url: "地址",
|
||||||
get_schema: '获取模式',
|
get_schema: "获取模式",
|
||||||
header_list: '请求头列表',
|
header_list: "请求头列表",
|
||||||
add_new: '添加',
|
add_new: "添加",
|
||||||
response: '响应',
|
response: "响应",
|
||||||
query: '查询',
|
query: "查询",
|
||||||
queries: '查询',
|
queries: "查询",
|
||||||
query_variables: '变数',
|
query_variables: "变数",
|
||||||
mutations: 'Mutations',
|
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的官方代理由ApolloTV托管',
|
postwoman_official_proxy_hosting: "Postwoman的官方代理由ApolloTV托管",
|
||||||
read_the: '阅读',
|
read_the: "阅读",
|
||||||
apollotv_privacy_policy: 'ApolloTV隐私政策',
|
apollotv_privacy_policy: "ApolloTV隐私政策",
|
||||||
contact_us: '联系我们',
|
contact_us: "联系我们",
|
||||||
connect: '连接',
|
connect: "连接",
|
||||||
disconnect: '断开',
|
disconnect: "断开",
|
||||||
start: '开始',
|
start: "开始",
|
||||||
stop: '停止',
|
stop: "停止",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,7 +324,7 @@
|
|||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">settings</i>
|
<i class="material-icons">settings</i>
|
||||||
<span>
|
<span>
|
||||||
{{ $t('settings') }}
|
{{ $t("settings") }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="logout" v-close-popover>
|
<button class="icon" @click="logout" v-close-popover>
|
||||||
<i class="material-icons">exit_to_app</i>
|
<i class="material-icons">exit_to_app</i>
|
||||||
<span>{{ $t('logout') }}</span>
|
<span>{{ $t("logout") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -346,19 +346,19 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showExtensions = true" v-close-popover>
|
<button class="icon" @click="showExtensions = true" v-close-popover>
|
||||||
<i class="material-icons">extension</i>
|
<i class="material-icons">extension</i>
|
||||||
<span>{{ $t('extensions') }}</span>
|
<span>{{ $t("extensions") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showShortcuts = true" v-close-popover>
|
<button class="icon" @click="showShortcuts = true" v-close-popover>
|
||||||
<i class="material-icons">keyboard</i>
|
<i class="material-icons">keyboard</i>
|
||||||
<span>{{ $t('shortcuts') }}</span>
|
<span>{{ $t("shortcuts") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showSupport = true" v-close-popover>
|
<button class="icon" @click="showSupport = true" v-close-popover>
|
||||||
<i class="material-icons">favorite</i>
|
<i class="material-icons">favorite</i>
|
||||||
<span>{{ $t('support_us') }}</span>
|
<span>{{ $t("support_us") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -377,7 +377,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"
|
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>
|
</svg>
|
||||||
<span>{{ $t('tweet') }}</span>
|
<span>{{ $t("tweet") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="navigatorShare"
|
v-if="navigatorShare"
|
||||||
@@ -462,7 +462,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('extensions') }}</h3>
|
<h3 class="title">{{ $t("extensions") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showExtensions = false">
|
<button class="icon" @click="showExtensions = false">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -474,7 +474,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<p class="info">
|
<p class="info">
|
||||||
{{ $t('extensions_info1') }}
|
{{ $t("extensions_info1") }}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
@@ -534,7 +534,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('shortcuts') }}</h3>
|
<h3 class="title">{{ $t("shortcuts") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showShortcuts = false">
|
<button class="icon" @click="showShortcuts = false">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -546,19 +546,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t('send_request') }}</label>
|
<label>{{ $t("send_request") }}</label>
|
||||||
<kbd>{{ getSpecialKey() }} G</kbd>
|
<kbd>{{ getSpecialKey() }} G</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t('save_to_collections') }}</label>
|
<label>{{ $t("save_to_collections") }}</label>
|
||||||
<kbd>{{ getSpecialKey() }} S</kbd>
|
<kbd>{{ getSpecialKey() }} S</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t('copy_request_link') }}</label>
|
<label>{{ $t("copy_request_link") }}</label>
|
||||||
<kbd>{{ getSpecialKey() }} K</kbd>
|
<kbd>{{ getSpecialKey() }} K</kbd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t('reset_request') }}</label>
|
<label>{{ $t("reset_request") }}</label>
|
||||||
<kbd>{{ getSpecialKey() }} L</kbd>
|
<kbd>{{ getSpecialKey() }} L</kbd>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -569,7 +569,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<h3 class="title">{{ $t('support_us_on') }}</h3>
|
<h3 class="title">{{ $t("support_us_on") }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="showSupport = false">
|
<button class="icon" @click="showSupport = false">
|
||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
@@ -581,10 +581,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<p class="info">
|
<p class="info">
|
||||||
{{ $t('donate_info1') }}
|
{{ $t("donate_info1") }}
|
||||||
</p>
|
</p>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
{{ $t('donate_info2') }}
|
{{ $t("donate_info2") }}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
@@ -595,7 +595,7 @@
|
|||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">donut_large</i>
|
<i class="material-icons">donut_large</i>
|
||||||
<span>{{ $t('open_collective') }}</span>
|
<span>{{ $t("open_collective") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">payment</i>
|
<i class="material-icons">payment</i>
|
||||||
<span>{{ $t('paypal') }}</span>
|
<span>{{ $t("paypal") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -621,7 +621,7 @@
|
|||||||
>
|
>
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">local_parking</i>
|
<i class="material-icons">local_parking</i>
|
||||||
<span>{{ $t('patreon') }}</span>
|
<span>{{ $t("patreon") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -638,27 +638,27 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import intializePwa from '../assets/js/pwa'
|
import intializePwa from "../assets/js/pwa"
|
||||||
import * as version from '../.postwoman/version.json'
|
import * as version from "../.postwoman/version.json"
|
||||||
import { hasExtensionInstalled } from '../functions/strategies/ExtensionStrategy'
|
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy"
|
||||||
import firebase from 'firebase/app'
|
import firebase from "firebase/app"
|
||||||
import { fb } from '../functions/fb'
|
import { fb } from "../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
logo: () => import('../components/logo'),
|
logo: () => import("../components/logo"),
|
||||||
modal: () => import('../components/modal'),
|
modal: () => import("../components/modal"),
|
||||||
login: () => import('../components/firebase/login'),
|
login: () => import("../components/firebase/login"),
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getSpecialKey() {
|
getSpecialKey() {
|
||||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? '⌘' : 'Ctrl'
|
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl"
|
||||||
},
|
},
|
||||||
linkActive(path) {
|
linkActive(path) {
|
||||||
return {
|
return {
|
||||||
'nuxt-link-exact-active': this.$route.path === path,
|
"nuxt-link-exact-active": this.$route.path === path,
|
||||||
'nuxt-link-active': this.$route.path === path,
|
"nuxt-link-active": this.$route.path === path,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
@@ -668,21 +668,21 @@ export default {
|
|||||||
.signOut()
|
.signOut()
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.$toast.info(this.$t('logged_out'), {
|
this.$toast.info(this.$t("logged_out"), {
|
||||||
icon: 'vpn_key',
|
icon: "vpn_key",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
nativeShare() {
|
nativeShare() {
|
||||||
if (navigator.share) {
|
if (navigator.share) {
|
||||||
navigator
|
navigator
|
||||||
.share({
|
.share({
|
||||||
title: 'Postwoman',
|
title: "Postwoman",
|
||||||
text:
|
text:
|
||||||
'Postwoman • A free, fast and beautiful API request builder - Web alternative to Postman - Helps you create requests faster, saving precious time on development.',
|
"Postwoman • A free, fast and beautiful API request builder - Web alternative to Postman - Helps you create requests faster, saving precious time on development.",
|
||||||
url: 'https://postwoman.io/',
|
url: "https://postwoman.io/",
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
@@ -715,66 +715,66 @@ export default {
|
|||||||
// Load theme settings
|
// Load theme settings
|
||||||
;(() => {
|
;(() => {
|
||||||
// Apply theme from settings.
|
// Apply theme from settings.
|
||||||
document.documentElement.className = this.$store.state.postwoman.settings.THEME_CLASS || ''
|
document.documentElement.className = this.$store.state.postwoman.settings.THEME_CLASS || ""
|
||||||
// Load theme color data from settings, or use default color.
|
// Load theme color data from settings, or use default color.
|
||||||
let color = this.$store.state.postwoman.settings.THEME_COLOR || '#50fa7b'
|
let color = this.$store.state.postwoman.settings.THEME_COLOR || "#50fa7b"
|
||||||
let vibrant = this.$store.state.postwoman.settings.THEME_COLOR_VIBRANT || true
|
let vibrant = this.$store.state.postwoman.settings.THEME_COLOR_VIBRANT || true
|
||||||
document.documentElement.style.setProperty('--ac-color', color)
|
document.documentElement.style.setProperty("--ac-color", color)
|
||||||
document.documentElement.style.setProperty(
|
document.documentElement.style.setProperty(
|
||||||
'--act-color',
|
"--act-color",
|
||||||
vibrant ? 'rgba(32, 33, 36, 1)' : 'rgba(255, 255, 255, 1)'
|
vibrant ? "rgba(32, 33, 36, 1)" : "rgba(255, 255, 255, 1)"
|
||||||
)
|
)
|
||||||
})()
|
})()
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (process.client) {
|
if (process.client) {
|
||||||
document.body.classList.add('afterLoad')
|
document.body.classList.add("afterLoad")
|
||||||
}
|
}
|
||||||
|
|
||||||
document
|
document
|
||||||
.querySelector('meta[name=theme-color]')
|
.querySelector("meta[name=theme-color]")
|
||||||
.setAttribute('content', this.$store.state.postwoman.settings.THEME_TAB_COLOR || '#202124')
|
.setAttribute("content", this.$store.state.postwoman.settings.THEME_TAB_COLOR || "#202124")
|
||||||
|
|
||||||
// Initializes the PWA code - checks if the app is installed,
|
// Initializes the PWA code - checks if the app is installed,
|
||||||
// etc.
|
// etc.
|
||||||
;(async () => {
|
;(async () => {
|
||||||
this.showInstallPrompt = await intializePwa()
|
this.showInstallPrompt = await intializePwa()
|
||||||
let cookiesAllowed = localStorage.getItem('cookiesAllowed') === 'yes'
|
let cookiesAllowed = localStorage.getItem("cookiesAllowed") === "yes"
|
||||||
if (!cookiesAllowed) {
|
if (!cookiesAllowed) {
|
||||||
this.$toast.show(this.$t('we_use_cookies'), {
|
this.$toast.show(this.$t("we_use_cookies"), {
|
||||||
icon: 'info',
|
icon: "info",
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
theme: 'toasted-primary',
|
theme: "toasted-primary",
|
||||||
action: [
|
action: [
|
||||||
{
|
{
|
||||||
text: this.$t('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)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let showExtensionsToast = localStorage.getItem('showExtensionsToast') === 'yes'
|
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
|
||||||
if (!this.extensionInstalled && !showExtensionsToast) {
|
if (!this.extensionInstalled && !showExtensionsToast) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast.show(this.$t('extensions_info2'), {
|
this.$toast.show(this.$t("extensions_info2"), {
|
||||||
icon: 'extension',
|
icon: "extension",
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
theme: 'toasted-primary',
|
theme: "toasted-primary",
|
||||||
action: [
|
action: [
|
||||||
{
|
{
|
||||||
text: this.$t('yes'),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.showExtensions = true
|
this.showExtensions = true
|
||||||
localStorage.setItem('showExtensionsToast', 'yes')
|
localStorage.setItem("showExtensionsToast", "yes")
|
||||||
toastObject.goAway(0)
|
toastObject.goAway(0)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: this.$t('no'),
|
text: this.$t("no"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
toastObject.goAway(0)
|
toastObject.goAway(0)
|
||||||
},
|
},
|
||||||
@@ -785,16 +785,16 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._keyListener = function(e) {
|
this._keyListener = function(e) {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === "Escape") {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.showExtensions = this.showShortcuts = this.showSupport = false
|
this.showExtensions = this.showShortcuts = this.showSupport = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener('keydown', this._keyListener.bind(this))
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
})()
|
})()
|
||||||
|
|
||||||
window.addEventListener('scroll', event => {
|
window.addEventListener("scroll", event => {
|
||||||
let mainNavLinks = document.querySelectorAll('nav ul li a')
|
let mainNavLinks = document.querySelectorAll("nav ul li a")
|
||||||
let fromTop = window.scrollY
|
let fromTop = window.scrollY
|
||||||
mainNavLinks.forEach(link => {
|
mainNavLinks.forEach(link => {
|
||||||
let section = document.querySelector(link.hash)
|
let section = document.querySelector(link.hash)
|
||||||
@@ -804,20 +804,20 @@ export default {
|
|||||||
section.offsetTop <= fromTop &&
|
section.offsetTop <= fromTop &&
|
||||||
section.offsetTop + section.offsetHeight > fromTop
|
section.offsetTop + section.offsetHeight > fromTop
|
||||||
) {
|
) {
|
||||||
link.classList.add('current')
|
link.classList.add("current")
|
||||||
} else {
|
} else {
|
||||||
link.classList.remove('current')
|
link.classList.remove("current")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
'%cWe ❤︎ open source!',
|
"%cWe ❤︎ open source!",
|
||||||
'background-color:white;padding:8px 16px;border-radius:8px;font-size:32px;color:red;'
|
"background-color:white;padding:8px 16px;border-radius:8px;font-size:32px;color:red;"
|
||||||
)
|
)
|
||||||
console.log(
|
console.log(
|
||||||
'%cContribute: https://github.com/liyasthomas/postwoman',
|
"%cContribute: https://github.com/liyasthomas/postwoman",
|
||||||
'background-color:black;padding:4px 8px;border-radius:8px;font-size:16px;color:white;'
|
"background-color:black;padding:4px 8px;border-radius:8px;font-size:16px;color:white;"
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -834,7 +834,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.removeEventListener('keydown', this._keyListener)
|
document.removeEventListener("keydown", this._keyListener)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
<h3>{{ error.message }}</h3>
|
<h3>{{ error.message }}</h3>
|
||||||
<p>
|
<p>
|
||||||
<nuxt-link to="/">
|
<nuxt-link to="/">
|
||||||
<button>{{ $t('go_home') }}</button>
|
<button>{{ $t("go_home") }}</button>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href @click.prevent="reloadApplication">{{ $t('reload') }}</a>
|
<a href @click.prevent="reloadApplication">{{ $t("reload") }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,18 +31,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['error'],
|
props: ["error"],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
reloadApplication() {
|
reloadApplication() {
|
||||||
this.$router.push('/', () => window.location.reload())
|
this.$router.push("/", () => window.location.reload())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
head() {
|
head() {
|
||||||
return {
|
return {
|
||||||
bodyAttrs: {
|
bodyAttrs: {
|
||||||
class: 'sticky-footer',
|
class: "sticky-footer",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default function({ route, redirect }) {
|
export default function({ route, redirect }) {
|
||||||
if (route.fullPath !== '/') {
|
if (route.fullPath !== "/") {
|
||||||
return redirect('/')
|
return redirect("/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
272
nuxt.config.js
272
nuxt.config.js
@@ -1,18 +1,18 @@
|
|||||||
// Some helpful application constants.
|
// Some helpful application constants.
|
||||||
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
||||||
export const meta = {
|
export const meta = {
|
||||||
name: 'Postwoman',
|
name: "Postwoman",
|
||||||
shortDescription: 'A free, fast and beautiful API request builder',
|
shortDescription: "A free, fast and beautiful API request builder",
|
||||||
description:
|
description:
|
||||||
'Web alternative to Postman - Helps you create requests faster, saving precious time on development.',
|
"Web alternative to Postman - Helps you create requests faster, saving precious time on development.",
|
||||||
}
|
}
|
||||||
// Sets the base path for the router.
|
// Sets the base path for the router.
|
||||||
// Important for deploying to GitHub pages.
|
// Important for deploying to GitHub pages.
|
||||||
// -- Travis includes the author in the repo slug,
|
// -- Travis includes the author in the repo slug,
|
||||||
// so if there's a /, we need to get everything after it.
|
// so if there's a /, we need to get everything after it.
|
||||||
let repoName = (process.env.TRAVIS_REPO_SLUG || '').split('/').pop()
|
let repoName = (process.env.TRAVIS_REPO_SLUG || "").split("/").pop()
|
||||||
export const routerBase =
|
export const routerBase =
|
||||||
process.env.DEPLOY_ENV === 'GH_PAGES'
|
process.env.DEPLOY_ENV === "GH_PAGES"
|
||||||
? {
|
? {
|
||||||
router: {
|
router: {
|
||||||
base: `/${repoName}/`,
|
base: `/${repoName}/`,
|
||||||
@@ -20,21 +20,21 @@ export const routerBase =
|
|||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
router: {
|
router: {
|
||||||
base: '/',
|
base: "/",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
mode: 'spa',
|
mode: "spa",
|
||||||
/*
|
/*
|
||||||
** Headers of the page
|
** Headers of the page
|
||||||
*/
|
*/
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0', // default: localhost
|
host: "0.0.0.0", // default: localhost
|
||||||
},
|
},
|
||||||
render: {
|
render: {
|
||||||
bundleRenderer: {
|
bundleRenderer: {
|
||||||
shouldPreload: (file, type) => {
|
shouldPreload: (file, type) => {
|
||||||
return ['script', 'style', 'font'].includes(type)
|
return ["script", "style", "font"].includes(type)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -42,154 +42,154 @@ export default {
|
|||||||
title: `${meta.name} \u2022 ${meta.shortDescription}`,
|
title: `${meta.name} \u2022 ${meta.shortDescription}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
charset: 'utf-8',
|
charset: "utf-8",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'viewport',
|
name: "viewport",
|
||||||
content:
|
content:
|
||||||
'width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui',
|
"width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hid: 'description',
|
hid: "description",
|
||||||
name: 'description',
|
name: "description",
|
||||||
content: meta.description || '',
|
content: meta.description || "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'keywords',
|
name: "keywords",
|
||||||
content:
|
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',
|
"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',
|
content: "IE=edge, chrome=1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
itemprop: 'name',
|
itemprop: "name",
|
||||||
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
itemprop: 'description',
|
itemprop: "description",
|
||||||
content: meta.description,
|
content: meta.description,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
itemprop: 'image',
|
itemprop: "image",
|
||||||
content: `https://postwoman.io/logo.jpg`,
|
content: `https://postwoman.io/logo.jpg`,
|
||||||
},
|
},
|
||||||
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
||||||
{
|
{
|
||||||
name: 'application-name',
|
name: "application-name",
|
||||||
content: meta.name,
|
content: meta.name,
|
||||||
},
|
},
|
||||||
// Add to homescreen for Safari on iOS
|
// Add to homescreen for Safari on iOS
|
||||||
{
|
{
|
||||||
name: 'apple-mobile-web-app-capable',
|
name: "apple-mobile-web-app-capable",
|
||||||
content: 'yes',
|
content: "yes",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'apple-mobile-web-app-status-bar-style',
|
name: "apple-mobile-web-app-status-bar-style",
|
||||||
content: 'black-translucent',
|
content: "black-translucent",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'apple-mobile-web-app-title',
|
name: "apple-mobile-web-app-title",
|
||||||
content: meta.name,
|
content: meta.name,
|
||||||
},
|
},
|
||||||
// Windows phone tile icon
|
// Windows phone tile icon
|
||||||
{
|
{
|
||||||
name: 'msapplication-TileImage',
|
name: "msapplication-TileImage",
|
||||||
content: `${routerBase.router.base}icons/icon-144x144.png`,
|
content: `${routerBase.router.base}icons/icon-144x144.png`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'msapplication-TileColor',
|
name: "msapplication-TileColor",
|
||||||
content: '#202124',
|
content: "#202124",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'msapplication-tap-highlight',
|
name: "msapplication-tap-highlight",
|
||||||
content: 'no',
|
content: "no",
|
||||||
},
|
},
|
||||||
// OpenGraph
|
// OpenGraph
|
||||||
{
|
{
|
||||||
property: 'og:site_name',
|
property: "og:site_name",
|
||||||
content: meta.name,
|
content: meta.name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:url',
|
property: "og:url",
|
||||||
content: 'https://postwoman.io',
|
content: "https://postwoman.io",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:type',
|
property: "og:type",
|
||||||
content: 'website',
|
content: "website",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:title',
|
property: "og:title",
|
||||||
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:description',
|
property: "og:description",
|
||||||
content: meta.description,
|
content: meta.description,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:image',
|
property: "og:image",
|
||||||
content: `https://postwoman.io/logo.jpg`,
|
content: `https://postwoman.io/logo.jpg`,
|
||||||
},
|
},
|
||||||
// Twitter
|
// Twitter
|
||||||
{
|
{
|
||||||
name: 'twitter:card',
|
name: "twitter:card",
|
||||||
content: 'summary_large_image',
|
content: "summary_large_image",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:site',
|
name: "twitter:site",
|
||||||
content: '@liyasthomas',
|
content: "@liyasthomas",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:creator',
|
name: "twitter:creator",
|
||||||
content: '@liyasthomas',
|
content: "@liyasthomas",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:url',
|
name: "twitter:url",
|
||||||
content: 'https://postwoman.io',
|
content: "https://postwoman.io",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:title',
|
name: "twitter:title",
|
||||||
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
content: `${meta.name} \u2022 ${meta.shortDescription}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:description',
|
name: "twitter:description",
|
||||||
content: meta.description,
|
content: meta.description,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:image',
|
name: "twitter:image",
|
||||||
content: 'https://postwoman.io/logo.jpg',
|
content: "https://postwoman.io/logo.jpg",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
link: [
|
link: [
|
||||||
{
|
{
|
||||||
rel: 'icon',
|
rel: "icon",
|
||||||
type: 'image/x-icon',
|
type: "image/x-icon",
|
||||||
href: `${routerBase.router.base}favicon.ico`,
|
href: `${routerBase.router.base}favicon.ico`,
|
||||||
},
|
},
|
||||||
// Home-screen icons (iOS)
|
// Home-screen icons (iOS)
|
||||||
{
|
{
|
||||||
rel: 'apple-touch-icon',
|
rel: "apple-touch-icon",
|
||||||
href: `${routerBase.router.base}icons/icon-48x48.png`,
|
href: `${routerBase.router.base}icons/icon-48x48.png`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rel: 'apple-touch-icon',
|
rel: "apple-touch-icon",
|
||||||
sizes: '72x72',
|
sizes: "72x72",
|
||||||
href: `${routerBase.router.base}icons/icon-72x72.png`,
|
href: `${routerBase.router.base}icons/icon-72x72.png`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rel: 'apple-touch-icon',
|
rel: "apple-touch-icon",
|
||||||
sizes: '96x96',
|
sizes: "96x96",
|
||||||
href: `${routerBase.router.base}icons/icon-96x96.png`,
|
href: `${routerBase.router.base}icons/icon-96x96.png`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rel: 'apple-touch-icon',
|
rel: "apple-touch-icon",
|
||||||
sizes: '144x144',
|
sizes: "144x144",
|
||||||
href: `${routerBase.router.base}icons/icon-144x144.png`,
|
href: `${routerBase.router.base}icons/icon-144x144.png`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rel: 'apple-touch-icon',
|
rel: "apple-touch-icon",
|
||||||
sizes: '192x192',
|
sizes: "192x192",
|
||||||
href: `${routerBase.router.base}icons/icon-192x192.png`,
|
href: `${routerBase.router.base}icons/icon-192x192.png`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -198,29 +198,29 @@ export default {
|
|||||||
** Customize the progress-bar color
|
** Customize the progress-bar color
|
||||||
*/
|
*/
|
||||||
loading: {
|
loading: {
|
||||||
color: 'var(--ac-color)',
|
color: "var(--ac-color)",
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
** Customize the loading indicator
|
** Customize the loading indicator
|
||||||
*/
|
*/
|
||||||
loadingIndicator: {
|
loadingIndicator: {
|
||||||
name: 'pulse',
|
name: "pulse",
|
||||||
color: 'var(--ac-color)',
|
color: "var(--ac-color)",
|
||||||
background: 'var(--bg-color)',
|
background: "var(--bg-color)",
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
** Global CSS
|
** Global CSS
|
||||||
*/
|
*/
|
||||||
css: ['~/assets/css/styles.scss', '~/assets/css/themes.scss', '~/assets/css/fonts.scss'],
|
css: ["~/assets/css/styles.scss", "~/assets/css/themes.scss", "~/assets/css/fonts.scss"],
|
||||||
/*
|
/*
|
||||||
** Plugins to load before mounting the App
|
** Plugins to load before mounting the App
|
||||||
*/
|
*/
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
src: '~/plugins/vuex-persist',
|
src: "~/plugins/vuex-persist",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: '~/plugins/v-tooltip',
|
src: "~/plugins/v-tooltip",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
/*
|
/*
|
||||||
@@ -232,35 +232,35 @@ export default {
|
|||||||
*/
|
*/
|
||||||
modules: [
|
modules: [
|
||||||
// See https://goo.gl/OOhYW5
|
// See https://goo.gl/OOhYW5
|
||||||
['@nuxtjs/pwa'],
|
["@nuxtjs/pwa"],
|
||||||
['@nuxtjs/axios'],
|
["@nuxtjs/axios"],
|
||||||
['@nuxtjs/toast'],
|
["@nuxtjs/toast"],
|
||||||
['@nuxtjs/google-analytics'],
|
["@nuxtjs/google-analytics"],
|
||||||
['@nuxtjs/sitemap'],
|
["@nuxtjs/sitemap"],
|
||||||
[
|
[
|
||||||
'@nuxtjs/google-tag-manager',
|
"@nuxtjs/google-tag-manager",
|
||||||
{
|
{
|
||||||
id: process.env.GTM_ID || 'GTM-MXWD8NQ',
|
id: process.env.GTM_ID || "GTM-MXWD8NQ",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
['@nuxtjs/robots'],
|
["@nuxtjs/robots"],
|
||||||
['nuxt-i18n'],
|
["nuxt-i18n"],
|
||||||
],
|
],
|
||||||
pwa: {
|
pwa: {
|
||||||
manifest: {
|
manifest: {
|
||||||
name: meta.name,
|
name: meta.name,
|
||||||
short_name: meta.name,
|
short_name: meta.name,
|
||||||
|
|
||||||
display: 'standalone',
|
display: "standalone",
|
||||||
|
|
||||||
theme_color: '#202124',
|
theme_color: "#202124",
|
||||||
background_color: '#202124',
|
background_color: "#202124",
|
||||||
start_url: `${routerBase.router.base}`,
|
start_url: `${routerBase.router.base}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
meta: {
|
meta: {
|
||||||
description: meta.shortDescription,
|
description: meta.shortDescription,
|
||||||
theme_color: '#202124',
|
theme_color: "#202124",
|
||||||
},
|
},
|
||||||
|
|
||||||
icons: (sizes => {
|
icons: (sizes => {
|
||||||
@@ -268,7 +268,7 @@ export default {
|
|||||||
for (let size of sizes) {
|
for (let size of sizes) {
|
||||||
icons.push({
|
icons.push({
|
||||||
src: `${routerBase.router.base}icons/icon-${size}x${size}.png`,
|
src: `${routerBase.router.base}icons/icon-${size}x${size}.png`,
|
||||||
type: 'image/png',
|
type: "image/png",
|
||||||
sizes: `${size}x${size}`,
|
sizes: `${size}x${size}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -276,92 +276,92 @@ export default {
|
|||||||
})([48, 72, 96, 144, 192, 512]),
|
})([48, 72, 96, 144, 192, 512]),
|
||||||
},
|
},
|
||||||
toast: {
|
toast: {
|
||||||
position: 'bottom-center',
|
position: "bottom-center",
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
theme: 'bubble',
|
theme: "bubble",
|
||||||
keepOnHover: true,
|
keepOnHover: true,
|
||||||
},
|
},
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
id: process.env.GA_ID || 'UA-61422507-2',
|
id: process.env.GA_ID || "UA-61422507-2",
|
||||||
},
|
},
|
||||||
sitemap: {
|
sitemap: {
|
||||||
hostname: 'https://postwoman.io',
|
hostname: "https://postwoman.io",
|
||||||
},
|
},
|
||||||
robots: {
|
robots: {
|
||||||
UserAgent: '*',
|
UserAgent: "*",
|
||||||
Disallow: '',
|
Disallow: "",
|
||||||
Allow: '/',
|
Allow: "/",
|
||||||
Sitemap: 'https://postwoman.io/sitemap.xml',
|
Sitemap: "https://postwoman.io/sitemap.xml",
|
||||||
},
|
},
|
||||||
i18n: {
|
i18n: {
|
||||||
locales: [
|
locales: [
|
||||||
{
|
{
|
||||||
code: 'en',
|
code: "en",
|
||||||
name: 'English',
|
name: "English",
|
||||||
iso: 'en-US',
|
iso: "en-US",
|
||||||
file: 'en-US.js',
|
file: "en-US.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'es',
|
code: "es",
|
||||||
name: 'Español',
|
name: "Español",
|
||||||
iso: 'es-ES',
|
iso: "es-ES",
|
||||||
file: 'es-ES.js',
|
file: "es-ES.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'fr',
|
code: "fr",
|
||||||
name: 'Français',
|
name: "Français",
|
||||||
iso: 'fr-FR',
|
iso: "fr-FR",
|
||||||
file: 'fr-FR.js',
|
file: "fr-FR.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'fa',
|
code: "fa",
|
||||||
name: 'Farsi',
|
name: "Farsi",
|
||||||
iso: 'fa-IR',
|
iso: "fa-IR",
|
||||||
file: 'fa-IR.js',
|
file: "fa-IR.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'pt',
|
code: "pt",
|
||||||
name: 'Português Brasileiro',
|
name: "Português Brasileiro",
|
||||||
iso: 'pt-BR',
|
iso: "pt-BR",
|
||||||
file: 'pt-BR.js',
|
file: "pt-BR.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'cn',
|
code: "cn",
|
||||||
name: '简体中文',
|
name: "简体中文",
|
||||||
iso: 'zh-CN',
|
iso: "zh-CN",
|
||||||
file: 'zh-CN.js',
|
file: "zh-CN.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'id',
|
code: "id",
|
||||||
name: 'Bahasa Indonesia',
|
name: "Bahasa Indonesia",
|
||||||
iso: 'id-ID',
|
iso: "id-ID",
|
||||||
file: 'id-ID.js',
|
file: "id-ID.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'tr',
|
code: "tr",
|
||||||
name: 'Türkçe',
|
name: "Türkçe",
|
||||||
iso: 'tr-TR',
|
iso: "tr-TR",
|
||||||
file: 'tr-TR.js',
|
file: "tr-TR.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'de',
|
code: "de",
|
||||||
name: 'Deutsch',
|
name: "Deutsch",
|
||||||
iso: 'de-DE',
|
iso: "de-DE",
|
||||||
file: 'de-DE.js',
|
file: "de-DE.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'ja',
|
code: "ja",
|
||||||
name: '日本語',
|
name: "日本語",
|
||||||
iso: 'ja-JP',
|
iso: "ja-JP",
|
||||||
file: 'ja-JP.js',
|
file: "ja-JP.js",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
defaultLocale: 'en',
|
defaultLocale: "en",
|
||||||
vueI18n: {
|
vueI18n: {
|
||||||
fallbackLocale: 'en',
|
fallbackLocale: "en",
|
||||||
},
|
},
|
||||||
lazy: true,
|
lazy: true,
|
||||||
langDir: 'lang/',
|
langDir: "lang/",
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
** Build configuration
|
** Build configuration
|
||||||
|
|||||||
146
pages/doc.vue
146
pages/doc.vue
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
{{ $t('generate_docs_message') }}
|
{{ $t("generate_docs_message") }}
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<label for="collectionUpload">
|
<label for="collectionUpload">
|
||||||
<button class="icon" @click="$refs.collectionUpload.click()" v-tooltip="$t('json')">
|
<button class="icon" @click="$refs.collectionUpload.click()" v-tooltip="$t('json')">
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
<span>{{ $t('import_collections') }}</span>
|
<span>{{ $t("import_collections") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@@ -44,7 +44,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>{{ $t('generate_docs') }}</span>
|
<span>{{ $t("generate_docs") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -52,108 +52,108 @@
|
|||||||
|
|
||||||
<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">
|
||||||
{{ $t('generate_docs_first') }}
|
{{ $t("generate_docs_first") }}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<span class="collection" v-for="(collection, index) in this.items" :key="index">
|
<span class="collection" v-for="(collection, index) in this.items" :key="index">
|
||||||
<h2>
|
<h2>
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
{{ collection.name || $t('none') }}
|
{{ collection.name || $t("none") }}
|
||||||
</h2>
|
</h2>
|
||||||
<span class="folder" v-for="(folder, index) in collection.folders" :key="index">
|
<span class="folder" v-for="(folder, index) in collection.folders" :key="index">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="material-icons">folder_open</i>
|
<i class="material-icons">folder_open</i>
|
||||||
{{ folder.name || $t('none') }}
|
{{ folder.name || $t("none") }}
|
||||||
</h3>
|
</h3>
|
||||||
<span class="request" v-for="(request, index) in folder.requests" :key="index">
|
<span class="request" v-for="(request, index) in folder.requests" :key="index">
|
||||||
<h4>
|
<h4>
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
{{ request.name || $t('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>
|
||||||
{{ $t('url') }}: <code>{{ request.url || $t('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>
|
||||||
{{ $t('path') }}:
|
{{ $t("path") }}:
|
||||||
<code>{{ request.path || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('method') }}:
|
{{ $t("method") }}:
|
||||||
<code>{{ request.method || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('authentication') }}:
|
{{ $t("authentication") }}:
|
||||||
<code>{{ request.auth || $t('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>
|
||||||
{{ $t('username') }}:
|
{{ $t("username") }}:
|
||||||
<code>{{ request.httpUser || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('password') }}:
|
{{ $t("password") }}:
|
||||||
<code>{{ request.httpPassword || $t('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>
|
||||||
{{ $t('token') }}:
|
{{ $t("token") }}:
|
||||||
<code>{{ request.bearerToken || $t('none') }}</code>
|
<code>{{ request.bearerToken || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<h4 v-if="request.headers.length > 0">{{ $t('headers') }}</h4>
|
<h4 v-if="request.headers.length > 0">{{ $t("headers") }}</h4>
|
||||||
<span v-if="request.headers">
|
<span v-if="request.headers">
|
||||||
<p v-for="header in request.headers" :key="header.key" class="doc-desc">
|
<p v-for="header in request.headers" :key="header.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ header.key || $t('none') }}:
|
{{ header.key || $t("none") }}:
|
||||||
<code>{{ header.value || $t('none') }}</code>
|
<code>{{ header.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.params.length > 0">{{ $t('parameters') }}</h4>
|
<h4 v-if="request.params.length > 0">{{ $t("parameters") }}</h4>
|
||||||
<span v-if="request.params">
|
<span v-if="request.params">
|
||||||
<p v-for="parameter in request.params" :key="parameter.key" class="doc-desc">
|
<p v-for="parameter in request.params" :key="parameter.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ parameter.key || $t('none') }}:
|
{{ parameter.key || $t("none") }}:
|
||||||
<code>{{ parameter.value || $t('none') }}</code>
|
<code>{{ parameter.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.bodyParam">{{ $t('payload') }}</h4>
|
<h4 v-if="request.bodyParam">{{ $t("payload") }}</h4>
|
||||||
<span v-if="request.bodyParam">
|
<span v-if="request.bodyParam">
|
||||||
<p v-for="payload in request.bodyParam" :key="payload.key" class="doc-desc">
|
<p v-for="payload in request.bodyParam" :key="payload.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ payload.key || $t('none') }}:
|
{{ payload.key || $t("none") }}:
|
||||||
<code>{{ payload.value || $t('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>
|
||||||
{{ $t('parameters') }}:
|
{{ $t("parameters") }}:
|
||||||
<code>{{ request.rawParams || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('content_type') }}:
|
{{ $t("content_type") }}:
|
||||||
<code>{{ request.contentType || $t('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>
|
||||||
{{ $t('request_type') }}:
|
{{ $t("request_type") }}:
|
||||||
<code>{{ request.requestType || $t('none') }}</code>
|
<code>{{ request.requestType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
@@ -165,91 +165,91 @@
|
|||||||
>
|
>
|
||||||
<h4>
|
<h4>
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
{{ request.name || $t('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>
|
||||||
{{ $t('url') }}: <code>{{ request.url || $t('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>
|
||||||
{{ $t('path') }}: <code>{{ request.path || $t('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>
|
||||||
{{ $t('method') }}:
|
{{ $t("method") }}:
|
||||||
<code>{{ request.method || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('authentication') }}:
|
{{ $t("authentication") }}:
|
||||||
<code>{{ request.auth || $t('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>
|
||||||
{{ $t('username') }}:
|
{{ $t("username") }}:
|
||||||
<code>{{ request.httpUser || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('password') }}:
|
{{ $t("password") }}:
|
||||||
<code>{{ request.httpPassword || $t('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>
|
||||||
{{ $t('token') }}:
|
{{ $t("token") }}:
|
||||||
<code>{{ request.bearerToken || $t('none') }}</code>
|
<code>{{ request.bearerToken || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<h4 v-if="request.headers.length > 0">{{ $t('headers') }}</h4>
|
<h4 v-if="request.headers.length > 0">{{ $t("headers") }}</h4>
|
||||||
<span v-if="request.headers">
|
<span v-if="request.headers">
|
||||||
<p v-for="header in request.headers" :key="header.key" class="doc-desc">
|
<p v-for="header in request.headers" :key="header.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ header.key || $t('none') }}:
|
{{ header.key || $t("none") }}:
|
||||||
<code>{{ header.value || $t('none') }}</code>
|
<code>{{ header.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.params.length > 0">{{ $t('parameters') }}</h4>
|
<h4 v-if="request.params.length > 0">{{ $t("parameters") }}</h4>
|
||||||
<span v-if="request.params">
|
<span v-if="request.params">
|
||||||
<p v-for="parameter in request.params" :key="parameter.key" class="doc-desc">
|
<p v-for="parameter in request.params" :key="parameter.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ parameter.key || $t('none') }}:
|
{{ parameter.key || $t("none") }}:
|
||||||
<code>{{ parameter.value || $t('none') }}</code>
|
<code>{{ parameter.value || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<h4 v-if="request.bodyParam">{{ $t('payload') }}</h4>
|
<h4 v-if="request.bodyParam">{{ $t("payload") }}</h4>
|
||||||
<span v-if="request.bodyParam">
|
<span v-if="request.bodyParam">
|
||||||
<p v-for="payload in request.bodyParam" :key="payload.key" class="doc-desc">
|
<p v-for="payload in request.bodyParam" :key="payload.key" class="doc-desc">
|
||||||
<span>
|
<span>
|
||||||
{{ payload.key || $t('none') }}:
|
{{ payload.key || $t("none") }}:
|
||||||
<code>{{ payload.value || $t('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>
|
||||||
{{ $t('parameters') }}:
|
{{ $t("parameters") }}:
|
||||||
<code>{{ request.rawParams || $t('none') }}</code>
|
<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>
|
||||||
{{ $t('content_type') }}:
|
{{ $t("content_type") }}:
|
||||||
<code>{{ request.contentType || $t('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>
|
||||||
{{ $t('request_type') }}:
|
{{ $t("request_type") }}:
|
||||||
<code>{{ request.requestType || $t('none') }}</code>
|
<code>{{ request.requestType || $t("none") }}</code>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
@@ -302,17 +302,17 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AceEditor from '../components/ace-editor'
|
import AceEditor from "../components/ace-editor"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
'pw-section': () => import('../components/section'),
|
"pw-section": () => import("../components/section"),
|
||||||
Editor: AceEditor,
|
Editor: AceEditor,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collectionJSON: '[]',
|
collectionJSON: "[]",
|
||||||
items: [],
|
items: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -327,12 +327,12 @@ export default {
|
|||||||
this.collectionJSON = target.result
|
this.collectionJSON = target.result
|
||||||
}
|
}
|
||||||
reader.readAsText(file)
|
reader.readAsText(file)
|
||||||
this.$toast.info(this.$t('file_imported'), {
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
icon: 'attach_file',
|
icon: "attach_file",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$toast.error(this.$t('choose_file'), {
|
this.$toast.error(this.$t("choose_file"), {
|
||||||
icon: 'attach_file',
|
icon: "attach_file",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -340,12 +340,12 @@ export default {
|
|||||||
getDoc() {
|
getDoc() {
|
||||||
try {
|
try {
|
||||||
this.items = JSON.parse(this.collectionJSON)
|
this.items = JSON.parse(this.collectionJSON)
|
||||||
this.$toast.info(this.$t('docs_generated'), {
|
this.$toast.info(this.$t("docs_generated"), {
|
||||||
icon: 'book',
|
icon: "book",
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.$toast.error(e, {
|
this.$toast.error(e, {
|
||||||
icon: 'code',
|
icon: "code",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
<pw-section class="blue" :label="$t('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>
|
||||||
<input id="url" type="url" v-model="url" @keyup.enter="getSchema()" />
|
<input id="url" type="url" v-model="url" @keyup.enter="getSchema()" />
|
||||||
</li>
|
</li>
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<label for="get" class="hide-on-small-screen"> </label>
|
<label for="get" class="hide-on-small-screen"> </label>
|
||||||
<button id="get" name="get" @click="getSchema">
|
<button id="get" name="get" @click="getSchema">
|
||||||
{{ $t('get_schema') }}
|
{{ $t("get_schema") }}
|
||||||
<span><i class="material-icons">send</i></span>
|
<span><i class="material-icons">send</i></span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="headerList">{{ $t('header_list') }}</label>
|
<label for="headerList">{{ $t("header_list") }}</label>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="headers = []" v-tooltip.bottom="$t('clear')">
|
<button class="icon" @click="headers = []" v-tooltip.bottom="$t('clear')">
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<button class="icon" @click="addRequestHeader">
|
<button class="icon" @click="addRequestHeader">
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
<span>{{ $t('add_new') }}</span>
|
<span>{{ $t("add_new") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
<pw-section class="green" :label="$t('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>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ !expandResponse ? 'unfold_more' : 'unfold_less' }}
|
{{ !expandResponse ? "unfold_more" : "unfold_less" }}
|
||||||
</i>
|
</i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
|
|
||||||
<pw-section class="cyan" :label="$t('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 class="icon" @click="runQuery()" v-tooltip.bottom="$t('run_query')">
|
<button class="icon" @click="runQuery()" v-tooltip.bottom="$t('run_query')">
|
||||||
<i class="material-icons">play_arrow</i>
|
<i class="material-icons">play_arrow</i>
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
|
|
||||||
<pw-section class="purple" label="Response" ref="response">
|
<pw-section class="purple" label="Response" ref="response">
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="responseField">{{ $t('response') }}</label>
|
<label for="responseField">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
checked="checked"
|
checked="checked"
|
||||||
/>
|
/>
|
||||||
<label v-if="queryFields.length > 0" for="queries-tab">
|
<label v-if="queryFields.length > 0" for="queries-tab">
|
||||||
{{ $t('queries') }}
|
{{ $t("queries") }}
|
||||||
</label>
|
</label>
|
||||||
<div v-if="queryFields.length > 0" class="tab">
|
<div v-if="queryFields.length > 0" class="tab">
|
||||||
<div v-for="field in queryFields" :key="field.name">
|
<div v-for="field in queryFields" :key="field.name">
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
checked="checked"
|
checked="checked"
|
||||||
/>
|
/>
|
||||||
<label v-if="mutationFields.length > 0" for="mutations-tab">
|
<label v-if="mutationFields.length > 0" for="mutations-tab">
|
||||||
{{ $t('mutations') }}
|
{{ $t("mutations") }}
|
||||||
</label>
|
</label>
|
||||||
<div v-if="mutationFields.length > 0" class="tab">
|
<div v-if="mutationFields.length > 0" class="tab">
|
||||||
<div v-for="field in mutationFields" :key="field.name">
|
<div v-for="field in mutationFields" :key="field.name">
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
checked="checked"
|
checked="checked"
|
||||||
/>
|
/>
|
||||||
<label v-if="subscriptionFields.length > 0" for="subscriptions-tab">
|
<label v-if="subscriptionFields.length > 0" for="subscriptions-tab">
|
||||||
{{ $t('subscriptions') }}
|
{{ $t("subscriptions") }}
|
||||||
</label>
|
</label>
|
||||||
<div v-if="subscriptionFields.length > 0" class="tab">
|
<div v-if="subscriptionFields.length > 0" class="tab">
|
||||||
<div v-for="field in subscriptionFields" :key="field.name">
|
<div v-for="field in subscriptionFields" :key="field.name">
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
checked="checked"
|
checked="checked"
|
||||||
/>
|
/>
|
||||||
<label v-if="gqlTypes.length > 0" for="gqltypes-tab">
|
<label v-if="gqlTypes.length > 0" for="gqltypes-tab">
|
||||||
{{ $t('types') }}
|
{{ $t("types") }}
|
||||||
</label>
|
</label>
|
||||||
<div v-if="gqlTypes.length > 0" class="tab">
|
<div v-if="gqlTypes.length > 0" class="tab">
|
||||||
<div v-for="type in gqlTypes" :key="type.name" :id="`type_${type.name}`">
|
<div v-for="type in gqlTypes" :key="type.name" :id="`type_${type.name}`">
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
"
|
"
|
||||||
class="info"
|
class="info"
|
||||||
>
|
>
|
||||||
{{ $t('send_request_first') }}
|
{{ $t("send_request_first") }}
|
||||||
</p>
|
</p>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -311,35 +311,35 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
import axios from "axios"
|
||||||
import * as gql from 'graphql'
|
import * as gql from "graphql"
|
||||||
import textareaAutoHeight from '../directives/textareaAutoHeight'
|
import textareaAutoHeight from "../directives/textareaAutoHeight"
|
||||||
import { commonHeaders } from '../functions/headers'
|
import { commonHeaders } from "../functions/headers"
|
||||||
import AceEditor from '../components/ace-editor'
|
import AceEditor from "../components/ace-editor"
|
||||||
import QueryEditor from '../components/graphql/queryeditor'
|
import QueryEditor from "../components/graphql/queryeditor"
|
||||||
import { sendNetworkRequest } from '../functions/network'
|
import { sendNetworkRequest } from "../functions/network"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
directives: {
|
directives: {
|
||||||
textareaAutoHeight,
|
textareaAutoHeight,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'pw-section': () => import('../components/section'),
|
"pw-section": () => import("../components/section"),
|
||||||
'gql-field': () => import('../components/graphql/field'),
|
"gql-field": () => import("../components/graphql/field"),
|
||||||
'gql-type': () => import('../components/graphql/type'),
|
"gql-type": () => import("../components/graphql/type"),
|
||||||
autocomplete: () => import('../components/autocomplete'),
|
autocomplete: () => import("../components/autocomplete"),
|
||||||
Editor: AceEditor,
|
Editor: AceEditor,
|
||||||
QueryEditor: QueryEditor,
|
QueryEditor: QueryEditor,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
schemaString: '',
|
schemaString: "",
|
||||||
commonHeaders,
|
commonHeaders,
|
||||||
queryFields: [],
|
queryFields: [],
|
||||||
mutationFields: [],
|
mutationFields: [],
|
||||||
subscriptionFields: [],
|
subscriptionFields: [],
|
||||||
gqlTypes: [],
|
gqlTypes: [],
|
||||||
responseString: '',
|
responseString: "",
|
||||||
copyButton: '<i class="material-icons">file_copy</i>',
|
copyButton: '<i class="material-icons">file_copy</i>',
|
||||||
downloadButton: '<i class="material-icons">get_app</i>',
|
downloadButton: '<i class="material-icons">get_app</i>',
|
||||||
doneButton: '<i class="material-icons">done</i>',
|
doneButton: '<i class="material-icons">done</i>',
|
||||||
@@ -354,7 +354,7 @@ export default {
|
|||||||
return this.$store.state.gql.url
|
return this.$store.state.gql.url
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit('setGQLState', { value, attribute: 'url' })
|
this.$store.commit("setGQLState", { value, attribute: "url" })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
@@ -362,7 +362,7 @@ export default {
|
|||||||
return this.$store.state.gql.headers
|
return this.$store.state.gql.headers
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit('setGQLState', { value, attribute: 'headers' })
|
this.$store.commit("setGQLState", { value, attribute: "headers" })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
gqlQueryString: {
|
gqlQueryString: {
|
||||||
@@ -370,7 +370,7 @@ export default {
|
|||||||
return this.$store.state.gql.query
|
return this.$store.state.gql.query
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit('setGQLState', { value, attribute: 'query' })
|
this.$store.commit("setGQLState", { value, attribute: "query" })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
variableString: {
|
variableString: {
|
||||||
@@ -378,9 +378,9 @@ export default {
|
|||||||
return this.$store.state.gql.variablesJSONString
|
return this.$store.state.gql.variablesJSONString
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit('setGQLState', {
|
this.$store.commit("setGQLState", {
|
||||||
value,
|
value,
|
||||||
attribute: 'variablesJSONString',
|
attribute: "variablesJSONString",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -388,13 +388,13 @@ export default {
|
|||||||
const result = this.headers
|
const result = this.headers
|
||||||
.filter(({ key }) => !!key)
|
.filter(({ key }) => !!key)
|
||||||
.map(({ key, value }) => `${key}: ${value}`)
|
.map(({ key, value }) => `${key}: ${value}`)
|
||||||
.join(',\n')
|
.join(",\n")
|
||||||
return result === '' ? '' : `${result}`
|
return result === "" ? "" : `${result}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleJumpToType(type) {
|
handleJumpToType(type) {
|
||||||
const typesTab = document.getElementById('gqltypes-tab')
|
const typesTab = document.getElementById("gqltypes-tab")
|
||||||
typesTab.checked = true
|
typesTab.checked = true
|
||||||
|
|
||||||
const rootTypeName = this.resolveRootType(type).name
|
const rootTypeName = this.resolveRootType(type).name
|
||||||
@@ -402,7 +402,7 @@ export default {
|
|||||||
const target = document.getElementById(`type_${rootTypeName}`)
|
const target = document.getElementById(`type_${rootTypeName}`)
|
||||||
if (target && this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED) {
|
if (target && this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED) {
|
||||||
target.scrollIntoView({
|
target.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: "smooth",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -413,40 +413,40 @@ export default {
|
|||||||
},
|
},
|
||||||
copySchema() {
|
copySchema() {
|
||||||
this.$refs.copySchemaCode.innerHTML = this.doneButton
|
this.$refs.copySchemaCode.innerHTML = this.doneButton
|
||||||
const aux = document.createElement('textarea')
|
const aux = document.createElement("textarea")
|
||||||
aux.innerText = this.schemaString
|
aux.innerText = this.schemaString
|
||||||
document.body.appendChild(aux)
|
document.body.appendChild(aux)
|
||||||
aux.select()
|
aux.select()
|
||||||
document.execCommand('copy')
|
document.execCommand("copy")
|
||||||
document.body.removeChild(aux)
|
document.body.removeChild(aux)
|
||||||
this.$toast.success(this.$t('copied_to_clipboard'), {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
setTimeout(() => (this.$refs.copySchemaCode.innerHTML = this.copyButton), 1000)
|
setTimeout(() => (this.$refs.copySchemaCode.innerHTML = this.copyButton), 1000)
|
||||||
},
|
},
|
||||||
copyQuery() {
|
copyQuery() {
|
||||||
this.$refs.copyQueryButton.innerHTML = this.doneButton
|
this.$refs.copyQueryButton.innerHTML = this.doneButton
|
||||||
const aux = document.createElement('textarea')
|
const aux = document.createElement("textarea")
|
||||||
aux.innerText = this.gqlQueryString
|
aux.innerText = this.gqlQueryString
|
||||||
document.body.appendChild(aux)
|
document.body.appendChild(aux)
|
||||||
aux.select()
|
aux.select()
|
||||||
document.execCommand('copy')
|
document.execCommand("copy")
|
||||||
document.body.removeChild(aux)
|
document.body.removeChild(aux)
|
||||||
this.$toast.success(this.$t('copied_to_clipboard'), {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
setTimeout(() => (this.$refs.copyQueryButton.innerHTML = this.copyButton), 1000)
|
setTimeout(() => (this.$refs.copyQueryButton.innerHTML = this.copyButton), 1000)
|
||||||
},
|
},
|
||||||
copyResponse() {
|
copyResponse() {
|
||||||
this.$refs.copyResponseButton.innerHTML = this.doneButton
|
this.$refs.copyResponseButton.innerHTML = this.doneButton
|
||||||
const aux = document.createElement('textarea')
|
const aux = document.createElement("textarea")
|
||||||
aux.innerText = this.responseString
|
aux.innerText = this.responseString
|
||||||
document.body.appendChild(aux)
|
document.body.appendChild(aux)
|
||||||
aux.select()
|
aux.select()
|
||||||
document.execCommand('copy')
|
document.execCommand("copy")
|
||||||
document.body.removeChild(aux)
|
document.body.removeChild(aux)
|
||||||
this.$toast.success(this.$t('copied_to_clipboard'), {
|
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
setTimeout(() => (this.$refs.copyResponseButton.innerHTML = this.copyButton), 1000)
|
setTimeout(() => (this.$refs.copyResponseButton.innerHTML = this.copyButton), 1000)
|
||||||
},
|
},
|
||||||
@@ -454,7 +454,7 @@ export default {
|
|||||||
const startTime = Date.now()
|
const startTime = Date.now()
|
||||||
|
|
||||||
this.$nuxt.$loading.start()
|
this.$nuxt.$loading.start()
|
||||||
this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED && this.scrollInto('response')
|
this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED && this.scrollInto("response")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let headers = {}
|
let headers = {}
|
||||||
@@ -467,11 +467,11 @@ export default {
|
|||||||
const gqlQueryString = this.gqlQueryString
|
const gqlQueryString = this.gqlQueryString
|
||||||
|
|
||||||
const reqOptions = {
|
const reqOptions = {
|
||||||
method: 'post',
|
method: "post",
|
||||||
url: this.url,
|
url: this.url,
|
||||||
headers: {
|
headers: {
|
||||||
...headers,
|
...headers,
|
||||||
'content-type': 'application/json',
|
"content-type": "application/json",
|
||||||
},
|
},
|
||||||
data: JSON.stringify({ query: gqlQueryString, variables }),
|
data: JSON.stringify({ query: gqlQueryString, variables }),
|
||||||
}
|
}
|
||||||
@@ -482,22 +482,22 @@ export default {
|
|||||||
|
|
||||||
this.$nuxt.$loading.finish()
|
this.$nuxt.$loading.finish()
|
||||||
const duration = Date.now() - startTime
|
const duration = Date.now() - startTime
|
||||||
this.$toast.info(this.$t('finished_in', { duration }), {
|
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} ${this.$t('f12_details')}`, {
|
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
console.log('Error', error)
|
console.log("Error", error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getSchema() {
|
async getSchema() {
|
||||||
const startTime = Date.now()
|
const startTime = Date.now()
|
||||||
this.schemaString = this.$t('loading')
|
this.schemaString = this.$t("loading")
|
||||||
this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED && this.scrollInto('schema')
|
this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED && this.scrollInto("schema")
|
||||||
|
|
||||||
// Start showing the loading bar as soon as possible.
|
// Start showing the loading bar as soon as possible.
|
||||||
// The nuxt axios module will hide it when the request is made.
|
// The nuxt axios module will hide it when the request is made.
|
||||||
@@ -514,11 +514,11 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const reqOptions = {
|
const reqOptions = {
|
||||||
method: 'post',
|
method: "post",
|
||||||
url: this.url,
|
url: this.url,
|
||||||
headers: {
|
headers: {
|
||||||
...headers,
|
...headers,
|
||||||
'content-type': 'application/json',
|
"content-type": "application/json",
|
||||||
},
|
},
|
||||||
data: query,
|
data: query,
|
||||||
}
|
}
|
||||||
@@ -527,7 +527,7 @@ export default {
|
|||||||
|
|
||||||
const reqConfig = this.$store.state.postwoman.settings.PROXY_ENABLED
|
const reqConfig = this.$store.state.postwoman.settings.PROXY_ENABLED
|
||||||
? {
|
? {
|
||||||
method: 'post',
|
method: "post",
|
||||||
url:
|
url:
|
||||||
this.$store.state.postwoman.settings.PROXY_URL || `https://postwoman.apollotv.xyz/`,
|
this.$store.state.postwoman.settings.PROXY_URL || `https://postwoman.apollotv.xyz/`,
|
||||||
data: reqOptions,
|
data: reqOptions,
|
||||||
@@ -573,15 +573,15 @@ export default {
|
|||||||
const typeMap = schema.getTypeMap()
|
const typeMap = schema.getTypeMap()
|
||||||
const types = []
|
const types = []
|
||||||
|
|
||||||
const queryTypeName = schema.getQueryType() ? schema.getQueryType().name : ''
|
const queryTypeName = schema.getQueryType() ? schema.getQueryType().name : ""
|
||||||
const mutationTypeName = schema.getMutationType() ? schema.getMutationType().name : ''
|
const mutationTypeName = schema.getMutationType() ? schema.getMutationType().name : ""
|
||||||
const subscriptionTypeName = schema.getSubscriptionType()
|
const subscriptionTypeName = schema.getSubscriptionType()
|
||||||
? schema.getSubscriptionType().name
|
? schema.getSubscriptionType().name
|
||||||
: ''
|
: ""
|
||||||
|
|
||||||
for (const type in typeMap) {
|
for (const type in typeMap) {
|
||||||
if (
|
if (
|
||||||
!typeMap[type].name.startsWith('__') &&
|
!typeMap[type].name.startsWith("__") &&
|
||||||
![queryTypeName, mutationTypeName, subscriptionTypeName].includes(typeMap[type].name) &&
|
![queryTypeName, mutationTypeName, subscriptionTypeName].includes(typeMap[type].name) &&
|
||||||
typeMap[type] instanceof gql.GraphQLObjectType
|
typeMap[type] instanceof gql.GraphQLObjectType
|
||||||
) {
|
) {
|
||||||
@@ -592,16 +592,16 @@ export default {
|
|||||||
this.$refs.queryEditor.setValidationSchema(schema)
|
this.$refs.queryEditor.setValidationSchema(schema)
|
||||||
this.$nuxt.$loading.finish()
|
this.$nuxt.$loading.finish()
|
||||||
const duration = Date.now() - startTime
|
const duration = Date.now() - startTime
|
||||||
this.$toast.info(this.$t('finished_in', { duration }), {
|
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}. ${this.$t('check_console_details')}`
|
this.schemaString = `${error}. ${this.$t("check_console_details")}`
|
||||||
this.$toast.error(`${error} ${this.$t('f12_details')}`, {
|
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
console.log('Error', error)
|
console.log("Error", error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ToggleExpandResponse() {
|
ToggleExpandResponse() {
|
||||||
@@ -610,16 +610,16 @@ export default {
|
|||||||
},
|
},
|
||||||
downloadResponse() {
|
downloadResponse() {
|
||||||
const dataToWrite = JSON.stringify(this.schemaString, null, 2)
|
const dataToWrite = JSON.stringify(this.schemaString, null, 2)
|
||||||
const file = new Blob([dataToWrite], { type: 'application/json' })
|
const file = new Blob([dataToWrite], { type: "application/json" })
|
||||||
const a = document.createElement('a')
|
const a = document.createElement("a")
|
||||||
const url = URL.createObjectURL(file)
|
const url = URL.createObjectURL(file)
|
||||||
a.href = url
|
a.href = url
|
||||||
a.download = `${this.url} on ${Date()}.graphql`.replace(/\./g, '[dot]')
|
a.download = `${this.url} on ${Date()}.graphql`.replace(/\./g, "[dot]")
|
||||||
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(this.$t('download_started'), {
|
this.$toast.success(this.$t("download_started"), {
|
||||||
icon: 'done',
|
icon: "done",
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.body.removeChild(a)
|
document.body.removeChild(a)
|
||||||
@@ -628,9 +628,9 @@ export default {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
addRequestHeader(index) {
|
addRequestHeader(index) {
|
||||||
this.$store.commit('addGQLHeader', {
|
this.$store.commit("addGQLHeader", {
|
||||||
key: '',
|
key: "",
|
||||||
value: '',
|
value: "",
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
@@ -638,11 +638,11 @@ export default {
|
|||||||
// .slice() is used so we get a separate array, rather than just a reference
|
// .slice() is used so we get a separate array, rather than just a reference
|
||||||
const oldHeaders = this.headers.slice()
|
const oldHeaders = this.headers.slice()
|
||||||
|
|
||||||
this.$store.commit('removeGQLHeader', index)
|
this.$store.commit("removeGQLHeader", index)
|
||||||
this.$toast.error(this.$t('deleted'), {
|
this.$toast.error(this.$t("deleted"), {
|
||||||
icon: 'delete',
|
icon: "delete",
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('undo'),
|
text: this.$t("undo"),
|
||||||
duration: 4000,
|
duration: 4000,
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
this.headers = oldHeaders
|
this.headers = oldHeaders
|
||||||
@@ -654,7 +654,7 @@ export default {
|
|||||||
},
|
},
|
||||||
scrollInto(view) {
|
scrollInto(view) {
|
||||||
this.$refs[view].$el.scrollIntoView({
|
this.$refs[view].$el.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: "smooth",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
718
pages/index.vue
718
pages/index.vue
File diff suppressed because it is too large
Load Diff
@@ -2,12 +2,12 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<section id="options">
|
<section id="options">
|
||||||
<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="$t('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>
|
||||||
<input
|
<input
|
||||||
id="url"
|
id="url"
|
||||||
type="url"
|
type="url"
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
<li>
|
<li>
|
||||||
<label for="connect" class="hide-on-small-screen"> </label>
|
<label for="connect" class="hide-on-small-screen"> </label>
|
||||||
<button :disabled="!urlValid" id="connect" name="connect" @click="toggleConnection">
|
<button :disabled="!urlValid" id="connect" name="connect" @click="toggleConnection">
|
||||||
{{ !connectionState ? $t('connect') : $t('disconnect') }}
|
{{ !connectionState ? $t("connect") : $t("disconnect") }}
|
||||||
<span>
|
<span>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ !connectionState ? 'sync' : 'sync_disabled' }}
|
{{ !connectionState ? "sync" : "sync_disabled" }}
|
||||||
</i>
|
</i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<pw-section class="purple" :label="$t('communication')" id="response" ref="response">
|
<pw-section class="purple" :label="$t('communication')" id="response" ref="response">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="log">{{ $t('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
|
||||||
@@ -46,13 +46,13 @@
|
|||||||
}}{{ logEntry.payload }}</span
|
}}{{ logEntry.payload }}</span
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>{{ $t('waiting_for_connection') }}</span>
|
<span v-else>{{ $t("waiting_for_connection") }}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="message">{{ $t('message') }}</label>
|
<label for="message">{{ $t("message") }}</label>
|
||||||
<input
|
<input
|
||||||
id="message"
|
id="message"
|
||||||
name="message"
|
name="message"
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<label for="send" class="hide-on-small-screen"> </label>
|
<label for="send" class="hide-on-small-screen"> </label>
|
||||||
<button id="send" name="send" :disabled="!connectionState" @click="sendMessage">
|
<button id="send" name="send" :disabled="!connectionState" @click="sendMessage">
|
||||||
{{ $t('send') }}
|
{{ $t("send") }}
|
||||||
<span>
|
<span>
|
||||||
<i class="material-icons">send</i>
|
<i class="material-icons">send</i>
|
||||||
</span>
|
</span>
|
||||||
@@ -77,12 +77,12 @@
|
|||||||
</pw-section>
|
</pw-section>
|
||||||
</div>
|
</div>
|
||||||
<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="$t('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>
|
||||||
<input
|
<input
|
||||||
id="server"
|
id="server"
|
||||||
type="url"
|
type="url"
|
||||||
@@ -100,10 +100,10 @@
|
|||||||
name="start"
|
name="start"
|
||||||
@click="toggleSSEConnection"
|
@click="toggleSSEConnection"
|
||||||
>
|
>
|
||||||
{{ !connectionSSEState ? $t('start') : $t('stop') }}
|
{{ !connectionSSEState ? $t("start") : $t("stop") }}
|
||||||
<span>
|
<span>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
{{ !connectionSSEState ? 'sync' : 'sync_disabled' }}
|
{{ !connectionSSEState ? "sync" : "sync_disabled" }}
|
||||||
</i>
|
</i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<pw-section class="purple" :label="$t('communication')" id="response" ref="response">
|
<pw-section class="purple" :label="$t('communication')" id="response" ref="response">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="log">{{ $t('events') }}</label>
|
<label for="log">{{ $t("events") }}</label>
|
||||||
<div id="log" name="log" class="log">
|
<div id="log" name="log" class="log">
|
||||||
<span v-if="events.log">
|
<span v-if="events.log">
|
||||||
<span
|
<span
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
}}{{ logEntry.payload }}</span
|
}}{{ logEntry.payload }}</span
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>{{ $t('waiting_for_connection') }}</span>
|
<span v-else>{{ $t("waiting_for_connection") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="result"></div>
|
<div id="result"></div>
|
||||||
</li>
|
</li>
|
||||||
@@ -151,7 +151,7 @@ div.log {
|
|||||||
&,
|
&,
|
||||||
span {
|
span {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: "Roboto Mono", monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,29 +167,29 @@ div.log {
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
'pw-section': () => import('../components/section'),
|
"pw-section": () => import("../components/section"),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
connectionState: false,
|
connectionState: false,
|
||||||
url: 'wss://echo.websocket.org',
|
url: "wss://echo.websocket.org",
|
||||||
socket: null,
|
socket: null,
|
||||||
communication: {
|
communication: {
|
||||||
log: null,
|
log: null,
|
||||||
input: '',
|
input: "",
|
||||||
},
|
},
|
||||||
connectionSSEState: false,
|
connectionSSEState: false,
|
||||||
server: 'https://express-eventsource.herokuapp.com/events',
|
server: "https://express-eventsource.herokuapp.com/events",
|
||||||
sse: null,
|
sse: null,
|
||||||
events: {
|
events: {
|
||||||
log: null,
|
log: null,
|
||||||
input: '',
|
input: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
urlValid() {
|
urlValid() {
|
||||||
const protocol = '^(wss?:\\/\\/)?'
|
const protocol = "^(wss?:\\/\\/)?"
|
||||||
const validIP = new RegExp(
|
const validIP = new RegExp(
|
||||||
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
||||||
)
|
)
|
||||||
@@ -199,7 +199,7 @@ export default {
|
|||||||
return validIP.test(this.url) || validHostname.test(this.url)
|
return validIP.test(this.url) || validHostname.test(this.url)
|
||||||
},
|
},
|
||||||
serverValid() {
|
serverValid() {
|
||||||
const protocol = '^(https?:\\/\\/)?'
|
const protocol = "^(https?:\\/\\/)?"
|
||||||
const validIP = new RegExp(
|
const validIP = new RegExp(
|
||||||
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
`${protocol}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`
|
||||||
)
|
)
|
||||||
@@ -219,9 +219,9 @@ export default {
|
|||||||
connect() {
|
connect() {
|
||||||
this.communication.log = [
|
this.communication.log = [
|
||||||
{
|
{
|
||||||
payload: this.$t('connecting_to', { name: this.url }),
|
payload: this.$t("connecting_to", { name: this.url }),
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: 'var(--ac-color)',
|
color: "var(--ac-color)",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
try {
|
try {
|
||||||
@@ -230,14 +230,14 @@ export default {
|
|||||||
this.connectionState = true
|
this.connectionState = true
|
||||||
this.communication.log = [
|
this.communication.log = [
|
||||||
{
|
{
|
||||||
payload: this.$t('connected_to', { name: 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(this.$t('connected'), {
|
this.$toast.success(this.$t("connected"), {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.socket.onerror = event => {
|
this.socket.onerror = event => {
|
||||||
@@ -246,26 +246,26 @@ 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: this.$t('disconnected_from', { name: 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(this.$t('disconnected'), {
|
this.$toast.error(this.$t("disconnected"), {
|
||||||
icon: 'sync_disabled',
|
icon: "sync_disabled",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.socket.onmessage = event => {
|
this.socket.onmessage = event => {
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: event.data,
|
payload: event.data,
|
||||||
source: 'server',
|
source: "server",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.handleError(ex)
|
this.handleError(ex)
|
||||||
this.$toast.error(this.$t('something_went_wrong'), {
|
this.$toast.error(this.$t("something_went_wrong"), {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -276,16 +276,16 @@ export default {
|
|||||||
this.disconnect()
|
this.disconnect()
|
||||||
this.connectionState = false
|
this.connectionState = false
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: this.$t('error_occurred'),
|
payload: this.$t("error_occurred"),
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
if (error !== null)
|
if (error !== null)
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: error,
|
payload: error,
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -294,26 +294,26 @@ export default {
|
|||||||
this.socket.send(message)
|
this.socket.send(message)
|
||||||
this.communication.log.push({
|
this.communication.log.push({
|
||||||
payload: message,
|
payload: message,
|
||||||
source: 'client',
|
source: "client",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
this.communication.input = ''
|
this.communication.input = ""
|
||||||
},
|
},
|
||||||
collapse({ target }) {
|
collapse({ target }) {
|
||||||
const el = target.parentNode.className
|
const el = target.parentNode.className
|
||||||
document.getElementsByClassName(el)[0].classList.toggle('hidden')
|
document.getElementsByClassName(el)[0].classList.toggle("hidden")
|
||||||
},
|
},
|
||||||
getSourcePrefix(source) {
|
getSourcePrefix(source) {
|
||||||
const sourceEmojis = {
|
const sourceEmojis = {
|
||||||
// Source used for info messages.
|
// Source used for info messages.
|
||||||
info: '\tℹ️ [INFO]:\t',
|
info: "\tℹ️ [INFO]:\t",
|
||||||
// Source used for client to server messages.
|
// Source used for client to server messages.
|
||||||
client: '\t👽 [SENT]:\t',
|
client: "\t👽 [SENT]:\t",
|
||||||
// Source used for server to client messages.
|
// Source used for server to client messages.
|
||||||
server: '\t📥 [RECEIVED]:\t',
|
server: "\t📥 [RECEIVED]:\t",
|
||||||
}
|
}
|
||||||
if (Object.keys(sourceEmojis).includes(source)) return sourceEmojis[source]
|
if (Object.keys(sourceEmojis).includes(source)) return sourceEmojis[source]
|
||||||
return ''
|
return ""
|
||||||
},
|
},
|
||||||
toggleSSEConnection() {
|
toggleSSEConnection() {
|
||||||
// If it is connecting:
|
// If it is connecting:
|
||||||
@@ -324,26 +324,26 @@ export default {
|
|||||||
start() {
|
start() {
|
||||||
this.events.log = [
|
this.events.log = [
|
||||||
{
|
{
|
||||||
payload: this.$t('connecting_to', { name: this.server }),
|
payload: this.$t("connecting_to", { name: this.server }),
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: 'var(--ac-color)',
|
color: "var(--ac-color)",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
if (typeof EventSource !== 'undefined') {
|
if (typeof EventSource !== "undefined") {
|
||||||
try {
|
try {
|
||||||
this.sse = new EventSource(this.server)
|
this.sse = new EventSource(this.server)
|
||||||
this.sse.onopen = event => {
|
this.sse.onopen = event => {
|
||||||
this.connectionSSEState = true
|
this.connectionSSEState = true
|
||||||
this.events.log = [
|
this.events.log = [
|
||||||
{
|
{
|
||||||
payload: this.$t('connected_to', { name: 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(this.$t('connected'), {
|
this.$toast.success(this.$t("connected"), {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.sse.onerror = event => {
|
this.sse.onerror = event => {
|
||||||
@@ -352,34 +352,34 @@ 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: this.$t('disconnected_from', { name: 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(this.$t('disconnected'), {
|
this.$toast.error(this.$t("disconnected"), {
|
||||||
icon: 'sync_disabled',
|
icon: "sync_disabled",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.sse.onmessage = event => {
|
this.sse.onmessage = event => {
|
||||||
this.events.log.push({
|
this.events.log.push({
|
||||||
payload: event.data,
|
payload: event.data,
|
||||||
source: 'server',
|
source: "server",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.handleSSEError(ex)
|
this.handleSSEError(ex)
|
||||||
this.$toast.error(this.$t('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.$t('browser_support_sse'),
|
payload: this.$t("browser_support_sse"),
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -389,16 +389,16 @@ export default {
|
|||||||
this.stop()
|
this.stop()
|
||||||
this.connectionSSEState = false
|
this.connectionSSEState = false
|
||||||
this.events.log.push({
|
this.events.log.push({
|
||||||
payload: this.$t('error_occurred'),
|
payload: this.$t("error_occurred"),
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
if (error !== null)
|
if (error !== null)
|
||||||
this.events.log.push({
|
this.events.log.push({
|
||||||
payload: error,
|
payload: error,
|
||||||
source: 'info',
|
source: "info",
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
ts: new Date().toLocaleTimeString(),
|
ts: new Date().toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -409,7 +409,7 @@ export default {
|
|||||||
},
|
},
|
||||||
updated: function() {
|
updated: function() {
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
const divLog = document.getElementById('log')
|
const divLog = document.getElementById("log")
|
||||||
divLog.scrollBy(0, divLog.scrollHeight + 100)
|
divLog.scrollBy(0, divLog.scrollHeight + 100)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,20 +12,20 @@
|
|||||||
/>
|
/>
|
||||||
<i v-else class="material-icons">account_circle</i>
|
<i v-else class="material-icons">account_circle</i>
|
||||||
<span>
|
<span>
|
||||||
{{ fb.currentUser.displayName || 'Name not found' }}
|
{{ fb.currentUser.displayName || "Name not found" }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<button class="icon">
|
<button class="icon">
|
||||||
<i class="material-icons">email</i>
|
<i class="material-icons">email</i>
|
||||||
<span>
|
<span>
|
||||||
{{ fb.currentUser.email || 'Email not found' }}
|
{{ fb.currentUser.email || "Email not found" }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<button class="icon" @click="logout">
|
<button class="icon" @click="logout">
|
||||||
<i class="material-icons">exit_to_app</i>
|
<i class="material-icons">exit_to_app</i>
|
||||||
<span>{{ $t('logout') }}</span>
|
<span>{{ $t("logout") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<p v-for="setting in fb.currentSettings" :key="setting.id">
|
<p v-for="setting in fb.currentSettings" :key="setting.id">
|
||||||
@@ -34,19 +34,19 @@
|
|||||||
:on="setting.value"
|
:on="setting.value"
|
||||||
@change="toggleSettings(setting.name, setting.value)"
|
@change="toggleSettings(setting.name, setting.value)"
|
||||||
>
|
>
|
||||||
{{ $t(setting.name) + ' ' + $t('sync') }}
|
{{ $t(setting.name) + " " + $t("sync") }}
|
||||||
{{ setting.value ? $t('enabled') : $t('disabled') }}
|
{{ setting.value ? $t("enabled") : $t("disabled") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="fb.currentSettings.length !== 3">
|
<p v-if="fb.currentSettings.length !== 3">
|
||||||
<button class="" @click="initSettings">
|
<button class="" @click="initSettings">
|
||||||
<i class="material-icons">sync</i>
|
<i class="material-icons">sync</i>
|
||||||
<span>{{ $t('turn_on') + ' ' + $t('sync') }}</span>
|
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<label>{{ $t('login_with') }}</label>
|
<label>{{ $t("login_with") }}</label>
|
||||||
<p>
|
<p>
|
||||||
<button class="icon" @click="signInWithGoogle">
|
<button class="icon" @click="signInWithGoogle">
|
||||||
<svg
|
<svg
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<pw-section class="cyan" :label="$t('theme')" ref="theme">
|
<pw-section class="cyan" :label="$t('theme')" ref="theme">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>{{ $t('background') }}</label>
|
<label>{{ $t("background") }}</label>
|
||||||
<div class="backgrounds">
|
<div class="backgrounds">
|
||||||
<span :key="theme.class" @click="applyTheme(theme)" v-for="theme in themes">
|
<span :key="theme.class" @click="applyTheme(theme)" v-for="theme in themes">
|
||||||
<swatch
|
<swatch
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>{{ $t('color') }}</label>
|
<label>{{ $t("color") }}</label>
|
||||||
<div class="colors">
|
<div class="colors">
|
||||||
<span
|
<span
|
||||||
:key="entry.color"
|
:key="entry.color"
|
||||||
@@ -127,8 +127,8 @@
|
|||||||
:on="settings.FRAME_COLORS_ENABLED"
|
:on="settings.FRAME_COLORS_ENABLED"
|
||||||
@change="toggleSetting('FRAME_COLORS_ENABLED')"
|
@change="toggleSetting('FRAME_COLORS_ENABLED')"
|
||||||
>
|
>
|
||||||
{{ $t('multi_color') }}
|
{{ $t("multi_color") }}
|
||||||
{{ settings.FRAME_COLORS_ENABLED ? $t('enabled') : $t('disabled') }}
|
{{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -140,8 +140,8 @@
|
|||||||
:on="settings.SCROLL_INTO_ENABLED"
|
:on="settings.SCROLL_INTO_ENABLED"
|
||||||
@change="toggleSetting('SCROLL_INTO_ENABLED')"
|
@change="toggleSetting('SCROLL_INTO_ENABLED')"
|
||||||
>
|
>
|
||||||
{{ $t('scrollInto_use_toggle') }}
|
{{ $t("scrollInto_use_toggle") }}
|
||||||
{{ settings.SCROLL_INTO_ENABLED ? $t('enabled') : $t('disabled') }}
|
{{ settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
:on="settings.EXTENSIONS_ENABLED"
|
:on="settings.EXTENSIONS_ENABLED"
|
||||||
@change="toggleSetting('EXTENSIONS_ENABLED')"
|
@change="toggleSetting('EXTENSIONS_ENABLED')"
|
||||||
>
|
>
|
||||||
{{ $t('extensions_use_toggle') }}
|
{{ $t("extensions_use_toggle") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -169,8 +169,8 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<span>
|
<span>
|
||||||
<pw-toggle :on="settings.PROXY_ENABLED" @change="toggleSetting('PROXY_ENABLED')">
|
<pw-toggle :on="settings.PROXY_ENABLED" @change="toggleSetting('PROXY_ENABLED')">
|
||||||
{{ $t('proxy') }}
|
{{ $t("proxy") }}
|
||||||
{{ settings.PROXY_ENABLED ? $t('enabled') : $t('disabled') }}
|
{{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }}
|
||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</span>
|
</span>
|
||||||
<a
|
<a
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="url">{{ $t('url') }}</label>
|
<label for="url">{{ $t("url") }}</label>
|
||||||
<button class="icon" @click="resetProxy" v-tooltip.bottom="$t('reset_default')">
|
<button class="icon" @click="resetProxy" v-tooltip.bottom="$t('reset_default')">
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -204,11 +204,11 @@
|
|||||||
<ul class="info">
|
<ul class="info">
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
{{ $t('postwoman_official_proxy_hosting') }}
|
{{ $t("postwoman_official_proxy_hosting") }}
|
||||||
<br />
|
<br />
|
||||||
{{ $t('read_the') }}
|
{{ $t("read_the") }}
|
||||||
<a class="link" href="https://apollotv.xyz/legal" target="_blank" rel="noopener">
|
<a class="link" href="https://apollotv.xyz/legal" target="_blank" rel="noopener">
|
||||||
{{ $t('apollotv_privacy_policy') }} </a
|
{{ $t("apollotv_privacy_policy") }} </a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -235,14 +235,14 @@
|
|||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import firebase from 'firebase/app'
|
import firebase from "firebase/app"
|
||||||
import { fb } from '../functions/fb'
|
import { fb } from "../functions/fb"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
'pw-section': () => import('../components/section'),
|
"pw-section": () => import("../components/section"),
|
||||||
'pw-toggle': () => import('../components/toggle'),
|
"pw-toggle": () => import("../components/toggle"),
|
||||||
swatch: () => import('../components/settings/swatch'),
|
swatch: () => import("../components/settings/swatch"),
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -252,97 +252,97 @@ export default {
|
|||||||
// set the relevant values.
|
// set the relevant values.
|
||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
color: '#202124',
|
color: "#202124",
|
||||||
name: this.$t('kinda_dark'),
|
name: this.$t("kinda_dark"),
|
||||||
class: '',
|
class: "",
|
||||||
aceEditor: 'twilight',
|
aceEditor: "twilight",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#ffffff',
|
color: "#ffffff",
|
||||||
name: this.$t('clearly_white'),
|
name: this.$t("clearly_white"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
class: 'light',
|
class: "light",
|
||||||
aceEditor: 'iplastic',
|
aceEditor: "iplastic",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#000000',
|
color: "#000000",
|
||||||
name: this.$t('just_black'),
|
name: this.$t("just_black"),
|
||||||
class: 'black',
|
class: "black",
|
||||||
aceEditor: 'vibrant_ink',
|
aceEditor: "vibrant_ink",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: 'var(--ac-color)',
|
color: "var(--ac-color)",
|
||||||
name: this.$t('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
|
||||||
? 'iplastic'
|
? "iplastic"
|
||||||
: 'twilight',
|
: "twilight",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// You can define a new color here! It will simply store the color value.
|
// You can define a new color here! It will simply store the color value.
|
||||||
colors: [
|
colors: [
|
||||||
// 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: this.$t('green'),
|
name: this.$t("green"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#f1fa8c',
|
color: "#f1fa8c",
|
||||||
name: this.$t('yellow'),
|
name: this.$t("yellow"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#ff79c6',
|
color: "#ff79c6",
|
||||||
name: this.$t('pink'),
|
name: this.$t("pink"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#ff5555',
|
color: "#ff5555",
|
||||||
name: this.$t('red'),
|
name: this.$t("red"),
|
||||||
vibrant: false,
|
vibrant: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#bd93f9',
|
color: "#bd93f9",
|
||||||
name: this.$t('purple'),
|
name: this.$t("purple"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#ffb86c',
|
color: "#ffb86c",
|
||||||
name: this.$t('orange'),
|
name: this.$t("orange"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#8be9fd',
|
color: "#8be9fd",
|
||||||
name: this.$t('cyan'),
|
name: this.$t("cyan"),
|
||||||
vibrant: true,
|
vibrant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#57b5f9',
|
color: "#57b5f9",
|
||||||
name: this.$t('blue'),
|
name: this.$t("blue"),
|
||||||
vibrant: false,
|
vibrant: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
SCROLL_INTO_ENABLED:
|
SCROLL_INTO_ENABLED:
|
||||||
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== 'undefined'
|
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== "undefined"
|
||||||
? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED
|
? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED
|
||||||
: true,
|
: true,
|
||||||
|
|
||||||
THEME_COLOR: '',
|
THEME_COLOR: "",
|
||||||
THEME_TAB_COLOR: '',
|
THEME_TAB_COLOR: "",
|
||||||
THEME_COLOR_VIBRANT: true,
|
THEME_COLOR_VIBRANT: true,
|
||||||
|
|
||||||
FRAME_COLORS_ENABLED: this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false,
|
FRAME_COLORS_ENABLED: this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false,
|
||||||
PROXY_ENABLED: this.$store.state.postwoman.settings.PROXY_ENABLED || false,
|
PROXY_ENABLED: this.$store.state.postwoman.settings.PROXY_ENABLED || false,
|
||||||
PROXY_URL:
|
PROXY_URL:
|
||||||
this.$store.state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
|
this.$store.state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
|
||||||
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || '',
|
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
|
||||||
|
|
||||||
EXTENSIONS_ENABLED:
|
EXTENSIONS_ENABLED:
|
||||||
typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !== 'undefined'
|
typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !== "undefined"
|
||||||
? this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
|
? this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
|
||||||
: true,
|
: true,
|
||||||
},
|
},
|
||||||
@@ -356,45 +356,45 @@ export default {
|
|||||||
proxySettings: {
|
proxySettings: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.applySetting('PROXY_URL', value.url)
|
this.applySetting("PROXY_URL", value.url)
|
||||||
this.applySetting('PROXY_KEY', value.key)
|
this.applySetting("PROXY_KEY", value.key)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
applyTheme({ class: name, color, aceEditor }) {
|
applyTheme({ class: name, color, aceEditor }) {
|
||||||
this.applySetting('THEME_CLASS', name)
|
this.applySetting("THEME_CLASS", name)
|
||||||
this.applySetting('THEME_ACE_EDITOR', aceEditor)
|
this.applySetting("THEME_ACE_EDITOR", aceEditor)
|
||||||
document.querySelector('meta[name=theme-color]').setAttribute('content', color)
|
document.querySelector("meta[name=theme-color]").setAttribute("content", color)
|
||||||
this.applySetting('THEME_TAB_COLOR', color)
|
this.applySetting("THEME_TAB_COLOR", color)
|
||||||
document.documentElement.className = name
|
document.documentElement.className = name
|
||||||
},
|
},
|
||||||
setActiveColor(color, vibrant) {
|
setActiveColor(color, vibrant) {
|
||||||
// By default, the color is vibrant.
|
// By default, the color is vibrant.
|
||||||
if (vibrant === null) vibrant = true
|
if (vibrant === null) vibrant = true
|
||||||
document.documentElement.style.setProperty('--ac-color', color)
|
document.documentElement.style.setProperty("--ac-color", color)
|
||||||
document.documentElement.style.setProperty(
|
document.documentElement.style.setProperty(
|
||||||
'--act-color',
|
"--act-color",
|
||||||
vibrant ? 'rgba(32, 33, 36, 1)' : 'rgba(255, 255, 255, 1)'
|
vibrant ? "rgba(32, 33, 36, 1)" : "rgba(255, 255, 255, 1)"
|
||||||
)
|
)
|
||||||
this.applySetting('THEME_COLOR', color.toUpperCase())
|
this.applySetting("THEME_COLOR", color.toUpperCase())
|
||||||
this.applySetting('THEME_COLOR_VIBRANT', vibrant)
|
this.applySetting("THEME_COLOR_VIBRANT", vibrant)
|
||||||
},
|
},
|
||||||
getActiveColor() {
|
getActiveColor() {
|
||||||
// This strips extra spaces and # signs from the strings.
|
// This strips extra spaces and # signs from the strings.
|
||||||
const strip = str => str.replace(/#/g, '').replace(/ /g, '')
|
const strip = str => str.replace(/#/g, "").replace(/ /g, "")
|
||||||
return `#${strip(
|
return `#${strip(
|
||||||
window.getComputedStyle(document.documentElement).getPropertyValue('--ac-color')
|
window.getComputedStyle(document.documentElement).getPropertyValue("--ac-color")
|
||||||
).toUpperCase()}`
|
).toUpperCase()}`
|
||||||
},
|
},
|
||||||
applySetting(key, value) {
|
applySetting(key, value) {
|
||||||
this.settings[key] = value
|
this.settings[key] = value
|
||||||
this.$store.commit('postwoman/applySetting', [key, value])
|
this.$store.commit("postwoman/applySetting", [key, value])
|
||||||
},
|
},
|
||||||
toggleSetting(key) {
|
toggleSetting(key) {
|
||||||
this.settings[key] = !this.settings[key]
|
this.settings[key] = !this.settings[key]
|
||||||
this.$store.commit('postwoman/applySetting', [key, this.settings[key]])
|
this.$store.commit("postwoman/applySetting", [key, this.settings[key]])
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
fb.currentUser = null
|
fb.currentUser = null
|
||||||
@@ -403,11 +403,11 @@ export default {
|
|||||||
.signOut()
|
.signOut()
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.$toast.info(this.$t('logged_out'), {
|
this.$toast.info(this.$t("logged_out"), {
|
||||||
icon: 'vpn_key',
|
icon: "vpn_key",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
signInWithGoogle() {
|
signInWithGoogle() {
|
||||||
@@ -417,17 +417,17 @@ export default {
|
|||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(({ additionalUserInfo }) => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('yes'),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings('syncHistory', true)
|
fb.writeSettings("syncHistory", true)
|
||||||
fb.writeSettings('syncCollections', true)
|
fb.writeSettings("syncCollections", true)
|
||||||
fb.writeSettings('syncEnvironments', true)
|
fb.writeSettings("syncEnvironments", true)
|
||||||
this.$router.push({ path: '/settings' })
|
this.$router.push({ path: "/settings" })
|
||||||
toastObject.remove()
|
toastObject.remove()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -436,7 +436,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -447,17 +447,17 @@ export default {
|
|||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.then(({ additionalUserInfo }) => {
|
.then(({ additionalUserInfo }) => {
|
||||||
if (additionalUserInfo.isNewUser) {
|
if (additionalUserInfo.isNewUser) {
|
||||||
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
|
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
|
||||||
icon: 'sync',
|
icon: "sync",
|
||||||
duration: null,
|
duration: null,
|
||||||
closeOnSwipe: false,
|
closeOnSwipe: false,
|
||||||
action: {
|
action: {
|
||||||
text: this.$t('yes'),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings('syncHistory', true)
|
fb.writeSettings("syncHistory", true)
|
||||||
fb.writeSettings('syncCollections', true)
|
fb.writeSettings("syncCollections", true)
|
||||||
fb.writeSettings('syncEnvironments', true)
|
fb.writeSettings("syncEnvironments", true)
|
||||||
this.$router.push({ path: '/settings' })
|
this.$router.push({ path: "/settings" })
|
||||||
toastObject.remove()
|
toastObject.remove()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -466,7 +466,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$toast.show(err.message || err, {
|
this.$toast.show(err.message || err, {
|
||||||
icon: 'error',
|
icon: "error",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -474,15 +474,15 @@ export default {
|
|||||||
fb.writeSettings(s, !v)
|
fb.writeSettings(s, !v)
|
||||||
},
|
},
|
||||||
initSettings() {
|
initSettings() {
|
||||||
fb.writeSettings('syncHistory', true)
|
fb.writeSettings("syncHistory", true)
|
||||||
fb.writeSettings('syncCollections', true)
|
fb.writeSettings("syncCollections", true)
|
||||||
fb.writeSettings('syncEnvironments', true)
|
fb.writeSettings("syncEnvironments", true)
|
||||||
},
|
},
|
||||||
resetProxy({ target }) {
|
resetProxy({ target }) {
|
||||||
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`
|
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`
|
||||||
target.innerHTML = this.doneButton
|
target.innerHTML = this.doneButton
|
||||||
this.$toast.info(this.$t('cleared'), {
|
this.$toast.info(this.$t("cleared"), {
|
||||||
icon: 'clear_all',
|
icon: "clear_all",
|
||||||
})
|
})
|
||||||
setTimeout(() => (target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
setTimeout(() => (target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Vue from 'vue'
|
import Vue from "vue"
|
||||||
import VTooltip from 'v-tooltip'
|
import VTooltip from "v-tooltip"
|
||||||
|
|
||||||
Vue.use(VTooltip)
|
Vue.use(VTooltip)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import VuexPersistence from 'vuex-persist'
|
import VuexPersistence from "vuex-persist"
|
||||||
|
|
||||||
export default ({ store }) => {
|
export default ({ store }) => {
|
||||||
new VuexPersistence().plugin(store)
|
new VuexPersistence().plugin(store)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import Vuex from 'vuex'
|
import Vuex from "vuex"
|
||||||
import state from './state'
|
import state from "./state"
|
||||||
import VuexPersist from 'vuex-persist'
|
import VuexPersist from "vuex-persist"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install(Vue) {
|
install(Vue) {
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
const vuexLocalStorage = new VuexPersist({
|
const vuexLocalStorage = new VuexPersist({
|
||||||
key: 'vuex',
|
key: "vuex",
|
||||||
storage: window.localStorage,
|
storage: window.localStorage,
|
||||||
reducer: ({ ...request }) => ({
|
reducer: ({ ...request }) => ({
|
||||||
...request,
|
...request,
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
import Vue from 'vue'
|
import Vue from "vue"
|
||||||
|
|
||||||
export const SETTINGS_KEYS = [
|
export const SETTINGS_KEYS = [
|
||||||
/**
|
/**
|
||||||
* Whether or not to enable scrolling to a specified element, when certain
|
* Whether or not to enable scrolling to a specified element, when certain
|
||||||
* actions are triggered.
|
* actions are triggered.
|
||||||
*/
|
*/
|
||||||
'SCROLL_INTO_ENABLED',
|
"SCROLL_INTO_ENABLED",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The CSS class that should be applied to the root element.
|
* The CSS class that should be applied to the root element.
|
||||||
* Essentially, the name of the background theme.
|
* Essentially, the name of the background theme.
|
||||||
*/
|
*/
|
||||||
'THEME_CLASS',
|
"THEME_CLASS",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The hex color code for the currently active theme.
|
* The hex color code for the currently active theme.
|
||||||
*/
|
*/
|
||||||
'THEME_COLOR',
|
"THEME_COLOR",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The hex color code for browser tab color.
|
* The hex color code for browser tab color.
|
||||||
*/
|
*/
|
||||||
'THEME_TAB_COLOR',
|
"THEME_TAB_COLOR",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not THEME_COLOR is considered 'vibrant'.
|
* Whether or not THEME_COLOR is considered 'vibrant'.
|
||||||
@@ -30,59 +30,59 @@ export const SETTINGS_KEYS = [
|
|||||||
* any text placed on the theme color will have its color
|
* any text placed on the theme color will have its color
|
||||||
* inverted from white to black.
|
* inverted from white to black.
|
||||||
*/
|
*/
|
||||||
'THEME_COLOR_VIBRANT',
|
"THEME_COLOR_VIBRANT",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Ace editor theme
|
* The Ace editor theme
|
||||||
*/
|
*/
|
||||||
'THEME_ACE_EDITOR',
|
"THEME_ACE_EDITOR",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normally, section frames are multicolored in the UI
|
* Normally, section frames are multicolored in the UI
|
||||||
* to emphasise the different sections.
|
* to emphasise the different sections.
|
||||||
* This setting allows that to be turned off.
|
* This setting allows that to be turned off.
|
||||||
*/
|
*/
|
||||||
'FRAME_COLORS_ENABLED',
|
"FRAME_COLORS_ENABLED",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not requests should be proxied.
|
* Whether or not requests should be proxied.
|
||||||
*/
|
*/
|
||||||
'PROXY_ENABLED',
|
"PROXY_ENABLED",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL of the proxy to connect to for requests.
|
* The URL of the proxy to connect to for requests.
|
||||||
*/
|
*/
|
||||||
'PROXY_URL',
|
"PROXY_URL",
|
||||||
/**
|
/**
|
||||||
* The security key of the proxy.
|
* The security key of the proxy.
|
||||||
*/
|
*/
|
||||||
'PROXY_KEY',
|
"PROXY_KEY",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of properties to exclude from the URL.
|
* An array of properties to exclude from the URL.
|
||||||
* e.g. 'auth'
|
* e.g. 'auth'
|
||||||
*/
|
*/
|
||||||
'URL_EXCLUDES',
|
"URL_EXCLUDES",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A boolean value indicating whether to use the browser extensions
|
* A boolean value indicating whether to use the browser extensions
|
||||||
* to run the requests
|
* to run the requests
|
||||||
*/
|
*/
|
||||||
'EXTENSIONS_ENABLED',
|
"EXTENSIONS_ENABLED",
|
||||||
]
|
]
|
||||||
|
|
||||||
export const state = () => ({
|
export const state = () => ({
|
||||||
settings: {},
|
settings: {},
|
||||||
collections: [
|
collections: [
|
||||||
{
|
{
|
||||||
name: 'My Collection',
|
name: "My Collection",
|
||||||
folders: [],
|
folders: [],
|
||||||
requests: [],
|
requests: [],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
environments: [
|
environments: [
|
||||||
{
|
{
|
||||||
name: 'My Environment Variables',
|
name: "My Environment Variables",
|
||||||
variables: [],
|
variables: [],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -94,7 +94,7 @@ export const state = () => ({
|
|||||||
export const mutations = {
|
export const mutations = {
|
||||||
applySetting({ settings }, setting) {
|
applySetting({ settings }, setting) {
|
||||||
if (setting === null || !(setting instanceof Array) || setting.length !== 2) {
|
if (setting === null || !(setting instanceof Array) || setting.length !== 2) {
|
||||||
throw new Error('You must provide a setting (array in the form [key, value])')
|
throw new Error("You must provide a setting (array in the form [key, value])")
|
||||||
}
|
}
|
||||||
|
|
||||||
const [key, value] = setting
|
const [key, value] = setting
|
||||||
@@ -144,7 +144,7 @@ export const mutations = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
if (duplicateEnvironment) {
|
if (duplicateEnvironment) {
|
||||||
this.$toast.info('Duplicate environment')
|
this.$toast.info("Duplicate environment")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
state.environments = [...state.environments, ...environments]
|
state.environments = [...state.environments, ...environments]
|
||||||
@@ -155,7 +155,7 @@ export const mutations = {
|
|||||||
index += 1
|
index += 1
|
||||||
}
|
}
|
||||||
this.$toast.info(confirmation, {
|
this.$toast.info(confirmation, {
|
||||||
icon: 'folder_shared',
|
icon: "folder_shared",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ export const mutations = {
|
|||||||
item.name.toLowerCase() === name.toLowerCase()
|
item.name.toLowerCase() === name.toLowerCase()
|
||||||
)
|
)
|
||||||
if (duplicateEnvironment) {
|
if (duplicateEnvironment) {
|
||||||
this.$toast.info('Duplicate environment')
|
this.$toast.info("Duplicate environment")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
environments[environmentIndex] = environment
|
environments[environmentIndex] = environment
|
||||||
@@ -201,11 +201,11 @@ export const mutations = {
|
|||||||
item => item.name.toLowerCase() === name.toLowerCase()
|
item => item.name.toLowerCase() === name.toLowerCase()
|
||||||
)
|
)
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info('Duplicate collection')
|
this.$toast.info("Duplicate collection")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
collections.push({
|
collections.push({
|
||||||
name: '',
|
name: "",
|
||||||
folders: [],
|
folders: [],
|
||||||
requests: [],
|
requests: [],
|
||||||
...collection,
|
...collection,
|
||||||
@@ -226,7 +226,7 @@ export const mutations = {
|
|||||||
item => item.name.toLowerCase() === name.toLowerCase()
|
item => item.name.toLowerCase() === name.toLowerCase()
|
||||||
)
|
)
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info('Duplicate collection')
|
this.$toast.info("Duplicate collection")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
collections[collectionIndex] = collection
|
collections[collectionIndex] = collection
|
||||||
@@ -235,7 +235,7 @@ export const mutations = {
|
|||||||
addNewFolder({ collections }, payload) {
|
addNewFolder({ collections }, payload) {
|
||||||
const { collectionIndex, folder } = payload
|
const { collectionIndex, folder } = payload
|
||||||
collections[collectionIndex].folders.push({
|
collections[collectionIndex].folders.push({
|
||||||
name: '',
|
name: "",
|
||||||
requests: [],
|
requests: [],
|
||||||
...folder,
|
...folder,
|
||||||
})
|
})
|
||||||
@@ -328,9 +328,9 @@ export const mutations = {
|
|||||||
const { request } = payload
|
const { request } = payload
|
||||||
|
|
||||||
// Remove the old request from collection
|
// Remove the old request from collection
|
||||||
if (request.hasOwnProperty('oldCollection') && request.oldCollection > -1) {
|
if (request.hasOwnProperty("oldCollection") && request.oldCollection > -1) {
|
||||||
const folder =
|
const folder =
|
||||||
request.hasOwnProperty('oldFolder') && request.oldFolder >= -1
|
request.hasOwnProperty("oldFolder") && request.oldFolder >= -1
|
||||||
? request.oldFolder
|
? request.oldFolder
|
||||||
: request.folder
|
: request.folder
|
||||||
if (folder > -1) {
|
if (folder > -1) {
|
||||||
@@ -338,7 +338,7 @@ export const mutations = {
|
|||||||
} else {
|
} 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) {
|
} else if (request.hasOwnProperty("oldFolder") && request.oldFolder !== -1) {
|
||||||
collections[request.collection].folders[folder].requests.splice(request.requestIndex, 1)
|
collections[request.collection].folders[folder].requests.splice(request.requestIndex, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
export default () => ({
|
export default () => ({
|
||||||
request: {
|
request: {
|
||||||
method: 'GET',
|
method: "GET",
|
||||||
url: 'https://httpbin.org',
|
url: "https://httpbin.org",
|
||||||
path: '/get',
|
path: "/get",
|
||||||
label: '',
|
label: "",
|
||||||
auth: 'None',
|
auth: "None",
|
||||||
httpUser: '',
|
httpUser: "",
|
||||||
httpPassword: '',
|
httpPassword: "",
|
||||||
passwordFieldType: 'password',
|
passwordFieldType: "password",
|
||||||
bearerToken: '',
|
bearerToken: "",
|
||||||
headers: [],
|
headers: [],
|
||||||
params: [],
|
params: [],
|
||||||
bodyParams: [],
|
bodyParams: [],
|
||||||
rawParams: '',
|
rawParams: "",
|
||||||
rawInput: false,
|
rawInput: false,
|
||||||
requestType: '',
|
requestType: "",
|
||||||
contentType: '',
|
contentType: "",
|
||||||
},
|
},
|
||||||
gql: {
|
gql: {
|
||||||
url: 'https://rickandmortyapi.com/graphql',
|
url: "https://rickandmortyapi.com/graphql",
|
||||||
headers: [],
|
headers: [],
|
||||||
variablesJSONString: '{}',
|
variablesJSONString: "{}",
|
||||||
query: '',
|
query: "",
|
||||||
},
|
},
|
||||||
oauth2: {
|
oauth2: {
|
||||||
tokens: [],
|
tokens: [],
|
||||||
tokenReqs: [],
|
tokenReqs: [],
|
||||||
tokenReqSelect: '',
|
tokenReqSelect: "",
|
||||||
tokenReqName: '',
|
tokenReqName: "",
|
||||||
accessTokenName: '',
|
accessTokenName: "",
|
||||||
oidcDiscoveryUrl: '',
|
oidcDiscoveryUrl: "",
|
||||||
authUrl: '',
|
authUrl: "",
|
||||||
accessTokenUrl: '',
|
accessTokenUrl: "",
|
||||||
clientId: '',
|
clientId: "",
|
||||||
scope: '',
|
scope: "",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
describe('Visit home', () => {
|
describe("Visit home", () => {
|
||||||
it('Have a page title with "Postwoman"', () => {
|
it('Have a page title with "Postwoman"', () => {
|
||||||
cy.visit('/', { retryOnStatusCodeFailure: true })
|
cy.visit("/", { retryOnStatusCodeFailure: true })
|
||||||
.get('title')
|
.get("title")
|
||||||
.should('contain', 'Postwoman')
|
.should("contain", "Postwoman")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
describe('Authentication', () => {
|
describe("Authentication", () => {
|
||||||
it(`Change default auth user and pass with url`, () => {
|
it(`Change default auth user and pass with url`, () => {
|
||||||
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
|
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
|
||||||
.get('input[name="http_basic_user"]', { timeout: 500 })
|
.get('input[name="http_basic_user"]', { timeout: 500 })
|
||||||
.invoke('val')
|
.invoke("val")
|
||||||
.then(user => {
|
.then(user => {
|
||||||
expect(user === 'foo').to.equal(true)
|
expect(user === "foo").to.equal(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
.get('input[name="http_basic_passwd"]')
|
.get('input[name="http_basic_passwd"]')
|
||||||
.invoke('val')
|
.invoke("val")
|
||||||
.then(pass => {
|
.then(pass => {
|
||||||
expect(pass === 'bar').to.equal(true)
|
expect(pass === "bar").to.equal(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Enable user and pass at url with toggler', () => {
|
it("Enable user and pass at url with toggler", () => {
|
||||||
cy.visit('/', { retryOnStatusCodeFailure: true })
|
cy.visit("/", { retryOnStatusCodeFailure: true })
|
||||||
.get('#auth')
|
.get("#auth")
|
||||||
.select('Basic Auth')
|
.select("Basic Auth")
|
||||||
.get('input[name="http_basic_user"]', { timeout: 500 })
|
.get('input[name="http_basic_user"]', { timeout: 500 })
|
||||||
.type('foo')
|
.type("foo")
|
||||||
.get('input[name="http_basic_passwd"]', { timeout: 500 })
|
.get('input[name="http_basic_passwd"]', { timeout: 500 })
|
||||||
.type('bar')
|
.type("bar")
|
||||||
.url()
|
.url()
|
||||||
.should('not.contain', 'foo')
|
.should("not.contain", "foo")
|
||||||
.should('not.contain', 'bar')
|
.should("not.contain", "bar")
|
||||||
.get('.toggle')
|
.get(".toggle")
|
||||||
.click()
|
.click()
|
||||||
.url()
|
.url()
|
||||||
.should('contain', 'foo')
|
.should("contain", "foo")
|
||||||
.should('contain', 'bar')
|
.should("contain", "bar")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
describe('Proxy disabled - local request', () => {
|
describe("Proxy disabled - local request", () => {
|
||||||
it('Change default url with query and make a request to local cat api', () => {
|
it("Change default url with query and make a request to local cat api", () => {
|
||||||
cy.seedAndVisit('catapi', '/?url=https://api.thecatapi.com&path=')
|
cy.seedAndVisit("catapi", "/?url=https://api.thecatapi.com&path=")
|
||||||
.get('#url')
|
.get("#url")
|
||||||
.then(el => expect(el.val() === 'https://api.thecatapi.com').to.equal(true))
|
.then(el => expect(el.val() === "https://api.thecatapi.com").to.equal(true))
|
||||||
.get('#path')
|
.get("#path")
|
||||||
.then(el => expect(el.val() === '').to.equal(true))
|
.then(el => expect(el.val() === "").to.equal(true))
|
||||||
.get('#response-details-wrapper')
|
.get("#response-details-wrapper")
|
||||||
.should($wrapper => {
|
.should($wrapper => {
|
||||||
expect($wrapper).to.contain('FAKE Cat API')
|
expect($wrapper).to.contain("FAKE Cat API")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('Proxy enabled - external request', () => {
|
describe("Proxy enabled - external request", () => {
|
||||||
it('Enable the proxy and make a request to the real cat api', () => {
|
it("Enable the proxy and make a request to the real cat api", () => {
|
||||||
cy.enableProxy('/?url=https://api.thecatapi.com&path=')
|
cy.enableProxy("/?url=https://api.thecatapi.com&path=")
|
||||||
.get('#send')
|
.get("#send")
|
||||||
.click()
|
.click()
|
||||||
.get('#response-details-wrapper')
|
.get("#response-details-wrapper")
|
||||||
.should($wrapper => {
|
.should($wrapper => {
|
||||||
expect($wrapper).to.contain('Cat API')
|
expect($wrapper).to.contain("Cat API")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
* @param { String } path The path or query parameters to go -ex. '/?path=/api/users'
|
* @param { String } path The path or query parameters to go -ex. '/?path=/api/users'
|
||||||
* @param { String } method The fake request method
|
* @param { String } method The fake request method
|
||||||
*/
|
*/
|
||||||
Cypress.Commands.add('seedAndVisit', (seedData, path = '/', method = 'GET') => {
|
Cypress.Commands.add("seedAndVisit", (seedData, path = "/", method = "GET") => {
|
||||||
cy.server()
|
cy.server()
|
||||||
.route(method, 'https://api.thecatapi.com/', `fixture:${seedData}`)
|
.route(method, "https://api.thecatapi.com/", `fixture:${seedData}`)
|
||||||
.as('load')
|
.as("load")
|
||||||
|
|
||||||
cy.visit(path)
|
cy.visit(path)
|
||||||
.get('#send')
|
.get("#send")
|
||||||
.click()
|
.click()
|
||||||
.wait('@load')
|
.wait("@load")
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,11 +21,11 @@ Cypress.Commands.add('seedAndVisit', (seedData, path = '/', method = 'GET') => {
|
|||||||
* This function will enable the proxy and navigate back to a given path
|
* This function will enable the proxy and navigate back to a given path
|
||||||
* @param { String } goBackPath The page go back
|
* @param { String } goBackPath The page go back
|
||||||
*/
|
*/
|
||||||
Cypress.Commands.add('enableProxy', goBackPath => {
|
Cypress.Commands.add("enableProxy", goBackPath => {
|
||||||
cy.visit('/settings')
|
cy.visit("/settings")
|
||||||
.get('#proxy')
|
.get("#proxy")
|
||||||
.find('.toggle')
|
.find(".toggle")
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
.should('have.class', 'on')
|
.should("have.class", "on")
|
||||||
.visit(goBackPath)
|
.visit(goBackPath)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
import './commands'
|
import "./commands"
|
||||||
|
|||||||
Reference in New Issue
Block a user