mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(appstore): do not offer rating apps not on appstore
Shipped apps are no longer published to the appstore, so it makes no sense to offer rating them. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
0a24ae518f
commit
b441a77a1c
4 changed files with 2 additions and 4 deletions
|
|
@ -478,7 +478,6 @@ class ApiController extends OCSController {
|
|||
'active' => $this->appManager->isEnabledForUser($app['id']),
|
||||
'needsDownload' => !$existsLocally,
|
||||
'groups' => $groups,
|
||||
'fromAppStore' => true,
|
||||
'appstoreData' => $app,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export const actionsInteract: AppAction[] = [
|
|||
inline: false,
|
||||
label: () => t('appstore', 'Rate the app'),
|
||||
enabled(app: IAppstoreApp | IAppstoreExApp) {
|
||||
return !!app.fromAppStore
|
||||
return !app.shipped
|
||||
},
|
||||
href(app: IAppstoreApp | IAppstoreExApp) {
|
||||
return `https://apps.nextcloud.com/apps/${encodeURIComponent(app.id)}#comments`
|
||||
|
|
|
|||
1
apps/appstore/src/apps.d.ts
vendored
1
apps/appstore/src/apps.d.ts
vendored
|
|
@ -69,7 +69,6 @@ interface IAppInfoData {
|
|||
* It is not available for non-appstore apps.
|
||||
*/
|
||||
interface IAppstoreMetadata {
|
||||
fromAppStore: true
|
||||
/** List of appstore release information (e.g. changelog) */
|
||||
releases: IAppstoreAppRelease[]
|
||||
/** The overall rating of the app */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const { app } = defineProps<{
|
|||
app: IAppstoreApp | IAppstoreExApp
|
||||
}>()
|
||||
|
||||
const isShown = computed(() => app.ratingNumOverall && app.ratingNumOverall > 5)
|
||||
const isShown = computed(() => !app.shipped && app.ratingNumOverall && app.ratingNumOverall > 5)
|
||||
const score = computed(() => app.ratingOverall ?? 4)
|
||||
|
||||
const title = computed(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue