Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 4.6.0 #6093

Merged
merged 4 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=ddf62111b0a9505fff570b7a533067524d416279
OCIS_COMMITID=0d34ed55f0b0b72516b65a463e86f55792e94b2c
OCIS_BRANCH=master
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.5.0",
"version": "4.6.0",
"private": true,
"homepage": "https://github.com/owncloud/web",
"license": "AGPL-3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
>
{{ formRelativeDateFromHTTP(item.fileInfo[DavProperty.LastModifiedDate]) }}
</oc-td>
<oc-td
width="expand"
class="oc-text-muted uk-text-nowrap"
data-testid="file-versions-file-size"
>
<oc-td class="oc-text-muted uk-text-nowrap" data-testid="file-versions-file-size">
{{ getResourceSize(item.fileInfo[DavProperty.ContentLength]) }}
</oc-td>
<oc-td width="shrink">
Expand Down
8 changes: 8 additions & 0 deletions packages/web-app-files/src/mixins/actions/createPublicLink.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import quickActions, { canShare, createPublicLink } from '../../quickActions'
import { isSharedWithMeRoute } from '../../helpers/route'
import { shareStatus } from '../../helpers/shareStatus'

export default {
computed: {
Expand All @@ -13,6 +15,12 @@ export default {
if (resources.length !== 1) {
return false
}
if (isSharedWithMeRoute(this.$route)) {
if (resources[0].status !== shareStatus.accepted) {
return false
}
// FIXME: also check via capabilities if resharing is enabled + resharing is allowed on the share
}
return canShare(resources[0], this.$store)
},
componentType: 'oc-button',
Expand Down
13 changes: 11 additions & 2 deletions packages/web-app-files/src/mixins/actions/navigate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { isPublicFilesRoute, isTrashbinRoute } from '../../helpers/route'
import { isPublicFilesRoute, isSharedWithMeRoute, isTrashbinRoute } from '../../helpers/route'
import { mapState } from 'vuex'
import { isSameResource } from '../../helpers/resource'
import { shareStatus } from '../../helpers/shareStatus'

export default {
computed: {
Expand All @@ -24,7 +25,15 @@ export default {
return false
}

return resources[0].isFolder
if (!resources[0].isFolder) {
return false
}

if (isSharedWithMeRoute(this.$route) && resources[0].status !== shareStatus.accepted) {
return false
}

return true
},
canBeDefault: true,
componentType: 'router-link',
Expand Down
9 changes: 8 additions & 1 deletion packages/web-app-files/src/mixins/actions/showShares.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import quickActions, { canShare, openNewCollaboratorsPanel } from '../../quickActions'
import { isTrashbinRoute } from '../../helpers/route'
import { isSharedWithMeRoute, isTrashbinRoute } from '../../helpers/route'
import { shareStatus } from '../../helpers/shareStatus'

export default {
computed: {
Expand All @@ -17,6 +18,12 @@ export default {
if (resources.length !== 1) {
return false
}
if (isSharedWithMeRoute(this.$route)) {
if (resources[0].status !== shareStatus.accepted) {
return false
}
// FIXME: also check via capabilities if resharing is enabled + resharing is allowed on the share
}
return canShare(resources[0], this.$store)
},
componentType: 'oc-button',
Expand Down
15 changes: 11 additions & 4 deletions packages/web-app-files/src/views/SharedWithMe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
</div>
</template>
<template #contextMenu="{ resource }">
<context-actions v-if="isResourceInSelection(resource)" :item="resource" />
<context-actions
v-if="isResourceInPendingSelection(resource)"
:items="pendingSelected"
/>
</template>
<template v-if="pendingHasMore" #footer>
<div class="uk-width-1-1 uk-text-center oc-mt">
Expand Down Expand Up @@ -132,7 +135,7 @@
</div>
</template>
<template #contextMenu="{ resource }">
<context-actions v-if="isResourceInSelection(resource)" :items="selected" />
<context-actions v-if="isResourceInSharesSelection(resource)" :items="sharesSelected" />
</template>
<template #footer>
<list-info
Expand Down Expand Up @@ -372,8 +375,12 @@ export default {
this.showMorePending = !this.showMorePending
},

isResourceInSelection(resource) {
return this.selected?.includes(resource)
isResourceInPendingSelection(resource) {
return this.pendingSelected?.includes(resource)
},

isResourceInSharesSelection(resource) {
return this.sharesSelected?.includes(resource)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web-integration-oc10/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For feedback and bug reports, please use the [public issue tracker](https://gith
</description>
<licence>AGPL</licence>
<author>ownCloud</author>
<version>4.5.0</version>
<version>4.6.0</version>
<category>tools</category>
<website>https://github.com/owncloud/web</website>
<bugs>https://github.com/owncloud/web/issues</bugs>
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sonar.projectKey=owncloud_web
sonar.organization=owncloud-1
sonar.projectName=Web
sonar.projectVersion=4.5.0
sonar.projectVersion=4.6.0
sonar.host.url=https://sonarcloud.io

# =====================================================
Expand Down