diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-12-06 14:09:09 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2024-01-18 09:11:21 +0100 |
commit | fa2cf8d80538348b9a9c969f350ae49e2260b80c (patch) | |
tree | 863c4a3b33c1014122354d87f02ca8f27adde7e9 /apps/settings/src/components/UserList/UserRow.vue | |
parent | 08801969ea6adeb505a91562b0b6f65317e47fc1 (diff) | |
download | nextcloud-server-fa2cf8d80538348b9a9c969f350ae49e2260b80c.tar.gz nextcloud-server-fa2cf8d80538348b9a9c969f350ae49e2260b80c.zip |
fix(Users/Quota setting): Prevent floating point value from getting truncated in locales other than english
fixes #18468
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'apps/settings/src/components/UserList/UserRow.vue')
-rw-r--r-- | apps/settings/src/components/UserList/UserRow.vue | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/settings/src/components/UserList/UserRow.vue b/apps/settings/src/components/UserList/UserRow.vue index dddf5abef8a..2e507107b73 100644 --- a/apps/settings/src/components/UserList/UserRow.vue +++ b/apps/settings/src/components/UserList/UserRow.vue @@ -268,6 +268,7 @@ <script> import ClickOutside from 'vue-click-outside' +import { formatFileSize, parseFileSize } from '@nextcloud/files' import { NcPopoverMenu, @@ -688,7 +689,7 @@ export default { await this.$store.dispatch('setUserData', { userid: this.user.id, key: 'quota', - value: quota, + value: '' + parseFileSize(quota, true), }) } catch (error) { console.error(error) @@ -706,10 +707,10 @@ export default { */ validateQuota(quota) { // only used for new presets sent through @Tag - const validQuota = OC.Util.computerFileSize(quota) + const validQuota = parseFileSize(quota, true) if (validQuota !== null && validQuota >= 0) { // unify format output - return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota))) + return this.setUserQuota(formatFileSize(parseFileSize(quota, true))) } // if no valid do not change return false |