Skip to content

Conversation

@PVince81
Copy link
Member

When selecting default quota in the dropdown, the actual numeric value
or "Unlimited" will be displayed instead of "0 B". This matches whatever
is displayed after refreshing the page.

In the case where the default quota is unlimited, for which the server
returns -3 instead of "none", the frontend now also shows "Unlimited"
instead of "0 B".

Fixes #21085

Comment on lines 160 to 161
if (quota === -3) {
quota = 'none'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (quota === -3) {
quota = 'none'
if (quota === -3 || quota === 'none') {
return t('settings', 'Unlimited')

Merge the two?

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Nice! 🚀
A small comment, good otherwise 😉

@PVince81
Copy link
Member Author

ah yes, my master was not up to date... sorry little bot... fixing

When selecting default quota in the dropdown, the actual numeric value
or "Unlimited" will be displayed instead of "0 B". This matches whatever
is displayed after refreshing the page.

In the case where the default quota is unlimited, for which the server
returns -3 instead of "none", the frontend now also shows "Unlimited"
instead of "0 B".

Signed-off-by: Vincent Petry <[email protected]>
@PVince81 PVince81 force-pushed the bugfix/21085/userlist-display-default-quota-value branch from cc45a11 to 66ce56e Compare October 27, 2020 12:04
@PVince81 PVince81 requested review from skjnldsv October 27, 2020 12:04
@PVince81
Copy link
Member Author

@skjnldsv I've simplified even further, mind having a second look ?

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Perfect! 👍

@PVince81 PVince81 merged commit 4d974d0 into master Oct 27, 2020
@PVince81 PVince81 deleted the bugfix/21085/userlist-display-default-quota-value branch October 27, 2020 15:30
@PVince81
Copy link
Member Author

/backport to stable20

@backportbot-nextcloud
Copy link

The backport to stable20 failed. Please do this backport manually.

@PVince81
Copy link
Member Author

The backport to stable20 failed. Please do this backport manually.

on it... all you need to do is recompile everything

@PVince81
Copy link
Member Author

stable20 backport here: #23726

took me a while as I'm often confused at the weird juggling that is happening in the "js/*" folders...

@MorrisJobke
Copy link
Member

@PVince81 Keep in mind to remove the backport-request label after the backport was opened. In this way we can go over the PRs that still have this label to find pending backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Default quota" incorrectly displayed in administrator settings

5 participants