Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Revert "fix(ActionInsertLink): Apparently filePicker always returns…
… an array now"

This reverts commit 915fe39.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Jun 23, 2025
commit 73a5d632967cb8f540fbe22c83590e118804c10e
8 changes: 2 additions & 6 deletions src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@
const filePicker = buildFilePicker(this.startPath)

filePicker.pick()
.then((files) => {
.then((file) => {

Check warning on line 130 in src/components/Menu/ActionInsertLink.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L130

Added line #L130 was not covered by tests
const client = OC.Files.getClient()
client.getFileInfo(files[0]).then((_status, fileInfo) => {
client.getFileInfo(file).then((_status, fileInfo) => {

Check warning on line 132 in src/components/Menu/ActionInsertLink.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L132

Added line #L132 was not covered by tests
const url = new URL(generateUrl(`/f/${fileInfo.id}`), window.origin)
this.setLink(url.href, fileInfo.name)
this.startPath = fileInfo.path + (fileInfo.type === 'dir' ? `/${fileInfo.name}/` : '')
Expand All @@ -141,7 +141,6 @@
this.$refs.buttonFile?.$el.focus()
})
},

/**
* Allow user to enter an URL manually
* Triggered when by the "link url" button
Expand All @@ -163,7 +162,6 @@
}
this.isInputMode = true
},

/**
* Save user entered URL as a link markup
* Triggered when the user submits the ActionInput
Expand Down Expand Up @@ -191,7 +189,6 @@
chain.insertOrSetLink(text, { href })
chain.focus().run()
},

/**
* Remove link markup at current position
* Triggered by the "remove link" button
Expand All @@ -200,7 +197,6 @@
this.$editor.chain().unsetLink().focus().run()
this.menuOpen = false
},

linkPicker() {
getLinkWithPicker(null, true)
.then(link => {
Expand Down
Loading