ProzillaOS/docs/features/applications
2023-07-23 20:35:52 +02:00
..
terminal Updated docs with examples 2023-07-23 20:35:52 +02:00
README.md Updated docs with examples 2023-07-23 20:35:52 +02:00

← Back

Applications

Applications (sometimes shortened to apps) are processes that open a window when ran. The window allows the user to view and interact with the app. Apps have a title, id and a windowContent property that refers to the React component of the application interface.

Table of Contents

Examples

Adding a new application

// src/features/applications/applications.js

export default class ApplicationsManager {
	static APPLICATIONS = [
		// ...
		new Application("Example App", "example", <Example/>),
	]

	// ...
}

// src/components/applications/example/Example.jsx

export function Example() {
	return (
		<p>Application interface goes here.</p>
	)
}

Turning a webpage into an application

// src/features/applications/applications.js

export default class ApplicationsManager {
	static APPLICATIONS = [
		// ...
		new Application("Web App", "web-app",  <WebView source="https://prozilla.dev/"/>),
	]

	// ...
}