mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
refactor: clean up dropdown
This commit is contained in:
@@ -5,12 +5,12 @@ import { storeToRefs } from 'pinia';
|
||||
import { useDropdownStore } from '~/store/dropdown';
|
||||
import { useServerStore } from '~/store/server';
|
||||
|
||||
const dropdownStore = useDropdownStore()
|
||||
const dropdownStore = useDropdownStore();
|
||||
const { dropdownVisible } = storeToRefs(dropdownStore);
|
||||
const { connectPluginInstalled, registered, state, stateDataError, serverErrors } = storeToRefs(useServerStore());
|
||||
const { connectPluginInstalled, registered, state, stateDataError } = storeToRefs(useServerStore());
|
||||
|
||||
const showDefaultContent = computed(() => !showLaunchpad.value);
|
||||
const showLaunchpad = computed(() => state.value === 'ENOKEYFILE' || (connectPluginInstalled.value && !registered.value) && !stateDataError.value);
|
||||
const showLaunchpad = computed(() => state.value === 'ENOKEYFILE' || ((connectPluginInstalled.value && !registered.value) && !stateDataError.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -8,9 +8,6 @@ import { usePromoStore } from '~/store/promo';
|
||||
import { useServerStore } from '~/store/server';
|
||||
import type { UserProfileLink } from '~/types/userProfile';
|
||||
|
||||
const myServersEnv = ref<string>('Staging');
|
||||
const devEnv = ref<string>('development');
|
||||
|
||||
const errorsStore = useErrorsStore();
|
||||
const promoStore = usePromoStore();
|
||||
|
||||
@@ -83,10 +80,6 @@ const showKeyline = computed(() => showConnectStatus.value && (keyActions.value?
|
||||
<BrandLogoConnect gradient-start="currentcolor" gradient-stop="currentcolor" class="text-beta w-[120px]" />
|
||||
<UpcBeta />
|
||||
</h2>
|
||||
<span v-if="myServersEnv || devEnv" class="flex gap-x-4px cursor-default">
|
||||
<span v-if="myServersEnv" class="text-10px" :title="`API • ${myServersEnv}`">⚙️</span>
|
||||
<span v-if="devEnv" class="text-10px" :title="`UPC • ${devEnv}`">⚠️</span>
|
||||
</span>
|
||||
</header>
|
||||
<ul class="list-reset flex flex-col gap-y-4px p-0">
|
||||
<UpcDropdownConnectStatus v-if="showConnectStatus" class="mt-8px" />
|
||||
|
||||
Reference in New Issue
Block a user