aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-21 12:03:52 +0100
committerGitHub <noreply@github.com>2024-02-21 12:03:52 +0100
commit21bc3a3de70f6aa0ca44e0344327d2f2ce8390dc (patch)
tree0ea83b9e75e4ac58e89c2a95708039594917d9f3 /apps
parent1442477d2dea14a353d6d6d85faa5d9483efe957 (diff)
parent0d4a12b5db445cf8ad8a427ac2575a8339f1e1eb (diff)
downloadnextcloud-server-21bc3a3de70f6aa0ca44e0344327d2f2ce8390dc.tar.gz
nextcloud-server-21bc3a3de70f6aa0ca44e0344327d2f2ce8390dc.zip
Merge pull request #43672 from nextcloud/backport/43666/stable28
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/components/NavigationQuota.vue18
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/files/src/components/NavigationQuota.vue b/apps/files/src/components/NavigationQuota.vue
index 943d61cf0f5..8f96481232d 100644
--- a/apps/files/src/components/NavigationQuota.vue
+++ b/apps/files/src/components/NavigationQuota.vue
@@ -88,8 +88,17 @@ export default {
},
mounted() {
- // Warn the user if the available storage is 0 on page load
- if (this.storageStats?.free <= 0) {
+ // If the user has a quota set, warn if the available account storage is <=0
+ //
+ // NOTE: This doesn't catch situations where actual *server*
+ // disk (non-quota) space is low, but those should probably
+ // be handled differently anyway since a regular user can't
+ // can't do much about them (If we did want to indicate server disk
+ // space matters to users, we'd probably want to use a warning
+ // specific to that situation anyhow. So this covers warning covers
+ // our primary day-to-day concern (individual account quota usage).
+ //
+ if (this.storageStats?.quota > 0 && this.storageStats?.free <= 0) {
this.showStorageFullWarning()
}
},
@@ -122,8 +131,9 @@ export default {
throw new Error('Invalid storage stats')
}
- // Warn the user if the available storage changed from > 0 to 0
- if (this.storageStats?.free > 0 && response.data.data?.free <= 0) {
+ // Warn the user if the available account storage changed from > 0 to 0
+ // (unless only because quota was intentionally set to 0 by admin in the interim)
+ if (this.storageStats?.free > 0 && response.data.data?.free <= 0 && response.data.data?.quota > 0) {
this.showStorageFullWarning()
}