mirror of
https://github.com/unraid/api.git
synced 2026-05-07 23:51:40 -05:00
fix: display dropdown for pro key no connect installed (#848)
This commit is contained in:
@@ -31,13 +31,9 @@ const {
|
|||||||
guid,
|
guid,
|
||||||
keyfile,
|
keyfile,
|
||||||
lanIp,
|
lanIp,
|
||||||
state,
|
|
||||||
connectPluginInstalled,
|
|
||||||
} = storeToRefs(serverStore);
|
} = storeToRefs(serverStore);
|
||||||
const { bannerGradient, theme } = storeToRefs(useThemeStore());
|
const { bannerGradient, theme } = storeToRefs(useThemeStore());
|
||||||
|
|
||||||
const hideDropdown = computed(() => state.value === 'PRO' && !connectPluginInstalled.value);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close dropdown when clicking outside
|
* Close dropdown when clicking outside
|
||||||
* @note If in testing you have two variants of the component on a page the clickOutside will fire twice making it seem like it doesn't work
|
* @note If in testing you have two variants of the component on a page the clickOutside will fire twice making it seem like it doesn't work
|
||||||
@@ -129,14 +125,12 @@ onBeforeMount(() => {
|
|||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<template v-if="!hideDropdown">
|
<div class="block w-2px h-24px bg-gamma" />
|
||||||
<div class="block w-2px h-24px bg-gamma" />
|
|
||||||
|
|
||||||
<OnClickOutside class="flex items-center justify-end h-full" :options="{ ignore: [clickOutsideIgnoreTarget] }" @trigger="outsideDropdown">
|
<OnClickOutside class="flex items-center justify-end h-full" :options="{ ignore: [clickOutsideIgnoreTarget] }" @trigger="outsideDropdown">
|
||||||
<UpcDropdownTrigger ref="clickOutsideIgnoreTarget" :t="t" />
|
<UpcDropdownTrigger ref="clickOutsideIgnoreTarget" :t="t" />
|
||||||
<UpcDropdown ref="clickOutsideTarget" :t="t" />
|
<UpcDropdown ref="clickOutsideTarget" :t="t" />
|
||||||
</OnClickOutside>
|
</OnClickOutside>
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ const title = computed((): string => {
|
|||||||
if (showErrorIcon.value) { return props.t('Learn more about the error'); }
|
if (showErrorIcon.value) { return props.t('Learn more about the error'); }
|
||||||
return dropdownVisible.value ? props.t('Close Dropdown') : props.t('Open Dropdown');
|
return dropdownVisible.value ? props.t('Close Dropdown') : props.t('Open Dropdown');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// const hideAvatar = computed(() => state.value === 'PRO' && !connectPluginInstalled.value);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user