diff --git a/_data/serverState.ts b/_data/serverState.ts index dd44dcfc1..8e8e324b6 100644 --- a/_data/serverState.ts +++ b/_data/serverState.ts @@ -47,7 +47,7 @@ const serverState = { lanIp: '192.168.0.1', locale: 'en', pluginInstalled: false, - registered: false, + registered: true, site: 'http://localhost:4321', state, uptime, diff --git a/components/Auth.ce.vue b/components/Auth.ce.vue index a81b6ee10..1a198f012 100644 --- a/components/Auth.ce.vue +++ b/components/Auth.ce.vue @@ -2,30 +2,12 @@ import { storeToRefs } from 'pinia'; import { ExclamationTriangleIcon } from '@heroicons/vue/24/solid'; import { useServerStore } from '~/store/server'; -import type { ServerStateDataAction } from '~/types/server'; import 'tailwindcss/tailwind.css'; import '~/assets/main.css'; -export interface Props { - phpRegistered?: boolean; -} - -const props = withDefaults(defineProps(), { - phpRegistered: false, -}); - const serverStore = useServerStore(); -const { registered, stateData } = storeToRefs(serverStore); +const { authAction, stateData } = storeToRefs(serverStore); -// rely on prop before the pinia state kicks in -const computedRegistered = computed(() => registered.value === undefined ? !!props.phpRegistered : registered.value); - -// Intended to retrieve sign in and sign out from actions -const accountAction = computed((): ServerStateDataAction | undefined => { - const allowed = ['signIn', 'signOut']; - if (!stateData.value.actions) return; - return stateData.value.actions.find(action => allowed.includes(action.name)); -}); // @todo use callback url const stateDataErrorAction = computed(() => { return { @@ -39,7 +21,7 @@ const stateDataErrorAction = computed(() => { const button = computed(() => { if (stateData.value.error) return stateDataErrorAction.value; - return accountAction.value; + return authAction.value; }); diff --git a/components/KeyActions.ce.vue b/components/KeyActions.ce.vue index 01f19c26d..ee768963a 100644 --- a/components/KeyActions.ce.vue +++ b/components/KeyActions.ce.vue @@ -8,7 +8,7 @@ const { keyActions } = storeToRefs(useServerStore());