fix: URL loading broke

This commit is contained in:
Alex 2022-04-22 16:38:21 +12:00
parent ec7f8a9b85
commit a075c4167a
3 changed files with 42 additions and 13 deletions

View File

@ -58,6 +58,29 @@
<yt-text-formatter :textRuns="commentRenderer.contentText.runs">
</yt-text-formatter>
</collapsable-text>
<div class="toolbar">
<div class="toolbar--item">
<v-btn class="toolbar--button like" disabled icon x-small>
<v-icon small left>mdi-thumb-up</v-icon>
</v-btn>
</div>
<div class="toolbar--item">
<span
v-text="commentRenderer.voteCount.simpleText"
class="like-count mr-1 subtitle-2"
></span>
</div>
<div class="toolbar--item">
<v-btn class="toolbar--button dislike" disabled icon x-small>
<v-icon small>mdi-thumb-down</v-icon>
</v-btn>
</div>
<div class="toolbar--item">
<v-btn class="toolbar--button reply" disabled icon x-small>
<v-icon small>mdi-comment</v-icon>
</v-btn>
</div>
</div>
</div>
</div>
</template>
@ -76,7 +99,6 @@
.avatar-thumbnail {
margin-right: 0.5rem;
margin-top: 0.5rem;
border-radius: 50%;
width: 48px;
height: 48px;
@ -100,6 +122,12 @@
}
}
.toolbar {
display: flex;
flex-direction: row;
align-items: center;
}
.author-badge-name {
display: flex;
flex-direction: row;

View File

@ -1,5 +1,5 @@
<template>
<div class="yt-text-formatter" v-emoji>
<div class="yt-text-formatter">
<template v-for="(text, index) in textRuns">
<template v-if="$rendererUtils.checkInternal(text)">
<a
@ -31,12 +31,15 @@
draggable="false"
/>
</template>
<template v-else> {{ text.text }} </template>
<template v-else>
<span :key="index" v-emoji>{{ text.text }}</span>
</template>
</template>
</div>
</template>
<script>
import { Browser } from "@capacitor/browser";
export default {
props: {
textRuns: {
@ -44,5 +47,13 @@ export default {
default: () => [],
},
},
methods: {
async openExternal(url) {
await Browser.open({ url: url });
},
async openInternal(url) {
await this.$router.push(url);
},
},
};
</script>

View File

@ -12,7 +12,6 @@
</style>
<script>
import { Browser } from "@capacitor/browser";
import YtTextFormatter from "~/components/UtilRenderers/YtTextFormatter.vue";
export default {
@ -21,14 +20,5 @@ export default {
components: {
YtTextFormatter,
},
methods: {
async openExternal(url) {
await Browser.open({ url: url });
},
async openInternal(url) {
await this.$router.push(url);
},
},
};
</script>