refactor(frontend): 非ログイン画面でのmeta取得を減らす (#13776)

* refactor(frontend): 非ログイン画面でのmeta取得を減らす

* fix(frontend): サーバー供給のmetaとクライアントフォールバックで取れるmetaの型が違うのを修正

* force fetch meta at welcome.vue

* refactor
This commit is contained in:
かっこかり 2024-05-01 13:51:00 +09:00 committed by GitHub
parent 2ff90a80d4
commit 2017f9114f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 40 deletions

View file

@ -70,11 +70,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { onMounted, provide, ref, computed } from 'vue';
import * as Misskey from 'misskey-js';
import XCommon from './_common_/common.vue';
import { instanceName } from '@/config.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { instance } from '@/instance.js';
import XSigninDialog from '@/components/MkSigninDialog.vue';
import XSignupDialog from '@/components/MkSignupDialog.vue';
@ -114,7 +112,6 @@ const isTimelineAvailable = ref(instance.policies?.ltlAvailable || instance.poli
const showMenu = ref(false);
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
const narrow = ref(window.innerWidth < 1280);
const meta = ref<Misskey.entities.MetaResponse>();
const keymap = computed(() => {
return {
@ -128,10 +125,6 @@ const keymap = computed(() => {
};
});
misskeyApi('meta', { detail: true }).then(res => {
meta.value = res;
});
function signin() {
os.popup(XSigninDialog, {
autoSet: true,