Skip to content

Commit

Permalink
Merge pull request #7466 from owncloud/merge-master
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
Jan authored Aug 16, 2022
2 parents 007f880 + 4e2d12c commit d06baa8
Show file tree
Hide file tree
Showing 88 changed files with 1,434 additions and 1,216 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Summary
* Bugfix - Add Droparea again: [#7080](https://github.com/owncloud/web/issues/7080)
* Bugfix - Batch deleting multiple files: [#7357](https://github.com/owncloud/web/pull/7357)
* Bugfix - Context menu misplaced when triggered by keyboard navigation: [#7230](https://github.com/owncloud/web/pull/7230)
* Bugfix - Datetime formatting: [#7443](https://github.com/owncloud/web/pull/7443)
* Bugfix - Decline share not possible: [#7379](https://github.com/owncloud/web/pull/7379)
* Bugfix - Prevent error when pasting with empty clipboard: [#7214](https://github.com/owncloud/web/pull/7214)
* Bugfix - Re-introduce dynamic app name in document title: [#7173](https://github.com/owncloud/web/pull/7173)
* Bugfix - External apps fixes: [#7166](https://github.com/owncloud/web/pull/7166)
* Bugfix - Files pagination scroll to top: [#7322](https://github.com/owncloud/web/pull/7322)
* Bugfix - File size formatting: [#7443](https://github.com/owncloud/web/pull/7443)
* Bugfix - Hide empty trash bin modal on error: [#7248](https://github.com/owncloud/web/pull/7248)
* Bugfix - Left sidebar active navigation item has wrong cursor: [#7348](https://github.com/owncloud/web/pull/7348)
* Bugfix - Link indicator on "Shared via link"-page: [#7355](https://github.com/owncloud/web/pull/7355)
Expand Down Expand Up @@ -50,6 +52,7 @@ Summary
* Bugfix - Access token renewal during upload: [#7240](https://github.com/owncloud/web/issues/7240)
* Bugfix - Tooltips not shown on disabled create and upload button: [#7376](https://github.com/owncloud/web/pull/7376)
* Bugfix - Upload overlay progress bar spacing: [#7297](https://github.com/owncloud/web/pull/7297)
* Bugfix - User management app close side bar throws error: [#7445](https://github.com/owncloud/web/pull/7445)
* Bugfix - Users list not loading if user has no role: [#7332](https://github.com/owncloud/web/pull/7332)
* Bugfix - Versions of shared files not visible: [#7313](https://github.com/owncloud/web/pull/7313)
* Enhancement - Add app top bar component: [#7217](https://github.com/owncloud/web/pull/7217)
Expand Down Expand Up @@ -77,6 +80,7 @@ Summary
* Enhancement - Update ODS to v14.0.0-alpha.12: [#7355](https://github.com/owncloud/web/pull/7355)
* Enhancement - User management app saved dialog: [#7375](https://github.com/owncloud/web/pull/7375)
* Enhancement - Introduce group assignments: [#7176](https://github.com/owncloud/web/pull/7176)
* Enhancement - User management app edit quota: [#7182](https://github.com/owncloud/web/pull/7182)

Details
-------
Expand Down Expand Up @@ -105,6 +109,14 @@ Details
https://github.com/owncloud/web/pull/7314
https://github.com/owncloud/web/pull/7386

* Bugfix - Datetime formatting: [#7443](https://github.com/owncloud/web/pull/7443)

We've adjusted date time formatting to show a less verbose format (e.g. hiding the time zone and
using month abbreviations).

https://github.com/owncloud/web/issues/7336
https://github.com/owncloud/web/pull/7443

* Bugfix - Decline share not possible: [#7379](https://github.com/owncloud/web/pull/7379)

We've fixed a bug where declining an accepted share in the dropdown next to the breadcrumb was
Expand Down Expand Up @@ -142,6 +154,12 @@ Details
https://github.com/owncloud/web/issues/7138
https://github.com/owncloud/web/pull/7322

* Bugfix - File size formatting: [#7443](https://github.com/owncloud/web/pull/7443)

We've fixed file size formatting to respect the language setting of the user.

https://github.com/owncloud/web/pull/7443

* Bugfix - Hide empty trash bin modal on error: [#7248](https://github.com/owncloud/web/pull/7248)

We've fixed a bug where the empty trash bin modal was shown if an error occurred.
Expand Down Expand Up @@ -427,6 +445,13 @@ Details

https://github.com/owncloud/web/pull/7297

* Bugfix - User management app close side bar throws error: [#7445](https://github.com/owncloud/web/pull/7445)

We've fixed a bug, where closing the side bar in the user management app threw an error, when a
group or user was selected.

https://github.com/owncloud/web/pull/7445

* Bugfix - Users list not loading if user has no role: [#7332](https://github.com/owncloud/web/pull/7332)

We've fixed a bug where the users list in the user management app was not loading if a user has no
Expand Down Expand Up @@ -682,6 +707,13 @@ Details
https://github.com/owncloud/web/issues/6678
https://github.com/owncloud/web/pull/7176

* Enhancement - User management app edit quota: [#7182](https://github.com/owncloud/web/pull/7182)

We've added the possibility to change user's quota in the user management app.

https://github.com/owncloud/web/issues/7059
https://github.com/owncloud/web/pull/7182

Changelog for ownCloud Web [5.6.1] (2022-06-22)
=======================================
The following sections list the changes in ownCloud web 5.6.1 relevant to
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-datetime-formatting
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: datetime formatting

We've adjusted date time formatting to show a less verbose format (e.g. hiding the time zone and using month abbreviations).

https://github.com/owncloud/web/pull/7443
https://github.com/owncloud/web/issues/7336
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-filesize-formatting
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: file size formatting

We've fixed file size formatting to respect the language setting of the user.

https://github.com/owncloud/web/pull/7443
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: User management app close side bar throws error

We've fixed a bug, where closing the side bar in the user management app threw an error,
when a group or user was selected.

https://github.com/owncloud/web/pull/7445
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancemnet-user-management-edit-quota
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: User management app edit quota

We've added the possibility to change user's quota in the user management app.

https://github.com/owncloud/web/pull/7182
https://github.com/owncloud/web/issues/7059

2 changes: 1 addition & 1 deletion packages/web-app-files/l10n/translations.json

Large diffs are not rendered by default.

18 changes: 2 additions & 16 deletions packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</div>
<side-bar
v-if="showSidebar"
id="files-sidebar"
ref="filesSidebar"
tabindex="-1"
:sidebar-active-panel="sidebarActivePanel"
Expand All @@ -19,7 +18,6 @@
</main>
</template>
<script lang="ts">
import Mixins from './mixins'
import { mapActions, mapState } from 'vuex'
import SideBar from './components/SideBar/SideBar.vue'
import { defineComponent } from '@vue/composition-api'
Expand All @@ -29,7 +27,6 @@ export default defineComponent({
components: {
SideBar
},
mixins: [Mixins],
data: () => ({
dragareaEnabled: false
}),
Expand All @@ -55,7 +52,8 @@ export default defineComponent({
},
created() {
this.$root.$on('upload-end', () => {
this.delayForScreenreader(() => this.$refs.filesListWrapper.focus())
// delay for screen reader virtual buffer
setTimeout(() => this.$refs.filesListWrapper.focus(), 500)
})
const dragOver = bus.subscribe('drag-over', this.onDragOver)
const dragOut = bus.subscribe('drag-out', this.hideDropzone)
Expand Down Expand Up @@ -129,18 +127,6 @@ main {
position: relative;
}
#files-sidebar {
position: relative;
overflow: hidden;
width: 440px;
}
@media only screen and (max-width: 960px) {
#files-sidebar {
width: 100%;
}
}
#files-view {
grid-area: main;
z-index: 0;
Expand Down
3 changes: 1 addition & 2 deletions packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import { mapGetters, mapState, mapMutations } from 'vuex'
import last from 'lodash-es/last'
import Mixins from '../../mixins'
import MixinFileActions from '../../mixins/fileActions'
import BatchActions from './SelectedResources/BatchActions.vue'
Expand All @@ -70,7 +69,7 @@ export default {
SizeInfo,
ViewOptions
},
mixins: [Mixins, MixinFileActions],
mixins: [MixinFileActions],
props: {
breadcrumbs: { type: Array, default: () => [] },
breadcrumbsContextActionsItems: { type: Array, default: () => [] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<translate
v-if="selectedResourcesSize !== '?'"
key="multiple-select-info-with-size"
:translate-n="selectedResourcesAmount"
:translate-params="{ amount: selectedResourcesAmount, size: selectedResourcesSize }"
:translate-n="selectedResourcesCount"
:translate-params="{ amount: selectedResourcesCount, size: selectedResourcesSize }"
translate-plural="%{ amount } selected - %{ size }"
translate-comment="Number of selected resources and their size displayed above the files list"
>%{ amount } selected - %{ size }
</translate>
<translate
v-else
key="multiple-select-info"
:translate-n="selectedResourcesAmount"
:translate-params="{ amount: selectedResourcesAmount }"
:translate-n="selectedResourcesCount"
:translate-params="{ amount: selectedResourcesCount }"
translate-plural="%{ amount } selected"
translate-comment="Number of selected resources displayed above the files list"
>%{ amount } selected
Expand All @@ -34,27 +34,22 @@
<script>
import { mapGetters, mapMutations } from 'vuex'
import { cloneStateObject } from '../../../helpers/store'
import MixinResources from '../../../mixins/resources'
import { formatFileSize } from 'web-pkg/src/helpers'
export default {
mixins: [MixinResources],
computed: {
...mapGetters('Files', ['selectedFiles']),
selectedResourcesAmount() {
selectedResourcesCount() {
return this.selectedFiles.length
},
selectedResourcesSize() {
const resources = cloneStateObject(this.selectedFiles)
let size = 0
for (const resource of resources) {
size += parseInt(resource.size, 10)
}
return this.getResourceSize(size)
const totalSize = this.selectedFiles.reduce((totalSize, file) => {
const size = typeof file.size === 'string' ? parseInt(file.size) : file.size
return totalSize + size
}, 0)
return formatFileSize(totalSize, this.$language.current)
},
clearSelectionLabel() {
Expand Down
4 changes: 2 additions & 2 deletions packages/web-app-files/src/components/FilesList/ListInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script>
import { getResourceSize } from 'web-runtime/src/helpers/resource'
import { formatFileSize } from 'web-pkg/src/helpers'
export default {
props: {
Expand Down Expand Up @@ -52,7 +52,7 @@ export default {
foldersCount: this.folders
}
)
const itemSize = getResourceSize(this.size)
const itemSize = formatFileSize(this.size, this.$language.current)
const translated =
this.size > 0
? this.$ngettext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@

<script lang="ts">
import { bus } from 'web-pkg/src/instance'
import { DateTime } from 'luxon'
import maxSize from 'popper-max-size-modifier'
import { mapGetters, mapActions, mapState } from 'vuex'
import { EVENT_TROW_MOUNTED, EVENT_FILE_DROPPED } from '../../constants'
Expand All @@ -206,6 +205,7 @@ import { Resource } from 'web-client'
import { ClipboardActions } from '../../helpers/clipboardActions'
import { ShareTypes } from 'web-client/src/helpers/share'
import { createLocationSpaces, createLocationCommon } from '../../router'
import { formatDateFromJSDate, formatRelativeDateFromJSDate } from 'web-pkg/src/helpers'
const mapResourceFields = (resource: Resource, mapping = {}) => {
return Object.keys(mapping).reduce((result, resourceKey) => {
Expand Down Expand Up @@ -500,7 +500,7 @@ export default defineComponent({
: {},
{
name: 'owner',
title: this.$gettext('Share owner'),
title: this.$gettext('Shared by'),
type: 'slot',
alignH: 'right',
wrap: 'nowrap'
Expand Down Expand Up @@ -583,9 +583,6 @@ export default defineComponent({
contextMenuLabel() {
return this.$gettext('Show context menu')
},
currentLanguage() {
return (this.$language?.current || '').split('_')[0]
},
hoverableQuickActions() {
return this.configuration?.options?.hoverableQuickActions
}
Expand Down Expand Up @@ -742,12 +739,10 @@ export default defineComponent({
return this.emitSelect([resource.id])
},
formatDate(date) {
return DateTime.fromJSDate(new Date(date))
.setLocale(this.currentLanguage)
.toLocaleString(DateTime.DATETIME_FULL)
return formatDateFromJSDate(new Date(date), this.$language.current)
},
formatDateRelative(date) {
return DateTime.fromJSDate(new Date(date)).setLocale(this.currentLanguage).toRelative()
return formatRelativeDateFromJSDate(new Date(date), this.$language.current)
},
setSelection(selected, resource) {
if (selected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</tr>
<tr v-if="showSize" data-testid="sizeInfo">
<th scope="col" class="oc-pr-s" v-text="sizeLabel" />
<td v-text="getResourceSize(file.size)" />
<td v-text="resourceSize" />
</tr>
<tr v-if="showVersions" data-testid="versionsInfo">
<th scope="col" class="oc-pr-s" v-text="versionsLabel" />
Expand Down Expand Up @@ -158,8 +158,6 @@
</template>
<script lang="ts">
import { computed, defineComponent, ref, unref } from '@vue/composition-api'
import Mixins from '../../../mixins'
import MixinResources from '../../../mixins/resources'
import { mapActions, mapGetters } from 'vuex'
import { ImageDimension } from '../../../constants'
import { loadPreview } from 'web-pkg/src/helpers/preview'
Expand All @@ -179,11 +177,10 @@ import { getIndicators } from '../../../helpers/statusIndicators'
import copyToClipboard from 'copy-to-clipboard'
import { encodePath } from 'web-pkg/src/utils'
import { isUserContext } from 'web-runtime/src/router'
import { formatDateFromHTTP, formatFileSize } from 'web-pkg/src/helpers'
export default defineComponent({
name: 'FileDetails',
mixins: [Mixins, MixinResources],
inject: ['displayedItem'],
setup() {
const sharedParentDir = ref('')
Expand Down Expand Up @@ -324,8 +321,11 @@ export default defineComponent({
copyEosPathLabel() {
return this.$gettext('Copy EOS path')
},
resourceSize() {
return formatFileSize(this.file.size, this.$language.current)
},
showSize() {
return this.getResourceSize(this.file.size) !== '?'
return this.resourceSize !== '?'
},
sizeLabel() {
return this.$gettext('Size')
Expand All @@ -343,7 +343,7 @@ export default defineComponent({
return this.$gettext('See all versions')
},
capitalizedTimestamp() {
const displayDate = this.formDateFromHTTP(this.file.mdate)
const displayDate = formatDateFromHTTP(this.file.mdate, this.$language.current)
return upperFirst(displayDate)
},
showTags() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th scope="col" class="oc-pr-s" v-text="foldersText" />
<td v-text="foldersCount" />
</tr>
<tr v-if="showSize" data-testid="size">
<tr data-testid="size">
<th scope="col" class="oc-pr-s" v-text="sizeText" />
<td v-text="sizeValue" />
</tr>
Expand All @@ -25,14 +25,12 @@
</div>
</template>
<script lang="ts">
import Mixins from '../../../mixins'
import MixinResources from '../../../mixins/resources'
import { mapGetters } from 'vuex'
import { defineComponent } from '@vue/composition-api'
import { formatFileSize } from 'web-pkg/src/helpers'
export default defineComponent({
name: 'FileDetailsMultiple',
mixins: [Mixins, MixinResources],
computed: {
...mapGetters('Files', ['selectedFiles']),
selectedFilesCount() {
Expand All @@ -53,10 +51,7 @@ export default defineComponent({
sizeValue() {
let size = 0
this.selectedFiles.forEach((i) => (size += parseInt(i.size)))
return this.getResourceSize(size)
},
showSize() {
return this.getResourceSize(this.selectedFiles[0].size) !== '?'
return formatFileSize(size, this.$language.current)
},
sizeText() {
return this.$gettext('Size')
Expand Down
Loading

0 comments on commit d06baa8

Please sign in to comment.