summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-01-13 02:29:27 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-01-13 02:29:27 +0900
commit7271fbb09217bc79380e924d3831fe054c9c3ab6 (patch)
tree8cdd0156a6b4542fd13518a6c39d6829bbb4b1d2 /packages
parentrefactor (diff)
downloadmisskey-7271fbb09217bc79380e924d3831fe054c9c3ab6.tar.gz
misskey-7271fbb09217bc79380e924d3831fe054c9c3ab6.tar.bz2
misskey-7271fbb09217bc79380e924d3831fe054c9c3ab6.zip
wip: refactor(client): migrate paging components to composition api
Diffstat (limited to 'packages')
-rw-r--r--packages/client/src/ui/deck/direct-column.vue45
-rw-r--r--packages/client/src/ui/deck/mentions-column.vue39
2 files changed, 25 insertions, 59 deletions
diff --git a/packages/client/src/ui/deck/direct-column.vue b/packages/client/src/ui/deck/direct-column.vue
index 7bf6344153..ca70f693c3 100644
--- a/packages/client/src/ui/deck/direct-column.vue
+++ b/packages/client/src/ui/deck/direct-column.vue
@@ -2,43 +2,26 @@
<XColumn :column="column" :is-stacked="isStacked">
<template #header><i class="fas fa-envelope" style="margin-right: 8px;"></i>{{ column.name }}</template>
- <XNotes :pagination="pagination" @before="before()" @after="after()"/>
+ <XNotes :pagination="pagination"/>
</XColumn>
</template>
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
+<script lang="ts" setup>
+import { computed } from 'vue';
import XColumn from './column.vue';
import XNotes from '@/components/notes.vue';
import * as os from '@/os';
-export default defineComponent({
- components: {
- XColumn,
- XNotes
- },
+const props = defineProps<{
+ column: Record<string, unknown>; // TODO
+ isStacked: boolean;
+}>();
- props: {
- column: {
- type: Object,
- required: true
- },
- isStacked: {
- type: Boolean,
- required: true
- }
- },
-
- data() {
- return {
- pagination: {
- endpoint: 'notes/mentions' as const,
- limit: 10,
- params: computed(() => ({
- visibility: 'specified'
- })),
- },
- }
- },
-});
+const pagination = {
+ point: 'notes/mentions' as const,
+ limit: 10,
+ params: computed(() => ({
+ visibility: 'specified' as const,
+ })),
+};
</script>
diff --git a/packages/client/src/ui/deck/mentions-column.vue b/packages/client/src/ui/deck/mentions-column.vue
index e007b3e08a..6822e7ef06 100644
--- a/packages/client/src/ui/deck/mentions-column.vue
+++ b/packages/client/src/ui/deck/mentions-column.vue
@@ -2,40 +2,23 @@
<XColumn :column="column" :is-stacked="isStacked">
<template #header><i class="fas fa-at" style="margin-right: 8px;"></i>{{ column.name }}</template>
- <XNotes :pagination="pagination" @before="before()" @after="after()"/>
+ <XNotes :pagination="pagination"/>
</XColumn>
</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
+<script lang="ts" setup>
+import { } from 'vue';
import XColumn from './column.vue';
import XNotes from '@/components/notes.vue';
import * as os from '@/os';
-export default defineComponent({
- components: {
- XColumn,
- XNotes
- },
+const props = defineProps<{
+ column: Record<string, unknown>; // TODO
+ isStacked: boolean;
+}>();
- props: {
- column: {
- type: Object,
- required: true
- },
- isStacked: {
- type: Boolean,
- required: true
- }
- },
-
- data() {
- return {
- pagination: {
- endpoint: 'notes/mentions' as const,
- limit: 10,
- },
- }
- },
-});
+const pagination = {
+ endpoint: 'notes/mentions' as const,
+ limit: 10,
+};
</script>