Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

:fire: Better boolean conditions

Liyas Thomasca3abed60582
diff --git a/assets/css/styles.scss b/assets/css/styles.scss
index 6d70fe14a..6650bd2af 100644
--- a/assets/css/styles.scss
+++ b/assets/css/styles.scss
@@ -409,7 +409,7 @@ button {
&:not([disabled]):focus {
color: var(--act-color);
fill: var(--act-color);
- box-shadow: 0 0 0 2px var(--fg-color);
+ box-shadow: inset 0 0 0 2px var(--fg-color);
transition: all 0.2s ease-in-out;
}
diff --git a/build.js b/build.js
index b2dd9f89f..22ebe8164 100644
--- a/build.js
+++ b/build.js
@@ -21,7 +21,7 @@ try {
let version = {};
// Get the current version name as the tag from Git.
- version.name = process.env.TRAVIS_TAG || runCommand("git", ["tag"]);
+ version.name = process.env.TRAVIS_TAG || runCommand("git", ["tag --sort=committerdate | tail -1"]);
// FALLBACK: If version.name was unset, let's grab it from GitHub.
if (!version.name) {
diff --git a/pages/index.vue b/pages/index.vue
index 1791060b6..075392f48 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -230,7 +230,7 @@
v-tooltip.bottom="{ content: isHidden ? 'Show Code' : 'Hide Code'}"
>
<i class="material-icons" v-if="isHidden">flash_on</i>
- <i class="material-icons" v-if="!isHidden">flash_off</i>
+ <i class="material-icons" v-else>flash_off</i>
</button>
<button
:class="'icon' + (showPreRequestScript ? ' info-response' : '')"
@@ -246,7 +246,7 @@
<i
class="material-icons"
:class="showPreRequestScript"
- v-if="showPreRequestScript"
+ v-else
>close</i>
</button>
</div>
@@ -373,7 +373,7 @@
</li>
</div>
</ul>
- <ul v-if="auth === 'Bearer Token'">
+ <ul v-else-if="auth === 'Bearer Token'">
<li>
<input placeholder="Token" name="bearer_token" v-model="bearerToken" />
</li>
@@ -586,7 +586,7 @@
<div class="align-right" v-if="response.body && responseType === 'text/html'">
<button class="icon" @click.prevent="togglePreview">
<i class="material-icons" v-if="!previewEnabled">visibility</i>
- <i class="material-icons" v-if="previewEnabled">visibility_off</i>
+ <i class="material-icons" v-else>visibility_off</i>
<span>{{ previewEnabled ? 'Hide Preview' : 'Preview HTML' }}</span>
</button>
</div>