Sharkey/packages/frontend/src/pages/user/clips.vue

49 lines
1 KiB
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
2020-11-29 05:34:39 +02:00
<template>
2023-05-19 14:52:15 +03:00
<MkSpacer :contentMax="700">
<div>
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" :class="$style.item" class="_panel _margin">
<b>{{ item.name }}</b>
2023-05-19 14:52:15 +03:00
<div v-if="item.description" :class="$style.description">{{ item.description }}</div>
</MkA>
</MkPagination>
</div>
</MkSpacer>
2020-11-29 05:34:39 +02:00
</template>
2022-08-31 17:12:22 +03:00
<script lang="ts" setup>
import { computed } from 'vue';
import * as misskey from 'misskey-js';
import MkPagination from '@/components/MkPagination.vue';
2020-11-29 05:34:39 +02:00
2022-08-31 17:12:22 +03:00
const props = defineProps<{
user: misskey.entities.User;
}>();
2020-11-29 05:34:39 +02:00
2022-08-31 17:12:22 +03:00
const pagination = {
endpoint: 'users/clips' as const,
limit: 20,
params: computed(() => ({
userId: props.user.id,
})),
};
2020-11-29 05:34:39 +02:00
</script>
2023-05-19 14:52:15 +03:00
<style lang="scss" module>
.item {
display: block;
padding: 16px;
}
2020-11-29 05:34:39 +02:00
2023-05-19 14:52:15 +03:00
.description {
margin-top: 8px;
padding-top: 8px;
border-top: solid 0.5px var(--divider);
}
2020-11-29 05:34:39 +02:00
</style>