chore: lint

This commit is contained in:
Zack Spear
2023-07-24 17:10:44 -07:00
parent ee7e49e929
commit c89696f3d5

View File

@@ -20,24 +20,23 @@ const registeredAndconnectPluginInstalled = computed(() => connectPluginInstalle
const showErrorIcon = computed(() => errors.value.length || stateData.value.error);
const text = computed((): string | undefined => {
if ((stateData.value.error) && state.value !== 'EEXPIRED') return 'Fix Error';
if (registeredAndconnectPluginInstalled.value) return username.value;
return;
if ((stateData.value.error) && state.value !== 'EEXPIRED') { return 'Fix Error'; }
if (registeredAndconnectPluginInstalled.value) { return username.value; }
});
const title = computed((): string => {
if (state.value === 'ENOKEYFILE') return 'Get Started';
if (state.value === 'EEXPIRED') return 'Trial Expired, see options below';
if (showErrorIcon.value) return 'Learn more about the error';
if (state.value === 'ENOKEYFILE') { return 'Get Started'; }
if (state.value === 'EEXPIRED') { return 'Trial Expired, see options below'; }
if (showErrorIcon.value) { return 'Learn more about the error'; }
return dropdownVisible.value ? 'Close Dropdown' : 'Open Dropdown';
});
</script>
<template>
<button
@click="dropdownStore.dropdownToggle()"
class="group text-18px hover:text-alpha focus:text-alpha border border-transparent relative flex flex-row justify-end items-center h-full gap-x-8px outline-none focus:outline-none"
:title="title"
@click="dropdownStore.dropdownToggle()"
>
<template v-if="errors.length && errors[0].level">
<InformationCircleIcon v-if="errors[0].level === 'info'" class="text-unraid-red fill-current relative w-24px h-24px" />
@@ -46,7 +45,7 @@ const title = computed((): string => {
</template>
<span v-if="text" class="relative leading-none">
<span>{{ text }}</span>
<span class="absolute bottom-[-3px] inset-x-0 h-2px w-full bg-gradient-to-r from-unraid-red to-orange rounded opacity-0 group-hover:opacity-100 group-focus:opacity-100 transition-opacity"></span>
<span class="absolute bottom-[-3px] inset-x-0 h-2px w-full bg-gradient-to-r from-unraid-red to-orange rounded opacity-0 group-hover:opacity-100 group-focus:opacity-100 transition-opacity" />
</span>
<UpcDropdownTriggerMenuIcon :open="dropdownVisible" />
<BrandAvatar />