Constructor
new ShareDialog(projectId, server)
Parameters:
| Name | Type | Description |
|---|---|---|
projectId | string | The ID of the project to share. |
server | object | Server instance (for token + baseUrl) |
- Source
Classes
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.
_copyLink()
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:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
msg | string | The message to display. | ||
isError | boolean | <optional> | false | If true, renders the message in error colour. |
close()
Removes the dialog and scrim from the DOM.