Преглед изворни кода

Update Post component, rewrite local post urls

Daniel Supernault пре 4 месеци
родитељ
комит
d2f2a1b1cf
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      resources/assets/components/Post.vue

+ 3 - 0
resources/assets/components/Post.vue

@@ -203,6 +203,9 @@
                     this.post = res.data;
                     this.post = res.data;
                     this.media = this.post.media_attachments;
                     this.media = this.post.media_attachments;
                     this.profile = this.post.account;
                     this.profile = this.post.account;
+                    if(res.data.account && res.data.account.local) {
+                        window.history.pushState({}, '', `/p/${res.data.account.acct}/${res.data.id}`);
+                    }
                     if(this.post.in_reply_to_id) {
                     if(this.post.in_reply_to_id) {
                         this.fetchReply();
                         this.fetchReply();
                     } else {
                     } else {