For postman-like http client change default tab for response view to Browser Preview
This commit is contained in:
@@ -82,7 +82,7 @@ show_refresh=False, show_link=False, show_edit_form=True, show_client=True, show
|
|||||||
this.responseHeaders = [];
|
this.responseHeaders = [];
|
||||||
this.responseSize = 0;
|
this.responseSize = 0;
|
||||||
this.activeTab = 'Query Params';
|
this.activeTab = 'Query Params';
|
||||||
this.activeResponseTab = 'Body'
|
this.activeResponseTab = 'Browser Preview'
|
||||||
this.headers = [{ key: 'Content-Type', value: 'application/json' }, { key: '', value: '' }];
|
this.headers = [{ key: 'Content-Type', value: 'application/json' }, { key: '', value: '' }];
|
||||||
this.queryParams = [{ key: '', value: '' }];
|
this.queryParams = [{ key: '', value: '' }];
|
||||||
},
|
},
|
||||||
@@ -163,7 +163,7 @@ show_refresh=False, show_link=False, show_edit_form=True, show_client=True, show
|
|||||||
]),
|
]),
|
||||||
this.response ? m("div.my-4.p-4.shadow.rounded-lg", [
|
this.response ? m("div.my-4.p-4.shadow.rounded-lg", [
|
||||||
m("div.flex.items-center.mb-4.justify-between", [
|
m("div.flex.items-center.mb-4.justify-between", [
|
||||||
m("ul.flex.border.border-gray-300.rounded-t-lg", [{ name: 'Body', count: null }, { name: 'Headers', count: this.responseHeaders.length }, { name: 'Browser Preview', count: null }].map(({ name, count }) =>
|
m("ul.flex.border.border-gray-300.rounded-t-lg", [{ name: 'Browser Preview', count: null }, { name: 'Headers', count: this.responseHeaders.length }, { name: 'Body', count: null }].map(({ name, count }) =>
|
||||||
m("li.mr-3.py-2.px-4.border-orange-400.focus:outline-none.hover:text-orange-500.cursor-pointer", {
|
m("li.mr-3.py-2.px-4.border-orange-400.focus:outline-none.hover:text-orange-500.cursor-pointer", {
|
||||||
class: this.activeResponseTab === name ? "border-b-2 text-orange-600" : "",
|
class: this.activeResponseTab === name ? "border-b-2 text-orange-600" : "",
|
||||||
onclick: () => this.activeResponseTab = name
|
onclick: () => this.activeResponseTab = name
|
||||||
|
|||||||
Reference in New Issue
Block a user