Skip to content
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

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

ThyThal
Copy link
Contributor

@ThyThal ThyThal commented Nov 6, 2023

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.

…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.
Copy link

what-the-diff bot commented Nov 6, 2023

PR Summary

  • Introduction of the $tagsMet variable
    An additional variable called $tagsMet has been added. This means we now have a new piece of data that our software can use to make decisions or perform actions.

  • Modification of the title attribute
    The title attribute, which typically describes or classifies something in our software, has been updated to accommodate a variety of conditions and translations. This implies that the software's ability to categorize and communicate information has been enhanced for multiple scenarios and languages, increasing its flexibility and reach.

Copy link
Collaborator

@Roardom Roardom left a 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

@ThyThal ThyThal requested a review from Roardom November 6, 2023 04:16
Copy link
Collaborator

@Roardom Roardom left a 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))
            }}"

@ThyThal
Copy link
Contributor Author

ThyThal commented Nov 6, 2023

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!

@ThyThal ThyThal requested a review from Roardom November 6, 2023 10:33
Copy link
Collaborator

@Roardom Roardom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@HDVinnie HDVinnie merged commit e8f80c7 into HDInnovations:7.x.x Nov 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants