Made expandable man in REST Mock (#269)

Reviewed-on: #269
Reviewed-by: Mikolaj Widla <widlam@noreply.example.com>
Co-authored-by: Adam Bem <adam.bem@zoho.eu>
Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
2023-11-20 11:01:01 +01:00
committed by Adam Bem
parent c45d1ee83d
commit af140c30a4
9 changed files with 66 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ const props = defineProps(
</script>
<template>
<div class="w-full text-center dark:text-white mt-2 flex flex-col gap-4 ">
<div class="w-full h-2/3 text-center dark:text-white mt-2 flex flex-col gap-4 overflow-auto">
<div class="flex flex-row gap-4">
<div class="w-full font-bold">Name</div>
<div class="w-full font-bold">Value</div>

View File

@@ -52,7 +52,6 @@ function showUpdatedCode(newCode : string){
<a class="underline" :href="mockMessageLink">{{ mockMessageLink }}</a>
</div>
</div>
<a class="tool-button" href="/man/rest-mock">Help</a>
<SaveComponent v-bind:message-data="messageData"></SaveComponent>
</div>
<div class="flex flex-col md:flex-row w-full gap-4">

View File

@@ -15,7 +15,7 @@ const visible = ref('hidden');
const fetchLink = window.location.protocol + "//" + window.location.hostname + "/mock/api/mock";
function prepareAndSendData(){
if (props.messageData != null|| props.messageData != undefined ){
if (props.messageData != null || props.messageData != undefined ){
fetch(fetchLink, { method: "put", body:JSON.stringify(props.messageData), headers: { "Content-Type" : "application/json" }})
.then( response => response.text() )
.then( data => {message.value = data} )