Skip to content
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
36 changes: 18 additions & 18 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@nextcloud/auth": "^2.4.0",
"@nextcloud/axios": "^2.5.1",
"@nextcloud/browser-storage": "^0.4.0",
"@nextcloud/dialogs": "^6.1.1",
"@nextcloud/dialogs": "^6.2.0",
"@nextcloud/event-bus": "^3.3.2",
"@nextcloud/files": "^3.10.2",
"@nextcloud/initial-state": "^2.2.0",
Expand Down
10 changes: 7 additions & 3 deletions src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@
.build()

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

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

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L152

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

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

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L154

Added line #L154 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 @@ -160,9 +160,10 @@
})
.catch(() => {
// do not close menu but keep focus
this.$refs.buttonFile.$el.focus()
this.$refs.buttonFile?.$el.focus()

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

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L163

Added line #L163 was not covered by tests
})
},

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

/**
* Save user entered URL as a link markup
* Triggered when the user submits the ActionInput
Expand Down Expand Up @@ -228,6 +230,7 @@
}
chain.focus().run()
},

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

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