2022-03-27 04:31:32 +00:00
|
|
|
<template>
|
2022-03-27 05:48:27 +00:00
|
|
|
<div class="description" style="white-space: pre-line">
|
|
|
|
<template v-for="(text, index) in render.description.runs">
|
2022-03-27 11:24:34 +00:00
|
|
|
<template
|
|
|
|
v-if="
|
|
|
|
text.navigationEndpoint && text.navigationEndpoint.webviewEndpoint
|
|
|
|
"
|
|
|
|
>
|
2022-03-28 02:07:03 +00:00
|
|
|
<a
|
|
|
|
@click="
|
|
|
|
openExternal(this.$rendererUtils.getNavigationEndpoints(text))
|
|
|
|
"
|
|
|
|
:key="index"
|
|
|
|
class="link"
|
|
|
|
>{{ text.text }}</a
|
|
|
|
>
|
2022-03-27 11:24:34 +00:00
|
|
|
</template>
|
2022-03-28 02:07:03 +00:00
|
|
|
<template v-else-if="this.$rendererUtils.checkInternal(text)">
|
|
|
|
<a
|
|
|
|
@click="
|
|
|
|
openInternal(this.$rendererUtils.getNavigationEndpoints(text))
|
|
|
|
"
|
|
|
|
:key="index"
|
|
|
|
class="link"
|
|
|
|
>{{ text.text }}</a
|
|
|
|
>
|
2022-03-27 05:48:27 +00:00
|
|
|
</template>
|
|
|
|
<template v-else> {{ text.text }} </template>
|
|
|
|
</template>
|
2022-03-27 04:31:32 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped></style>
|
|
|
|
|
|
|
|
<script>
|
2022-03-27 11:24:34 +00:00
|
|
|
import { Browser } from "@capacitor/browser";
|
2022-03-27 04:31:32 +00:00
|
|
|
export default {
|
|
|
|
props: ["render"],
|
|
|
|
|
|
|
|
methods: {
|
2022-03-27 11:24:34 +00:00
|
|
|
async openExternal(url) {
|
|
|
|
await Browser.open({ url: url });
|
|
|
|
},
|
|
|
|
async openInternal(url) {
|
|
|
|
await this.$router.push(url);
|
|
|
|
},
|
2022-03-27 04:31:32 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|