@@ -136,6 +136,8 @@ import AppNavigationIconBullet from '@nextcloud/vue/dist/Components/AppNavigatio
136136import Actions from ' @nextcloud/vue/dist/Components/Actions'
137137import ActionButton from ' @nextcloud/vue/dist/Components/ActionButton'
138138import ActionLink from ' @nextcloud/vue/dist/Components/ActionLink'
139+ import { generateRemoteUrl } from ' @nextcloud/router'
140+ import { showSuccess , showError } from ' @nextcloud/dialogs'
139141
140142const CD_DURATION = 7
141143
@@ -227,7 +229,7 @@ export default {
227229 return url
228230 },
229231 url () {
230- const rootURL = this . $OC . linkToRemote (' dav' )
232+ const rootURL = generateRemoteUrl (' dav' )
231233 return new URL (this .calendar .url , rootURL)
232234 },
233235 hasShares () {
@@ -400,11 +402,11 @@ export default {
400402 this .copySuccess = true
401403 this .copied = true
402404 // Notify calendar url was copied
403- this . $OC . Notification . showTemporary (this .$t (' tasks' , ' Calendar link copied to clipboard.' ))
405+ showSuccess (this .$t (' tasks' , ' Calendar link copied to clipboard.' ))
404406 }, e => {
405407 this .copySuccess = false
406408 this .copied = true
407- this . $OC . Notification . showTemporary (this .$t (' tasks' , ' Calendar link could not be copied to clipboard.' ))
409+ showError (this .$t (' tasks' , ' Calendar link could not be copied to clipboard.' ))
408410 }).then (() => {
409411 setTimeout (() => {
410412 // stop loading status regardless of outcome
@@ -473,7 +475,7 @@ export default {
473475 try {
474476 await this .deleteCalendar (this .calendar )
475477 } catch (error) {
476- this . $toast . error (this .$t (' tasks' , ' An error occurred, unable to delete the calendar.' ))
478+ showError (this .$t (' tasks' , ' An error occurred, unable to delete the calendar.' ))
477479 console .error (error)
478480 } finally {
479481 clearInterval (this .deleteInterval )
0 commit comments