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] Drive aliases #7430

Merged
merged 157 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
d2a5c01
WIP drive aliases in routes
kulmann Aug 9, 2022
711877f
WIP pass spaces into personal and project views and render them in Dr…
dschmidt Aug 10, 2022
d70fd60
WIP: introduce generic space view
kulmann Sep 7, 2022
546ad0c
fix: breadcrumb items in Generic view
kulmann Sep 14, 2022
7152a19
fix: remove personal and project space routes from codebase
kulmann Sep 14, 2022
3bf2ea3
fix: move home redirect into dedicated component
kulmann Sep 14, 2022
c8ce26b
feat: introduce space header component
kulmann Sep 15, 2022
42087a7
refactor: delete Project view
kulmann Sep 15, 2022
94f2087
WIP: generic trash
kulmann Sep 15, 2022
62e5e9b
fix: don't rely on old trash routes anymore
kulmann Sep 16, 2022
09bb075
perf: cache resolved space
kulmann Sep 16, 2022
2774566
fix: trash routing and resolving
kulmann Sep 16, 2022
63d98d6
WIP: get rid of SharedResource view
kulmann Sep 19, 2022
f09db65
fix: breadcrumb items for shares
kulmann Sep 19, 2022
206be3c
fix: space computed prop in action mixins
kulmann Sep 19, 2022
b2df0b5
fix: right sidebar details for space
kulmann Sep 19, 2022
333da4f
refactor: use space in file actions
kulmann Sep 19, 2022
da86ac4
fix: pass down space prop
kulmann Sep 20, 2022
6cdda82
fix: spaces nav item highlighting inside project space
kulmann Sep 20, 2022
3257478
perf: load space members once upon entering space
kulmann Sep 20, 2022
4bce084
WIP: allow driveAliasAndItem in apps
kulmann Sep 20, 2022
717bb8a
refactor: use getDriveAliasAndItem for building route param
kulmann Sep 21, 2022
eb415ba
fix: file context (and make preview app work again)
kulmann Sep 21, 2022
8c587e6
WIP: public links as space
kulmann Sep 21, 2022
2f89a4b
Introduce SpaceResources
dschmidt Sep 21, 2022
97cef0f
WIP: webdav list files abstraction
kulmann Sep 21, 2022
e33798c
wip: implement listFiles in web-client
dschmidt Sep 21, 2022
fb8aa02
web-app-preview: fix url after end or beginning of folder
dschmidt Sep 21, 2022
80f9748
wip: Fix PublicFiles.vue a little to make debugging easier... not wor…
dschmidt Sep 21, 2022
11cfa60
fixup! wip: implement listFiles in web-client
dschmidt Sep 21, 2022
3ad5755
Fix type narrowing
dschmidt Sep 21, 2022
0d8e334
fix: delete unused loaderProject file
kulmann Sep 22, 2022
855f275
feat: maintain public link password in public space
kulmann Sep 22, 2022
8200a18
WIP: handle public link in GenericSpace view
kulmann Sep 22, 2022
9ee19f4
delete: unused helper
kulmann Sep 22, 2022
3cd021c
WIP: getFileInfo in the client
kulmann Sep 22, 2022
9532880
fix: use single item from list response in getFileInfo
kulmann Sep 22, 2022
042ae4c
fix: attach public link password to space
kulmann Sep 22, 2022
350b100
web-client: Add createFolder method and refactor getFileInfo
dschmidt Sep 22, 2022
041e078
add createFolder.ts
dschmidt Sep 22, 2022
292db06
remove superfluuous var
dschmidt Sep 22, 2022
b230bab
fix lint
dschmidt Sep 22, 2022
0a12b06
web-client: implement putFileContents
dschmidt Sep 22, 2022
23b6b47
Use putFileContents from web-client in apps
dschmidt Sep 22, 2022
03d2f5e
Add loose types for OwncloudSdk
dschmidt Sep 22, 2022
251c99f
Implement getFileContents in web-client
dschmidt Sep 22, 2022
ecd0a68
Move getFileUrl to web-client
dschmidt Sep 22, 2022
4f6f3b7
web-app-draw-io: simplify visio import loading
dschmidt Sep 22, 2022
9e197b1
web-app-preview: fix url retrieval
dschmidt Sep 22, 2022
e1f3987
Reintroduce getUrlForResource to useAppFileHandling
dschmidt Sep 22, 2022
0789ad4
use shorter notation for OwncloudSdk types
dschmidt Sep 22, 2022
5e9cc2b
Port useAppFileHandling.getFileResource to web-client.webdav.getFileInfo
dschmidt Sep 23, 2022
cf4a35c
Port web-app-draw-io permission check to use proper resources instead…
dschmidt Sep 23, 2022
4cab87b
useAppFileHandling: rename getFileResource to getFileInfo
dschmidt Sep 23, 2022
5b444b6
Move OwncloudSdk type to web-client to make the package standalone again
dschmidt Sep 23, 2022
26fd5b7
fixup! Move OwncloudSdk type to web-client to make the package standa…
dschmidt Sep 23, 2022
1fb630a
Remove isPublicLinkContext and publicLinkPassword from AppFileHandlin…
dschmidt Sep 23, 2022
e903bb3
Avoid typecast in buildPublicSpaceResource
dschmidt Sep 23, 2022
ad2818d
Add missing types
dschmidt Sep 23, 2022
eae730d
fixup! useAppFileHandling: rename getFileResource to getFileInfo
dschmidt Sep 23, 2022
5546f26
Simplify
dschmidt Sep 23, 2022
802b95d
Do not add PublicLink property to all propfinds to public files
dschmidt Sep 23, 2022
3427703
feat: add public link props to public link space
kulmann Sep 23, 2022
98aeea0
Fix buildPublicSpaceResource to set driveType
dschmidt Sep 23, 2022
cf121b5
Move more logic to buildPublicSpaceResource
dschmidt Sep 23, 2022
efef83f
wip: use web-client in sidebar
dschmidt Sep 23, 2022
9f52640
fix: copy/move in public links
kulmann Sep 23, 2022
7078477
fix: rename in public links
kulmann Sep 23, 2022
59a85d6
WIP: change public links URLs
kulmann Sep 26, 2022
390f21f
fix: space loading on share pages
kulmann Sep 26, 2022
fa5a7e6
fix: remove dead code
kulmann Sep 26, 2022
412d477
WIP: fix upload handling
kulmann Sep 26, 2022
2a31ac5
fix: quota update driveType check
kulmann Sep 27, 2022
4ba12d0
WIP normalize urls/paths
kulmann Sep 27, 2022
1ce2b79
Fix loading of share indicators for indirect shares
JammingBen Sep 27, 2022
2681f90
Fix space member display for space resources in sidebar
JammingBen Sep 27, 2022
ad8cd59
Fix sidebar in public link view
JammingBen Sep 27, 2022
b5ba189
FIx redirect after deleting the current folder
JammingBen Sep 27, 2022
abaa60e
Fix context actions and sidebar on search result page
JammingBen Sep 27, 2022
28613ab
Hide breadcrumb context actions in personal trashbin
JammingBen Sep 27, 2022
f44ba87
Prevent quota-update in share jail after deleting
JammingBen Sep 27, 2022
87bd65a
Prevent quota-update on public pages after deleting
JammingBen Sep 27, 2022
a235f92
Fix batch download on public pages
JammingBen Sep 27, 2022
7d35dbb
Unify path / url handling
dschmidt Sep 27, 2022
75ffd3f
Fix sidebar for reshares
JammingBen Sep 27, 2022
699d998
Do not use path magic on driveAliasAndItem
dschmidt Sep 27, 2022
3f0f0ee
Fix sidebar for reshares in search list, add FIXME comments
JammingBen Sep 27, 2022
7a4349d
Fix link to personal space in trashbin
JammingBen Sep 27, 2022
5db5f63
Make proper use of urlJoin to add leadingSlash
JammingBen Sep 27, 2022
63ff109
Fix share loading for share jail root folder
JammingBen Sep 27, 2022
7bba594
Fix UploadInfo.vue
dschmidt Sep 27, 2022
86dccb1
Fix share name on 'Shared with me'-view in sidebar
JammingBen Sep 27, 2022
9d8f3b5
Add url-join test
dschmidt Sep 27, 2022
0fc5c7d
fix lint
dschmidt Sep 27, 2022
65b9a94
Fix inline renaming of shares
dschmidt Sep 27, 2022
a5df59c
Fix webDavUrl in public spaces
dschmidt Sep 27, 2022
a67eb9f
Remove sidebar and toggle for trashbin
lookacat Sep 27, 2022
16ef41e
fix formatting
dschmidt Sep 27, 2022
674aa16
fix: parent folder rename in public links
kulmann Sep 27, 2022
0f3c086
Fix copy/move in speace root
JammingBen Sep 27, 2022
f655d7f
fix: mitigate storageId absence in oc10
kulmann Sep 27, 2022
51e4852
fix: uploads in oc10
kulmann Sep 27, 2022
ae7e1ca
fix: rename on non-public link spaces
kulmann Sep 27, 2022
e233688
fix: remove unused flatFileList getter
kulmann Sep 27, 2022
fb8a80b
wip: modify unit tests
kulmann Sep 27, 2022
c200696
Fix delete in public links
dschmidt Sep 27, 2022
fbb1d66
Add missing deleteFile.ts
dschmidt Sep 27, 2022
1b23e4a
Fix rename.spec.ts
dschmidt Sep 27, 2022
6698414
Fix showDetails unit test
dschmidt Sep 27, 2022
97c2007
test: rename and skip GenericSpace and GenericTrash
kulmann Sep 27, 2022
3198c53
refactor: remove unneeded var assignments
kulmann Sep 27, 2022
612743b
fix: copyMove tests
kulmann Sep 27, 2022
6060533
test: fix deleteResources mixin test
kulmann Sep 27, 2022
04ed1f2
fix: NotFoundMessage on public links + tests
kulmann Sep 27, 2022
28b1bc2
test: comment out view tests, not useful in that state
kulmann Sep 28, 2022
974ce95
Fix unit tests for CreateAndUpload.spec.js
JammingBen Sep 28, 2022
4b957d3
Fix unit tests for ContextActions.spec.js
JammingBen Sep 28, 2022
15e3929
Fixing PrivateLinkItem.spec.js, TrashBin.spec.js
lookacat Sep 28, 2022
db4eeb6
Fix unit tests for ResourceTable.spec.js
JammingBen Sep 28, 2022
b3435ea
Disable unit tests for List.spec.js
JammingBen Sep 28, 2022
9052e73
test: fix upload info
kulmann Sep 28, 2022
89e9422
Fix unit tests for Preview.spec.js
JammingBen Sep 28, 2022
13171bd
Fix rename.spec.js, setImage.spec.js
lookacat Sep 28, 2022
3855e98
Fix unit tests for FileShares.spec.js
JammingBen Sep 28, 2022
a925083
Fix unit tests for Collaborators/ListItem.spec.js
JammingBen Sep 28, 2022
e8282b4
test: fix useUpload unit tests
kulmann Sep 28, 2022
d5f1fa6
Fix unit tests for SideBar.spec.js
JammingBen Sep 28, 2022
bb2c51a
Fix setImage.spec.js
lookacat Sep 28, 2022
3366b23
Include todo for test
JammingBen Sep 28, 2022
32d22e8
Fix setReadme.spec.js
lookacat Sep 28, 2022
0f95b2b
Fix unit tests for sdk.spec.ts
JammingBen Sep 28, 2022
6430ce4
Fix unit tests for avatarUrl.spec.ts
JammingBen Sep 28, 2022
7b0c7a9
Fix navigate.spec.js
lookacat Sep 28, 2022
db89e9c
Fix linting
lookacat Sep 28, 2022
5c11157
Fix unit test warnings
JammingBen Sep 28, 2022
abaa8b5
Fix public link loading for spaces in sidebar
JammingBen Sep 28, 2022
a8d988c
test: fix personal space nav item in e2e tests
kulmann Sep 28, 2022
0cea8ae
Fix space description edit
JammingBen Sep 28, 2022
beb7012
fix: replace proper-url-join with custom implementation
kulmann Sep 28, 2022
09e90e1
Fix preview loading on 'Shared with me'-page
JammingBen Sep 28, 2022
21c03a6
test: fix broken web-pkg import in e2e tests
kulmann Sep 28, 2022
74c6037
test: fix upload test navigation
kulmann Sep 28, 2022
f9584f9
Revert "Remove sidebar and toggle for trashbin"
kulmann Sep 28, 2022
7b7254b
Fix space image locator in e2e tests
JammingBen Sep 28, 2022
558b89b
fix: copy/move recursion check
kulmann Sep 28, 2022
308e14f
Fix draw-io e2e tests
JammingBen Sep 28, 2022
08baba9
fix: forward deprecated all files route with item to personal space
kulmann Sep 28, 2022
170e155
Fix space e2e tests
JammingBen Sep 29, 2022
9a2ea22
Fix editing resources after accepting shares
JammingBen Sep 29, 2022
4452ca2
Adjust expected acceptance test failures
JammingBen Sep 29, 2022
f9ddfc3
Fix resource loading on 'Shared with me'-page for oC10
JammingBen Sep 29, 2022
4b80c34
fix: enable favorites folder loader unconditionally
kulmann Sep 29, 2022
560877a
test: skip favorites test on oCIS since they aren't enabled/supported
kulmann Sep 29, 2022
f4cba7e
refactor: use urlJoin for normalizing old filePath route param
kulmann Sep 29, 2022
7db7699
docs: changelog items
kulmann Sep 29, 2022
8d9f3fd
refactor: remove patchCleanPath from deprecated route
kulmann Sep 29, 2022
f5aaebc
Wait for ajax calls to finish in performFileAction() test method
JammingBen Sep 29, 2022
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
9 changes: 9 additions & 0 deletions changelog/unreleased/change-drive-aliases-in-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Change: Drive aliases in URLs

