|
|
@ -24,14 +24,14 @@
|
|
|
|
// If we only want to get first N
|
|
|
|
// If we only want to get first N
|
|
|
|
if(first_number) {
|
|
|
|
if(first_number) {
|
|
|
|
(out[0].length > first_number && (out[0].length = first_number));
|
|
|
|
(out[0].length > first_number && (out[0].length = first_number));
|
|
|
|
(out[1].length > first_number && (out[0].length = first_number));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return {file: out[0], thumb: out[1]};
|
|
|
|
return {file: out[0], thumb: out[1]};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onMount(async () => {
|
|
|
|
onMount(async () => {
|
|
|
|
const file_lists = await fetch_things(10);
|
|
|
|
const file_lists = await fetch_things();
|
|
|
|
|
|
|
|
console.log(file_lists);
|
|
|
|
|
|
|
|
|
|
|
|
const thumbs_resolved = {};
|
|
|
|
const thumbs_resolved = {};
|
|
|
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
console.log("uhh");
|
|
|
|
console.log("uhh");
|
|
|
|
// Loop backwards efficiently.
|
|
|
|
// Loop backwards efficiently.
|
|
|
|
for (let i = 1; i < file_lists.file.length; i++) {
|
|
|
|
for (let i = 0; i < file_lists.file.length; i++) {
|
|
|
|
const file = file_lists.file[i];
|
|
|
|
const file = file_lists.file[i];
|
|
|
|
|
|
|
|
|
|
|
|
if (/^\s*$/.test(file)) continue;
|
|
|
|
if (/^\s*$/.test(file)) continue;
|
|
|
@ -56,6 +56,8 @@
|
|
|
|
file_list.push(file);
|
|
|
|
file_list.push(file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
file_list= file_list.reverse();
|
|
|
|
|
|
|
|
console.log({file: file_list, thumb: thumb_list});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function open_lightbox(i) {
|
|
|
|
function open_lightbox(i) {
|
|
|
|