Merge branch 'file-upload-image-crop' into 6.2-user-coverphoto
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 12 Dec 2024 10:09:07 +0000 (11:09 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 12 Dec 2024 10:09:07 +0000 (11:09 +0100)
# Conflicts:
# com.woltlab.wcf/templates/user.tpl
# ts/WoltLabSuite/Core/Bootstrap.ts
# ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts
# ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Upload.ts
# wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js
# wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.js
# wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/CoverPhoto/Upload.js

1  2 
com.woltlab.wcf/fileDelete.xml
com.woltlab.wcf/templates/user.tpl
ts/WoltLabSuite/Core/Bootstrap.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

Simple merge
index 88d36daefcf178a4b76ed75f8062236080ff4b9b,99fbb3eac0ea9f31f360bc79d5a9993e3eb6bbc5..4e71cfeb187de2c6f111861efb596b14d8d4b699
@@@ -61,9 -49,7 +49,7 @@@
                                        'wcf.user.activityPoint': '{jslang}wcf.user.activityPoint{/jslang}'
                                });
                        {/if}
-                       
-                       new WCF.User.Profile.TabMenu({@$user->userID});
--                      
++
                        {if $user->canEdit() || ($__wcf->getUser()->userID == $user->userID && $user->canEditOwnProfile())}
                                WCF.Language.addObject({
                                        'wcf.user.editProfile': '{jslang}wcf.user.editProfile{/jslang}'
index cb0032697195a33fe9bd2f7822885cf49919de6c,b58cd698786524490fd282b4b61fbd4ca6cfa30a..3b55b9c600943d24df7f5f6ed3b2013f1db21ff8
@@@ -188,9 -188,9 +188,12 @@@ export function setup(options: Boostrap
      console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead.");
      void import("./Component/Image/Viewer").then(({ setupLegacy }) => setupLegacy());
    });
+   whenFirstSeen(".jsEnablesOptions", () => {
+     void import("./Component/Option/Enable").then(({ setup }) => setup());
+   });
 +  whenFirstSeen("[data-edit-cover-photo]", () => {
 +    void import("./Component/User/CoverPhoto").then(({ setup }) => setup());
 +  });
  
    // Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
    // when widget form elements are placed in a dialog.
index bcf44c189cdb3a449797fb902cd4c57df114cacc,711af341576a3fb017552401ba55f1e615368459..71e10909f398db29103c55a0ed138562eca05558
@@@ -153,9 -153,9 +153,12 @@@ define(["require", "exports", "tslib", 
              console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead.");
              void new Promise((resolve_12, reject_12) => { require(["./Component/Image/Viewer"], resolve_12, reject_12); }).then(tslib_1.__importStar).then(({ setupLegacy }) => setupLegacy());
          });
+         (0, LazyLoader_1.whenFirstSeen)(".jsEnablesOptions", () => {
+             void new Promise((resolve_13, reject_13) => { require(["./Component/Option/Enable"], resolve_13, reject_13); }).then(tslib_1.__importStar).then(({ setup }) => setup());
+         });
 +        (0, LazyLoader_1.whenFirstSeen)("[data-edit-cover-photo]", () => {
 +            void new Promise((resolve_13, reject_13) => { require(["./Component/User/CoverPhoto"], resolve_13, reject_13); }).then(tslib_1.__importStar).then(({ setup }) => setup());
 +        });
          // Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
          // when widget form elements are placed in a dialog.
          const observer = new MutationObserver((mutations) => {
index 015b2dbabdee47b09953c1292f10b2073acf72eb,0647427a88f5c572904a7f736b10515a2471f699..6ab78f2060caf0812c6bacbb29fa809798d65def
@@@ -5268,10 -5272,13 +5272,13 @@@ Sobald {if LANGUAGE_USE_INFORMAL_VARIAN
                <item name="wcf.user.coverPhoto.delete"><![CDATA[Titelbild löschen]]></item>
                <item name="wcf.user.coverPhoto.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du dein{else}Wollen Sie Ihr{/if} Titelbild wirklich löschen? Nach dem Löschen wird wieder das Standard-Bild angezeigt.]]></item>
                <item name="wcf.user.coverPhoto.edit"><![CDATA[Titelbild bearbeiten]]></item>
 -              <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[Der Administrator hat{if $__wcf->user->coverPhotoHash} {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} derzeitiges Titelbild gesperrt und{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if} die weitere Nutzungsberechtigung der Titelbild-Funktion {if !$__wcf->user->disableCoverPhotoReason}entzogen.{else} aus folgenden Gründen entzogen: {$__wcf->user->disableCoverPhotoReason}{/if}]]></item>
 +              <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[Der Administrator hat{if $__wcf->user->coverPhotoFileID} {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} derzeitiges Titelbild gesperrt und{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if} die weitere Nutzungsberechtigung der Titelbild-Funktion {if !$__wcf->user->disableCoverPhotoReason}entzogen.{else} aus folgenden Gründen entzogen: {$__wcf->user->disableCoverPhotoReason}{/if}]]></item>
                <item name="wcf.user.coverPhoto.noImage"><![CDATA[Der Benutzer hat noch kein Titelbild hochgeladen.]]></item>
                <item name="wcf.user.coverPhoto.upload"><![CDATA[Titelbild hochladen]]></item>
-               <item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimale Bildgröße: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} Pixel<br>Maximale Bildgröße: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} Pixel<br>Erlaubte Dateiendungen: gif, jpg, jpeg, png, webp<br>Maximale Dateigröße: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}]]></item>
+               <item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimale Bildgröße: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} Pixel<br>
+ Maximale Bildgröße: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} Pixel<br>
+ Maximale Dateigröße: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}<br>
+ Erlaubte Dateiendungen: gif, jpg, jpeg, png, webp]]></item>
                <item name="wcf.user.coverPhoto.upload.error.badImage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} kein gültiges Bild hochgeladen.]]></item>
                <item name="wcf.user.coverPhoto.upload.error.fileExtension"><![CDATA[Die Datei hat eine ungültige Dateiendung.]]></item>
                <item name="wcf.user.coverPhoto.upload.error.maxHeight"><![CDATA[Das Bild ist zu hoch.]]></item>
