Merge branch 'master' into feature/pre-request-script
This commit is contained in:
@@ -1421,9 +1421,9 @@ export default {
|
||||
"url",
|
||||
"path",
|
||||
!this.urlExcludes.auth ? "auth" : null,
|
||||
"httpUser",
|
||||
"httpPassword",
|
||||
"bearerToken",
|
||||
!this.urlExcludes.httpUser ? "httpUser" : null,
|
||||
!this.urlExcludes.httpPassword ? "httpPassword" : null,
|
||||
!this.urlExcludes.bearerToken ? "bearerToken" : null,
|
||||
"contentType"
|
||||
].filter((item) => item !== null).map(item => flat(item));
|
||||
let deeps = ["headers", "params"].map(item => deep(item));
|
||||
@@ -1571,8 +1571,15 @@ export default {
|
||||
this.editRequest = {};
|
||||
},
|
||||
setExclude (excludedField, excluded) {
|
||||
if (excludedField === "auth") {
|
||||
this.urlExcludes.auth = excluded;
|
||||
this.urlExcludes.httpUser = excluded;
|
||||
this.urlExcludes.httpPassword = excluded;
|
||||
this.urlExcludes.bearerToken = excluded;
|
||||
} else {
|
||||
this.urlExcludes[excludedField] = excluded;
|
||||
this.setRouteQueryState();
|
||||
}
|
||||
this.setRouteQueryState();
|
||||
},
|
||||
methodChange() {
|
||||
// this.$store.commit('setState', { 'value': ["POST", "PUT", "PATCH"].includes(this.method) ? 'application/json' : '', 'attribute': 'contentType' })
|
||||
@@ -1585,7 +1592,10 @@ export default {
|
||||
created() {
|
||||
this.urlExcludes = this.$store.state.postwoman.settings.URL_EXCLUDES || {
|
||||
// Exclude authentication by default for security reasons.
|
||||
auth: true
|
||||
auth: true,
|
||||
httpUser: true,
|
||||
httpPassword: true,
|
||||
bearerToken: true
|
||||
};
|
||||
|
||||
if (Object.keys(this.$route.query).length)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<li>
|
||||
<h3 class="title">Background</h3>
|
||||
<div class="backgrounds">
|
||||
<span :key="theme.class" @click="applyTheme(theme.class)" v-for="theme in themes">
|
||||
<span :key="theme.class" @click="applyTheme(theme.class, theme.color)" v-for="theme in themes">
|
||||
<swatch
|
||||
:active="settings.THEME_CLASS === theme.class"
|
||||
:class="{ vibrant: theme.vibrant }"
|
||||
@@ -176,6 +176,7 @@
|
||||
settings: {
|
||||
THEME_CLASS: this.$store.state.postwoman.settings.THEME_CLASS || "",
|
||||
THEME_COLOR: "",
|
||||
THEME_TAB_COLOR: "",
|
||||
THEME_COLOR_VIBRANT: true,
|
||||
|
||||
FRAME_COLORS_ENABLED:
|
||||
@@ -199,8 +200,10 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
applyTheme(name) {
|
||||
applyTheme(name, color) {
|
||||
this.applySetting("THEME_CLASS", name);
|
||||
document.querySelector('meta[name=theme-color]').setAttribute('content', color)
|
||||
this.applySetting("THEME_TAB_COLOR", color);
|
||||
document.documentElement.className = name;
|
||||
let imgGitHub = document.getElementById("imgGitHub");
|
||||
imgGitHub.style["filter"] = "";
|
||||
|
||||
Reference in New Issue
Block a user