Skip to content

Commit

Permalink
Merge pull request #6820 from owncloud/introduce-quicklinks
Browse files Browse the repository at this point in the history
[full-ci] Introduce QuickLinks
  • Loading branch information
kulmann authored May 4, 2022
2 parents 24c7ed8 + 2e763c7 commit f3a39d0
Show file tree
Hide file tree
Showing 44 changed files with 671 additions and 632 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/enhancement-introduce-quicklink
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Introduce quicklinks

We have added quicklinks to the link share section in the right sidebar. Clicking the link quickaction and the link menu item in the files table contextmenu now always copy the quick link instead of creating a new link (and create it first, if it didn't exist before).

https://github.com/owncloud/web/pull/6820
https://github.com/owncloud/web/issues/6605
15 changes: 15 additions & 0 deletions changelog/unreleased/enhancement-update-sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Enhancement: Update SDK

We've updated the ownCloud SDK to version 3.0.0-alpha.7.

- Change - Pass full trash bin path to methods of FilesTrash class: https://github.com/owncloud/owncloud-sdk/pull/1021
- Enhancement - Enforce share_type guest if applies: https://github.com/owncloud/owncloud-sdk/pull/1046
- Enhancement - Create quicklink: https://github.com/owncloud/owncloud-sdk/pull/1041
- Enhancement - Replace deprecated String.prototype.substr(): https://github.com/owncloud/owncloud-sdk/pull/1035
- Enhancement - Add blob resolveType: https://github.com/owncloud/owncloud-sdk/pull/1028
- Enhancement - Adjust share management to properly work with spaces: https://github.com/owncloud/owncloud-sdk/pull/1013
- Bugfix - Always add X-Request-ID: https://github.com/owncloud/owncloud-sdk/pull/1016
- Bugfix - Always add X-Requested-With header: https://github.com/owncloud/owncloud-sdk/pull/1020

https://github.com/owncloud/web/pull/6820
https://github.com/owncloud/owncloud-sdk/releases/tag/v3.0.0-alpha.7
1 change: 1 addition & 0 deletions dev/docker/oc10.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
$CONFIG = [
'web.baseUrl' => 'http://host.docker.internal:8080/index.php/apps/web',
'web.rewriteLinks' => true,
'sharing.showPublicLinkQuickAction' => true,
];

7 changes: 6 additions & 1 deletion dev/docker/oc10.web.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
],
"options": {
"disablePreviews": true,
"displayResourcesLazy": false
"displayResourcesLazy": false,
"sidebar": {
"shares": {
"showAllOnLoad": true
}
}
},
"applications": [
{
Expand Down
7 changes: 6 additions & 1 deletion dev/docker/ocis.web.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
},
"options": {
"disablePreviews": true,
"displayResourcesLazy": false
"displayResourcesLazy": false,
"sidebar": {
"shares": {
"showAllOnLoad": true
}
}
},
"apps": [
"files",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ContextActionMenu from '../ContextActionMenu.vue'
import FileActions from '../../mixins/fileActions'
import AcceptShare from '../../mixins/actions/acceptShare'
import Copy from '../../mixins/actions/copy'
import CreatePublicLink from '../../mixins/actions/createPublicLink'
import CreateQuicklink from '../../mixins/actions/createQuicklink'
import DeclineShare from '../../mixins/actions/declineShare'
import Delete from '../../mixins/actions/delete'
import DownloadArchive from '../../mixins/actions/downloadArchive'
Expand All @@ -35,7 +35,7 @@ export default {
FileActions,
AcceptShare,
Copy,
CreatePublicLink,
CreateQuicklink,
DeclineShare,
Delete,
DownloadArchive,
Expand Down Expand Up @@ -134,7 +134,7 @@ export default {
},
menuItemsShare() {
return [...this.$_showShares_items, ...this.$_createPublicLink_items].filter((item) =>
return [...this.$_showShares_items, ...this.$_createQuicklink_items].filter((item) =>
item.isEnabled(this.filterParams)
)
},
Expand Down
60 changes: 41 additions & 19 deletions packages/web-app-files/src/components/SideBar/PrivateLinkItem.vue
Original file line number Diff line number Diff line change
@@ -1,36 +1,58 @@
<template>
<copy-to-clipboard-button
<oc-button
v-oc-tooltip="buttonLabel"
appearance="raw"
:aria-label="buttonLabel"
class="oc-files-private-link-copy-url"
:value="link"
:label="copyToClipboardLabel"
:text="copyToClipboardText"
:success-msg-title="copyToClipboardSuccessMsgTitle"
:success-msg-text="copyToClipboardSuccessMsgText"
/>
:variation="copied ? 'success' : 'passive'"
@click="copyPrivateLinkToClipboard"
>
<span v-text="buttonText" />
<oc-icon
v-if="copied"
key="oc-copy-to-clipboard-copied"
name="checkbox-circle"
class="_clipboard-success-animation"
/>
<oc-icon v-else key="oc-copy-to-clipboard-copy" name="clipboard" />
</oc-button>
</template>

<script>
import CopyToClipboardButton from './Shared/CopyToClipboardButton.vue'
import { mapActions } from 'vuex'
import copyToClipboard from 'copy-to-clipboard'
export default {
name: 'PrivateLinkItem',
components: { CopyToClipboardButton },
inject: ['displayedItem'],
data: () => ({
copied: false,
timeout: null
}),
computed: {
link() {
return this.displayedItem.value.privateLink
},
copyToClipboardText() {
buttonText() {
return this.$gettext('Private link')
},
copyToClipboardLabel() {
buttonLabel() {
return this.$gettext('Copy private link to clipboard')
}
},
methods: {
...mapActions(['showMessage']),
copyPrivateLinkToClipboard() {
copyToClipboard(this.displayedItem.value.privateLink)
this.clipboardSuccessHandler()
this.showMessage({
title: this.$gettext('Private link copied'),
desc: this.$gettext('The private link has been copied to your clipboard.')
})
},
copyToClipboardSuccessMsgTitle() {
return this.$gettext('Private link copied')
},
copyToClipboardSuccessMsgText() {
return this.$gettext('The private link has been copied to your clipboard.')
clipboardSuccessHandler() {
this.copied = true
clearTimeout(this.timeout)
this.timeout = setTimeout(() => {
this.copied = false
}, 550)
}
}
}
Expand Down

This file was deleted.

Loading

0 comments on commit f3a39d0

Please sign in to comment.