diff --git a/plugin/source/dynamix.unraid.net/install/doinst.sh b/plugin/source/dynamix.unraid.net/install/doinst.sh index e18f5f64eb..710522e626 100644 --- a/plugin/source/dynamix.unraid.net/install/doinst.sh +++ b/plugin/source/dynamix.unraid.net/install/doinst.sh @@ -31,3 +31,9 @@ cp usr/local/unraid-api/.env.production usr/local/unraid-api/.env ( cd usr/local/bin ; ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm ) ( cd usr/local/bin ; rm -rf npx ) ( cd usr/local/bin ; ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx ) +( cd usr/local/bin ; rm -rf corepack ) +( cd usr/local/bin ; ln -sf ../lib/node_modules/corepack/dist/corepack.js corepack ) +( cd usr/local/bin ; rm -rf npm ) +( cd usr/local/bin ; ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm ) +( cd usr/local/bin ; rm -rf npx ) +( cd usr/local/bin ; ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx ) diff --git a/unraid-ui/src/components/brand/brand-button.variants.ts b/unraid-ui/src/components/brand/brand-button.variants.ts index 352b3f5538..0dd53eac60 100644 --- a/unraid-ui/src/components/brand/brand-button.variants.ts +++ b/unraid-ui/src/components/brand/brand-button.variants.ts @@ -1,7 +1,7 @@ import { cva, type VariantProps } from 'class-variance-authority'; export const brandButtonVariants = cva( - 'group text-center font-semibold leading-none relative z-0 flex flex-row items-center justify-center border-2 border-solid shadow-none cursor-pointer rounded-md hover:shadow-md focus:shadow-md disabled:opacity-25 disabled:hover:opacity-25 disabled:focus:opacity-25 disabled:cursor-not-allowed', + 'group text-center font-semibold leading-none relative z-0 flex flex-row items-center justify-center border-2 border-solid shadow-none cursor-pointer rounded-md hover:shadow-md focus:shadow-md disabled:opacity-25 disabled:hover:opacity-25 disabled:focus:opacity-25 disabled:cursor-not-allowed aria-disabled:opacity-25 aria-disabled:cursor-not-allowed aria-disabled:hover:opacity-25 aria-disabled:hover:shadow-none', { variants: { variant: { diff --git a/unraid-ui/src/components/common/accordion/Accordion.vue b/unraid-ui/src/components/common/accordion/Accordion.vue index da908e7a03..a7fdeced85 100644 --- a/unraid-ui/src/components/common/accordion/Accordion.vue +++ b/unraid-ui/src/components/common/accordion/Accordion.vue @@ -5,6 +5,7 @@ import { AccordionRoot, AccordionTrigger, } from '@/components/ui/accordion'; +import { computed, ref, watch } from 'vue'; export interface AccordionItemData { value: string; @@ -18,13 +19,40 @@ export interface AccordionProps { type?: 'single' | 'multiple'; collapsible?: boolean; defaultValue?: string | string[]; + modelValue?: string | string[]; class?: string; + itemClass?: string; + triggerClass?: string; } const props = withDefaults(defineProps(), { type: 'single', collapsible: true, }); + +const emit = defineEmits<{ + 'update:modelValue': [value: string | string[]]; +}>(); + +const openValue = ref(props.modelValue ?? props.defaultValue); + +watch( + () => props.modelValue, + (val) => { + if (val !== undefined) openValue.value = val; + } +); + +function isItemOpen(itemValue: string): boolean { + if (!openValue.value) return false; + if (Array.isArray(openValue.value)) return openValue.value.includes(itemValue); + return openValue.value === itemValue; +} + +function handleUpdate(value: string | string[]) { + openValue.value = value; + emit('update:modelValue', value); +}