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

Tracking #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions src/components/AddLinkButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export default {
this.$emit('add:share', newShare, resolve)
})
showSuccess(t('files_sharing', 'Link share created'))
this.sendUtagInfo({
wt_link_id: 'button.add-link-share',
page_content_id: 'files.sharing',
page_type: 'files',
})

} catch (data) {
const message = data?.response?.data?.ocs?.meta?.message
Expand Down
7 changes: 7 additions & 0 deletions src/mixins/SharesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*
*/

/* global utag */

import { showError, showSuccess } from '@nextcloud/dialogs'
import { getCurrentUser } from '@nextcloud/auth'
// eslint-disable-next-line import/no-unresolved, n/no-missing-import
Expand Down Expand Up @@ -174,7 +176,7 @@
return true
},

/**

Check warning on line 179 in src/mixins/SharesMixin.js

View workflow job for this annotation

GitHub Actions / eslint

JSDoc @return declaration present but return expression not available in function
* @param {string} date a date with YYYY-MM-DD format
* @return {Date} date
*/
Expand Down Expand Up @@ -375,5 +377,10 @@
debounceQueueUpdate: debounce(500, function(property) {
this.queueUpdate(property)
}),

sendUtagInfo: (data) => {
if (typeof utag === 'undefined' || !utag.view()) return
utag.view(data)
},
},
}
2 changes: 1 addition & 1 deletion src/utils/CollaboraMimeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const COLLABORA_MIME_TYPES = [
'application/vnd.oasis.opendocument.graphics',
'application/vnd.visio',
'text/plain',
'text/markdown'
'text/markdown',
]
10 changes: 10 additions & 0 deletions src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,18 @@ export default {
const share = await this.addShare(incomingShare, this.fileInfo, this.config)
this.share = share
this.$emit('add:share', this.share)
this.sendUtagInfo({
wt_link_id: 'button.create-share',
page_content_id: 'files.sharing',
page_type: 'files',
})
} else {
this.queueUpdate(...permissionsAndAttributes)
this.sendUtagInfo({
wt_link_id: 'button.update-share',
page_content_id: 'files.sharing',
page_type: 'files',
})
}

this.$emit('close-sharing-details')
Expand Down
Loading