diff --git a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue index d0912e9dda2..45a4d549889 100644 --- a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue +++ b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue @@ -378,12 +378,12 @@ import urls from 'kolibri/urls'; import logger from 'kolibri-logging'; import { ref, watch } from 'vue'; + import pluginData from 'kolibri-plugin-data'; import commonCoreStrings from 'kolibri/uiText/commonCoreStrings'; import UiAlert from 'kolibri-design-system/lib/keen/UiAlert'; import { availableLanguages, currentLanguage, sortLanguages } from 'kolibri/utils/i18n'; import BottomAppBar from 'kolibri/components/BottomAppBar'; import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow'; - import { checkCapability } from 'kolibri/utils/appCapabilities'; import useUser from 'kolibri/composables/useUser'; import useSnackbar from 'kolibri/composables/useSnackbar'; import commonDeviceStrings from '../commonDeviceStrings'; @@ -603,7 +603,7 @@ } }, canCheckMeteredConnection() { - return checkCapability('check_is_metered'); + return pluginData.canCheckMeteredConnection; }, showDisabledAlert() { return this.isRemoteContent || !this.canRestart; diff --git a/kolibri/plugins/device/kolibri_plugin.py b/kolibri/plugins/device/kolibri_plugin.py index 9945202c4d3..af5cda87131 100644 --- a/kolibri/plugins/device/kolibri_plugin.py +++ b/kolibri/plugins/device/kolibri_plugin.py @@ -1,4 +1,5 @@ from kolibri.core.auth.constants.user_kinds import SUPERUSER +from kolibri.core.device.hooks import CheckIsMeteredHook from kolibri.core.hooks import NavigationHook from kolibri.core.hooks import RoleBasedRedirectHook from kolibri.core.webpack.hooks import WebpackBundleHook @@ -28,6 +29,7 @@ def plugin_data(self): return { "isRemoteContent": OPTIONS["Deployment"]["REMOTE_CONTENT"], "canRestart": bool(OPTIONS["Deployment"]["RESTART_HOOKS"]), + "canCheckMeteredConnection": CheckIsMeteredHook.is_registered, "deprecationWarnings": { "ie11": any_ie11_users(), }, diff --git a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/MeteredConnectionNotificationModal.vue similarity index 95% rename from packages/kolibri-common/components/MeteredConnectionNotificationModal.vue rename to kolibri/plugins/learn/assets/src/views/LibraryPage/MeteredConnectionNotificationModal.vue index 9e83bdc511b..6b53cc1828e 100644 --- a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/MeteredConnectionNotificationModal.vue @@ -35,12 +35,13 @@