-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Fix) Bad Spacing and Special Characters in Torrent Icons #3221
Conversation
…s#3215 It is a bit much to have all in one line of code I would suggest to have it spaced in each tag to make it more readable. I also fixed a formatting error for refundable torrent.
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea, but the new logic doesn't work. For example, if a user has personal freeleech, is in a group with freeleech, and the torrent is set to 100% free, it displays like this:
Personal FreeleechSpecial Freeleech
100% free
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spacing is proper now, thanks!
However, it just dawned on me that this could be a whole lot cleaner using implode()
and array_keys()
. Would you mind implementing it like this instead? (Sorry for the back and forth)
title="{{
implode("\n", array_keys([
__('torrent.personal-freeleech') => $personalFreeleech,
__('torrent.freeleech-token') => $torrent->freeleechTokens_exists,
__('torrent.special-freeleech') => auth()->user()->group->is_freeleech,
__('torrent.global-freeleech') => config('other.freeleech'),
$torrent->free . '% ' . __('common.free') . ($torrent->fl_until !== null ? ' (expires ' . $torrent->fl_until->diffForHumans() . ')' : '') => $torrent->free > 0,
], true))
}}"
Sure no problems, I never did web development or used php so I am not familiar with this kind of stuff but I will keep it in mind for the future! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It is a bit much to have all in one line of code I would suggest to have it spaced in each tag to make it more readable.
Also fixed a formatting error for refundable torrent.