ProzillaOS/packages/apps/file-explorer
2024-07-07 12:22:10 +02:00
..
src Added settings app 2024-06-28 14:55:03 +02:00
CHANGELOG.md Refactor: moved site to packages/demo folder 2024-07-07 12:22:10 +02:00
package.json Refactor: moved site to packages/demo folder 2024-07-07 12:22:10 +02:00
README.md Changed branch in urls in package READMEs to main 2024-07-06 20:48:21 +02:00
tsconfig.build.json Updated app build process + updated docs 2024-06-23 15:12:54 +02:00
tsconfig.json Updated app build process + updated docs 2024-06-23 15:12:54 +02:00
vite.config.ts Updated app build process + updated docs 2024-06-23 15:12:54 +02:00


ProzillaOS

License Stars Forks NPM Version

About

@prozilla-os/file-explorer is a standard ProzillaOS application for browsing files.

Installation

@prozilla-os/core is required to run this application.

$ npm install @prozilla-os/core @prozilla-os/file-explorer
$ yarn add @prozilla-os/core @prozilla-os/file-explorer
$ pnpm add @prozilla-os/core @prozilla-os/file-explorer

Usage

Basic setup

import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView, AppsConfig } from "@prozilla-os/core";
import { fileExplorer } from "@prozilla-os/file-explorer";

function App() {
  return (
    <ProzillaOS
      systemName="Example"
      tagLine="Powered by ProzillaOS"
      config={{
        apps: new AppsConfig({
          apps: [ fileExplorer ]
        })
      }}
    >
      <Taskbar/>
      <WindowsView/>
      <ModalsView/>
      <Desktop/>
    </ProzillaOS>
  );
}

Window options

/**
 * Initial path that the app will open
 * @default "~" - Home directory
 */
path: string;

/**
 * Defines in which mode the application is running
 * 0: None
 * 1: Single
 * 2: Multiple
 * @default 0
 */
selectorMode: number;

/**
 * Footer component that will be displayed when `selectorMode` != 0
 * Can be used to display a list of selected files for example
 */
Footer: React.FC;

/**
 * Gets called each time the selection changes if `selectorMode` != 0
 */
onSelectionChange: (params: OnSelectionChangeParams) => void;

/**
 * Gets called when the selection is finished if `selectorMode` != 0
 */
onSelectionFinish: Function;