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 showing of all apps are up-to-date in apps management #32114

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

szaimen
Copy link
Contributor

@szaimen szaimen commented Apr 25, 2022

Fix #31915

Signed-off-by: szaimen szaimen@e.mail.de

For my own testing
docker run -it \
-e SERVER_BRANCH=fix/31915/up-to-date-fix \
-p 8443:443 \
-e TRUSTED_DOMAIN=192.168.146.128 \
--name nextcloud-easy-test \
ghcr.io/szaimen/nextcloud-easy-test:latest

@szaimen szaimen added this to the Nextcloud 25 milestone Apr 25, 2022
@szaimen
Copy link
Contributor Author

szaimen commented Apr 25, 2022

/compile amend /

@szaimen
Copy link
Contributor Author

szaimen commented Apr 25, 2022

/backport to stable24

@@ -125,10 +125,10 @@ export default {
return this.$store.getters.loading('list')
},
hasPendingUpdate() {
return this.apps.filter(app => app.update).length > 1
return this.apps.filter(app => app.update).length > 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if it is expected that the updateall button shows up if only one update is available...

Copy link
Contributor

Choose a reason for hiding this comment

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

Update all should show only if theres at least 2 apps, otherwise "all" doesnt make too much sense i would say

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also good point... I guess @jancborchardt and @nimishavijay should probably decide then :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ping @nimishavijay :)

Copy link
Member

Choose a reason for hiding this comment

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

Both could work... I like the idea of showing the message on top so that an admin can just click the same button everytime to update, but as Greta said "Update all" doesn't with if there is only one update.

What do you think about showing a message "1 app has an update available. [Update button]" if there is only 1 update available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! at least the description is already implemented like this:

{{ n('settings', '%n app has an update available', '%n apps have an update available', counter) }}

What could the update button in the case of only one update state?
{{ t('settings', 'Update all') }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented

Copy link
Member

Choose a reason for hiding this comment

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

What could the update button in the case of only one update state?

@szaimen not sure if you already did that, but if it’s only 1 app, the button can simply be labeled "Update". :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, already implemented like this :)

@szaimen szaimen force-pushed the fix/31915/up-to-date-fix branch from b897db3 to 2a5e455 Compare April 25, 2022 12:11
},
showUpdateAll() {
return this.hasPendingUpdate && ['installed', 'updates'].includes(this.category)
return this.hasPendingUpdate && this.useListView
Copy link
Contributor Author

@szaimen szaimen Apr 25, 2022

Choose a reason for hiding this comment

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

I think this is the best fix because we now handle this in one method:

useListView() {
return (this.category === 'installed' || this.category === 'enabled' || this.category === 'disabled' || this.category === 'updates' || this.category === 'featured')
},

@szaimen
Copy link
Contributor Author

szaimen commented Apr 25, 2022

/compile amend /

@szaimen szaimen requested a review from nimishavijay April 25, 2022 12:17
@szaimen
Copy link
Contributor Author

szaimen commented Apr 25, 2022

@GretaD does this look good to you now? :)

Signed-off-by: szaimen <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the fix/31915/up-to-date-fix branch from 2a5e455 to 34004a3 Compare April 25, 2022 12:30
@szaimen szaimen merged commit ec5d8c7 into master Apr 26, 2022
@szaimen szaimen deleted the fix/31915/up-to-date-fix branch April 26, 2022 07:44
@backportbot-nextcloud
Copy link

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

@szaimen
Copy link
Contributor Author

szaimen commented Apr 26, 2022

/backport to stable24

@backportbot-nextcloud
Copy link

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

@szaimen szaimen restored the fix/31915/up-to-date-fix branch April 26, 2022 08:23
@szaimen szaimen deleted the fix/31915/up-to-date-fix branch April 26, 2022 08:31
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.

[Bug]: index.php/settings/apps incorrectly shows "All apps are up-to-date." while there is 1 not up-to-date
6 participants