Closed thlehmann-ionos closed 2 months ago
If you use Vue then I recommend simply directly using NcDialog
from @nextcloud/vue
.
If not you can use this library, as the replacement for the deprecated function is to use the DialogBuilder
from this library, see:
https://nextcloud-libraries.github.io/nextcloud-dialogs/classes/index.DialogBuilder.html
Thanks for pointing that out.
Note: unfortunately, <NcDialog>
leads to repetition and possibly inconsistent UI because every confirm dialog has to be re-implemented (icon, button order). ´. Same for the DialogBuilder
, which is a bit better because it includes the facility for that, but still repeated code.
Background
OC.dialogs.confirm
is to be deprecated in Nextcloud 30, but it's not yet included in the dialogs packageconfirm()
was also never declared in typingsRequest
confirm()
Workaround
Adding this as
src/oc.d.ts
to a typscript-able app: