diff --git a/.github/workflows/build_whl.yml b/.github/workflows/build_whl.yml index c0f40c96a26..c2073330d9d 100644 --- a/.github/workflows/build_whl.yml +++ b/.github/workflows/build_whl.yml @@ -33,7 +33,7 @@ jobs: apt-get -y -qq update apt-get install -y gettext sudo - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16.x' - name: Install Yarn diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 81b8cd33879..20dcdb0eaf2 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16.x' - name: Cache Node.js modules diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dd19a2eb2bc..574b33df16b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -34,7 +34,7 @@ jobs: with: python-version: '3.11' - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16.x' - name: Get yarn cache directory path diff --git a/.github/workflows/yarn.yml b/.github/workflows/yarn.yml index 657b6a52cba..20123f3823c 100644 --- a/.github/workflows/yarn.yml +++ b/.github/workflows/yarn.yml @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16.x' - name: Get yarn cache directory path diff --git a/docker/base.dockerfile b/docker/base.dockerfile index 8609a195245..61a2ca8ce89 100644 --- a/docker/base.dockerfile +++ b/docker/base.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:jammy ENV NODE_VERSION=16.20.0 @@ -11,9 +11,9 @@ RUN apt-get update && \ git \ git-lfs \ psmisc \ - python2.7 \ - python-pip \ - python-sphinx + python3 \ + python3-pip \ + python3-sphinx # add yarn ppa RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - @@ -21,19 +21,23 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources # install nodejs and yarn RUN apt-get update && \ - curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \ - dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \ - rm nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \ + ARCH=$(dpkg --print-architecture) && \ + curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \ + dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \ + rm nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \ apt-get install yarn RUN git lfs install +# Check if symbolic links exist before creating them +RUN if [ ! -f /usr/bin/python ]; then ln -s /usr/bin/python3 /usr/bin/python; fi \ + && if [ ! -f /usr/bin/pip ]; then ln -s /usr/bin/pip3 /usr/bin/pip; fi + # copy Kolibri source code into image COPY . /kolibri # do the time-consuming base install commands RUN cd /kolibri \ - && pip install -r requirements/dev.txt \ - && pip install -r requirements/build.txt \ - && pip install -r requirements/test.txt \ + && pip3 install -r requirements/dev.txt \ + && pip3 install -r requirements/test.txt \ && yarn install --network-timeout 100000 diff --git a/docker/demoserver.dockerfile b/docker/demoserver.dockerfile index 55547ee8aed..2bd8bee69b4 100644 --- a/docker/demoserver.dockerfile +++ b/docker/demoserver.dockerfile @@ -2,7 +2,6 @@ FROM learningequality/kolibribase ENV KOLIBRI_RUN_MODE=demoserver ENV KOLIBRI_PROVISIONDEVICE_FACILITY="Kolibri Demo" -ENV WHICH_PYTHON=python2 COPY docker/entrypoint.py /docker/entrypoint.py diff --git a/docker/entrypoint.py b/docker/entrypoint.py index d95d011bc8a..2a5e0a15669 100644 --- a/docker/entrypoint.py +++ b/docker/entrypoint.py @@ -38,7 +38,7 @@ # - KOLIBRI_PROVISIONDEVICE_FACILITY if set, provision facility with this name # - CHANNELS_TO_IMPORT if set, comma separated list of channel IDs to import DEFAULT_ENVS = { - "WHICH_PYTHON": "python2", # or python3 if you prefer; Kolibri don't care + "WHICH_PYTHON": "python3", # or python3 if you prefer; Kolibri don't care "KOLIBRI_HOME": "/kolibrihome", "KOLIBRI_HTTP_PORT": "8080", "KOLIBRI_LANG": "en", diff --git a/kolibri/core/assets/src/composables/useUserSyncStatus.js b/kolibri/core/assets/src/composables/useUserSyncStatus.js index 4c1213f7aba..503ad479c07 100644 --- a/kolibri/core/assets/src/composables/useUserSyncStatus.js +++ b/kolibri/core/assets/src/composables/useUserSyncStatus.js @@ -14,6 +14,7 @@ const deviceStatus = ref(null); const deviceStatusSentiment = ref(null); const hasDownloads = ref(false); const lastDownloadRemoved = ref(null); +const syncDownloadsInProgress = ref(false); const timeoutInterval = computed(() => { return get(status) === SyncStatus.QUEUED ? 1000 : 10000; }); @@ -51,6 +52,7 @@ export function pollUserSyncStatusTask() { lastDownloadRemoved.value = syncData[0].last_download_removed ? new Date(syncData[0].last_download_removed) : null; + syncDownloadsInProgress.value = syncData[0].sync_downloads_in_progress; } else { status.value = SyncStatus.NOT_CONNECTED; } @@ -83,5 +85,6 @@ export default function useUserSyncStatus() { deviceStatusSentiment, hasDownloads, lastDownloadRemoved, + syncDownloadsInProgress, }; } diff --git a/kolibri/core/assets/src/core-app/apiSpec.js b/kolibri/core/assets/src/core-app/apiSpec.js index 10b6b1ca069..8d64a667011 100644 --- a/kolibri/core/assets/src/core-app/apiSpec.js +++ b/kolibri/core/assets/src/core-app/apiSpec.js @@ -105,6 +105,7 @@ import * as sync from '../views/sync/syncComponentSet'; import PageRoot from '../views/PageRoot'; import NotificationsRoot from '../views/NotificationsRoot'; import useMinimumKolibriVersion from '../composables/useMinimumKolibriVersion'; +import useUserSyncStatus from '../composables/useUserSyncStatus'; import useUser from '../composables/useUser'; // webpack optimization @@ -232,6 +233,7 @@ export default { useKShow, useMinimumKolibriVersion, useUser, + useUserSyncStatus, }, }, resources, diff --git a/kolibri/core/assets/src/utils/browserInfo.js b/kolibri/core/assets/src/utils/browserInfo.js index 264c39e8d7c..412b0d92498 100644 --- a/kolibri/core/assets/src/utils/browserInfo.js +++ b/kolibri/core/assets/src/utils/browserInfo.js @@ -87,3 +87,9 @@ export const isMacWebView = * All web views */ export const isEmbeddedWebView = isAndroidWebView || isMacWebView; + +// Check for presence of the touch event in DOM or multi-touch capabilities +export const isTouchDevice = + 'ontouchstart' in window || + window.navigator?.maxTouchPoints > 0 || + window.navigator?.msMaxTouchPoints > 0; diff --git a/kolibri/core/assets/src/views/AppBar.vue b/kolibri/core/assets/src/views/AppBar.vue index 7d256f8b2a2..6d5cabc27f9 100644 --- a/kolibri/core/assets/src/views/AppBar.vue +++ b/kolibri/core/assets/src/views/AppBar.vue @@ -10,7 +10,7 @@