Files
api/web/app.config.ts
Ajit Mehrotra 49f498de82 refactor(ui): replace vue-sonner toasts with nuxtui toasts
> [!Note] This stubs the unraid-ui/src/components/common/toast. Initially created a shim to convert vue-sonnner toasts to nuxtui. However, since there weren't that many, I just did a clean replacement.

# Other Changes
- replace router link with window.location.assign

The `UButton` component attempts to inject the Vue Router instance when the `:to` prop is used. In the standalone component environment (where the router is not installed), this caused a "TypeError: inject(...) is undefined" crash when rendering notifications with links.

This change replaces the `:to` prop with a standard `@click` handler that uses `window.location.assign`, ensuring navigation works correctly without requiring the router context.
2025-12-02 16:39:40 -05:00

50 lines
1.2 KiB
TypeScript

export default {
ui: {
colors: {
// overrided by tailwind-shared/css-variables.css
// these shared tailwind styles and colors are imported in src/assets/main.css
},
// https://ui.nuxt.com/docs/components/button#theme
button: {
//keep in mind, there is a "variant" AND a "variants" property
variants: {
variant: {
ghost: '',
link: 'hover:underline focus:underline',
},
},
},
// https://ui.nuxt.com/docs/components/tabs#theme
tabs: {
variants: {
pill: {},
},
},
// https://ui.nuxt.com/docs/components/slideover#theme
slideover: {
slots: {
// title: 'text-3xl font-normal',
},
variants: {
right: {},
},
},
//css theming/style-overrides for the toast component
// https://ui.nuxt.com/docs/components/toast#theme
toast: {},
// Also, for toasts, BUT this is imported in the Root UApp in mount-engine.ts
// https://ui.nuxt.com/docs/components/toast#examples
toaster: {
position: 'top-center' as const,
// expand: false, --> buggy
duration: 5000,
max: 3,
},
},
};