Skip to content

Commit 59caee0

Browse files
authored
Merge pull request #43368 from nextcloud/fix/trashbin-parse-dav
[stable27] fix: Fix resolved nextcloud/files dep version
2 parents 7fffac7 + c30c219 commit 59caee0

77 files changed

Lines changed: 203 additions & 178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/settings/src/components/UserList.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ import Vue from 'vue'
262262
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
263263
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
264264
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'
265-
import { formatFileSize, parseFileSize } from '@nextcloud/files'
266265
267266
import userRow from './UserList/UserRow.vue'
268267
@@ -487,10 +486,10 @@ export default {
487486
*/
488487
validateQuota(quota) {
489488
// only used for new presets sent through @Tag
490-
const validQuota = parseFileSize(quota, true)
489+
const validQuota = OC.Util.computerFileSize(quota)
491490
if (validQuota !== null && validQuota >= 0) {
492491
// unify format output
493-
quota = formatFileSize(parseFileSize(quota, true))
492+
quota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota))
494493
this.newUser.quota = { id: quota, label: quota }
495494
return this.newUser.quota
496495
}

apps/settings/src/components/UserList/UserRow.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@
268268

269269
<script>
270270
import ClickOutside from 'vue-click-outside'
271-
import { formatFileSize, parseFileSize } from '@nextcloud/files'
272271
273272
import {
274273
NcPopoverMenu,
@@ -689,7 +688,7 @@ export default {
689688
await this.$store.dispatch('setUserData', {
690689
userid: this.user.id,
691690
key: 'quota',
692-
value: '' + parseFileSize(quota, true),
691+
value: String(OC.Util.computerFileSize(quota)),
693692
})
694693
} catch (error) {
695694
console.error(error)
@@ -707,10 +706,10 @@ export default {
707706
*/
708707
validateQuota(quota) {
709708
// only used for new presets sent through @Tag
710-
const validQuota = parseFileSize(quota, true)
709+
const validQuota = OC.Util.computerFileSize(quota)
711710
if (validQuota !== null && validQuota >= 0) {
712711
// unify format output
713-
return this.setUserQuota(formatFileSize(parseFileSize(quota, true)))
712+
return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)))
714713
}
715714
// if no valid do not change
716715
return false

apps/settings/src/store/users.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import api from './api.js'
3131
import axios from '@nextcloud/axios'
3232
import { generateOcsUrl } from '@nextcloud/router'
3333
import logger from '../logger.js'
34-
import { parseFileSize } from '@nextcloud/files'
3534

3635
const orderGroups = function(groups, orderBy) {
3736
/* const SORT_USERCOUNT = 1;
@@ -212,7 +211,7 @@ const mutations = {
212211
},
213212
setUserData(state, { userid, key, value }) {
214213
if (key === 'quota') {
215-
const humanValue = parseFileSize(value, true)
214+
const humanValue = OC.Util.computerFileSize(value)
216215
state.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value
217216
} else {
218217
state.users.find(user => user.id === userid)[key] = value

core/js/tests/specs/coreSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ describe('Core base tests', function() {
337337
['-1234 B', null],
338338
['B', null],
339339
['40/0', null],
340-
['40,30 kb', null],
340+
['40,30 kb', 41267],
341341
[' 122.1 MB ', 128031130],
342342
['122.1 MB ', 128031130],
343343
[' 122.1 MB ', 128031130],

core/src/OC/util.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import moment from 'moment'
2626
import History from './util-history.js'
2727
import OC from './index.js'
2828
import { formatFileSize as humanFileSize } from '@nextcloud/files'
29+
import { getCanonicalLocale } from '@nextcloud/l10n'
2930

3031
/**
3132
* @param {any} t -
@@ -85,7 +86,10 @@ export default {
8586
return null
8687
}
8788

88-
const s = string.toLowerCase().trim()
89+
const s = string
90+
.toLocaleLowerCase(getCanonicalLocale())
91+
.replaceAll(',', '.')
92+
.trim()
8993
let bytes = null
9094

9195
const bytesArray = {

dist/6799-6799.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/comments-comments-app.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/comments-comments-app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-common.js

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/core-common.js.LICENSE.txt

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ object-assign
473473
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
474474
* Copyright jQuery Foundation and other contributors; Licensed MIT */
475475

476+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
477+
476478
/**
477479
*
478480
*
@@ -481,6 +483,28 @@ object-assign
481483
*
482484
*/
483485

486+
/**
487+
* @copyright 2019 Christoph Wurst <[email protected]>
488+
*
489+
* @author Christoph Wurst <[email protected]>
490+
*
491+
* @license AGPL-3.0-or-later
492+
*
493+
* This program is free software: you can redistribute it and/or modify
494+
* it under the terms of the GNU Affero General Public License as
495+
* published by the Free Software Foundation, either version 3 of the
496+
* License, or (at your option) any later version.
497+
*
498+
* This program is distributed in the hope that it will be useful,
499+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
500+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
501+
* GNU Affero General Public License for more details.
502+
*
503+
* You should have received a copy of the GNU Affero General Public License
504+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
505+
*
506+
*/
507+
484508
/**
485509
* @copyright 2019 Christoph Wurst <[email protected]>
486510
*
@@ -860,7 +884,7 @@ object-assign
860884
*/
861885

862886
/**
863-
* @copyright Copyright (c) 2022 John Molakvoæ <[email protected]>
887+
* @copyright Copyright (c) 2021 John Molakvoæ <[email protected]>
864888
*
865889
* @author John Molakvoæ <[email protected]>
866890
*
@@ -882,9 +906,9 @@ object-assign
882906
*/
883907

884908
/**
885-
* @copyright Copyright (c) 2023 Ferdinand Thiessen <[email protected]>
909+
* @copyright Copyright (c) 2022 John Molakvoæ <[email protected]>
886910
*
887-
* @author Ferdinand Thiessen <[email protected]>
911+
* @author John Molakvoæ <[email protected]>
888912
*
889913
* @license AGPL-3.0-or-later
890914
*
@@ -922,6 +946,7 @@ object-assign
922946
*
923947
* You should have received a copy of the GNU Affero General Public License
924948
* along with this program. If not, see <http://www.gnu.org/licenses/>.
949+
*
925950
*/
926951

927952
/**
@@ -938,19 +963,17 @@ object-assign
938963
*
939964
* This program is distributed in the hope that it will be useful,
940965
* but WITHOUT ANY WARRANTY; without even the implied warranty of
941-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
966+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
942967
* GNU Affero General Public License for more details.
943968
*
944969
* You should have received a copy of the GNU Affero General Public License
945970
* along with this program. If not, see <http://www.gnu.org/licenses/>.
946-
*
947971
*/
948972

949973
/**
950974
* @copyright Copyright (c) 2023 Ferdinand Thiessen <[email protected]>
951975
*
952976
* @author Ferdinand Thiessen <[email protected]>
953-
* @author John Molakvoæ <[email protected]>
954977
*
955978
* @license AGPL-3.0-or-later
956979
*
@@ -970,32 +993,10 @@ object-assign
970993
*/
971994

972995
/**
973-
* @copyright Copyright (c) 2023 John Molakvoæ <[email protected]>
974-
*
975-
* @author John Molakvoæ <[email protected]>
976-
*
977-
* @license AGPL-3.0-or-later
978-
*
979-
* This program is free software: you can redistribute it and/or modify
980-
* it under the terms of the GNU Affero General Public License as
981-
* published by the Free Software Foundation, either version 3 of the
982-
* License, or (at your option) any later version.
983-
*
984-
* This program is distributed in the hope that it will be useful,
985-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
986-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
987-
* GNU Affero General Public License for more details.
988-
*
989-
* You should have received a copy of the GNU Affero General Public License
990-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
991-
*
992-
*/
993-
994-
/**
995-
* @copyright Copyright (c) 2023 John Molakvoæ <[email protected]>
996+
* @copyright Copyright (c) 2023 Ferdinand Thiessen <[email protected]>
996997
*
997-
* @author John Molakvoæ <[email protected]>
998998
* @author Ferdinand Thiessen <[email protected]>
999+
* @author John Molakvoæ <[email protected]>
9991000
*
10001001
* @license AGPL-3.0-or-later
10011002
*
@@ -1006,7 +1007,7 @@ object-assign
10061007
*
10071008
* This program is distributed in the hope that it will be useful,
10081009
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1009-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1010+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10101011
* GNU Affero General Public License for more details.
10111012
*
10121013
* You should have received a copy of the GNU Affero General Public License

0 commit comments

Comments
 (0)