index bc7977e7773d96612246782fdbcf30387424ff5f,c424ff3a02f428a4f44bf124eeb2cfa3d6f3eb45..eff454c586bf38c792fbf66cc5df513fe3b68f35
@@@ -5267,10 -5271,13 +5271,13 @@@ You also received a list of backup code
                <item name="wcf.user.coverPhoto.delete"><![CDATA[Delete Cover Photo]]></item>
                <item name="wcf.user.coverPhoto.delete.confirmMessage"><![CDATA[Do you really want to delete your cover photo? This will replace your current photo with the default image.]]></item>
                <item name="wcf.user.coverPhoto.edit"><![CDATA[Edit Cover Photo]]></item>
 -              <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[The administrators {if $__wcf->user->coverPhotoHash}have blocked your cover photo and {/if}disallowed you from using a cover photo{if $__wcf->user->disableCoverPhotoReason}: {$__wcf->user->disableCoverPhotoReason}{/if}.]]></item>
 +              <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[The administrators {if $__wcf->user->coverPhotoFileID}have blocked your cover photo and {/if}disallowed you from using a cover photo{if $__wcf->user->disableCoverPhotoReason}: {$__wcf->user->disableCoverPhotoReason}{/if}.]]></item>
                <item name="wcf.user.coverPhoto.noImage"><![CDATA[The user has not yet uploaded a cover photo.]]></item>
                <item name="wcf.user.coverPhoto.upload"><![CDATA[Upload Cover Photo]]></item>
-               <item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimum Image Size: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} pixels<br>Maximum Image Size: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} pixels<br>Allowed File Extensions: gif, jpg, jpeg, png, webp<br>Maximum Filesize: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}]]></item>
+               <item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimum image size: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} pixels<br>
+ Maximum image size: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} pixels<br>
+ Maximum file size: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}<br>
+ Allowed extensions: gif, jpg, jpeg, png, webp]]></item>
                <item name="wcf.user.coverPhoto.upload.error.badImage"><![CDATA[The uploaded file is not an image.]]></item>
                <item name="wcf.user.coverPhoto.upload.error.fileExtension"><![CDATA[The file has an invalid extension.]]></item>
                <item name="wcf.user.coverPhoto.upload.error.maxHeight"><![CDATA[The image is too tall.]]></item>