From 676fabf8222cab778ed07c2dc4c020c9a2a29cec Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Thu, 24 Oct 2024 19:43:20 +0530 Subject: [PATCH 01/10] wrapped KRadioButtons in KRadioButtonGroup --- .../core/assets/src/views/UserTable/index.vue | 146 +++++++-------- .../src/views/sync/RadioButtonGroup.vue | 39 ++-- .../SelectDeviceForm.vue | 82 ++++----- .../src/views/sync/SelectSyncSourceModal.vue | 48 ++--- .../plan/CreateExamPage/SectionEditor.vue | 86 +++------ .../src/views/plan/CreateExamPage/index.vue | 78 ++++---- .../ContentCardList.vue | 93 +++++----- .../plan/assignments/AssignmentCopyModal.vue | 37 ++-- .../plan/assignments/RecipientSelector.vue | 74 ++++---- .../SelectTransferSourceModal/DriveList.vue | 27 +-- .../SelectImportSourceModal.vue | 60 ++++--- .../assets/src/views/UserCreatePage.vue | 145 +++++++-------- .../assets/src/views/UserEditPage.vue | 170 ++++++++---------- .../LanguagesMenuItem.vue | 24 +-- .../assets/src/views/JoinOrNewLOD.vue | 58 +++--- .../CreateLearnerAccountForm.vue | 58 +++--- .../FacilityPermissionsForm.vue | 74 ++++---- .../FullOrLearnOnlyDeviceForm.vue | 41 ++--- .../onboarding-forms/GettingStartedForm.vue | 38 ++-- .../onboarding-forms/GuestAccessForm.vue | 56 +++--- .../HowAreYouUsingKolibri.vue | 46 ++--- .../RequirePasswordForLearnersForm.vue | 58 +++--- .../SetUpLearningFacilityForm.vue | 54 +++--- .../src/views/onboarding-forms/YesNoForm.vue | 53 +++--- .../views/ChangeFacility/SelectFacility.vue | 53 +++--- .../MeteredConnectionNotificationModal.vue | 50 +++--- 26 files changed, 844 insertions(+), 904 deletions(-) diff --git a/kolibri/core/assets/src/views/UserTable/index.vue b/kolibri/core/assets/src/views/UserTable/index.vue index da17f5d17cb..a605f78e480 100644 --- a/kolibri/core/assets/src/views/UserTable/index.vue +++ b/kolibri/core/assets/src/views/UserTable/index.vue @@ -52,7 +52,9 @@ - - - - + v !== null; // Either we build a facility filter or an empty object. // Passing the empty object to useDeviceFacilityFilter is asking "are there ANY facilities?" @@ -175,18 +172,15 @@ }, pickNotNull, ); - // If we're filtering a particular facility if (Object.keys(facilityFilter).length > 0 || props.filterByHasFacilities) { apiParams.subset_of_users_device = false; deviceFilters.push(useDeviceFacilityFilter(facilityFilter)); } - if (props.filterLODAvailable) { apiParams.subset_of_users_device = false; deviceFilters.push(useDeviceMinimumVersionFilter(0, 15, 0)); } - const { devices: _devices, isFetching, @@ -194,19 +188,14 @@ fetchFailed, forceFetch, } = useDevicesWithFilter(apiParams, deviceFilters); - const { devices, isDeleting, hasDeleted, deletingFailed, doDelete } = useDeviceDeletion( _devices, context, ); - const { isChecking, doCheck } = useConnectionChecker(devices); - const storageDeviceId = useLocalStorage('kolibri-lastSelectedNetworkLocationId', ''); - const discoveredDevices = computed(() => get(devices).filter(d => d.dynamic)); const savedDevices = computed(() => get(devices).filter(d => !d.dynamic)); - return { // useDevices devices, @@ -373,16 +362,13 @@ if (!this.selectedDeviceId) { return; } - const match = find(this.devices, { id: this.selectedDeviceId }); if (!match) { this.uiAlertText = this.$tr('fetchingFailedText'); return this.forceFetch(); } - this.uiAlertText = null; this.isSubmitChecking = true; - // TODO: implement `DeviceConnectingModal` this.doCheck(match.id).then(device => { this.$emit('submit', device); diff --git a/kolibri/core/assets/src/views/sync/SelectSyncSourceModal.vue b/kolibri/core/assets/src/views/sync/SelectSyncSourceModal.vue index 39a5cd4302b..a0c56b81ce2 100644 --- a/kolibri/core/assets/src/views/sync/SelectSyncSourceModal.vue +++ b/kolibri/core/assets/src/views/sync/SelectSyncSourceModal.vue @@ -1,27 +1,29 @@ @@ -34,7 +36,6 @@ PORTAL: 'PORTAL', PEER: 'PEER', }); - export default { name: 'SelectSyncSourceModal', components: { @@ -86,7 +87,6 @@ localNetworkDescription: { message: 'Sync facility data with another Kolibri server on your local network or the internet', - context: 'Description of the sync option.', }, }, diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue index 0fac7600366..6ebc7b9b77f 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue @@ -7,7 +7,6 @@

