From 3a8362c40848bf08a4d0f84d8ca8433d54c89be0 Mon Sep 17 00:00:00 2001 From: Prozilla Date: Fri, 4 Aug 2023 13:17:58 +0200 Subject: [PATCH] Updated features docs --- docs/features/applications/README.md | 37 +++++++++++++++++-- docs/features/applications/terminal/README.md | 2 +- docs/features/virtual-drive/README.md | 2 +- docs/features/windows/README.md | 2 +- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/features/applications/README.md b/docs/features/applications/README.md index f8b70d9..2f3ff5a 100644 --- a/docs/features/applications/README.md +++ b/docs/features/applications/README.md @@ -17,16 +17,45 @@ Applications (sometimes shortened to apps) are processes that open a window when The header menu is a useful component that can be added to app windows for quick access to useful functions, like saving and opening files. The header menu can also be used to add shortcuts for functions. +#### Example + +```js +// components/applications/example/Example.jsx + + { + // ... + }, + "Save": () => { + // ... + }, + "Exit": () => { + // ... + }, + }, + }} + shortcuts={{ + "File": { + "New": ["Control", "e"], + "Save": ["Control", "s"], + "Exit": ["Control", "x"], + }, + }} +/> +``` + ## Template components ### Webview -The webview template can be used to turn a webpage into an application by simply setting a source property. For more information, see the [example](#turning-a-webpage-into-an-application) below. +The webview template can be used to turn a webpage into an application by simply setting a source property. #### Example ```js -// src/features/applications/applications.js +// features/applications/applications.js import { WebView } from "../../components/applications/templates/WebView.jsx"; @@ -45,7 +74,7 @@ export default class ApplicationsManager { ### Adding a new application ```js -// src/components/applications/example/Example.jsx +// components/applications/example/Example.jsx export function Example() { return ( @@ -55,7 +84,7 @@ export function Example() { ``` ```js -// src/features/applications/applications.js +// features/applications/applications.js import { Example } from "../../components/applications/example/Example.jsx"; diff --git a/docs/features/applications/terminal/README.md b/docs/features/applications/terminal/README.md index bb9d731..8d46723 100644 --- a/docs/features/applications/terminal/README.md +++ b/docs/features/applications/terminal/README.md @@ -11,7 +11,7 @@ See [features/applications/terminal/commands.js](../../../../src/features/applic ### Examples ```js -// src/features/applications/terminal/commands.js +// features/applications/terminal/commands.js new Command("cd", (args, { currentDirectory, setCurrentDirectory }) => { const path = args[0] ?? "~"; // Default to home directory diff --git a/docs/features/virtual-drive/README.md b/docs/features/virtual-drive/README.md index b658482..bb930f7 100644 --- a/docs/features/virtual-drive/README.md +++ b/docs/features/virtual-drive/README.md @@ -16,7 +16,7 @@ The initial files added to every instance of ProzillaOS, can be found and config ### Component interacting with virtual drive ```js -// src/components/applications/example/Example.jsx +// components/applications/example/Example.jsx export function Example() { const virtualRoot = useVirtualRoot(); diff --git a/docs/features/windows/README.md b/docs/features/windows/README.md index 68eb775..6940700 100644 --- a/docs/features/windows/README.md +++ b/docs/features/windows/README.md @@ -8,6 +8,6 @@ The windows components are used to view and interact with running applications. - [x] Maximize (fullscreen) - [ ] Minimize -- [ ] Resize +- [x] Resize - [x] Multiple windows of the same app - [x] Draw order \ No newline at end of file