浏览代码

Update components

Daniel Supernault 4 年之前
父节点
当前提交
36bc4adbe7
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 7 1
      resources/assets/js/components/Profile.vue
  2. 1 1
      resources/assets/js/components/RemotePost.vue

+ 7 - 1
resources/assets/js/components/Profile.vue

@@ -140,7 +140,7 @@
 										<span class="font-weight-bold pr-3">{{profile.display_name}}</span>
 										<span class="font-weight-bold pr-3">{{profile.display_name}}</span>
 									</p>
 									</p>
 									<div v-if="profile.note" class="mb-0" v-html="profile.note"></div>
 									<div v-if="profile.note" class="mb-0" v-html="profile.note"></div>
-									<p v-if="profile.website" class=""><a :href="profile.website" class="profile-website" rel="me external nofollow noopener" target="_blank">{{profile.website}}</a></p>
+									<p v-if="profile.website" class=""><a :href="profile.website" class="profile-website" rel="me external nofollow noopener" target="_blank">{{truncate(profile.website,24)}}</a></p>
 								</div>
 								</div>
 							</div>
 							</div>
 						</div>
 						</div>
@@ -1270,6 +1270,12 @@
 						self.followingModalSearch = null;
 						self.followingModalSearch = null;
 					});
 					});
 				}
 				}
+			},
+
+			truncate(str, len) {
+				return _.truncate(str, {
+					length: len
+				});
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
resources/assets/js/components/RemotePost.vue

@@ -791,7 +791,7 @@ export default {
       },
       },
 
 
       fetchComments() {
       fetchComments() {
-          let url = '/api/v2/comments/'+this.statusUsername+'/status/'+this.statusId;
+          let url = '/api/v2/comments/'+this.statusProfileId+'/status/'+this.statusId;
           axios.get(url)
           axios.get(url)
             .then(response => {
             .then(response => {
                 let self = this;
                 let self = this;