Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5dad1f9 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

files toast msg fix

parent f4a76d14
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ RUN patch -u ${BASE_DIR}/lib/private/legacy/OC_Helper.php -i ${TMP_PATCH_DIR}/01
RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch
RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch
RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch
RUN patch -u ${BASE_DIR}/core/js/dist/main.js -i ${TMP_PATCH_DIR}/020-patch_maintoast.patch
RUN patch -u ${BASE_DIR}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/020-patch_files.patch
RUN rm -rf ${TMP_PATCH_DIR}

# show reset pwd page with a query param
+42 −0
Original line number Diff line number Diff line
--- ./apps/files/js/files.js	2022-09-23 11:28:21.551766200 +0530
+++ ./apps/files/js/files-new.js	2022-09-26 11:55:35.003857700 +0530
@@ -180,6 +180,19 @@
 						{type : 'error'}
 					);
 				} else {
+					 var exist=0;
+					 $('body').find('.toastify').each(function(i, obj) {
+						var toastmsg=$(obj).text();
+						toastmsg=toastmsg.replace('✖', '').trim();
+						actualmsg=t('files','Your storage is full, files cannot be updated or synced anymore!');
+						if(toastmsg===actualmsg){
+							exist=1;
+						}
+					});
+					if(exist==1){
+						return;
+					}
+					var exist=0 \n\t\t$('body').find('.toastify').each(function(i, obj) { \n\t\t\tvar toastmsg=$(obj).text()\n\t\t\ttoastmsg=toastmsg.replace('✖', '').trim()\n\t\t\tactualmsg=t('files','Your storage is full, files cannot be updated or synced anymore!')\n\t\t\tif(toastmsg===actualmsg){\n\t\t\t\texist=1\n\t\t\t}\n\t\t})\n\t\tif(exist==1){\n\t\t\treturn;\n\t\t}\n\t\t
 					OC.Notification.show(t('files',
 						'Your storage is full, files cannot be updated or synced anymore!'),
 						{type: 'error'}
@@ -209,6 +222,19 @@
 						{type : 'error'}
 					);
 				} else {
+					 var exist=0;
+					 $('body').find('.toastify').each(function(i, obj) {
+						var toastmsg=$(obj).text();
+						toastmsg=toastmsg.replace('✖', '').trim();
+						actualmsg=t('files', 'Your storage is almost full ({usedSpacePercent}%).',
+						{usedSpacePercent: usedSpacePercent});
+						if(toastmsg===actualmsg){
+							exist=1;
+						}
+					});
+					if(exist==1){
+						return;
+					}
 					OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%).',
 						{usedSpacePercent: usedSpacePercent}),
 						{type : 'error'}

patches/020-patch_maintoast.patch

deleted100644 → 0
+0 −11

File deleted.

Preview size limit exceeded, changes collapsed.