merge: upstream
This commit is contained in:
commit
5db583a3eb
701 changed files with 50809 additions and 13660 deletions
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue';
|
||||
import { watch, ref, shallowRef, computed } from 'vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkClipPreview from '@/components/MkClipPreview.vue';
|
||||
|
|
@ -41,13 +41,13 @@ const pagination = {
|
|||
limit: 10,
|
||||
};
|
||||
|
||||
let tab = $ref('my');
|
||||
let favorites = $ref();
|
||||
const tab = ref('my');
|
||||
const favorites = ref();
|
||||
|
||||
const pagingComponent = $shallowRef<InstanceType<typeof MkPagination>>();
|
||||
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||
|
||||
watch($$(tab), async () => {
|
||||
favorites = await os.api('clips/my-favorites');
|
||||
watch(tab, async () => {
|
||||
favorites.value = await os.api('clips/my-favorites');
|
||||
});
|
||||
|
||||
async function create() {
|
||||
|
|
@ -60,6 +60,7 @@ async function create() {
|
|||
type: 'string',
|
||||
required: false,
|
||||
multiline: true,
|
||||
treatAsMfm: true,
|
||||
label: i18n.ts.description,
|
||||
},
|
||||
isPublic: {
|
||||
|
|
@ -74,20 +75,20 @@ async function create() {
|
|||
|
||||
clipsCache.delete();
|
||||
|
||||
pagingComponent.reload();
|
||||
pagingComponent.value.reload();
|
||||
}
|
||||
|
||||
function onClipCreated() {
|
||||
pagingComponent.reload();
|
||||
pagingComponent.value.reload();
|
||||
}
|
||||
|
||||
function onClipDeleted() {
|
||||
pagingComponent.reload();
|
||||
pagingComponent.value.reload();
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => [{
|
||||
const headerTabs = computed(() => [{
|
||||
key: 'my',
|
||||
title: i18n.ts.myClips,
|
||||
icon: 'ph-paperclip ph-bold ph-lg',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue