Skip to content

Commit

Permalink
Include shareType in share select option data
Browse files Browse the repository at this point in the history
The object that is built in src/main.js which is added to the user
search bar is used to build a share object and for this app the
shareType is guest, hence it should be included from the source.

Related to : nextcloud/server#40299

Signed-off-by: fenn-cs <[email protected]>
  • Loading branch information
Fenn-CS committed Sep 6, 2023
1 parent fc4ca47 commit 09bc8db
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@nextcloud/dialogs": "^4.0.1",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/router": "^2.0.1",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/vue": "^7.11.4",
"email-validator": "^2.0.4",
"vue": "^2.7.14",
Expand Down
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Vue from 'vue'
import GuestForm from './views/GuestForm.vue'
import Nextcloud from './mixins/Nextcloud.js'
import { showError } from '@nextcloud/dialogs'
import { Type } from '@nextcloud/sharing'

Vue.mixin(Nextcloud)

Expand All @@ -25,6 +26,7 @@ guestForm.$mount('#guest-root')
const result = {
icon: 'icon-guests',
displayName: t('guests', 'Invite guest'),
shareType: Type.SHARE_TYPE_GUEST,
handler: async self => {
const user = self.suggestions.find(s => s.isNoUser === false && s.shareType === 0)
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 09bc8db

Please sign in to comment.