ShareDialog

Modal dialog for managing project presentation sharing. Allows owners to toggle "Anyone with link" access and copy the presentation URL.

Constructor

new ShareDialog(projectId, server)

Parameters:
NameTypeDescription
projectIdstringThe ID of the project to share.
serverobjectServer instance (for token + baseUrl)

Classes

ShareDialog

Methods

_applyState()

Syncs the toggle and link-section visibility to the current `_anyWithLink` state.

_buildDOM()

Builds the dialog DOM and appends it to the document body.
Copies the presentation link to the clipboard and briefly updates the button label.

(async) _load()

Fetches the current sharing permissions from the server and updates the UI.

(async) _onToggle()

Handles the "Anyone with link" toggle change: PUTs updated permissions to the server.

_showStatus(msg, isErroropt)

Briefly displays a status message at the bottom of the dialog.
Parameters:
NameTypeAttributesDefaultDescription
msgstringThe message to display.
isErrorboolean<optional>
falseIf true, renders the message in error colour.

close()

Removes the dialog and scrim from the DOM.