Added prettify query button for GraphQL queries
This commit is contained in:
@@ -178,6 +178,13 @@
|
|||||||
>
|
>
|
||||||
<i class="material-icons">file_copy</i>
|
<i class="material-icons">file_copy</i>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="doPrettifyQuery"
|
||||||
|
v-tooltip="`${$t('prettify_query')} (${getSpecialKey()}-P)`"
|
||||||
|
>
|
||||||
|
<i class="material-icons">photo_filter</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<QueryEditor
|
<QueryEditor
|
||||||
@@ -452,6 +459,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSpecialKey: getPlatformSpecialKey,
|
getSpecialKey: getPlatformSpecialKey,
|
||||||
|
doPrettifyQuery() {
|
||||||
|
this.$refs.queryEditor.prettifyQuery()
|
||||||
|
},
|
||||||
handleJumpToType(type) {
|
handleJumpToType(type) {
|
||||||
const typesTab = document.getElementById("gqltypes-tab")
|
const typesTab = document.getElementById("gqltypes-tab")
|
||||||
typesTab.checked = true
|
typesTab.checked = true
|
||||||
|
|||||||
Reference in New Issue
Block a user