Skip to content

Commit 0ff1beb

Browse files
moodyjmzclaude
andcommitted
fix(settings): replace deprecated OC.Notification with @nextcloud/dialogs
OC.Notification.showTemporary no longer exists in NC34. Replace with showSuccess/showError from @nextcloud/dialogs. Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 608cfd3 commit 0ff1beb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/settings/src/components/AppList.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
</template>
152152

153153
<script>
154+
import { showError, showSuccess } from '@nextcloud/dialogs'
154155
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
155156
import pLimit from 'p-limit'
156157
import NcButton from '@nextcloud/vue/components/NcButton'
@@ -351,7 +352,7 @@ export default {
351352
try {
352353
if (suiteId === null) {
353354
await this.disableOfficeSuites(OFFICE_SUITES)
354-
OC.Notification.showTemporary(t('settings', 'All office suites disabled'))
355+
showSuccess(t('settings', 'All office suites disabled'))
355356
return
356357
}
357358
@@ -362,14 +363,14 @@ export default {
362363
}
363364
364365
await this.$store.dispatch('enableApp', { appId: selectedSuite.appId, groups: [] })
365-
OC.Notification.showTemporary(t('settings', '{name} enabled', { name: selectedSuite.name }))
366+
showSuccess(t('settings', '{name} enabled', { name: selectedSuite.name }))
366367
367368
const otherSuites = OFFICE_SUITES.filter((suite) => suite.id !== suiteId)
368369
await this.disableOfficeSuites(otherSuites)
369370
} catch (error) {
370371
logger.error('Error switching office suite:', error)
371372
if (error?.message) {
372-
OC.Notification.showTemporary(error.message)
373+
showError(error.message)
373374
}
374375
}
375376
},

0 commit comments

Comments
 (0)