mirror of
https://github.com/unraid/api.git
synced 2026-03-09 02:39:52 -05:00
fix: type check
This commit is contained in:
@@ -34,11 +34,11 @@ const showExternalIconOnHover = computed(() => props.item?.external && props.ite
|
||||
'rounded-md': rounded,
|
||||
'disabled:opacity-50 disabled:hover:opacity-50 disabled:focus:opacity-50 disabled:cursor-not-allowed': item?.disabled,
|
||||
}"
|
||||
@click.stop="item?.click ? item?.click(item?.clickParams) : null"
|
||||
@click.stop="item?.click ? item?.click(item?.clickParams ?? []) : null"
|
||||
>
|
||||
<span class="leading-snug inline-flex flex-row items-center gap-x-8px">
|
||||
<component :is="item?.icon" class="flex-shrink-0 text-current w-16px h-16px" aria-hidden="true" />
|
||||
{{ t(item?.text, item?.textParams) }}
|
||||
{{ t(item?.text, item?.textParams ?? []) }}
|
||||
</span>
|
||||
<ArrowTopRightOnSquareIcon
|
||||
v-if="showExternalIconOnHover"
|
||||
|
||||
@@ -41,7 +41,7 @@ const showExpireTime = computed(() => (state.value === 'TRIAL' || state.value ==
|
||||
:icon="unraidApiStatus === 'restarting' ? BrandLoadingWhite : unraidApiRestartAction?.icon"
|
||||
:text="unraidApiStatus === 'restarting' ? t('Restarting unraid-api…') : t('Restart unraid-api')"
|
||||
:title="unraidApiStatus === 'restarting' ? t('Restarting unraid-api…') : t('Restart unraid-api')"
|
||||
@click="unraidApiRestartAction?.click()"
|
||||
@click="unraidApiRestartAction?.click ? unraidApiRestartAction?.click() : undefined"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -23,7 +23,7 @@ const upgradeAction = computed((): ServerStateDataAction | undefined => {
|
||||
<UpcServerStateBuy
|
||||
class="text-gamma"
|
||||
:title="t('Upgrade Key')"
|
||||
@click="upgradeAction.click()"
|
||||
@click="upgradeAction.click ? upgradeAction.click() : undefined"
|
||||
>
|
||||
<h5>Unraid OS <em><strong>{{ t(stateData.humanReadable) }}</strong></em></h5>
|
||||
</UpcServerStateBuy>
|
||||
@@ -36,7 +36,7 @@ const upgradeAction = computed((): ServerStateDataAction | undefined => {
|
||||
<UpcServerStateBuy
|
||||
class="text-orange-dark relative top-[1px] hidden sm:block"
|
||||
:title="t('Purchase Key')"
|
||||
@click="purchaseAction.click()"
|
||||
@click="purchaseAction.click ? purchaseAction.click() : undefined"
|
||||
>{{ t('Purchase') }}</UpcServerStateBuy>
|
||||
</template>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user