Skip to content

Commit

Permalink
Merge pull request #43368 from nextcloud/fix/trashbin-parse-dav
Browse files Browse the repository at this point in the history
[stable27] fix: Fix resolved nextcloud/files dep version
  • Loading branch information
Pytal committed Feb 9, 2024
2 parents 7fffac7 + c30c219 commit 59caee0
Show file tree
Hide file tree
Showing 77 changed files with 203 additions and 178 deletions.
5 changes: 2 additions & 3 deletions apps/settings/src/components/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ import Vue from 'vue'
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'
import { formatFileSize, parseFileSize } from '@nextcloud/files'
import userRow from './UserList/UserRow.vue'
Expand Down Expand Up @@ -487,10 +486,10 @@ export default {
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
const validQuota = parseFileSize(quota, true)
const validQuota = OC.Util.computerFileSize(quota)
if (validQuota !== null && validQuota >= 0) {
// unify format output
quota = formatFileSize(parseFileSize(quota, true))
quota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota))
this.newUser.quota = { id: quota, label: quota }
return this.newUser.quota
}
Expand Down
7 changes: 3 additions & 4 deletions apps/settings/src/components/UserList/UserRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@

<script>
import ClickOutside from 'vue-click-outside'
import { formatFileSize, parseFileSize } from '@nextcloud/files'
import {
NcPopoverMenu,
Expand Down Expand Up @@ -689,7 +688,7 @@ export default {
await this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'quota',
value: '' + parseFileSize(quota, true),
value: String(OC.Util.computerFileSize(quota)),
})
} catch (error) {
console.error(error)
Expand All @@ -707,10 +706,10 @@ export default {
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
const validQuota = parseFileSize(quota, true)
const validQuota = OC.Util.computerFileSize(quota)
if (validQuota !== null && validQuota >= 0) {
// unify format output
return this.setUserQuota(formatFileSize(parseFileSize(quota, true)))
return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)))
}
// if no valid do not change
return false
Expand Down
3 changes: 1 addition & 2 deletions apps/settings/src/store/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import api from './api.js'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import logger from '../logger.js'
import { parseFileSize } from '@nextcloud/files'

const orderGroups = function(groups, orderBy) {
/* const SORT_USERCOUNT = 1;
Expand Down Expand Up @@ -212,7 +211,7 @@ const mutations = {
},
setUserData(state, { userid, key, value }) {
if (key === 'quota') {
const humanValue = parseFileSize(value, true)
const humanValue = OC.Util.computerFileSize(value)
state.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value
} else {
state.users.find(user => user.id === userid)[key] = value
Expand Down
2 changes: 1 addition & 1 deletion core/js/tests/specs/coreSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ describe('Core base tests', function() {
['-1234 B', null],
['B', null],
['40/0', null],
['40,30 kb', null],
['40,30 kb', 41267],
[' 122.1 MB ', 128031130],
['122.1 MB ', 128031130],
[' 122.1 MB ', 128031130],
Expand Down
6 changes: 5 additions & 1 deletion core/src/OC/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import moment from 'moment'
import History from './util-history.js'
import OC from './index.js'
import { formatFileSize as humanFileSize } from '@nextcloud/files'
import { getCanonicalLocale } from '@nextcloud/l10n'

/**
* @param {any} t -
Expand Down Expand Up @@ -85,7 +86,10 @@ export default {
return null
}

const s = string.toLowerCase().trim()
const s = string
.toLocaleLowerCase(getCanonicalLocale())
.replaceAll(',', '.')
.trim()
let bytes = null

const bytesArray = {
Expand Down
1 change: 1 addition & 0 deletions dist/6799-6799.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/comments-comments-app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/comments-comments-app.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

63 changes: 32 additions & 31 deletions dist/core-common.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ object-assign
* 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
* Copyright jQuery Foundation and other contributors; Licensed MIT */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
*
*
Expand All @@ -481,6 +483,28 @@ object-assign
*
*/

/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
Expand Down Expand Up @@ -860,7 +884,7 @@ object-assign
*/

/**
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
* @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
Expand All @@ -882,9 +906,9 @@ object-assign
*/

/**
* @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author Ferdinand Thiessen <opensource@fthiessen.de>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0-or-later
*
Expand Down Expand Up @@ -922,6 +946,7 @@ object-assign
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

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

/**
* @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
*
* @author Ferdinand Thiessen <opensource@fthiessen.de>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0-or-later
*
Expand All @@ -970,32 +993,10 @@ object-assign
*/

/**
* @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
* @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Ferdinand Thiessen <opensource@fthiessen.de>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0-or-later
*
Expand All @@ -1006,7 +1007,7 @@ object-assign
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
Expand Down
2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-profile.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-profile.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-unified-search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-unified-search.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-unsupported-browser-redirect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/core-unsupported-browser-redirect.js.map

Large diffs are not rendered by default.

0 comments on commit 59caee0

Please sign in to comment.