Archive · OWD 3.x for Nuxt. This page describes the previous Nuxt integration. For OWD 4.x, see the current Nuxt guide.
OWD standardizes how code asks for user confirmation or input, not which widget library renders it. Themes keep their own look (Win95, Win11, GNOME, Nova, …); shared code (module-nuxt-fs, apps) calls a small provider instead of hard-coding window.confirm or PrimeVue.
The interface lives in @owdproject/core:
packages/core/runtime/dialogs/desktopDialogProvider.ts — DesktopDialogProvider:
confirm(options) → Promise<boolean>alert(message, options?) → Promise<void>prompt(message, defaultValue?) → Promise<string | null>DESKTOP_DIALOG_PROVIDER_KEYimport { useDesktopDialogs } from '@owdproject/core/runtime/composables/useDesktopDialogs'
const dialogs = useDesktopDialogs()
const ok = await dialogs.confirm({
title: 'Delete items',
message: 'Send 3 items to the Recycle Bin?',
acceptLabel: 'Yes',
rejectLabel: 'No',
})
Pass already translated strings from vue-i18n. Optional extras on confirm carries theme-specific payloads (e.g. Win95 delete dialog { toTrash: boolean }).
If no theme provider is registered, useDesktopDialogs falls back to window.confirm / alert / prompt. On the server, confirm resolves to false and prompt to null.
kit-nuxt-primevue)Demo themes install @owdproject/kit-nuxt-primevue, which:
@primevue/nuxt-moduleprovide**s createDesktopDialogs(useConfirm())await installModule('@owdproject/kit-nuxt-primevue')
Themes mount <ConfirmDialog /> groups (delete, about, …) with their own templates/CSS.
Explicit imports (optional):
import { DESKTOP_DIALOG_PROVIDER_KEY } from '@owdproject/core/runtime/constants/desktopShellKeys'
import { createDesktopDialogs } from '@owdproject/kit-nuxt-primevue/runtime/dialogs/createDesktopDialogs'
Custom PV themes can replace the plugin and still implement DesktopDialogProvider.
Implement DesktopDialogProvider (Vuetify, Nuxt UI, native <dialog>, …) and provide it on DESKTOP_DIALOG_PROVIDER_KEY in a client plugin. Do not require kit-nuxt-primevue.
useExplorerFsOperations (core) calls useDesktopDialogs for file overwrite prompts.