Compare commits

..

No commits in common. "dae708c7651ac26d1c6b930fab8a277b30008179" and "f3d7c7abf27ad14f5dcf30d47af42596efd6e7b8" have entirely different histories.

2 changed files with 10 additions and 34 deletions

View File

@ -63,10 +63,6 @@ body {
background-color: #0056b3;
}
.PlaceholderItem {
animation: loading 1.5s infinite;
}
.PlaceholderItem > button,
.ParentDirectoryItem > button {
background-color: #4D4F5D;
@ -77,15 +73,6 @@ body {
}
.PlaceholderItem > button {
height: calc(18px + 10px * 2);
min-width: 4em;
}
@keyframes loading {
0%, 100% {
filter: brightness(80%);
}
50% {
filter: brightness(100%);
}
height: calc(16px + 10px * 2);
width: 6em;
}

View File

@ -68,18 +68,16 @@ function Contents(
};
if (item.is_dir) {
itemProps.onClick = item.isPlaceholder
? () => {}
: () => {
const subCategory = getFileName(itemProps.url);
itemProps.onClick = () => {
const subCategory = getFileName(itemProps.url);
if (category !== '') category = `${category}/${subCategory}`;
else category = subCategory;
if (subCategory === '..')
category = category.split('/').slice(0, -2).join('/');
if (category !== '') category = `${category}/${subCategory}`;
else category = subCategory;
if (subCategory === '..')
category = category.split('/').slice(0, -2).join('/');
setCategory(category);
};
setCategory(category);
};
return <DirectoryItem {...itemProps} />;
}
if (itemProps.url.endsWith('.mp4')) {
@ -139,14 +137,6 @@ function getFileName(string: string): string {
}
function getPlaceholderData(): galleryItemInfo[] {
const backDir = (): galleryItemInfo => {
return {
is_dir: true,
url: '..',
thumbnail_url: '',
isPlaceholder: true,
};
};
const placeholderDir = (): galleryItemInfo => {
return {
is_dir: true,
@ -165,7 +155,6 @@ function getPlaceholderData(): galleryItemInfo[] {
};
return [
backDir(),
placeholderDir(),
placeholderDir(),
placeholderImg(),