From 01b4155a65e476864875eb1e5a89b27503c9e240 Mon Sep 17 00:00:00 2001 From: Evilham Date: Mon, 27 Feb 2023 19:38:41 +0100 Subject: [PATCH] [NC] Upgrade to Nextcloud 25.0.4 This still uses a fork of nextcloud/forms and reenables that plugin. Since version 25 of Nextcloud uses the 2.X line of the nextcloud/mail plugin, which already includes our patches, we can get rid of them to easen future maintenance. --- dd-apps/docker/nextcloud/Dockerfile | 6 +- dd-apps/docker/nextcloud/dd-patch | 5 +- dd-apps/docker/nextcloud/nc-setup.sh | 65 +++---- .../docker/nextcloud/nc_mail/appinfo/info.xml | 75 -------- .../nc_mail/lib/Command/UpdateAccount.php | 179 ------------------ .../nc_mail/lib/Db/MailAccountMapper.php | 171 ----------------- dd-apps/docker/nextcloud/nextcloud.yml | 2 +- .../nextcloud/src/themes/dd/core/ddstyles.css | 14 ++ .../nextcloud/src/themes/dd/core/js/navbar.js | 2 +- .../src/admin/static/templates/base.html | 2 +- .../src/admin/static/templates/login.html | 2 +- .../api/src/api/static/_templates/dd.css | 10 +- dd.conf.sample | 2 +- 13 files changed, 55 insertions(+), 480 deletions(-) delete mode 100644 dd-apps/docker/nextcloud/nc_mail/appinfo/info.xml delete mode 100644 dd-apps/docker/nextcloud/nc_mail/lib/Command/UpdateAccount.php delete mode 100644 dd-apps/docker/nextcloud/nc_mail/lib/Db/MailAccountMapper.php diff --git a/dd-apps/docker/nextcloud/Dockerfile b/dd-apps/docker/nextcloud/Dockerfile index dfdea19..6ade834 100644 --- a/dd-apps/docker/nextcloud/Dockerfile +++ b/dd-apps/docker/nextcloud/Dockerfile @@ -82,11 +82,9 @@ COPY saml.sh / COPY template.docx / ## Save current forms plugin hash -#RUN sh -c 'curl -sL https://api.github.com/repos/3iPunt/nextcloud_forms/commits/STABLE_25 | jq -r .sha > /forms.hash' +RUN sh -c 'curl -sL https://api.github.com/repos/3iPunt/nextcloud_forms/commits/STABLE_25 | jq -r .sha > /forms.hash' ## And current forms code -#RUN sh -c 'curl -sL "https://github.com/3iPunt/nextcloud_forms/archive/$(cat /forms.hash).zip" > /forms.zip' -# Mail app patches. To remove in NC 25 -COPY nc_mail/ /nc_mail/ +RUN sh -c 'curl -sL "https://github.com/3iPunt/nextcloud_forms/archive/$(cat /forms.hash).zip" > /forms.zip' # Setup cron as documented in: # https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile diff --git a/dd-apps/docker/nextcloud/dd-patch b/dd-apps/docker/nextcloud/dd-patch index 72f2848..fb3241e 100644 --- a/dd-apps/docker/nextcloud/dd-patch +++ b/dd-apps/docker/nextcloud/dd-patch @@ -2,7 +2,4 @@ # file license author source nginx.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf supervisord.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/dockerfiles/cron/fpm-alpine/supervisord.conf -nc_mail/appinfo/info.xml AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/v1.15.2/appinfo/info.xml -nc_mail/lib/Command/UpdateAccount.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/1e777a1783254bd4b7f69f39a6c5123323f8b701/lib/Command/UpdateAccount.php -nc_mail/lib/Db/MailAccountMapper.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/1e777a1783254bd4b7f69f39a6c5123323f8b701/lib/Db/MailAccountMapper.php -src/themes/dd/core/templates/layout.user.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/server/v21.0.9/core/templates/layout.user.php +src/themes/dd/core/templates/layout.user.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/server/v25.0.4/core/templates/layout.user.php diff --git a/dd-apps/docker/nextcloud/nc-setup.sh b/dd-apps/docker/nextcloud/nc-setup.sh index fa5c00c..7ea1356 100755 --- a/dd-apps/docker/nextcloud/nc-setup.sh +++ b/dd-apps/docker/nextcloud/nc-setup.sh @@ -20,7 +20,10 @@ plugin_status() { printf "%s\t%s" "enabled" "${version}" else version="$(echo "${plugins_state}" | jq -r ".disabled.${plugin}")" - if [ "${version}" != "null" ]; then + is_available="$(echo "${plugins_state}" | jq -r \ + --arg plugin "${plugin}" \ + '.disabled | to_entries[] | select(.key == $plugin) | .key')" + if [ "${is_available}" = "${plugin}" ]; then printf "%s\t%s" "disabled" "${version}" else printf "%s\t%s" "n/a" "n/a" @@ -57,7 +60,7 @@ occupgrade # Operators should instead rely on the environment variables to ease deployment # EXTRA_PLUGINS_ENABLE and EXTRA_PLUGINS_DISABLE CORE_PLUGINS_ENABLE="user_saml,bruteforcesettings,polls,calendar,spreed,bbb,mail,ownpad,onlyoffice" -CORE_PLUGINS_DISABLE="firstrunwizard,recommendations,dashboard,circles,forms" +CORE_PLUGINS_DISABLE="firstrunwizard,recommendations,dashboard,circles" if [ "${DISABLE_CLAMAV:-true}" = "false" ]; then CORE_PLUGINS_ENABLE="${CORE_PLUGINS_ENABLE},files_antivirus" @@ -72,7 +75,7 @@ PLUGINS="${CORE_PLUGINS_ENABLE},${CORE_PLUGINS_DISABLE},${EXTRA_PLUGINS_ENABLE:- # Install all plugins # shellcheck disable=SC2086 # We do want multiple arguments for plugin in $(echo "${PLUGINS}" | tr ',' '\n'); do - if plugin_status "${plugin}" | grep -q "n/a"; then + if plugin_status "${plugin}" | grep -qE "^n/a"; then echo "--> Installing ${plugin}" ./occ --no-warnings app:install "${plugin}" fi @@ -117,40 +120,32 @@ done occupgrade -# Temporary patch while upstream lands our changes -# See: https://github.com/nextcloud/mail/pull/6908 -for f in appinfo/info.xml lib/Command/UpdateAccount.php lib/Db/MailAccountMapper.php; do - install -m 0644 -o www-data -g www-data "/nc_mail/$f" "/var/www/html/custom_apps/mail/$f" -done - -occupgrade ## Forms -# TODO: This is broken in NC 24 due to: -# https://github.com/nextcloud/forms/pull/1149/files -## TODO: request explanations and reduce upstream diff -## This is what is being used: https://github.com/juanan3ip/form -#FORMS_EXPECTED_HASH="$(cat /forms.hash)" -#FORMS_DIR="/var/www/html/custom_apps/forms" -#FORMS_HASH="" -#if [ -f "${FORMS_DIR}.hash" ]; then -# FORMS_HASH="$(cat "${FORMS_DIR}.hash")" -#fi -#if [ "${FORMS_EXPECTED_HASH}" != "${FORMS_HASH}" ]; then -# # Remove old plugin -# rm -rf "${FORMS_DIR}" -# # Install new one -# unzip -o /forms.zip -d /tmp -# mv "/tmp/form-${FORMS_EXPECTED_HASH}" "${FORMS_DIR}" -# # Perform config / install -# npm --prefix "${FORMS_DIR}" install -# composer --ignore-platform-req=ext-dom -d"${FORMS_DIR}" install --no-dev -o -# # Place hash marker -# cp /forms.hash "${FORMS_DIR}.hash" -#fi -#if plugin_status "${plugin}" | grep -qE "^disabled"; then -# ./occ app:enable forms -#fi +## This should be upstreamed, see: +## https://github.com/juanan3ip/form/issues/76 +## This is what is being used: https://github.com/3iPunt/nextcloud_forms +FORMS_EXPECTED_HASH="$(cat /forms.hash)" +FORMS_DIR="/var/www/html/custom_apps/forms" +FORMS_HASH="" +if [ -f "${FORMS_DIR}.hash" ]; then + FORMS_HASH="$(cat "${FORMS_DIR}.hash")" +fi +if [ "${FORMS_EXPECTED_HASH}" != "${FORMS_HASH}" ]; then + # Remove old plugin + rm -rf "${FORMS_DIR}" + # Install new one + unzip -o /forms.zip -d /tmp + mv "/tmp/nextcloud_forms-${FORMS_EXPECTED_HASH}" "${FORMS_DIR}" + # Perform config / install + npm --prefix "${FORMS_DIR}" install + composer --ignore-platform-req=ext-dom -d"${FORMS_DIR}" install --no-dev -o + # Place hash marker + cp /forms.hash "${FORMS_DIR}.hash" +fi +if plugin_status "${plugin}" | grep -qE "^disabled"; then + ./occ app:enable forms +fi # #occupgrade diff --git a/dd-apps/docker/nextcloud/nc_mail/appinfo/info.xml b/dd-apps/docker/nextcloud/nc_mail/appinfo/info.xml deleted file mode 100644 index 920028d..0000000 --- a/dd-apps/docker/nextcloud/nc_mail/appinfo/info.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - mail - Mail - ๐Ÿ’Œ A mail app for Nextcloud - - 1.15.2 - agpl - Greta Doรงi - Nextcloud Groupware Team - Mail - - https://github.com/nextcloud/mail/blob/main/doc/user.md - https://github.com/nextcloud/mail/blob/main/doc/admin.md - https://github.com/nextcloud/mail/blob/main/doc/developer.md - - social - office - https://github.com/nextcloud/mail#readme - https://github.com/nextcloud/mail/issues - https://github.com/nextcloud/mail.git - https://user-images.githubusercontent.com/1374172/79554966-278e1600-809f-11ea-82ea-7a0d72a2704f.png - - - - - - OCA\Mail\BackgroundJob\CleanupJob - OCA\Mail\BackgroundJob\OutboxWorkerJob - - - - OCA\Mail\Migration\AddMissingDefaultTags - OCA\Mail\Migration\AddMissingMessageIds - OCA\Mail\Migration\FixCollectedAddresses - OCA\Mail\Migration\FixBackgroundJobs - OCA\Mail\Migration\MakeItineraryExtractorExecutable - OCA\Mail\Migration\ProvisionAccounts - OCA\Mail\Migration\RepairMailTheads - - - - OCA\Mail\Command\AddMissingTags - OCA\Mail\Command\CleanUp - OCA\Mail\Command\CreateAccount - OCA\Mail\Command\CreateTagMigrationJobEntry - OCA\Mail\Command\DeleteAccount - OCA\Mail\Command\DiagnoseAccount - OCA\Mail\Command\ExportAccount - OCA\Mail\Command\ExportAccountThreads - OCA\Mail\Command\SyncAccount - OCA\Mail\Command\TrainAccount - OCA\Mail\Command\Thread - OCA\Mail\Command\UpdateAccount - - - OCA\Mail\Settings\AdminSettings - - - - Mail - mail.page.index - mail.svg - 3 - - - diff --git a/dd-apps/docker/nextcloud/nc_mail/lib/Command/UpdateAccount.php b/dd-apps/docker/nextcloud/nc_mail/lib/Command/UpdateAccount.php deleted file mode 100644 index 45cf1f7..0000000 --- a/dd-apps/docker/nextcloud/nc_mail/lib/Command/UpdateAccount.php +++ /dev/null @@ -1,179 +0,0 @@ - - * @author Maadix - * - * Mail - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see - * - */ - -namespace OCA\Mail\Command; - -use OCA\Mail\Db\MailAccountMapper; -use OCP\Security\ICrypto; -use OCP\AppFramework\Db\DoesNotExistException; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class UpdateAccount extends Command { - public const ARGUMENT_ACCOUNT_ID = 'account-id'; - public const ARGUMENT_NAME = 'name'; - public const ARGUMENT_EMAIL = 'email'; - public const ARGUMENT_AUTH_METHOD = 'auth-method'; - public const ARGUMENT_IMAP_HOST = 'imap-host'; - public const ARGUMENT_IMAP_PORT = 'imap-port'; - public const ARGUMENT_IMAP_SSL_MODE = 'imap-ssl-mode'; - public const ARGUMENT_IMAP_USER = 'imap-user'; - public const ARGUMENT_IMAP_PASSWORD = 'imap-password'; - public const ARGUMENT_SMTP_HOST = 'smtp-host'; - public const ARGUMENT_SMTP_PORT = 'smtp-port'; - public const ARGUMENT_SMTP_SSL_MODE = 'smtp-ssl-mode'; - public const ARGUMENT_SMTP_USER = 'smtp-user'; - public const ARGUMENT_SMTP_PASSWORD = 'smtp-password'; - - - /** @var mapper */ - private $mapper; - - /** @var ICrypto */ - private $crypto; - - public function __construct(MailAccountMapper $mapper, ICrypto $crypto) { - parent::__construct(); - - $this->mapper = $mapper; - $this->crypto = $crypto; - } - - /** - * @return void - */ - protected function configure() { - $this->setName('mail:account:update'); - $this->setDescription('Update a user\'s IMAP account'); - $this->addArgument(self::ARGUMENT_ACCOUNT_ID, InputArgument::REQUIRED); - - $this->addOption(self::ARGUMENT_NAME, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_EMAIL, '', InputOption::VALUE_OPTIONAL); - - $this->addOption(self::ARGUMENT_IMAP_HOST, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_IMAP_PORT, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_IMAP_SSL_MODE, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_IMAP_USER, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_IMAP_PASSWORD, '', InputOption::VALUE_OPTIONAL); - - $this->addOption(self::ARGUMENT_SMTP_HOST, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_SMTP_PORT, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_SMTP_SSL_MODE, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_SMTP_USER, '', InputOption::VALUE_OPTIONAL); - $this->addOption(self::ARGUMENT_SMTP_PASSWORD, '', InputOption::VALUE_OPTIONAL); - - $this->addOption(self::ARGUMENT_AUTH_METHOD, '', InputOption::VALUE_OPTIONAL); - } - - protected function execute(InputInterface $input, OutputInterface $output): int { - $accountId = (int)$input->getArgument(self::ARGUMENT_ACCOUNT_ID); - - $name = $input->getOption(self::ARGUMENT_NAME); - $email = $input->getOption(self::ARGUMENT_EMAIL); - - $imapHost = $input->getOption(self::ARGUMENT_IMAP_HOST); - $imapPort = $input->getOption(self::ARGUMENT_IMAP_PORT); - $imapSslMode = $input->getOption(self::ARGUMENT_IMAP_SSL_MODE); - $imapUser = $input->getOption(self::ARGUMENT_IMAP_USER); - $imapPassword = $input->getOption(self::ARGUMENT_IMAP_PASSWORD); - - $smtpHost = $input->getOption(self::ARGUMENT_SMTP_HOST); - $smtpPort = $input->getOption(self::ARGUMENT_SMTP_PORT); - $smtpSslMode = $input->getOption(self::ARGUMENT_SMTP_SSL_MODE); - $smtpUser = $input->getOption(self::ARGUMENT_SMTP_USER); - $smtpPassword = $input->getOption(self::ARGUMENT_SMTP_PASSWORD); - $authMethod = $input->getOption(self::ARGUMENT_AUTH_METHOD); - - try { - $mailAccount = $this->mapper->findById($accountId); - } catch (DoesNotExistException $e) { - $output->writeln("No Email Account found with ID $accountId "); - return 1; - } - - $output->writeLn("Found account with email: " . $mailAccount->getEmail() . ""); - - //ACCOUNT OPTIONS - if ($input->getOption(self::ARGUMENT_NAME)) { - $mailAccount->setName($name); - } - if ($input->getOption(self::ARGUMENT_EMAIL)) { - $mailAccount->setEmail($email); - } - - //AUTH METHOD - if ($input->getOption(self::ARGUMENT_AUTH_METHOD)) { - $mailAccount->setAuthMethod($authMethod); - } - - //INBOUND - if ($input->getOption(self::ARGUMENT_IMAP_HOST)) { - $mailAccount->setInboundHost($imapHost); - } - - if ($input->getOption(self::ARGUMENT_IMAP_PORT)) { - $mailAccount->setInboundPort((int) $imapPort); - } - - if ($input->getOption(self::ARGUMENT_IMAP_SSL_MODE)) { - $mailAccount->setInboundSslMode($imapSslMode); - } - - if ($input->getOption(self::ARGUMENT_IMAP_PASSWORD)) { - $mailAccount->setInboundPassword($this->crypto->encrypt($imapPassword)); - } - - if ($input->getOption(self::ARGUMENT_SMTP_USER)) { - $mailAccount->setInboundUser($imapUser); - } - - // OUTBOUND - - if ($input->getOption(self::ARGUMENT_SMTP_HOST)) { - $mailAccount->setOutboundHost($smtpHost); - } - - if ($input->getOption(self::ARGUMENT_SMTP_PORT)) { - $mailAccount->setOutboundPort((int) $smtpPort); - } - - if ($input->getOption(self::ARGUMENT_SMTP_SSL_MODE)) { - $mailAccount->setOutboundSslMode($smtpSslMode); - } - - if ($input->getOption(self::ARGUMENT_SMTP_PASSWORD)) { - $mailAccount->setOutboundPassword($this->crypto->encrypt($smtpPassword)); - } - - if ($input->getOption(self::ARGUMENT_SMTP_USER)) { - $mailAccount->setOutboundUser($smtpUser); - } - - $this->mapper->save($mailAccount); - - $output->writeln("Account " . $mailAccount->getEmail() . " with ID $accountId succesfully updated "); - return 0; - } -} diff --git a/dd-apps/docker/nextcloud/nc_mail/lib/Db/MailAccountMapper.php b/dd-apps/docker/nextcloud/nc_mail/lib/Db/MailAccountMapper.php deleted file mode 100644 index 626708e..0000000 --- a/dd-apps/docker/nextcloud/nc_mail/lib/Db/MailAccountMapper.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @author Christoph Wurst - * @author Lukas Reschke - * @author Thomas Mรผller - * - * Mail - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see - * - */ - -namespace OCA\Mail\Db; - -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\AppFramework\Db\QBMapper; -use OCP\DB\QueryBuilder\IQueryBuilder; -use OCP\IDBConnection; -use OCP\IUser; - -/** - * @template-extends QBMapper - */ -class MailAccountMapper extends QBMapper { - /** - * @param IDBConnection $db - */ - public function __construct(IDBConnection $db) { - parent::__construct($db, 'mail_accounts'); - } - - /** Finds an Mail Account by id - * - * @param string $userId - * @param int $accountId - * - * @return MailAccount - * - * @throws DoesNotExistException - */ - public function find(string $userId, int $accountId): MailAccount { - $qb = $this->db->getQueryBuilder(); - $query = $qb - ->select('*') - ->from($this->getTableName()) - ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId))) - ->andWhere($qb->expr()->eq('id', $qb->createNamedParameter($accountId))); - - return $this->findEntity($query); - } - - /** - * Finds an mail account by id - * - * @return MailAccount - * @throws DoesNotExistException - */ - public function findById(int $id): MailAccount { - $qb = $this->db->getQueryBuilder(); - $query = $qb - ->select('*') - ->from($this->getTableName()) - ->where($qb->expr()->eq('id', $qb->createNamedParameter($id))); - - return $this->findEntity($query); - } - - /** - * Finds all Mail Accounts by user id existing for this user - * - * @param string $userId the id of the user that we want to find - * - * @return MailAccount[] - */ - public function findByUserId(string $userId): array { - $qb = $this->db->getQueryBuilder(); - $query = $qb - ->select('*') - ->from($this->getTableName()) - ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId))); - - return $this->findEntities($query); - } - - /** - * @throws DoesNotExistException - * @throws MultipleObjectsReturnedException - */ - public function findProvisionedAccount(IUser $user): MailAccount { - $qb = $this->db->getQueryBuilder(); - - $query = $qb - ->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('user_id', $qb->createNamedParameter($user->getUID())), - $qb->expr()->isNotNull('provisioning_id') - ); - - return $this->findEntity($query); - } - - /** - * Saves an User Account into the database - * - * @param MailAccount $account - * - * @return MailAccount - */ - public function save(MailAccount $account): MailAccount { - if ($account->getId() === null) { - return $this->insert($account); - } - - return $this->update($account); - } - - public function deleteProvisionedAccounts(int $provisioningId): void { - $qb = $this->db->getQueryBuilder(); - - $delete = $qb->delete($this->getTableName()) - ->where($qb->expr()->eq('provisioning_id', $qb->createNamedParameter($provisioningId, IQueryBuilder::PARAM_INT))); - - $delete->execute(); - } - - public function deleteProvisionedAccountsByUid(string $uid): void { - $qb = $this->db->getQueryBuilder(); - - $delete = $qb->delete($this->getTableName()) - ->where( - $qb->expr()->eq('user_id', $qb->createNamedParameter($uid)), - $qb->expr()->isNotNull('provisioning_id') - ); - - $delete->execute(); - } - - public function getAllAccounts(): array { - $qb = $this->db->getQueryBuilder(); - $query = $qb - ->select('*') - ->from($this->getTableName()); - - return $this->findEntities($query); - } - - public function getAllUserIdsWithAccounts(): array { - $qb = $this->db->getQueryBuilder(); - $query = $qb - ->selectDistinct('user_id') - ->from($this->getTableName()); - - return $this->findEntities($query); - } -} diff --git a/dd-apps/docker/nextcloud/nextcloud.yml b/dd-apps/docker/nextcloud/nextcloud.yml index b4b3d9a..76b2374 100644 --- a/dd-apps/docker/nextcloud/nextcloud.yml +++ b/dd-apps/docker/nextcloud/nextcloud.yml @@ -26,7 +26,7 @@ services: dockerfile: Dockerfile args: # Update dd.conf.sample when bumping this version in main - - IMG=${NEXTCLOUD_IMG_OVERRIDE-nextcloud:24.0.10-fpm-alpine} + - IMG=${NEXTCLOUD_IMG_OVERRIDE-nextcloud:25.0.4-fpm-alpine} container_name: dd-apps-nextcloud-app image: registry.dd-work.space/dd/apps-nextcloud:${DD_BUILD:-latest} restart: unless-stopped diff --git a/dd-apps/docker/nextcloud/src/themes/dd/core/ddstyles.css b/dd-apps/docker/nextcloud/src/themes/dd/core/ddstyles.css index f890999..55aebba 100644 --- a/dd-apps/docker/nextcloud/src/themes/dd/core/ddstyles.css +++ b/dd-apps/docker/nextcloud/src/themes/dd/core/ddstyles.css @@ -1,3 +1,17 @@ [data-action="onlyofficeDocxf"]{ display: none !important; } + +/* Fix logo misplacement */ +header#header a#nextcloud { + margin-left: 0; +} +/* Force visual aesthetic */ +body#body-user header#header { + background-image: none !important; +} +/* Fix icon colours */ +header#header #navbar-nextcloud span.material-design-icon, +header#header #navbar-nextcloud #contactsmenu div.menutoggle::before { + filter: invert(); +} diff --git a/dd-apps/docker/nextcloud/src/themes/dd/core/js/navbar.js b/dd-apps/docker/nextcloud/src/themes/dd/core/js/navbar.js index 9e72ea5..b9c00ee 100644 --- a/dd-apps/docker/nextcloud/src/themes/dd/core/js/navbar.js +++ b/dd-apps/docker/nextcloud/src/themes/dd/core/js/navbar.js @@ -23,7 +23,7 @@ document.addEventListener("DOMContentLoaded", () => { base_url = `${window.location.protocol}//${window.location.host.replace(/^nextcloud\./, 'api.')}` $.getJSON(`${base_url}/json`, (result) => { if (result.logo) { - $("#navbar-logo img").attr('src', result.logo) + $("#navbar-logo #nextcloud img").attr('src', result.logo) } if (result.product_logo) { $("#product-logo img").attr("src", result.product_logo) diff --git a/dd-sso/admin/src/admin/static/templates/base.html b/dd-sso/admin/src/admin/static/templates/base.html index cecd08c..6f40a6d 100644 --- a/dd-sso/admin/src/admin/static/templates/base.html +++ b/dd-sso/admin/src/admin/static/templates/base.html @@ -52,7 +52,7 @@ - + diff --git a/dd-sso/admin/src/admin/static/templates/login.html b/dd-sso/admin/src/admin/static/templates/login.html index 5460f46..4b58b2a 100644 --- a/dd-sso/admin/src/admin/static/templates/login.html +++ b/dd-sso/admin/src/admin/static/templates/login.html @@ -41,7 +41,7 @@ - + diff --git a/dd-sso/docker/api/src/api/static/_templates/dd.css b/dd-sso/docker/api/src/api/static/_templates/dd.css index d474494..4cc547d 100644 --- a/dd-sso/docker/api/src/api/static/_templates/dd.css +++ b/dd-sso/docker/api/src/api/static/_templates/dd.css @@ -67,12 +67,6 @@ margin-right: 16px; } -#navbar-nextcloud #unified-search svg { - fill: black; - width: 16px; - height: 16px; -} - #navbar-nextcloud #unified-search a.header-menu__trigger .magnify-icon { width: 16px; height: 16px; @@ -178,6 +172,8 @@ #header div#navbar-menu-apps { display: flex; align-items: center; + width: 50px; + margin-right: 10px; } #header #navbar-menu-apps #menu-apps-btn { @@ -187,7 +183,7 @@ border-radius: 5px; background-color: #f0f0f0; position: relative; - left: -15px; + margin: auto; top: 1px; display: flex; align-items: center; diff --git a/dd.conf.sample b/dd.conf.sample index c2f71ba..25e8056 100644 --- a/dd.conf.sample +++ b/dd.conf.sample @@ -169,7 +169,7 @@ MOODLE_MEMORY_LIMIT=128M ## NEXTCLOUD # If enabled overrides nextcloud.yaml default image. # You usually do not want to change this, but instead rely on DD's version. -#NEXTCLOUD_IMG_OVERRIDE=nextcloud:24.0.10-fpm-alpine +#NEXTCLOUD_IMG_OVERRIDE=nextcloud:25.0.4-fpm-alpine ## ONLYOFFICE ONLYOFFICE_IMG=alehoho/oo-ce-docker-license:6.3.1.32