Skip to main content

CnDependencyMissing

Full-page screen shown when one or more apps declared in manifest.dependencies are not installed or not enabled. CnAppRoot mounts this in its dependency-check phase — between loading and shell — based on per-dependency results from useAppStatus.

Apps can override CnAppRoot's #dependency-missing slot to customise the screen (or skip CnAppRoot entirely).

Usage​

As CnAppRoot's default dependency-missing screen (typical)​

<CnAppRoot :manifest="manifest" app-id="decidesk">
<!-- nothing else needed; CnDependencyMissing renders automatically -->
</CnAppRoot>

Customised via props​

<CnAppRoot ...>
<template #dependency-missing="{ dependencies }">
<CnDependencyMissing
:dependencies="dependencies"
app-name="Decidiq"
heading="OpenRegister is required"
intro="Decidiq needs OpenRegister to manage decisions."
install-label="Install"
enable-label="Enable" />
</template>
</CnAppRoot>

Dependency shape​

dependencies is an array of objects with this shape:

FieldTypeDescription
idstringRequired. Nextcloud app id (matches entries in manifest.dependencies)
namestringOptional human-readable label; falls back to id when omitted
installUrlstringOptional override URL. Defaults to /index.php/settings/apps
enabledbooleanWhen false, the action reads "Enable" (installed but disabled). Otherwise it reads "Install and enable"

Install / enable action (admin-aware)​

For each dependency the component renders, by user role:

  • Admin (getCurrentUser().isAdmin): an Install and enable / Enable button driven by useAppInstaller. One click confirms the admin's password, then downloads-installs-and-enables the app via Nextcloud's install endpoint — the NC34+ bundled-appstore OCS API, falling back to the legacy settings/apps/enable route on ≤NC33 — and reloads on success. On failure the error shows inline and the store link (resolveLink(dep)) stays as a fallback. See the composable's Adoption notes for the @nextcloud/dialogs ^6 build requirement.
  • Non-admin: "ask your administrator to enable {name}" copy (they cannot hit the admin-only endpoint) — no dead-end link.

The label is Install and enable when the app is not installed and Enable when dep.enabled === false (installed but disabled).

Props​

PropTypeDefaultDescription
dependenciesArray— (required)Array of dependency objects (see shape above)
appNameString''Optional name of the host app. Currently informational; reserved for templated headings
headingString'Required apps are missing'Top heading text
introString'This app needs the following Nextcloud apps to be installed and enabled.'Introductory paragraph
installLabelString'Install and enable'Label for the action when the app is not installed
enableLabelString'Enable'Label for the action when dep.enabled === false (installed but disabled)
askAdminLabelString'Ask your administrator to enable {name}'Non-admin copy; {name} is replaced by the dependency's display name

CSS​

Class prefix: cn-dependency-missing__*. Uses Nextcloud CSS variables only (--color-main-background, --color-main-text, --color-text-maxcontrast, --color-border, --color-primary-element, --default-grid-baseline).

  • CnAppRoot — Mounts this component during the dependency-check phase.
  • useAppInstaller — Backs the admin-aware install/enable action.
  • useAppStatus — Detects per-app installed/enabled status.