🚨 Lint

This commit is contained in:
Liyas Thomas
2019-11-21 09:11:50 +05:30
parent 354ad3983f
commit 4c9c9a2240
6 changed files with 22 additions and 34 deletions

View File

@@ -39,11 +39,7 @@
useWorker: false
}"
/>
<button
class="icon"
@click="copySchema"
v-tooltip="'Copy Schema'"
>
<button class="icon" @click="copySchema" v-tooltip="'Copy Schema'">
<i class="material-icons">file_copy</i>
</button>
</pw-section>
@@ -149,7 +145,6 @@ export default {
};
},
methods: {
copySchema() {
const aux = document.createElement("textarea");
aux.innerText = this.schemaString;
@@ -172,8 +167,8 @@ export default {
try {
const res = await axios.post(this.url, {
query: gql.getIntrospectionQuery()
})
query: gql.getIntrospectionQuery()
});
const schema = gql.buildClientSchema(res.data.data);
this.schemaString = gql.printSchema(schema, {
@@ -238,14 +233,14 @@ export default {
this.$toast.info(`Finished in ${duration}ms`, {
icon: "done"
});
} catch(error) {
this.$nuxt.$loading.finish();
this.schemaString = error + ". Check console for details.";
this.$toast.error(error + " (F12 for details)", {
icon: "error"
});
console.log("Error", error);
}
} catch (error) {
this.$nuxt.$loading.finish();
this.schemaString = error + ". Check console for details.";
this.$toast.error(error + " (F12 for details)", {
icon: "error"
});
console.log("Error", error);
}
}
}
};

View File

@@ -315,7 +315,6 @@
<input id="tab-one" type="radio" name="options" checked="checked" />
<label for="tab-one">Authentication</label>
<div class="tab">
<pw-section
class="cyan"
label="Authentication"
@@ -401,7 +400,6 @@
<input id="tab-two" type="radio" name="options" />
<label for="tab-two">Headers</label>
<div class="tab">
<pw-section class="orange" label="Headers" ref="headers">
<ul>
<li>
@@ -482,7 +480,6 @@
<input id="tab-three" type="radio" name="options" />
<label for="tab-three">Parameters</label>
<div class="tab">
<pw-section class="pink" label="Parameters" ref="parameters">
<ul>
<li>

View File

@@ -24,7 +24,9 @@
{{ toggleConnectionVerb }}
<span>
<i class="material-icons" v-if="!connectionState">sync</i>
<i class="material-icons" v-if="connectionState">sync_disabled</i>
<i class="material-icons" v-if="connectionState"
>sync_disabled</i
>
</span>
</button>
</li>
@@ -47,9 +49,7 @@
v-for="(logEntry, index) in communication.log"
:style="{ color: logEntry.color }"
:key="index"
>@ {{ logEntry.ts }} {{ getSourcePrefix(logEntry.source) }}
{{ logEntry.payload }}</span
>
>@ {{ logEntry.ts }} {{ getSourcePrefix(logEntry.source) }} {{ logEntry.payload }}</span>
</span>
<span v-else>(waiting for connection)</span>
</div>