mirror of
https://github.com/nextcloud/server.git
synced 2026-05-18 11:30:42 -04:00
Fix inability to re-enter share password after invalid input
Signed-off-by: Christopher Ng <chrng8@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
082fe16eee
commit
e225b8d77d
3 changed files with 13 additions and 6 deletions
|
|
@ -644,7 +644,13 @@ export default {
|
|||
if (this.share && !this.share.id) {
|
||||
// if the share is valid, create it on the server
|
||||
if (this.checkShare(this.share)) {
|
||||
await this.pushNewLinkShare(this.share, true)
|
||||
try {
|
||||
await this.pushNewLinkShare(this.share, true)
|
||||
} catch (e) {
|
||||
this.pending = false
|
||||
console.error(e)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
this.open = true
|
||||
|
|
@ -738,8 +744,8 @@ export default {
|
|||
component.copyLink()
|
||||
}
|
||||
|
||||
} catch ({ response }) {
|
||||
const message = response.data.ocs.meta.message
|
||||
} catch (data) {
|
||||
const message = data.response.data.ocs.meta.message
|
||||
if (message.match(/password/i)) {
|
||||
this.onSyncError('password', message)
|
||||
} else if (message.match(/date/i)) {
|
||||
|
|
@ -747,6 +753,7 @@ export default {
|
|||
} else {
|
||||
this.onSyncError('pending', message)
|
||||
}
|
||||
throw data
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
|
|
|||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue