mirror of
https://github.com/unraid/api.git
synced 2026-05-05 14:41:54 -05:00
fix: display dropdown for pro key no connect installed (#848)
This commit is contained in:
@@ -31,13 +31,9 @@ const {
|
||||
guid,
|
||||
keyfile,
|
||||
lanIp,
|
||||
state,
|
||||
connectPluginInstalled,
|
||||
} = storeToRefs(serverStore);
|
||||
const { bannerGradient, theme } = storeToRefs(useThemeStore());
|
||||
|
||||
const hideDropdown = computed(() => state.value === 'PRO' && !connectPluginInstalled.value);
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -129,14 +125,12 @@ onBeforeMount(() => {
|
||||
</span>
|
||||
</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">
|
||||
<UpcDropdownTrigger ref="clickOutsideIgnoreTarget" :t="t" />
|
||||
<UpcDropdown ref="clickOutsideTarget" :t="t" />
|
||||
</OnClickOutside>
|
||||
</template>
|
||||
<OnClickOutside class="flex items-center justify-end h-full" :options="{ ignore: [clickOutsideIgnoreTarget] }" @trigger="outsideDropdown">
|
||||
<UpcDropdownTrigger ref="clickOutsideIgnoreTarget" :t="t" />
|
||||
<UpcDropdown ref="clickOutsideTarget" :t="t" />
|
||||
</OnClickOutside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -35,6 +35,8 @@ const title = computed((): string => {
|
||||
if (showErrorIcon.value) { return props.t('Learn more about the error'); }
|
||||
return dropdownVisible.value ? props.t('Close Dropdown') : props.t('Open Dropdown');
|
||||
});
|
||||
|
||||
// const hideAvatar = computed(() => state.value === 'PRO' && !connectPluginInstalled.value);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user