Application interface goes here.
- ) -} -``` - -```js -// features/applications/applications.js - -import { Example } from "../../components/applications/example/Example.jsx"; - -export default class ApplicationsManager { - static APPLICATIONS = [ - // ... - new Application("Example App", "example", Example), - ] - - // ... -} -``` \ No newline at end of file diff --git a/docs/features/applications/media-viewer/README.md b/docs/features/applications/media-viewer/README.md deleted file mode 100644 index 704d0e0..0000000 --- a/docs/features/applications/media-viewer/README.md +++ /dev/null @@ -1,9 +0,0 @@ -[← Back](../README.md) - -#Application interface goes here.
+ ) +} +``` + +```js +// features/apps/apps.js + +import { Example } from "../../components/apps/example/Example.jsx"; + +export default class AppsManager { + static APPLICATIONS = [ + // ... + new App("Example App", "example", Example), + ] + + // ... +} +``` \ No newline at end of file diff --git a/docs/features/applications/file-explorer/README.md b/docs/features/apps/file-explorer/README.md similarity index 51% rename from docs/features/applications/file-explorer/README.md rename to docs/features/apps/file-explorer/README.md index 9a89500..c36a416 100644 --- a/docs/features/applications/file-explorer/README.md +++ b/docs/features/apps/file-explorer/README.md @@ -1,6 +1,6 @@ [← Back](../README.md) -#{folder.name}
@@ -181,7 +181,7 @@ export function DirectoryList({ directory, showHidden = false, folderClassName, }} >{file.id}
diff --git a/src/components/applications/file-explorer/directory-list/DirectoryList.module.css b/src/components/apps/file-explorer/directory-list/DirectoryList.module.css similarity index 100% rename from src/components/applications/file-explorer/directory-list/DirectoryList.module.css rename to src/components/apps/file-explorer/directory-list/DirectoryList.module.css diff --git a/src/components/apps/file-explorer/directory-list/ImagePreview.jsx b/src/components/apps/file-explorer/directory-list/ImagePreview.jsx new file mode 100644 index 0000000..42df32a --- /dev/null +++ b/src/components/apps/file-explorer/directory-list/ImagePreview.jsx @@ -0,0 +1,27 @@ +import { useState } from "react"; +import styles from "./ImagePreview.module.css"; +import { ReactSVG } from "react-svg"; +import AppsManager from "../../../../features/apps/appsManager.js"; +import { APPS } from "../../../../config/apps.config.js"; + +export function ImagePreview({ source, className, onError, ...props }) { + const [loadingFailed, setLoadingFailed] = useState(false); + + const onLoadingError = () => { + setLoadingFailed(true); + onError?.(); + }; + + const classNames = [styles["Image-preview"]]; + if (className != null) + classNames.push(className); + + return (