Merge branch '6.1' into 6.2
authorAlexander Ebert <ebert@woltlab.com>
Thu, 2 Jan 2025 15:29:01 +0000 (16:29 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 2 Jan 2025 15:29:01 +0000 (16:29 +0100)
22 files changed:
1  2 
com.woltlab.wcf/templates/userCard.tpl
ts/WoltLabSuite/Core/Component/File/Upload.ts
ts/WoltLabSuite/Core/Component/Popover.ts
ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts
wcfsetup/install/files/acp/style/layout.scss
wcfsetup/install/files/js/WoltLabSuite/Core/Component/File/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js
wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php
wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php
wcfsetup/install/files/lib/data/attachment/Attachment.class.php
wcfsetup/install/files/lib/data/file/File.class.php
wcfsetup/install/files/lib/data/smiley/SmileyCache.class.php
wcfsetup/install/files/lib/data/stat/daily/StatDailyAction.class.php
wcfsetup/install/files/lib/data/user/UserProfile.class.php
wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php
wcfsetup/install/files/lib/system/event/listener/PreloadPhrasesCollectingListener.class.php
wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php
wcfsetup/install/files/lib/system/file/processor/FileProcessor.class.php
wcfsetup/install/files/lib/system/package/plugin/UserOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 37491ac0274396d3098b20f28723263a8d739e93,94758ddbb867d957cf6af496a6cb2022cad7c8ea..4c95609f81004488386bb1b93842b7f83290fa11
@@@ -3,8 -3,8 +3,8 @@@
                <div class="userCard__header__background">
                        <img
                                class="userCard__header__background__image"
 -                              src="{$user->getCoverPhoto()->getURL()}"
 +                              src="{$user->getCoverPhoto()->getThumbnailURL()}"
-                               loading="lazy">
+                               alt="">
                </div>
                <div class="userCard__header__avatar">
                        {user object=$user type='avatar64' ariaHidden='true' tabindex='-1'}
index 18b67b91cce77783e7cfb5b203d34868bf563eb6,476a94d6f92417451ce7173fe7c5478b163a0787..a232d3dfa8bd1c7b5d9a518e86b041d055f43d68
@@@ -269,30 -268,13 +269,34 @@@ export function setup(): void 
          return;
        }
  
 -      void resizeImage(element, file)
 +      if (element.dataset.cropperConfiguration) {
 +        const cropperConfiguration = JSON.parse(element.dataset.cropperConfiguration) as CropperConfiguration;
 +
 +        void cropImage(element, file, cropperConfiguration)
 +          .then((resizedFile) => {
 +            void upload(element, resizedFile);
 +          })
 +          .catch((e) => {
 +            element.dispatchEvent(new CustomEvent("cancel"));
 +
 +            if (e === undefined) {
 +              // User closed the dialog.
 +              return;
 +            }
 +
 +            if (e instanceof Error) {
 +              innerError(element, e.message);
 +            }
 +          });
 +      } else {
-         void resizeImage(element, file).then((resizedFile) => {
-           void upload(element, resizedFile);
++        void resizeImage(element, file)
+         .then((resizedFile) => {
 -          void upload(element, resizedFile);
 -        })
++            void upload(element, resizedFile);
++          })
+         .catch(() => {
+           innerError(element, getPhrase("wcf.upload.error.damagedImageFile", { filename: file.name }));
          });
 +      }
      });
  
      element.addEventListener("ckeditorDrop", (event: CustomEvent<CkeditorDropEvent>) => {
index 0ae8dd7508c56d7ffd5378ba66ed6bb6e4e21440,e2cc2648551c499fde29fd4093ea5e44342d938b..3e0faa8929dceaa5e84403d6dfff120b4e12b33f
@@@ -1041,6 -1041,29 +1041,33 @@@ html[data-color-scheme="dark"] 
        text-align: center;
  }
  
 +#acpDashboardSortableContainer .sortableNode {
 +      border-bottom: none;
 +}
