Skip to content

fix showing of all apps are up-to-date in apps management - #32114

Merged
szaimen merged 1 commit into
masterfrom
fix/31915/up-to-date-fix
Apr 26, 2022
Merged

fix showing of all apps are up-to-date in apps management#32114
szaimen merged 1 commit into
masterfrom
fix/31915/up-to-date-fix

Conversation

@szaimen

@szaimenszaimen commented Apr 25, 2022

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
ContributorAuthor

/compile amend /

@szaimen

Copy link
Copy Markdown
ContributorAuthor

/backport to stable24

},
hasPendingUpdate() {
return this.apps.filter(app => app.update).length > 1
return this.apps.filter(app => app.update).length > 0

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

implemented

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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 :)

Comment threadapps/settings/src/components/AppList.vue Outdated
@szaimen
szaimenforce-pushed the fix/31915/up-to-date-fix branch from b897db3 to 2a5e455CompareApril 25, 2022 12:11
},
showUpdateAll() {
return this.hasPendingUpdate && ['installed', 'updates'].includes(this.category)
return this.hasPendingUpdate && this.useListView

@szaimenszaimenApr 25, 2022

Copy link
Copy Markdown
ContributorAuthor

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')
},

Comment threadapps/settings/src/components/AppList.vue
@szaimen

Copy link
Copy Markdown
ContributorAuthor

/compile amend /

@szaimen

Copy link
Copy Markdown
ContributorAuthor

@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>
Comment threadapps/settings/src/components/AppList.vue
@szaimen
szaimen merged commit ec5d8c7 into masterApr 26, 2022
@szaimen
szaimen deleted the fix/31915/up-to-date-fix branch April 26, 2022 07:44
@backportbot-nextcloud

Copy link
Copy Markdown

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

@szaimen

Copy link
Copy Markdown
ContributorAuthor

/backport to stable24

@backportbot-nextcloud

Copy link
Copy Markdown

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

@szaimen@jancborchardt@GretaD@skjnldsv@nimishavijay@come-nc