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

[full-ci] Introduce QuickLinks #6820

Merged
merged 6 commits into from
May 4, 2022
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
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev leftover or intended change to our dev setup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had the same questions, was reluctant to commit it but @fschade went ahead. I get the reasoning though and would leave it in our dev setup since otherwise we'd fall back to internal pings about "how to get it work" which is suboptimal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would keep it, this enables the same quicklink behavior for oc10 as in ocis...

];

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