Skip to content

Commit

Permalink
Merge pull request hoppscotch#216 from mateusppereira/bug-fix-frame-c…
Browse files Browse the repository at this point in the history
…olors

Fixed frame colors toggle
  • Loading branch information
NBTX authored Oct 25, 2019
2 parents fa268fd + 9103cee commit 84eda99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions components/section.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<fieldset :id="label.toLowerCase()" :class="{ 'no-colored-frames': noFrameColors }">
<fieldset :id="label.toLowerCase()" :class="{ 'no-colored-frames': !frameColorsEnabled }">
<legend @click.prevent="collapse">
<i class="material-icons icon">{{ icon }}</i>
<span>{{ label }}</span>
Expand All @@ -24,8 +24,8 @@
<script>
export default {
computed: {
noFrameColors() {
return this.$store.state.postwoman.settings.DISABLE_FRAME_COLORS || false;
frameColorsEnabled() {
return this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false;
}
},
Expand Down
12 changes: 6 additions & 6 deletions pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<h3 class="title">Frames</h3>
<span>
<pw-toggle
:on="!settings.DISABLE_FRAME_COLORS"
@change="applySetting('DISABLE_FRAME_COLORS', $event)"
>Multi-color {{ settings.DISABLE_FRAME_COLORS ? "Disabled" : "Enabled" }}</pw-toggle>
:on="settings.FRAME_COLORS_ENABLED"
@change="toggleSetting('FRAME_COLORS_ENABLED')"
>Multi-color {{ settings.FRAME_COLORS_ENABLED ? "Enabled" : "Disabled" }}</pw-toggle>
</span>
</li>
</ul>
Expand All @@ -52,7 +52,7 @@
<li>
<pw-toggle
:on="settings.PROXY_ENABLED"
@change="applySetting('PROXY_ENABLED', $event)"
@change="toggleSetting('PROXY_ENABLED')"
>Proxy {{ settings.PROXY_ENABLED ? "enabled" : "disabled" }}</pw-toggle>
</li>
</ul>
Expand Down Expand Up @@ -166,8 +166,8 @@
THEME_COLOR: "",
THEME_COLOR_VIBRANT: true,
DISABLE_FRAME_COLORS:
this.$store.state.postwoman.settings.DISABLE_FRAME_COLORS || false,
FRAME_COLORS_ENABLED:
this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false,
PROXY_ENABLED:
this.$store.state.postwoman.settings.PROXY_ENABLED || false,
PROXY_URL: this.$store.state.postwoman.settings.PROXY_URL || "",
Expand Down
2 changes: 1 addition & 1 deletion store/postwoman.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SETTINGS_KEYS = [
* to emphasise the different sections.
* This setting allows that to be turned off.
*/
"DISABLE_FRAME_COLORS",
"FRAME_COLORS_ENABLED",

/**
* Whether or not requests should be proxied.
Expand Down

0 comments on commit 84eda99

Please sign in to comment.