We changed the URL format to not use storageIds in the URL path anymore to identify spaces, but instead use drive aliases of spaces in the URL path.

BREAKING CHANGE for users: this breaks existing bookmarks - they won't resolve anymore.
BREAKING CHANGE for developers: the appDefaults composables from web-pkg now work with drive aliases, concatenated with relative item paths, instead of webdav paths. If you use the appDefaults composables in your application it's likely that your code needs to be adapted.

https://github.com/owncloud/web/issues/6648
https://github.com/owncloud/web/pull/7430
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancement-webdav-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: webdav support in web-client package

Only relevant for developers:
We've added webdav support to the `web-client` package. This wraps the existing webdav requests from ownCloud SDK but
handles the differentiation of public link and user-specific webdav requests internally.

https://github.com/owncloud/web/pull/7430
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"jest-axe": "^5.0.1",
"jest-fetch-mock": "^3.0.3",
"jest-mock-axios": "^4.5.0",
"jest-mock-extended": "^3.0.1",
"jest-serializer-vue": "^2.0.2",
"join-path": "^1.1.1",
"license-checker-rseidelsohn": "^3.1.0",
Expand Down
44 changes: 24 additions & 20 deletions packages/web-app-draw-io/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
/>
</main>
</template>
<script>
<script lang="ts">
import { mapActions } from 'vuex'
import { basename } from 'path'
import qs from 'qs'
import { DateTime } from 'luxon'
import { DavPermission, DavProperty } from 'web-pkg/src/constants'
import { useAppDefaults } from 'web-pkg/src/composables'
import { defineComponent } from '@vue/composition-api'
import { basename } from 'path'

