App

Type reference

  ---@class WindowDimensions
  ---@field width? number
  ---@field height? number
  ---@field minWidth? number
  ---@field minHeight? number
  ---@field maxWidth? number
  ---@field maxHeight? number

  ---@class WindowActions
  ---@field isResizable? boolean
  ---@field isMaximizable? boolean
  ---@field isClosable? boolean
  ---@field isMinimizable? boolean
  ---@field isDraggable? boolean

  ---@class WindowDefaultStates
  ---@field isMaximized boolean
  ---@field isMinimized boolean

  ---@class AppStoreOptions
  ---@field description? string
  ---@field author? string
  ---@field installTime? number
  ---@field images? string[]

  ---@class LaptopApp
  ---@field id string
  ---@field name string
  ---@field icon string
  ---@field isDefaultApp boolean
  ---@field isInstalled? boolean
  ---@field isInternal? boolean
  ---@field isReactOrVue? boolean
  ---@field isAlpine? boolean
  ---@field isOnDesktopByDefault? boolean
  ---@field groups? string[]
  ---@field deviceId? string
  ---@field needsUpdate? boolean
  ---@field resourceName? string
  ---@field ui? string
  ---@field overrides? string[]
  ---@field appstore? AppStoreOptions
  ---@field keepAlive? boolean
  ---@field windowDimensions? WindowDimensions
  ---@field windowActions? WindowActions
  ---@field windowDefaultStates? WindowDefaultStates
  ---@field onUseServer? function
  ---@field onCloseServer? function

WindowDimensions

width number = 700

Initial window width, once app is opened.

minWidth number = 500

Minimum window width, if resize is enabled.

maxWidth number = 1000

Maximum window width, if resize is enabled

height number = 600

Initial window height, once app is opened.

minHeight number = 500

Minimum window height, if resize is enabled.

maxHeight number = 1000

Maximum window height, if resize is enabled

WindowActions

isResizable boolean = true

Defines if window is resizable.

isMaximizable boolean = true

Defines if window maximizable.

isClosable boolean = true

Defines if window is closable.

isMinimizable boolean = true

Defines if window is minimizable.

isDraggable boolean = true

Defines if window is draggable by its title bar.

WindowDefaultStates

isMaximized boolean = false

Defines if window is maximized on open.

isMinimized boolean = false

Defines if window is minimized on open.

AppStoreOptions

description boolean

App description for app store.

author string

Custom app author.

installTime number

Time in miliseconds, which defines how long it takes to install app.

images string[]

Array of preview images links.

LaptopApp

id string

Unique App ID, if same exists, app will be overridden.

name string

App name.

icon string

App icon url.

isDefaultApp boolean = false

Defines if app is always shown, without installing it.

isInstalled boolean = false

For internal usage.

isInternal boolean = false

For internal usage.

isReactOrVue boolean = false

Defines if app is using React or Vue framework. If true, while opening app, laptop will wait until DOM is populated.

isAlpine boolean = false

Defines if app is Alpine.js. If true, while opening app, laptop will wait until Alpine is loaded globally inside iframe.

isOnDesktopByDefault boolean = false

If true, app shortcut will be placed on the desktop automatically for new users.

groups string[]

List of job group identifiers. If set, only players with a matching job can see the app.

overrides string[] = []

Defines overrides for app, which are loaded as .js files inside the iframe. For more, check Lunar Heistcontracts integration.

deviceId string

Device id, for apps who needs external device put into the laptop storage, for app to show up.

needsUpdate boolean = false

Defines if app has a pending update.

resourceName string

Set automatically while invoking addCustomApp export.

ui string

Custom app iframe url.

keepAlive boolean = false

Defines if app should be kept alive when the window is closed or the laptop is put away. The iframe stays loaded in the background, preserving state and still receiving messages. When reopened, the app resumes instantly without reloading. onCloseServer and onUseServer are still triggered on hide/show.

windowDimensions WindowDimensions

Defines default window dimensions on app opening

windowActions WindowActions

Defines window action capabilities (resize, maximize, close, minimize, drag).

windowDefaultStates WindowDefaultStates

Defines default window states on app opening

onUseServer function

If defined, gets triggered on server side once app is opened (or unhidden for keepAlive apps). Source is passed as param.

onCloseServer function

If defined, gets triggered on server side once app is closed (or hidden for keepAlive apps). Source is passed as param.

Notification

summary string

Title for notification

detail string

Description for notification

Copyright © 2025 Felis Development