forked from nutomic/lemmy
Don't show post url if its local.
This commit is contained in:
parent
484118ca6c
commit
b147ca462c
2 changed files with 19 additions and 16 deletions
2
README.md
vendored
2
README.md
vendored
|
@ -138,7 +138,7 @@ fa | 71% | cross_post,cross_posted_to,subscribed_to_communities,trending_communi
|
||||||
eo | 73% | cross_posted_to,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,support_on_liberapay,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,couldnt_get_comments,post_title_too_long,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
|
eo | 73% | cross_posted_to,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,support_on_liberapay,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,couldnt_get_comments,post_title_too_long,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
|
||||||
es | 99% | cross_posted_to,couldnt_get_comments,post_title_too_long
|
es | 99% | cross_posted_to,couldnt_get_comments,post_title_too_long
|
||||||
fi | 97% | cross_posted_to,old,support_on_liberapay,couldnt_get_comments,post_title_too_long,time,action
|
fi | 97% | cross_posted_to,old,support_on_liberapay,couldnt_get_comments,post_title_too_long,time,action
|
||||||
fr | 100% | upload_avatar,show_avatars
|
fr | 100% |
|
||||||
it | 82% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,couldnt_get_comments,post_title_too_long,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
|
it | 82% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,couldnt_get_comments,post_title_too_long,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
|
||||||
nl | 98% | cross_posted_to,couldnt_get_comments,post_title_too_long,time,action
|
nl | 98% | cross_posted_to,couldnt_get_comments,post_title_too_long,time,action
|
||||||
pt-br | 99% | couldnt_get_comments,post_title_too_long
|
pt-br | 99% | couldnt_get_comments,post_title_too_long
|
||||||
|
|
33
ui/src/components/post-listing.tsx
vendored
33
ui/src/components/post-listing.tsx
vendored
|
@ -210,21 +210,24 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
{this.state.url && (
|
{this.state.url &&
|
||||||
<small class="d-inline-block">
|
!(
|
||||||
<a
|
new URL(this.state.url).hostname == window.location.hostname
|
||||||
className="ml-2 text-muted font-italic"
|
) && (
|
||||||
href={this.state.url}
|
<small class="d-inline-block">
|
||||||
target="_blank"
|
<a
|
||||||
title={this.state.url}
|
className="ml-2 text-muted font-italic"
|
||||||
>
|
href={this.state.url}
|
||||||
{new URL(this.state.url).hostname}
|
target="_blank"
|
||||||
<svg class="ml-1 icon">
|
title={this.state.url}
|
||||||
<use xlinkHref="#icon-external-link"></use>
|
>
|
||||||
</svg>
|
{new URL(this.state.url).hostname}
|
||||||
</a>
|
<svg class="ml-1 icon">
|
||||||
</small>
|
<use xlinkHref="#icon-external-link"></use>
|
||||||
)}
|
</svg>
|
||||||
|
</a>
|
||||||
|
</small>
|
||||||
|
)}
|
||||||
{this.hasImage() && (
|
{this.hasImage() && (
|
||||||
<>
|
<>
|
||||||
{!this.state.imageExpanded ? (
|
{!this.state.imageExpanded ? (
|
||||||
|
|
Loading…
Reference in a new issue