From 8f217c914ebf89dc42c607eff2820c89dba1043a Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 28 Oct 2021 14:18:57 +0530 Subject: [PATCH 1/3] added sed to remove OS dependent dark mode css --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a786563f..feed495b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM nextcloud:20.0.12-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_VERSION="20.1.2" +ARG THEME_VERSION="20.1.3" ARG THEME_HELPER_VERSION="1.0.1" ARG NEWS_VERSION="16.0.1" ARG QUOTA_WARN_VERSION="1.9.1" @@ -20,7 +20,7 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/20,0,12,1/20,0,12,14/' ${BASE_DIR}/version.php +RUN sed -i 's/20,0,12,1/20,0,12,15/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -129,6 +129,11 @@ RUN sed -i 's/recommendations,spreed,mail,calendar/calendar,tasks,notes/' ${BASE # Remove colored background from email template logo RUN sed -i 's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this->header, \["none"/' ${BASE_DIR}/lib/private/Mail/EMailTemplate.php +# Ignore OS dark mode for all users +# Don't use user-specific dark theme css for non-logged in users +RUN sed -i 's/OCA.Accessibility.theme="dark"/OCA.Accessibility.theme="light"/' ${BASE_DIR}/apps/accessibility/js/accessibilityoca.js +RUN sed -i "s/$userValues = ['dark']/$userValues = []/" ${BASE_DIR}/apps/accessibility/lib/Controller/AccessibilityController.php + # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ "https://gitlab.e.foundation/e/infra/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ -- GitLab From 176c41823f0a0c554fe9053b27f61b55e6161226 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 28 Oct 2021 17:19:58 +0530 Subject: [PATCH 2/3] Fixed sed for non-logged in css --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index feed495b..61c0301f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,7 +132,7 @@ RUN sed -i 's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this-> # Ignore OS dark mode for all users # Don't use user-specific dark theme css for non-logged in users RUN sed -i 's/OCA.Accessibility.theme="dark"/OCA.Accessibility.theme="light"/' ${BASE_DIR}/apps/accessibility/js/accessibilityoca.js -RUN sed -i "s/$userValues = ['dark']/$userValues = []/" ${BASE_DIR}/apps/accessibility/lib/Controller/AccessibilityController.php +RUN sed -i "s/$userValues = \['dark'\]/$userValues = \[\]/" ${BASE_DIR}/apps/accessibility/lib/Controller/AccessibilityController.php # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ -- GitLab From 42ec87113f11a972d18a7aefb3d59c9d8374bb87 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 28 Oct 2021 17:41:14 +0530 Subject: [PATCH 3/3] Bumped version number to 16 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 61c0301f..1a9b332b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/20,0,12,1/20,0,12,15/' ${BASE_DIR}/version.php +RUN sed -i 's/20,0,12,1/20,0,12,16/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab