Compare commits

...

2 Commits

Author SHA1 Message Date
Dustin Brett
41f2ece1eb Show icons on details view when they exist
Some checks failed
Tests / tests (push) Has been cancelled
2025-10-24 17:19:24 -07:00
Dustin Brett
aa30cf7e4b Properly look for run pid 2025-10-24 16:48:53 -07:00
3 changed files with 10 additions and 7 deletions

View File

@ -169,12 +169,15 @@ const Run: FC<ComponentProcessProps> = ({ id }) => {
([processName]) =>
processName.toLowerCase() ===
(
resourceAliasMap[resourcePath.toLowerCase()] || resourcePath
resourceAliasMap[resourcePid.toLowerCase()] || resourcePid
).toLowerCase()
) || [];
if (pid) {
open(pid);
open(
pid,
resourcePath === resourcePid ? undefined : { url: resourcePath }
);
addRunHistoryEntry();
} else if (utilCommandMap[resource.toLowerCase()]) {
utilCommandMap[resource.toLowerCase()]();

View File

@ -41,6 +41,7 @@ import useDoubleClick from "hooks/useDoubleClick";
import Button from "styles/common/Button";
import Icon from "styles/common/Icon";
import {
EXTENSIONS_WITH_ICON,
ICON_CACHE,
ICON_CACHE_EXTENSION,
ICON_PATH,
@ -349,7 +350,7 @@ const FileEntry: FC<FileEntryProps> = ({
!isLoadingFileManager &&
isVisible &&
!isIconCached.current &&
!detailsView
(!detailsView || EXTENSIONS_WITH_ICON.has(urlExt))
) {
const updateIcon = async (): Promise<void> => {
if (icon.startsWith("blob:") || icon.startsWith("data:")) {
@ -506,9 +507,7 @@ const FileEntry: FC<FileEntryProps> = ({
updateIcon();
}
if (!isVisible && getIconAbortController.current) {
getIconAbortController.current.abort();
}
if (!isVisible) getIconAbortController.current?.abort();
}, [
detailsView,
exists,

View File

@ -274,13 +274,14 @@ export const VIDEO_FILE_EXTENSIONS = new Set([
export const DYNAMIC_PREFIX = ["nostr:"];
export const EXTENSIONS_WITH_ICON = new Set([".ani", ".cur", ".exe", ".ico"]);
export const DYNAMIC_EXTENSION = new Set([
...AUDIO_FILE_EXTENSIONS,
...AUDIO_PLAYLIST_EXTENSIONS,
...IMAGE_FILE_EXTENSIONS,
...TIFF_IMAGE_FORMATS,
...VIDEO_FILE_EXTENSIONS,
".ani",
".exe",
".mp3",
".sav",