2021-01-28 07:39:31 +00:00
|
|
|
<template>
|
2021-06-21 10:03:51 +00:00
|
|
|
<AppSection label="response">
|
2021-07-15 04:10:45 +00:00
|
|
|
<HttpResponseMeta :response="response" />
|
2021-07-13 05:37:29 +00:00
|
|
|
<LensesResponseBodyRenderer v-if="!loading" :response="response" />
|
2021-03-01 03:58:14 +00:00
|
|
|
</AppSection>
|
2021-01-28 07:39:31 +00:00
|
|
|
</template>
|
|
|
|
|
|
2021-08-12 08:14:10 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { computed, defineComponent } from "@nuxtjs/composition-api"
|
|
|
|
|
import { useReadonlyStream } from "~/helpers/utils/composables"
|
2021-07-13 05:37:29 +00:00
|
|
|
import { restResponse$ } from "~/newstore/RESTSession"
|
|
|
|
|
|
2021-08-12 08:14:10 +00:00
|
|
|
export default defineComponent({
|
|
|
|
|
setup() {
|
|
|
|
|
const response = useReadonlyStream(restResponse$, null)
|
|
|
|
|
|
|
|
|
|
const loading = computed(
|
|
|
|
|
() => response.value === null || response.value.type === "loading"
|
|
|
|
|
)
|
|
|
|
|
|
2021-07-13 05:37:29 +00:00
|
|
|
return {
|
2021-08-12 08:14:10 +00:00
|
|
|
response,
|
|
|
|
|
loading,
|
2021-07-13 05:37:29 +00:00
|
|
|
}
|
|
|
|
|
},
|
2021-08-12 08:14:10 +00:00
|
|
|
})
|
2021-01-28 07:39:31 +00:00
|
|
|
</script>
|