mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-03-29 11:56:58 +00:00
@@ -85,7 +85,7 @@ const { t } = useI18n();
|
|||||||
|
|
||||||
let currentVideoCount = 0;
|
let currentVideoCount = 0;
|
||||||
const videoStep = 100;
|
const videoStep = 100;
|
||||||
let videosStore = null;
|
const videosStore = ref(null);
|
||||||
const videos = ref([]);
|
const videos = ref([]);
|
||||||
const availableFilters = ["all", "shorts", "videos"];
|
const availableFilters = ["all", "shorts", "videos"];
|
||||||
const selectedFilter = ref("all");
|
const selectedFilter = ref("all");
|
||||||
@@ -110,11 +110,11 @@ const filteredVideos = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function loadMoreVideos() {
|
function loadMoreVideos() {
|
||||||
if (!videosStore) return;
|
if (!videosStore.value) return;
|
||||||
currentVideoCount = Math.min(currentVideoCount + videoStep, videosStore.length);
|
currentVideoCount = Math.min(currentVideoCount + videoStep, videosStore.value.length);
|
||||||
if (videos.value.length != videosStore.length) {
|
if (videos.value.length != videosStore.value.length) {
|
||||||
fetchDeArrowContent(videosStore.slice(videos.value.length, currentVideoCount));
|
fetchDeArrowContent(videosStore.value.slice(videos.value.length, currentVideoCount));
|
||||||
videos.value = videosStore.slice(0, currentVideoCount);
|
videos.value = videosStore.value.slice(0, currentVideoCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ onMounted(() => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
videosStore = resp;
|
videosStore.value = resp;
|
||||||
loadMoreVideos();
|
loadMoreVideos();
|
||||||
updateWatched(videos.value);
|
updateWatched(videos.value);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user