refactor(frontend): 非ログイン画面でのmeta取得を減らす (#13776)
* refactor(frontend): 非ログイン画面でのmeta取得を減らす * fix(frontend): サーバー供給のmetaとクライアントフォールバックで取れるmetaの型が違うのを修正 * force fetch meta at welcome.vue * refactor
This commit is contained in:
@@ -4,8 +4,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div v-if="meta">
|
||||
<XSetup v-if="meta.requireSetup"/>
|
||||
<div v-if="instance">
|
||||
<XSetup v-if="instance.requireSetup"/>
|
||||
<XEntrance v-else/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -16,13 +16,13 @@ import * as Misskey from 'misskey-js';
|
||||
import XSetup from './welcome.setup.vue';
|
||||
import XEntrance from './welcome.entrance.a.vue';
|
||||
import { instanceName } from '@/config.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { fetchInstance } from '@/instance.js';
|
||||
|
||||
const meta = ref<Misskey.entities.MetaResponse | null>(null);
|
||||
const instance = ref<Misskey.entities.MetaDetailed | null>(null);
|
||||
|
||||
misskeyApi('meta', { detail: true }).then(res => {
|
||||
meta.value = res;
|
||||
fetchInstance(true).then((res) => {
|
||||
instance.value = res;
|
||||
});
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
Reference in New Issue
Block a user