Skip to content

Commit

Permalink
Merge pull request hoppscotch#530 from liyasthomas/feature/post-reque…
Browse files Browse the repository at this point in the history
…st-tests

Updating the UI and style files
  • Loading branch information
liyasthomas authored Jan 27, 2020
2 parents aefe0ab + e68bfc0 commit d2bf0b7
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 19 deletions.
4 changes: 4 additions & 0 deletions assets/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ h3.title {
color: var(--fg-light-color);
}

.bg-color {
background-color: transparent;
}

button {
display: inline-flex;
align-items: center;
Expand Down
4 changes: 0 additions & 4 deletions components/firebase/feeds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
.virtual-list {
max-height: calc(100vh - 288px);
}
.bg-color {
background-color: transparent;
}
</style>

<script>
Expand Down
4 changes: 0 additions & 4 deletions components/history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,6 @@ ol li {
padding: 0 0 8px;
}
.bg-color {
background-color: transparent;
}
@media (max-width: 720px) {
.virtual-list.filled {
min-height: 320px;
Expand Down
36 changes: 26 additions & 10 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
v-model="preRequestScript"
:lang="'javascript'"
:options="{
maxLines: responseBodyMaxLines,
minLines: '16',
maxLines: '16',
minLines: '8',
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
Expand Down Expand Up @@ -359,29 +359,42 @@
v-model="testScript"
:lang="'javascript'"
:options="{
maxLines: responseBodyMaxLines,
minLines: '16',
maxLines: '16',
minLines: '8',
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
useWorker: false
}"
/>
<label>Test Reports<span v-if="testReports"></span></label>
<div v-if="testReports">
<div class="flex-wrap">
<label>Test Reports</label>
<div>
<button
class="icon"
@click="clearContent('tests', $event)"
v-tooltip.bottom="$t('clear')"
>
<i class="material-icons">clear_all</i>
</button>
</div>
</div>
<div v-for="testReport in testReports">
<div v-if="testReport.result">
<span :class="testReport.styles.class">
<div v-if="testReport.result" class="flex-wrap">
<span :class="testReport.styles.class" class="info">
<i class="material-icons">
{{ testReport.styles.icon }}
</i>
{{ testReport.result }}
<span>&nbsp; {{ testReport.result }}</span>
</span>
<ul v-if="testReport.message">
<li>{{ testReport.message }}</li>
<li>
<label>{{ testReport.message }}</label>
</li>
</ul>
</div>
<div v-else-if="testReport.startBlock">
<div v-else-if="testReport.startBlock" class="info">
<h4>{{ testReport.startBlock }}</h4>
</div>
<div v-else-if="testReport.endBlock"><br /></div>
Expand Down Expand Up @@ -2605,6 +2618,9 @@ export default {
break;
case "tokenReqs":
this.tokenReqs = [];
case "tests":
this.testReports = null;
break;
default:
(this.label = ""),
(this.method = "GET"),
Expand Down
14 changes: 13 additions & 1 deletion pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<label for="url">{{ $t("url") }}</label>
<button
class="icon"
@click="settings.PROXY_URL = `https://postwoman.apollotv.xyz/`"
@click="resetProxy"
v-tooltip.bottom="$t('reset_default')"
>
<i class="material-icons">clear_all</i>
Expand Down Expand Up @@ -326,6 +326,7 @@ export default {
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || ""
},
doneButton: '<i class="material-icons">done</i>',
fb
};
},
Expand Down Expand Up @@ -456,6 +457,17 @@ export default {
initSettings() {
fb.writeSettings("syncHistory", true);
fb.writeSettings("syncCollections", false);
},
resetProxy(e) {
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`;
e.target.innerHTML = this.doneButton;
this.$toast.info(this.$t("cleared"), {
icon: "clear_all"
});
setTimeout(
() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'),
1000
);
}
},
Expand Down

0 comments on commit d2bf0b7

Please sign in to comment.