export default {
export default defineComponent({
name: 'DrawIoEditor',
setup() {
return {
Expand Down Expand Up @@ -110,19 +111,21 @@ export default {
'*'
)
},
checkPermissions() {
this.getFileInfo(this.filePath, [DavProperty.Permissions])
.then((v) => {
this.isReadOnly =
v.fileInfo[DavProperty.Permissions].indexOf(DavPermission.Updateable) === -1
this.loading = false
})
.catch((error) => {
this.errorPopup(error)
async checkPermissions() {
try {
const resource = await this.getFileInfo(this.currentFileContext, {
davProperties: [DavProperty.Permissions]
})
this.isReadOnly = ![DavPermission.Updateable, DavPermission.FileUpdateable].some(
(p) => (resource.permissions || '').indexOf(p) > -1
)
this.loading = false
} catch (error) {
this.errorPopup(error)
}
},
load() {
this.getFileContents(this.filePath)
this.getFileContents(this.currentFileContext)
.then((resp) => {
this.currentETag = resp.headers.ETag
this.$refs.drawIoEditor.contentWindow.postMessage(
Expand All @@ -138,9 +141,7 @@ export default {
this.errorPopup(error)
})
},
importVisio() {
const url = this.getFileUrl(this.filePath)

async importVisio() {
const getDescription = () =>
this.$gettextInterpolate(
this.$gettext('The diagram will open as a new .drawio file: %{file}'),
Expand All @@ -153,12 +154,14 @@ export default {
title: this.$gettext('Diagram imported'),
desc: getDescription()
})
this.makeRequest('GET', url)
this.getFileContents(this.currentFileContext, {
responseType: 'arrayBuffer'
})
.then((resp) => {
// Not setting `currentETag` on imports allows to create new files
// otherwise the ETag comparison fails with a 412 during the autosave/save event
// this.currentETag = resp.headers.get('etag')
return resp.arrayBuffer()
return resp.body
})
.then((arrayBuffer) => {
const blob = new Blob([arrayBuffer], { type: 'application/vnd.visio' })
Expand All @@ -180,7 +183,8 @@ export default {
})
},
save(payload, auto = false) {
this.putFileContents(this.filePath, payload.xml, {
this.putFileContents(this.currentFileContext, {
content: payload.xml,
previousEntityTag: this.currentETag
})
.then((resp) => {
Expand Down Expand Up @@ -228,7 +232,7 @@ export default {
return DateTime.local().toFormat('YYYYMMDD[T]HHmmss')
}
}
}
})
</script>
<style scoped>
#drawio-editor {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-draw-io/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from './App.vue'
const routes = [
{
name: 'draw-io',
path: '/:filePath*',
path: '/:driveAliasAndItem*',
component: App,
meta: {
auth: false,
Expand Down
34 changes: 22 additions & 12 deletions packages/web-app-external/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ import LoadingScreen from './components/LoadingScreen.vue'
import { computed, unref } from '@vue/composition-api'
import { queryItemAsString, useAppDefaults, useRouteQuery } from 'web-pkg/src/composables'
import { defineComponent } from '@vue/runtime-core'
import { DavProperty } from 'web-pkg/src/constants'
import { urlJoin } from 'web-pkg/src/utils'
import qs from 'qs'
import { configurationManager } from 'web-pkg/src/configuration'

export default defineComponent({
name: 'ExternalApp',
Expand Down Expand Up @@ -68,7 +72,7 @@ export default defineComponent({
formParameters: {}
}),
computed: {
...mapGetters(['capabilities', 'configuration']),
...mapGetters(['capabilities']),

pageTitle() {
const translated = this.$gettext('"%{appName}" app page')
Expand All @@ -89,19 +93,25 @@ export default defineComponent({
async created() {
this.loading = true
try {
const filePath = this.currentFileContext.path
const fileId = this.fileId || (await this.getFileResource(filePath)).fileId
const fileId =
this.fileId ||
(
await this.getFileInfo(this.currentFileContext, {
davProperties: [DavProperty.FileId]
})
).fileId

// fetch iframe params for app and file
const configUrl = this.configuration.server
const appOpenUrl = this.capabilities.files.app_providers[0].open_url.replace(/^\/+/, '')
const url =
configUrl +
appOpenUrl +
`?file_id=${fileId}` +
`&lang=${this.$language.current}` +
(this.applicationName ? `&app_name=${this.applicationName}` : '')

const baseUrl = urlJoin(
configurationManager.serverUrl,
this.capabilities.files.app_providers[0].open_url
)
const query = qs.stringify({
file_id: fileId,
lang: this.$language.current,
...(this.applicationName && { app_name: this.applicationName })
})
const url = `${baseUrl}?${query}`
const response = await this.makeRequest('POST', url)

if (response.status !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-external/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const appInfo = {
const routes = [
{
name: 'apps',
path: '/:filePath*',
path: '/:driveAliasAndItem*',
component: App,
meta: {
auth: false,
Expand Down
10 changes: 7 additions & 3 deletions packages/web-app-external/src/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Commit } from 'vuex'
import { urlJoin } from 'web-pkg/src/utils'
import { configurationManager } from 'web-pkg/src/configuration'

interface AppProvider {
icon: string
Expand Down Expand Up @@ -32,9 +34,11 @@ const actions = {
if (!rootGetters.capabilities.files.app_providers[0]?.enabled) {
return
}
const serverUrl = rootGetters.configuration.server
const appList = rootGetters.capabilities.files.app_providers[0].apps_url
const url = serverUrl + appList.replace('/app', 'app')

const url = urlJoin(
configurationManager.serverUrl,
rootGetters.capabilities.files.app_providers[0].apps_url
)

const response = await fetch(url)

Expand Down
55 changes: 32 additions & 23 deletions packages/web-app-files/src/components/ActionMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<oc-button
v-oc-tooltip="showTooltip || action.hideLabel ? action.label(filterParams) : ''"
:type="action.componentType"
v-bind="getComponentProps(action, items)"
v-bind="componentProps"
:class="[action.class, 'action-menu-item']"
data-testid="action-handler"
size="small"
v-on="getComponentListeners(action, items)"
v-on="componentListeners"
>
<oc-img
v-if="action.img"
Expand All @@ -17,7 +17,7 @@
class="oc-icon oc-icon-m"
/>
<oc-img
v-else-if="hasExternalImageIcon(action)"
v-else-if="hasExternalImageIcon"
data-testid="action-img"
:src="action.icon"
alt=""
Expand Down Expand Up @@ -51,8 +51,11 @@
</li>
</template>

<script>
export default {
<script lang="ts">
import { defineComponent, PropType } from '@vue/composition-api'
import { SpaceResource } from 'web-client/src/helpers'

export default defineComponent({
name: 'ActionMenuItem',
props: {
action: {
Expand All @@ -63,6 +66,11 @@ export default {
type: Array,
required: true
},
space: {
type: Object as PropType<SpaceResource>,
required: false,
default: null
},
appearance: {
type: String,
default: 'raw'
Expand All @@ -81,35 +89,40 @@ export default {
computed: {
filterParams() {
return {
space: this.space,
resources: this.items
}
}
},
methods: {
getComponentProps(action, resources) {
},
hasExternalImageIcon() {
return this.action.icon && /^https?:\/\//i.test(this.action.icon)
},
componentProps() {
const props = {
appearance: this.appearance,
...(action.isDisabled && { disabled: action.isDisabled() }),
...(action.variation && { variation: action.variation })
...(this.action.isDisabled && { disabled: this.action.isDisabled() }),
...(this.action.variation && { variation: this.action.variation })
}

if (action.componentType === 'router-link' && action.route) {
if (this.action.componentType === 'router-link' && this.action.route) {
return {
...props,
to: action.route({ resources })
to: this.action.route(this.filterParams)
}
}

return props
},

getComponentListeners(action, resources) {
if (typeof action.handler !== 'function' || action.componentType !== 'button') {
componentListeners() {
if (typeof this.action.handler !== 'function' || this.action.componentType !== 'button') {
return {}
}

const callback = () => action.handler({ resources, ...action.handlerData })
if (action.keepOpen) {
const callback = () =>
this.action.handler({
...this.filterParams,
...this.action.handlerData
})
if (this.action.keepOpen) {
return {
click: (event) => {
event.stopPropagation()
Expand All @@ -120,13 +133,9 @@ export default {
return {
click: callback
}
},

hasExternalImageIcon(action) {
return action.icon && /^https?:\/\//i.test(action.icon)
}
}
}
})
</script>
<style lang="scss">
.action-menu-item {
Expand Down
Loading