++
+ .acpDashboardBox__usersAwaitingApproval {
+       display: flex;
+       flex-direction: column;
+       row-gap: 10px;
+ }
+ .acpDashboardBox__usersAwaitingApproval__user {
+       position: relative;
+ }
+ .acpDashboardBox__usersAwaitingApproval__avatar {
+       align-content: center;
+ }
+ .acpDashboardBox__usersAwaitingApproval__link::after {
+       content: "";
+       inset: 0;
+       position: absolute;
+ }
+ .acpDashboardBox__usersAwaitingApproval__meta {
+       color: var(--wcfContentDimmedText);
+       margin-top: -5px;
+       @include wcfFontSmall;
+ }
index 9b00148b846c1b64b1b85903285bcc75947a54b6,fc70bf44f20d9e0695a8fa3eb52e04bc6f00e3c8..c0cbee68c0ba5142681241528497a13e626165be
@@@ -183,28 -183,13 +183,32 @@@ define(["require", "exports", "tslib", 
                  else if (!validateFileSize(element, file)) {
                      return;
                  }
 -                void resizeImage(element, file)
 -                    .then((resizedFile) => {
 -                    void upload(element, resizedFile);
 -                })
 -                    .catch(() => {
 -                    (0, Util_1.innerError)(element, (0, Language_1.getPhrase)("wcf.upload.error.damagedImageFile", { filename: file.name }));
 -                });
 +                if (element.dataset.cropperConfiguration) {
 +                    const cropperConfiguration = JSON.parse(element.dataset.cropperConfiguration);
 +                    void (0, Cropper_1.cropImage)(element, file, cropperConfiguration)
 +                        .then((resizedFile) => {
 +                        void upload(element, resizedFile);
 +                    })
 +                        .catch((e) => {
 +                        element.dispatchEvent(new CustomEvent("cancel"));
 +                        if (e === undefined) {
 +                            // User closed the dialog.
 +                            return;
 +                        }
 +                        if (e instanceof Error) {
 +                            (0, Util_1.innerError)(element, e.message);
 +                        }
 +                    });
 +                }
 +                else {
-                     void resizeImage(element, file).then((resizedFile) => {
++                    void resizeImage(element, file)
++                        .then((resizedFile) => {
 +                        void upload(element, resizedFile);
++                    })
++                        .catch(() => {
++                        (0, Util_1.innerError)(element, (0, Language_1.getPhrase)("wcf.upload.error.damagedImageFile", { filename: file.name }));
 +                    });
 +                }
              });
              element.addEventListener("ckeditorDrop", (event) => {
                  const { file } = event.detail;
index 01f659eea135c149ab321c40d88546fd2934852e,13c7e60ae605302733b0a0ba2ddec53f8dfc9ad3..3c6626ee1f5a9ea45c6a3c738a186aba2af17c99
@@@ -150,10 -150,9 +150,11 @@@ final class PreloadPhrasesCollectingLis
  
          $event->preload('wcf.style.changeStyle');
  
 +        $event->preload('wcf.upload.crop.image');
+         $event->preload('wcf.upload.error.damagedImageFile');
          $event->preload('wcf.upload.error.fileExtensionNotPermitted');
          $event->preload('wcf.upload.error.fileSizeTooLarge');
 +        $event->preload('wcf.upload.error.image.tooSmall');
          $event->preload('wcf.upload.error.maximumCountReached');
          $event->preload('wcf.upload.error.delete.permissionDenied');
          $event->preload('wcf.upload.error.delete.unknownError');
index d766b7f6201cc21670f3c5406ff0bfa605a6b073,3d8f9be35ed4a218940a33545f4f46e34a2e0ced..a9f63fd2ccd532deb15f95f9a9b175a78c121bc8
@@@ -10,7 -11,9 +10,8 @@@ use wcf\data\user\cover\photo\UserCover
  use wcf\data\user\User;
  use wcf\data\user\UserEditor;
  use wcf\data\user\UserList;
+ use wcf\data\user\UserProfile;
  use wcf\data\user\UserProfileAction;
 -use wcf\data\user\UserProfileList;
  use wcf\system\bbcode\BBCodeHandler;
  use wcf\system\database\util\PreparedStatementConditionBuilder;
  use wcf\system\exception\SystemException;
@@@ -48,8 -49,9 +49,9 @@@ final class UserRebuildDataWorker exten
          parent::initObjectList();
  
          $this->objectList->sqlSelects = 'user_option_value.userOption' . User::getUserOptionID('aboutMe') . ' AS aboutMe';
+         $this->objectList->sqlSelects .= ',user_option_value.userOption' . User::getUserOptionID('canViewOnlineStatus') . ' AS canViewOnlineStatus';
          $this->objectList->sqlJoins = "
 -            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
 +            LEFT JOIN   wcf1_user_option_value user_option_value
              ON          user_option_value.userID = user_table.userID";
      }
  
Simple merge
Simple merge