1
0
This commit is contained in:
syui 2024-04-25 21:40:35 +09:00
parent 4794951b81
commit d4e6aa0bbe
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -1,13 +1,13 @@
<template> <template>
<div id="app"> <div id="app">
<div class="bsky_comment" v-if="cid_root"> <div class="bsky_comment" v-if="cid_root">
<span v-for="i in api_json.data" class="comment"> <span v-for="i in api_json_record" class="comment">
<p class="comment-body" v-if="i.cid_root == cid_root"> <p class="comment-body" v-if="i.cid_root == cid_root">
<span v-if="i.did.replace('did:plc:', '') != ''"> <span v-if="i.did.replace('did:plc:', '') != ''">
{{ axios_check('/icon/' + i.did.replace('did:plc:', '') + '.jpg') }} {{ axios_check('/icon/' + i.did.replace('did:plc:', '') + '.jpg') }}
</span> </span>
<span v-if="url_check == true && i.did.replace('did:plc:', '') != ''"> <span v-if="url_check == true && i.did.replace('did:plc:', '') != ''">
<img :src="'/icon/' + i.did.replace('did:plc:', '') + '.jpg'" class="comment"/> <img :src="'https://git.syui.ai/ai/comment/raw/branch/main/public/icon/' + i.did.replace('did:plc:', '') + '.jpg'" class="comment"/>
</span> </span>
<span v-else-if="i.avatar"> <span v-else-if="i.avatar">
<img :src="i.avatar" class="comment"/> <img :src="i.avatar" class="comment"/>
@ -56,6 +56,7 @@ export default {
bsky_json: null, bsky_json: null,
api_url: null, api_url: null,
api_json: null, api_json: null,
api_json_record: null,
cid_root: null, cid_root: null,
uri_root: null, uri_root: null,
comment_open: false, comment_open: false,
@ -107,6 +108,7 @@ export default {
response => {this.api_json = response response => {this.api_json = response
this.cid_root = this.api_json.data.find((v) => v.blog_url == loc).cid; this.cid_root = this.api_json.data.find((v) => v.blog_url == loc).cid;
this.uri_root = this.api_json.data.find((v) => v.blog_url == loc).uri; this.uri_root = this.api_json.data.find((v) => v.blog_url == loc).uri;
this.api_json_record = this.api_json.data.filter((v) => v.cid_root == this.cid_root);
} }
); );
} }