fix: CSS selectors for listing icons (#3277)

This commit is contained in:
Andrés Bono 2024-06-08 21:54:06 +02:00 committed by GitHub
parent 6ca3d5a573
commit 2a90cdfdaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 14 deletions

View File

@ -275,12 +275,10 @@ const open = () => {
}; };
const getExtension = (fileName: string): string => { const getExtension = (fileName: string): string => {
const lastDotIndex = fileName.lastIndexOf('.'); const lastDotIndex = fileName.lastIndexOf(".");
if (lastDotIndex === -1) { if (lastDotIndex === -1) {
return fileName; return fileName;
} }
return fileName.substring(lastDotIndex ); return fileName.substring(lastDotIndex);
}; };
</script> </script>

View File

@ -5,7 +5,7 @@
.file-icons [aria-label^="."] { .file-icons [aria-label^="."] {
opacity: 0.33; opacity: 0.33;
} }
.file-icons [aria-label$=".bak"] { .file-icons [data-ext=".bak"] {
opacity: 0.33; opacity: 0.33;
} }
@ -47,7 +47,6 @@
content: "slideshow"; content: "slideshow";
} }
/* #0f0 - Spreadsheet/Database */ /* #0f0 - Spreadsheet/Database */
.file-icons [data-ext=".csv"] i::before, .file-icons [data-ext=".csv"] i::before,
@ -55,7 +54,7 @@
.file-icons [data-ext=".odb"] i::before, .file-icons [data-ext=".odb"] i::before,
.file-icons [data-ext=".ods"] i::before, .file-icons [data-ext=".ods"] i::before,
.file-icons [data-ext=".xls"] i::before, .file-icons [data-ext=".xls"] i::before,
.file-icons [data-ext=".xlsx"] i::before { .file-icons [data-ext=".xlsx"] i::before {
content: "border_all"; content: "border_all";
} }
@ -152,16 +151,16 @@
/* General */ /* General */
.file-icons [data-ext="audio"] i { .file-icons [data-type="audio"] i {
color: var(--icon-yellow); color: var(--icon-yellow);
} }
.file-icons [data-ext="image"] i { .file-icons [data-type="image"] i {
color: var(--icon-orange); color: var(--icon-orange);
} }
.file-icons [data-ext="video"] i { .file-icons [data-type="video"] i {
color: var(--icon-violet); color: var(--icon-violet);
} }
.file-icons [data-ext="invalid_link"] i { .file-icons [data-type="invalid_link"] i {
color: var(--icon-red); color: var(--icon-red);
} }
@ -172,7 +171,7 @@
.file-icons [data-ext=".jar"] i, .file-icons [data-ext=".jar"] i,
.file-icons [data-ext=".psd"] i, .file-icons [data-ext=".psd"] i,
.file-icons [data-ext=".rb"] i, .file-icons [data-ext=".rb"] i,
.file-icons [data-ext="pdf"] i { .file-icons [data-ext=".pdf"] i {
color: var(--icon-red); color: var(--icon-red);
} }
@ -204,8 +203,7 @@
.file-icons [data-ext=".go"] i, .file-icons [data-ext=".go"] i,
.file-icons [data-ext=".ods"] i, .file-icons [data-ext=".ods"] i,
.file-icons [data-ext=".xls"] i, .file-icons [data-ext=".xls"] i,
.file-icons [data-ext=".xlsx"] i , .file-icons [data-ext=".xlsx"] i {
.file-icons [data-ext="xlsx"] i::before{
color: var(--icon-green); color: var(--icon-green);
} }