{{ sectionSettings$() }}

- - -
-
{{ questionOrder$() }}
- - - - - - + + + + + + + + + +
-
-
{{ numberOfQuestionsSelected$({ @@ -68,7 +66,6 @@ }) }}
- store.state.route); const { createSnackbar } = useSnackbar(); - const { sectionSettings$, sectionTitle$, @@ -170,7 +166,6 @@ sectionDeletedNotification$, maxNumberOfQuestions$, } = enhancedQuizManagementStrings; - const { activeSectionIndex, activeSection, @@ -181,25 +176,18 @@ updateQuiz, removeSection, } = injectQuizCreation(); - const { moveDownOne, moveUpOne } = useDrag(); - const showCloseConfirmation = ref(false); - function handleCancelClose() { showCloseConfirmation.value = false; } - function handleConfirmClose() { context.emit('closePanel'); } - const showDeleteConfirmation = ref(false); - function handleCancelDelete() { showDeleteConfirmation.value = false; } - function handleConfirmDelete() { const section_title = displaySectionTitle(activeSection.value, activeSectionIndex.value); const newIndex = activeSectionIndex.value > 0 ? activeSectionIndex.value - 1 : 0; @@ -214,19 +202,15 @@ }); createSnackbar(sectionDeletedNotification$({ section_title })); } - function handleDeleteSection() { showDeleteConfirmation.value = true; } - /* Note that the use of snake_case here is to map directly to the API */ const learners_see_fixed_order = ref(activeSection?.value?.learners_see_fixed_order || false); const description = ref(activeSection?.value?.description || ''); const section_title = ref(activeSection?.value?.section_title?.trim() || ''); - // This is used to track the section that was moved const reorderedSectionIndex = ref(null); - const sectionTitleInvalidText = computed(() => { if (section_title.value.trim() === '') { // Always allow empty section titles @@ -243,7 +227,6 @@ return sectionTitleUniqueWarning$(); } }); - const activeSectionChanged = computed(() => { return !isEqual( { @@ -254,22 +237,17 @@ pick(activeSection.value, ['learners_see_fixed_order', 'description', 'section_title']), ); }); - const sectionOrderList = ref(allSections.value); - const sectionOrderChanged = computed(() => { return !isEqual( allSections.value.map(section => section.section_id), sectionOrderList.value.map(section => section.section_id), ); }); - const formDataHasChanged = computed(() => { return activeSectionChanged.value || sectionOrderChanged.value; }); - const { windowIsLarge, windowIsSmall } = useKResponsiveWindow(); - const resourceButtonLabel = computed(() => { if (activeQuestions.value.length === 0) { return addQuestionsLabel$(); @@ -277,15 +255,12 @@ return addMoreQuestionsLabel$(); } }); - const showResourceButton = computed(() => { return activeQuestions.value.length < MAX_QUESTIONS_PER_QUIZ_SECTION; }); - const maxQuestionsLabel = computed(() => { return maxNumberOfQuestions$({ count: MAX_QUESTIONS_PER_QUIZ_SECTION }); }); - return { reorderedSectionIndex, sectionTitleInvalidText, @@ -342,7 +317,6 @@ randomizedOptionDescription$, fixedLabel$, fixedOptionDescription$, - createSnackbar, }; }, @@ -378,14 +352,12 @@ this.$refs.sectionTitle.focus(); return; } - this.updateSection({ sectionIndex: this.activeSectionIndex, section_title: this.section_title, description: this.description, learners_see_fixed_order: this.learners_see_fixed_order, }); - if (this.sectionOrderChanged) { // Apply the new sorting to the updated sections, // otherwise the edits we just made will be lost @@ -397,14 +369,12 @@ question_sources, }); } - if (nextRouteName) { const sectionIndex = this.reorderedSectionIndex !== null && this.reorderedSectionIndex !== this.activeSectionIndex ? this.reorderedSectionIndex : this.activeSectionIndex; - this.$router.push({ name: nextRouteName, params: { diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/index.vue index 6a295164ca1..f888548a70f 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/index.vue @@ -13,7 +13,6 @@ > {{ selectionIsInvalidText }} - -
{{ sectionOrderLabel$() }}
- - - - - - - + + + + + + + + + + +
- -
- {{ closeConfirmationMessage$() }} - @@ -152,7 +150,6 @@ } = useQuizCreation(); const showError = ref(false); const quizInitialized = ref(false); - const { saveAndClose$, allSectionsEmptyWarning$, @@ -165,7 +162,6 @@ randomizedSectionOptionDescription$, fixedSectionOptionDescription$, } = enhancedQuizManagementStrings; - return { closeConfirmationTitle$, closeConfirmationMessage$, diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/ContentCardList.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/ContentCardList.vue index b3e7fb6dc36..02ed7e969ec 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/ContentCardList.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/ContentCardList.vue @@ -9,55 +9,57 @@ :indeterminate="selectAllIndeterminate" @change="$emit('changeselectall', $event)" /> -
  • - - - - - - -
  • + + + + + - diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue index 2e28604faee..d46e6546476 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue @@ -9,18 +9,21 @@ {{ noDrivesText }} - -
    -

    {{ $tr('drivesFound') }}

    - -
    + +
    +

    + {{ $tr('drivesFound') }} +

    + +
    +
    diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue index fbc0f737a6c..cf7619c9827 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue @@ -1,34 +1,36 @@ diff --git a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue index 99e3baf9c9a..69f00694fd2 100644 --- a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue +++ b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue @@ -16,87 +16,81 @@

    {{ $tr('createNewUserHeader') }}

    - -
    - - - - - - -
    - - + + + -
    - - - - - - - - -
    - +
    + + +
    + + + + + +
    {{ $tr('editUserDetailsHeader') }} - -
    - - - - - - - + - - - - - - - - -
    - +
    + + +
    + + + + + + +

    {{ $tr('forceLogoutWarning') }}

    @@ -174,7 +164,6 @@ setup() { const { createSnackbar } = useSnackbar(); const { currentUserId } = useUser(); - return { createSnackbar, currentUserId, @@ -245,7 +234,6 @@ if (devicePageUrl) { return `${devicePageUrl()}#/permissions/${this.userId}`; } - return ''; }, newUserKind() { @@ -335,7 +323,6 @@ return value !== this.userCopy[key]; }, ); - // Roles are update via a different API than FacilityUsers, so pass // their update separately if (!this.editingSuperAdmin && this.newUserKind !== this.userCopy.kind) { @@ -350,13 +337,10 @@ }, submitForm() { this.formSubmitted = true; - if (!this.formIsValid) { return this.focusOnInvalidField(); } - this.status = 'BUSY'; - this.$store .dispatch('userManagement/updateFacilityUserDetails', { userId: this.userId, diff --git a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue index cc690e9d9ac..3e313e6329e 100644 --- a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue +++ b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue @@ -1,16 +1,18 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue b/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue index cbb40d254e6..d863cc63e7b 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue @@ -1,33 +1,35 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue index 7a46942dfa2..830d648ccd5 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue @@ -1,33 +1,35 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue index a5a62c629ad..0f9980057e2 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue @@ -1,40 +1,42 @@ @@ -56,7 +58,6 @@ const preset = this.wizardService.state.context['formalOrNonformal']; // preset inits to null, so either it'll be what the user selected or default to nonformal const selected = preset || Presets.NONFORMAL; - const facilityName = this.wizardService.state.context['facilityName']; const footerMessageType = FooterMessageTypes.NEW_FACILITY; return { @@ -112,7 +113,6 @@ nonFormalDescription: { message: 'Libraries, orphanages, youth centers, computer labs, and other non-formal learning contexts.', - context: "Option description text for 'Non-formal' facility types.", }, }, diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue index 2210c6f6189..644155edb6c 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue @@ -1,24 +1,26 @@ @@ -31,7 +33,6 @@ FULL: 'FULL', LOD: 'LOD', }); - export default { name: 'FullOrLearnOnlyDeviceForm', components: { diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue index d97fe186200..d5ec0037f7f 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue @@ -1,22 +1,24 @@ @@ -31,7 +33,6 @@ PUBLIC: 'PUBLIC', PERSONAL: 'PERSONAL', }); - export default { name: 'GettingStartedForm', components: { @@ -78,7 +79,6 @@ advancedSetupDescription: { message: 'For schools, educational programs, organizations, or other group learning settings that will share the use of Kolibri', - context: "Option description text for 'Advanced setup'.", }, }, diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue index 363d7977cd2..caa18632f37 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue @@ -1,32 +1,34 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue index 9e5c3de6dd5..c2ea39a3223 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue @@ -1,27 +1,29 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/RequirePasswordForLearnersForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/RequirePasswordForLearnersForm.vue index 2256ba3a834..e461dc2a80a 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/RequirePasswordForLearnersForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/RequirePasswordForLearnersForm.vue @@ -1,33 +1,35 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue index 11bb1cc9b20..a8c5c303497 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue @@ -1,31 +1,33 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue index 1b87a0afe3d..9a4bcc39010 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue @@ -1,31 +1,32 @@ diff --git a/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue b/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue index 2ab91df6d73..dc72785766d 100644 --- a/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue +++ b/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue @@ -2,8 +2,9 @@
    -

    {{ getCommonSyncString('selectFacilityTitle') }}

    - +

    + {{ getCommonSyncString('selectFacilityTitle') }} +

    @@ -20,19 +21,20 @@

    {{ $tr('noFacilitiesText') }}

    -
    - -
    - + +
    + +
    +
    - {{ $tr('doNotSeeYourFacility') }} + + {{ $tr('doNotSeeYourFacility') }} + - { try { const { facilities } = await NetworkLocationResource.fetchFacilities(device.id); - return facilities.map(facility => { return { id: facility.id, @@ -140,7 +137,6 @@ getKey: device => device.id, }, ); - // computed properties (functions): const isFetching = computed(() => get(_isFetching) || get(isLoading)); const availableAddressIds = computed(() => @@ -182,7 +178,6 @@ [], { evaluating: isLoading, shallow: false }, ); - const { isMinimumKolibriVersion } = useMinimumKolibriVersion(0, 16, 0); const facilityDisabled = computed(() => { return function (facility) { @@ -193,7 +188,6 @@ ); }; }); - watch(availableFacilities, availableFacilities => { if ( !get(availableFacilities) @@ -206,15 +200,12 @@ resetSelectedAddress(); } }); - const { createSnackbar } = useSnackbar(); - function handleAddedAddress() { forceFetch(); createSnackbar(this.$tr('addDeviceSnackbarText')); this.showAddAddressModal = false; } - function resetSelectedAddress() { const enabledFacilities = availableFacilities.value.filter(f => isMinimumKolibriVersion(f.kolibri_version), @@ -227,13 +218,11 @@ selectedFacilityId.value = ''; } } - function to_continue() { this.changeFacilityService.send({ type: 'CONTINUE', }); } - return { // useDevices devices, @@ -246,7 +235,6 @@ hasDeleted, deletingFailed, doDelete, - // internal fetchDeviceFacilities, availableFacilities, @@ -261,7 +249,6 @@ }; }, inject: ['changeFacilityService'], - watch: { selectedFacilityId(newVal) { this.storageFacilityId = newVal; diff --git a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue b/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue index b4203027b7d..a5d01072910 100644 --- a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue +++ b/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue @@ -7,24 +7,27 @@ :submitDisabled="loading" @submit="submit" > -
    -

    {{ $tr('modalDescription') }}

    - - - -
    + +
    +

    + {{ $tr('modalDescription') }} +

    + + +
    +
    @@ -40,14 +43,11 @@ import useUser from 'kolibri.coreVue.composables.useUser'; const logging = logger.getLogger(__filename); - const Options = Object.freeze({ DO_NOT_USE_METERED: 'DO_NOT_USE_METERED', USE_METERED: 'USE_METERED', }); - const meteredNetworkModalDismissedKey = 'METERED_NETWORK_MODAL_DISMISSED'; - export default { name: 'MeteredConnectionNotificationModal', mixins: [commonCoreStrings], @@ -84,10 +84,8 @@ mounted() { if (checkCapability('check_is_metered')) { this.loading = true; - appCapabilities.checkIsMetered().then(isMetered => { this.activeConnectionIsMetered = isMetered; - // Fetch the DeviceSettings#extra_settings value // We need the whole thing because when we PATCH it later, the API will throw a fit // if we only include one of the keys for the extra_settings object @@ -108,12 +106,9 @@ methods: { submit() { this.$emit('submit', this.selected); - const allow_download_on_metered_connection = this.selected === Options.USE_METERED; const extra_settings = { ...this.extra_settings, allow_download_on_metered_connection }; - this.loading = true; - client({ method: 'PATCH', url: this.settingsUrl, @@ -123,7 +118,6 @@ this.$emit('update', allow_download_on_metered_connection); window.sessionStorage.setItem(meteredNetworkModalDismissedKey, true); this.dismissed = true; - // TODO Uncomment this when strings are not frozen //this.$store.dispatch("createSnackbar", this.$tr("saveSuccessNotification")); }) @@ -157,7 +151,6 @@ }, /** TODO Uncomment these when strings are not frozen, then use them to fix the other TODO * above in this file. - saveFailureNotification: { message: 'Settings have not been updated', context: 'Error message that displays if device settings are not saved correctly.', @@ -166,7 +159,6 @@ message: 'Settings have been updated', context: 'Notification that displays if device settings have been saved correctly.\n', }, - */ }, }; From 51e2ba4fbd7a1f9df666249e7a876f81b5421e7b Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Fri, 25 Oct 2024 12:25:59 +0530 Subject: [PATCH 02/10] fixed v directive erros --- .../SelectDeviceForm.vue | 32 ++- .../plan/assignments/AssignmentCopyModal.vue | 40 ++-- .../SelectTransferSourceModal/DriveList.vue | 16 +- script.py | 212 ++++++++++++++++++ 4 files changed, 255 insertions(+), 45 deletions(-) create mode 100644 script.py diff --git a/kolibri/core/assets/src/views/sync/SelectDeviceModalGroup/SelectDeviceForm.vue b/kolibri/core/assets/src/views/sync/SelectDeviceModalGroup/SelectDeviceForm.vue index 5da067a3566..2b7209b640c 100644 --- a/kolibri/core/assets/src/views/sync/SelectDeviceModalGroup/SelectDeviceForm.vue +++ b/kolibri/core/assets/src/views/sync/SelectDeviceModalGroup/SelectDeviceForm.vue @@ -32,8 +32,8 @@
    diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue index d46e6546476..3e5538ef70e 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue @@ -1,15 +1,15 @@ diff --git a/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue b/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue index bfc24b9a0e0..069562b401b 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue @@ -1,8 +1,8 @@ diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue index 3e5538ef70e..ef74d1236b9 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue @@ -1,19 +1,19 @@ diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue index cf7619c9827..d36dcbd3e9d 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue @@ -1,12 +1,12 @@ diff --git a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue index 8ff913744cf..be9da75b5a8 100644 --- a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue +++ b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue @@ -16,45 +16,45 @@

    {{ $tr('createNewUserHeader') }}

    - -
    - + + + + +
    + -
    - - - - -
    -
    + + + + + + +
    {{ $tr('editUserDetailsHeader') }} - -
    - + + + From 7652936b3d07fb7bf004f15d1cefa30f6666b941 Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Sat, 9 Nov 2024 21:46:58 +0530 Subject: [PATCH 07/10] fixed test error in UserTables/index --- .../core/assets/src/views/UserTable/index.vue | 133 +++++++++++++++++- 1 file changed, 131 insertions(+), 2 deletions(-) diff --git a/kolibri/core/assets/src/views/UserTable/index.vue b/kolibri/core/assets/src/views/UserTable/index.vue index 65f25f64621..e8e3f186b5b 100644 --- a/kolibri/core/assets/src/views/UserTable/index.vue +++ b/kolibri/core/assets/src/views/UserTable/index.vue @@ -79,7 +79,136 @@ From 3370650e17ff697818e23e1e697f2ee8dc3862c8 Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Sat, 9 Nov 2024 23:56:03 +0530 Subject: [PATCH 08/10] removed unwanted linting fixes --- .../views/plan/assignments/AssignmentCopyModal.vue | 8 ++------ .../src/views/plan/assignments/RecipientSelector.vue | 1 + .../SelectTransferSourceModal/DriveList.vue | 1 + .../facility/assets/src/views/UserCreatePage.vue | 8 ++++++++ .../facility/assets/src/views/UserEditPage.vue | 12 ++++++++++++ 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue b/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue index c9b9dbf90e5..61183dca1bf 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue @@ -28,12 +28,8 @@ v-else id="select-learnergroup" > -

    - {{ $tr('destinationExplanation', { classroomName: selectedClassroomName }) }} -

    -

    - {{ assignmentQuestion }} -

    +

    {{ $tr('destinationExplanation', { classroomName: selectedClassroomName }) }}

    +

    {{ assignmentQuestion }}

    +
    +

    {{ $tr('drivesFound') }} diff --git a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue index be9da75b5a8..58ff2064008 100644 --- a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue +++ b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue @@ -16,6 +16,7 @@

    {{ $tr('createNewUserHeader') }}

    +
    + +
    + + + +
    +
    {{ $tr('editUserDetailsHeader') }} +
    + + + + + + +
    +

    {{ $tr('forceLogoutWarning') }}

    From 90e4bccd8f97a66698262be8eb545b048d1dfede Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Mon, 11 Nov 2024 19:32:06 +0530 Subject: [PATCH 09/10] wrapped he rendered LanguagesMenuItem components inside LanguagesMenu --- .../assets/src/views/MediaPlayerLanguages/LanguagesMenu.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenu.vue b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenu.vue index f01650a278c..0b835d77586 100644 --- a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenu.vue +++ b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenu.vue @@ -5,6 +5,9 @@ class="languages-menu" > + + + From 557c9d3532363606879fecdfd12e62aef5358400 Mon Sep 17 00:00:00 2001 From: iamshobhraj Date: Wed, 13 Nov 2024 09:52:33 +0530 Subject: [PATCH 10/10] fixed syntax error --- kolibri/core/assets/src/views/UserTable/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kolibri/core/assets/src/views/UserTable/index.vue b/kolibri/core/assets/src/views/UserTable/index.vue index e8e3f186b5b..c2c732a957b 100644 --- a/kolibri/core/assets/src/views/UserTable/index.vue +++ b/kolibri/core/assets/src/views/UserTable/index.vue @@ -79,7 +79,7 @@