Sharkey/packages/frontend/src/components/MkFeaturedPhotos.vue
おさむのひと fa9c4a19b9
refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる (#12694)
* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる

* fix

* fix

* renate to "misskeyApi"

* rename file
2024-01-04 18:32:46 +09:00

27 lines
639 B
Vue

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div v-if="meta" :class="$style.root" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }"></div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import { misskeyApi } from '@/scripts/misskey-api.js';
const meta = ref<Misskey.entities.MetaResponse>();
misskeyApi('meta', { detail: true }).then(gotMeta => {
meta.value = gotMeta;
});
</script>
<style lang="scss" module>
.root {
background-position: center;
background-size: cover;
}
</style>