diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-10-04 12:57:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 12:57:56 +0200 |
commit | f312cfade043bf7f8139ecd39ab196222a50a6c2 (patch) | |
tree | 0d1d17ae78e3df205bb89e1a29e63e5f99b02457 /apps | |
parent | 0bca480efdf4f88e90203eb80be40ad4822da9c4 (diff) | |
parent | 0dfdf3ee9978fdfd119acaa98b8747026d60599b (diff) | |
download | nextcloud-server-f312cfade043bf7f8139ecd39ab196222a50a6c2.tar.gz nextcloud-server-f312cfade043bf7f8139ecd39ab196222a50a6c2.zip |
Merge pull request #22913 from nextcloud/group-folder-quota-warning-mountpoint
add mount point to quota warning message
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/files.js | 18 | ||||
-rw-r--r-- | apps/files/lib/Helper.php | 1 |
2 files changed, 12 insertions, 7 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 5481ece055c..6dbd87c1e2e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -73,6 +73,7 @@ $('#upload.button').attr('data-original-title', response.data.maxHumanFilesize); $('#usedSpacePercent').val(response.data.usedSpacePercent); $('#usedSpacePercent').data('mount-type', response.data.mountType); + $('#usedSpacePercent').data('mount-point', response.data.mountPoint); $('#owner').val(response.data.owner); $('#ownerDisplayName').val(response.data.ownerDisplayName); Files.displayStorageWarnings(); @@ -157,7 +158,8 @@ var usedSpacePercent = $('#usedSpacePercent').val(), owner = $('#owner').val(), ownerDisplayName = $('#ownerDisplayName').val(), - mountType = $('#usedSpacePercent').data('mount-type'); + mountType = $('#usedSpacePercent').data('mount-type'), + mountPoint = $('#usedSpacePercent').data('mount-point'); if (usedSpacePercent > 98) { if (owner !== OC.getCurrentUser().uid) { OC.Notification.show(t('files', 'Storage of {owner} is full, files can not be updated or synced anymore!', @@ -165,12 +167,14 @@ ); } else if (mountType === 'group') { OC.Notification.show(t('files', - 'This group folder is full, files can not be updated or synced anymore!'), + 'Group folder "{mountPoint}" is full, files can not be updated or synced anymore!', + {mountPoint: mountPoint}), {type: 'error'} ); } else if (mountType === 'external') { OC.Notification.show(t('files', - 'This external storage is full, files can not be updated or synced anymore!'), + 'External storage "{mountPoint}" is full, files can not be updated or synced anymore!', + {mountPoint: mountPoint}), {type : 'error'} ); } else { @@ -192,14 +196,14 @@ ); } else if (mountType === 'group') { OC.Notification.show(t('files', - 'This group folder is almost full ({usedSpacePercent}%).', - {usedSpacePercent: usedSpacePercent}), + 'Group folder "{mountPoint}" is almost full ({usedSpacePercent}%).', + {mountPoint: mountPoint, usedSpacePercent: usedSpacePercent}), {type : 'error'} ); } else if (mountType === 'external') { OC.Notification.show(t('files', - 'This external storage is almost full ({usedSpacePercent}%).', - {usedSpacePercent: usedSpacePercent}), + 'External storage "{mountPoint}" is almost full ({usedSpacePercent}%).', + {mountPoint: mountPoint, usedSpacePercent: usedSpacePercent}), {type : 'error'} ); } else { diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 1f728565ca6..2d5a3e2f26e 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -64,6 +64,7 @@ class Helper { 'owner' => $storageInfo['owner'], 'ownerDisplayName' => $storageInfo['ownerDisplayName'], 'mountType' => $storageInfo['mountType'], + 'mountPoint' => $storageInfo['mountPoint'], ]; } |