Class App<AppProps>
Source: app.tsx
An application that can be ran by ProzillaOS Applications can be installed by adding them to the apps array in AppsConfig
Type Parameters
AppProps
AppProps extends WindowProps = WindowProps
Constructors
Constructor
new App<
AppProps>(name:string,id:string,windowContent:FC<AppProps>,windowOptions?:Partial<AppProps> &DefaultWindowOptions):App<AppProps>
Parameters
name
string
id
string
windowContent
FC<AppProps>
windowOptions?
Partial<AppProps> & DefaultWindowOptions
Returns
App<AppProps>
Methods
setAssociatedExtensions()
setAssociatedExtensions(
extensions:string[] |null):this
Sets the associated extensions of this application
Parameters
extensions
string[] | null
Returns
this
setCategory()
setCategory(
category:"Business"|"Developer tools"|"Education"|"Entertainment"|"Food & dining"|"Health & fitness"|"Kids & family"|"Lifestyle"|"Media"|"Medical"|"Multimedia design"|"Music"|"Navigation & maps"|"News & weather"|"Personal finance"|"Personalization"|"Photo & video"|"Productivity"|"Security"|"Shopping"|"Social"|"Sports"|"Travel"|"Utilities & tools"|null):this
Sets the category this application belongs to
Parameters
category
"Business" | "Developer tools" | "Education" | "Entertainment" | "Food & dining" | "Health & fitness" | "Kids & family" | "Lifestyle" | "Media" | "Medical" | "Multimedia design" | "Music" | "Navigation & maps" | "News & weather" | "Personal finance" | "Personalization" | "Photo & video" | "Productivity" | "Security" | "Shopping" | "Social" | "Sports" | "Travel" | "Utilities & tools" | null
Returns
this
setDescription()
setDescription(
description:string|null):this
Sets the description of this application
Parameters
description
string | null
Returns
this
setIconUrl()
setIconUrl(
iconUrl:string|null):this
Sets the URL of the icon of this application
Parameters
iconUrl
string | null
Returns
this
setInstalled()
setInstalled(
installed:boolean):this
Changes whether this application is installed by default or not
Parameters
installed
boolean
Returns
this
setLaunchAtStartup()
setLaunchAtStartup(
launchAtStartup:boolean):this
Changes whether this application is launched at startup or not
Parameters
launchAtStartup
boolean
Returns
this
setMetadata()
setMetadata(
metadata:AppMetadata|null):this
Sets the metadata for this application
Parameters
metadata
AppMetadata | null
Returns
this
setName()
setName(
name:string):this
Sets the display name of this application
Parameters
name
string
Returns
this
setPinnedByDefault()
setPinnedByDefault(
pinnedByDefault:boolean):this
Changes whether this application is pinned by default or not
Parameters
pinnedByDefault
boolean
Returns
this
setRole()
setRole(
role:string|null):this
Sets the role of this application
Parameters
role
string | null
Returns
this
setShowDesktopIcon()
setShowDesktopIcon(
showDesktopIcon:boolean):this
Changes whether this application has a desktop icon in the default data
Parameters
showDesktopIcon
boolean
Returns
this
setWindowOptions()
setWindowOptions(
windowOptions:Partial<AppProps> &DefaultWindowOptions):this
Sets the default options for the App.windowContent component
Parameters
windowOptions
Partial<AppProps> & DefaultWindowOptions
Returns
this
WindowContent()
WindowContent(
props:AppProps):Element|null
Returns the component that renders the content of a window for this app
Parameters
props
AppProps
Returns
Element | null
Properties
associatedExtensions
associatedExtensions:
string[] =[]
An array of file extensions that this application can interpret
category
category:
"Business"|"Developer tools"|"Education"|"Entertainment"|"Food & dining"|"Health & fitness"|"Kids & family"|"Lifestyle"|"Media"|"Medical"|"Multimedia design"|"Music"|"Navigation & maps"|"News & weather"|"Personal finance"|"Personalization"|"Photo & video"|"Productivity"|"Security"|"Shopping"|"Social"|"Sports"|"Travel"|"Utilities & tools"|null=null
The category the app belongs to
description
description:
string|null=null
Description of this application
iconUrl
iconUrl:
string|null=null
URL of the icon of this application
id
id:
string="app"
The unique ID of this application
isActive
isActive:
boolean=false
isInstalled
isInstalled:
boolean=true
isPinned?
optionalisPinned:boolean
launchAtStartup
launchAtStartup:
boolean=false
Determines whether the app is launched at startup
Default
falsemetadata
metadata:
AppMetadata|null=null
Metadata of the app's package
name
name:
string="App"
The display name of this application
pinnedByDefault
pinnedByDefault:
boolean=true
Determines whether the app is pinned by default
Default
truerole
role:
string|null=null
Defines what the app can handle and how it can be used elsewhere in the system
showDesktopIcon
showDesktopIcon:
boolean=false
Determines whether a desktop icon is added to the default data
Default
falsewindowContent
windowContent:
FC<AppProps>
Main component that renders this app inside a window
windowOptions?
optionalwindowOptions:Partial<AppProps> &DefaultWindowOptions
Default options that get passed to the App.windowContent component