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

improve how labels are displayed #2299

Merged
merged 1 commit into from
Feb 11, 2022
Merged

improve how labels are displayed #2299

merged 1 commit into from
Feb 11, 2022

Conversation

TrimmingFool
Copy link
Contributor

I wanted to make the old label display My Label (100; 123 GiB) look better. Here is what I came up with:

rutorrent_label_display rutorrent_label_display_dark

In the settings the user can now choose to:

  • Show state size in pstate
  • Show label size in ptrackers and plabel
  • Show search size in flabel

plabel also shows the label sizes for All and No Label (something like this was requested in #2168)

prss also displays new label counts but no label sizes

I adjusted how the labels are displayed for all themes in this repo.
They are themed with the classes: label-text label-count label-size

Hints

The theWebUI.labels values with keys -_-_-label-_-_- now are objects of label count and label size
e.g. theWebUI.labels['-_-_-label-_-_-'] = { cnt: 0, size: 0}

stateLabels store which staticLabels = ['dls','com','act','iac','nlb','err'] a torrent hash has
e.g. stateLabels[hash] = ['nlb', 'com', ... ]

create new label elements with theWebUI.createSelectableLabelElement
and update label elements with theWebUI.updateLabel

separate label count and size

display label text, count and size as spans
with classes: label-text label-count label-size

add options to show size of state labels and search tags entries
@stickz
Copy link
Collaborator

stickz commented Feb 11, 2022

What do you think about removing the zeros from the end of the file size? For example, 200.00 MiB could be 200 MiB instead.

Perhaps, we could also let the user select how many decimal points to display for kilobytes, megabytes, gigabytes and terabytes. If I have 1TB of free disk space, I don't need to know if a label is 320.99 KiB. I would just care that it's 321 KiB.

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.

3 participants