JezerM
4 years ago
90 changed files with 4058 additions and 21 deletions
@ -0,0 +1,23 @@
|
||||
<a id="LightDM.Battery"></a> |
||||
|
||||
## LightDM.Battery |
||||
Interface for object that holds info about the battery on the system. This object is not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
|
||||
<a id="LightDM.Battery+level"></a> |
||||
|
||||
### battery.level : <code>String</code> \| <code>Null</code> |
||||
The battery level. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Battery+name"></a> |
||||
|
||||
### battery.name : <code>String</code> \| <code>Null</code> |
||||
The battery's name. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Battery+state"></a> |
||||
|
||||
### battery.state : <code>String</code> \| <code>Null</code> |
||||
The state for the battery |
||||
|
||||
**Read only**: true |
@ -0,0 +1,348 @@
|
||||
<a id="LightDM.Greeter"></a> |
||||
|
||||
## LightDM.Greeter |
||||
Base class for the greeter's Theme JavaScript API. Greeter themes will interact |
||||
directly with an object derived from this class to facilitate the user log-in process. |
||||
The greeter will automatically create an instance when it starts. |
||||
The instance can be accessed using the global variable: [`lightdm`](#dl-window-lightdm). |
||||
|
||||
<a id="LightDM.Greeter+authentication_user"></a> |
||||
|
||||
### greeter.authentication\_user : <code>String</code> \| <code>Null</code> |
||||
The username of the user being authenticated or [null](null) |
||||
if no authentication is in progress |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+autologin_guest"></a> |
||||
|
||||
### greeter.autologin\_guest : <code>Boolean</code> |
||||
Whether or not the guest account should be automatically logged |
||||
into when the timer expires. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+autologin_timeout"></a> |
||||
|
||||
### greeter.autologin\_timeout : <code>Number</code> |
||||
The number of seconds to wait before automatically logging in. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+autologin_user"></a> |
||||
|
||||
### greeter.autologin\_user : <code>String</code> |
||||
The username with which to automattically log in when the timer expires. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+batteryData"></a> |
||||
|
||||
### greeter.batteryData : <code>Battery</code> |
||||
The battery data |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+brightness"></a> |
||||
|
||||
### greeter.brightness : <code>Number</code> |
||||
Gets the brightness |
||||
|
||||
<a id="LightDM.Greeter+brightness"></a> |
||||
|
||||
### greeter.brightness |
||||
Sets the brightness |
||||
|
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| quantity | <code>Number</code> | The quantity to set | |
||||
|
||||
<a id="LightDM.Greeter+can_access_battery"></a> |
||||
|
||||
### greeter.can\_access\_battery : <code>boolean</code> |
||||
Whether or not the greeter can access to battery data. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+can_access_brightness"></a> |
||||
|
||||
### greeter.can\_access\_brightness : <code>boolean</code> |
||||
Whether or not the greeter can control display brightness. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+can_hibernate"></a> |
||||
|
||||
### greeter.can\_hibernate : <code>Boolean</code> |
||||
Whether or not the greeter can make the system hibernate. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+can_restart"></a> |
||||
|
||||
### greeter.can\_restart : <code>Boolean</code> |
||||
Whether or not the greeter can make the system restart. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+can_shutdown"></a> |
||||
|
||||
### greeter.can\_shutdown : <code>Boolean</code> |
||||
Whether or not the greeter can make the system shutdown. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+can_suspend"></a> |
||||
|
||||
### greeter.can\_suspend : <code>Boolean</code> |
||||
Whether or not the greeter can make the system suspend/sleep. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+default_session"></a> |
||||
|
||||
### greeter.default\_session : <code>String</code> |
||||
The name of the default session. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+has_guest_account"></a> |
||||
|
||||
### greeter.has\_guest\_account : <code>Boolean</code> |
||||
Whether or not guest sessions are supported. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+hide_users_hint"></a> |
||||
|
||||
### greeter.hide\_users\_hint : <code>boolean</code> |
||||
Whether or not user accounts should be hidden. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+hostname"></a> |
||||
|
||||
### greeter.hostname : <code>String</code> |
||||
The system's hostname. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+in_authentication"></a> |
||||
|
||||
### greeter.in\_authentication : <code>Boolean</code> |
||||
Whether or not the greeter is in the process of authenticating. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+is_authenticated"></a> |
||||
|
||||
### greeter.is\_authenticated : <code>Boolean</code> |
||||
Whether or not the greeter has successfully authenticated. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+language"></a> |
||||
|
||||
### greeter.language : <code>Language</code> \| <code>null</code> |
||||
The current language or [null](null) if no language. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+languages"></a> |
||||
|
||||
### greeter.languages : <code>Array.<Language></code> |
||||
A list of languages to present to the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+layout"></a> |
||||
|
||||
### greeter.layout : <code>Layout</code> |
||||
The currently active layout for the selected user. |
||||
|
||||
<a id="LightDM.Greeter+layouts"></a> |
||||
|
||||
### greeter.layouts : <code>Array.<Layout></code> |
||||
A list of keyboard layouts to present to the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+lock_hint"></a> |
||||
|
||||
### greeter.lock\_hint : <code>Boolean</code> |
||||
Whether or not the greeter was started as a lock screen. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+select_guest_hint"></a> |
||||
|
||||
### greeter.select\_guest\_hint : <code>Boolean</code> |
||||
Whether or not the guest account should be selected by default. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+select_user_hint"></a> |
||||
|
||||
### greeter.select\_user\_hint : <code>String</code> |
||||
The username to select by default. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+sessions"></a> |
||||
|
||||
### greeter.sessions : <code>Array.<Session></code> |
||||
List of available sessions. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+show_manual_login_hint"></a> |
||||
|
||||
### greeter.show\_manual\_login\_hint : <code>Boolean</code> |
||||
Check if a manual login option should be shown. If [true](true), the theme should |
||||
provide a way for a username to be entered manually. Otherwise, themes that show |
||||
a user list may limit logins to only those users. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+show_remote_login_hint"></a> |
||||
|
||||
### greeter.show\_remote\_login\_hint : <code>Boolean</code> |
||||
Check if a remote login option should be shown. If [true](true), the theme should provide |
||||
a way for a user to log into a remote desktop server. |
||||
|
||||
**Read only**: true |
||||
**Internal**: |
||||
<a id="LightDM.Greeter+users"></a> |
||||
|
||||
### greeter.users : <code>Array.<User></code> |
||||
List of available users. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Greeter+authentication_complete"></a> |
||||
|
||||
### greeter.authentication\_complete : <code>Signal</code> |
||||
Gets emitted when the greeter has completed authentication. |
||||
|
||||
<a id="LightDM.Greeter+autologin_timer_expired"></a> |
||||
|
||||
### greeter.autologin\_timer\_expired : <code>Signal</code> |
||||
Gets emitted when the automatic login timer has expired. |
||||
|
||||
<a id="LightDM.Greeter+brightness_update"></a> |
||||
|
||||
### greeter.brightness\_update : <code>Signal</code> |
||||
Gets emitted when brightness is updated |
||||
|
||||
<a id="LightDM.Greeter+idle"></a> |
||||
|
||||
### greeter.idle : <code>Signal</code> |
||||
Gets emitted when the user has logged in and the greeter is no longer needed. |
||||
|
||||
<a id="LightDM.Greeter+reset"></a> |
||||
|
||||
### greeter.reset : <code>Signal</code> |
||||
Gets emitted when the user is returning to a greeter that |
||||
was previously marked idle. |
||||
|
||||
<a id="LightDM.Greeter+show_message"></a> |
||||
|
||||
### greeter.show\_message : <code>Signal</code> |
||||
Gets emitted when the greeter should show a message to the user. |
||||
|
||||
<a id="LightDM.Greeter+show_prompt"></a> |
||||
|
||||
### greeter.show\_prompt : <code>Signal</code> |
||||
Gets emitted when the greeter should show a prompt to the user. |
||||
|
||||
<a id="LightDM.Greeter+authenticate"></a> |
||||
|
||||
### greeter.authenticate(username) |
||||
Starts the authentication procedure for a user. |
||||
|
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| username | <code>String</code> \| <code>null</code> | A username or [null](null) to prompt for a username. | |
||||
|
||||
<a id="LightDM.Greeter+authenticate_as_guest"></a> |
||||
|
||||
### greeter.authenticate\_as\_guest() |
||||
Starts the authentication procedure for the guest user. |
||||
|
||||
<a id="LightDM.Greeter+batteryUpdate"></a> |
||||
|
||||
### greeter.batteryUpdate() |
||||
Updates the battery data |
||||
|
||||
<a id="LightDM.Greeter+brightnessSet"></a> |
||||
|
||||
### greeter.brightnessSet(quantity) |
||||
Set the brightness to quantity |
||||
|
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| quantity | <code>Number</code> | The quantity to set | |
||||
|
||||
<a id="LightDM.Greeter+brightnessIncrease"></a> |
||||
|
||||
### greeter.brightnessIncrease(quantity) |
||||
Increase the brightness by quantity |
||||
|
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| quantity | <code>Number</code> | The quantity to increase | |
||||
|
||||
<a id="LightDM.Greeter+brightnessDecrease"></a> |
||||
|
||||
### greeter.brightnessDecrease(quantity) |
||||
Decrease the brightness by quantity |
||||
|
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| quantity | <code>Number</code> | The quantity to decrease | |
||||
|
||||
<a id="LightDM.Greeter+cancel_authentication"></a> |
||||
|
||||
### greeter.cancel\_authentication() |
||||
Cancel user authentication that is currently in progress. |
||||
|
||||
<a id="LightDM.Greeter+cancel_autologin"></a> |
||||
|
||||
### greeter.cancel\_autologin() |
||||
Cancel the automatic login. |
||||
|
||||
<a id="LightDM.Greeter+hibernate"></a> |
||||
|
||||
### greeter.hibernate() ⇒ <code>Boolean</code> |
||||
Triggers the system to hibernate. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if hibernation initiated, otherwise [false](false) |
||||
<a id="LightDM.Greeter+respond"></a> |
||||
|
||||
### greeter.respond(response) |
||||
Provide a response to a prompt. |
||||
|
||||
|
||||
| Param | Type | |
||||
| --- | --- | |
||||
| response | <code>\*</code> | |
||||
|
||||
<a id="LightDM.Greeter+restart"></a> |
||||
|
||||
### greeter.restart() ⇒ <code>Boolean</code> |
||||
Triggers the system to restart. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if restart initiated, otherwise [false](false) |
||||
<a id="LightDM.Greeter+set_language"></a> |
||||
|
||||
### greeter.set\_language(language) ⇒ <code>Boolean</code> |
||||
Set the language for the currently authenticated user. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if successful, otherwise [false](false) |
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| language | <code>String</code> | The language in the form of a locale specification (e.g. 'de_DE.UTF-8') | |
||||
|
||||
<a id="LightDM.Greeter+shutdown"></a> |
||||
|
||||
### greeter.shutdown() ⇒ <code>Boolean</code> |
||||
Triggers the system to shutdown. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if shutdown initiated, otherwise [false](false) |
||||
<a id="LightDM.Greeter+start_session"></a> |
||||
|
||||
### greeter.start\_session(session) ⇒ <code>Boolean</code> |
||||
Start a session for the authenticated user. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if successful, otherwise [false](false) |
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| session | <code>String</code> \| <code>null</code> | The session to log into or [null](null) to use the default. | |
||||
|
||||
<a id="LightDM.Greeter+suspend"></a> |
||||
|
||||
### greeter.suspend() ⇒ <code>Boolean</code> |
||||
Triggers the system to suspend/sleep. |
||||
|
||||
**Returns**: <code>Boolean</code> - [true](true) if suspend/sleep initiated, otherwise [false](false) |
@ -0,0 +1,55 @@
|
||||
<a id="LightDM.GreeterConfig"></a> |
||||
|
||||
## LightDM.GreeterConfig |
||||
Provides greeter themes with a way to access values from the greeter's config |
||||
file located at `/etc/lightdm/web-greeter.yml`. The greeter will |
||||
create an instance of this class when it starts. The instance can be accessed |
||||
with the global variable: [`greeter_config`](#dl-window-greeter_config). |
||||
|
||||
<a id="LightDM.GreeterConfig+branding"></a> |
||||
|
||||
### greeterConfig.branding : <code>object</code> |
||||
Holds keys/values from the `branding` section of the config file. |
||||
|
||||
**Read only**: true |
||||
**Properties** |
||||
|
||||
| Name | Type | Description | |
||||
| --- | --- | --- | |
||||
| background_images_dir | <code>string</code> | Path to directory that contains background images for use in greeter themes. | |
||||
| logo | <code>string</code> | Path to distro logo image for use in greeter themes. | |
||||
| user_image | <code>string</code> | Default user image/avatar. This is used by greeter themes for users that have not configured a `.face` image. | |
||||
|
||||
<a id="LightDM.GreeterConfig+greeter"></a> |
||||
|
||||
### greeterConfig.greeter : <code>object</code> |
||||
Holds keys/values from the `greeter` section of the config file. |
||||
|
||||
**Read only**: true |
||||
**Properties** |
||||
|
||||
| Name | Type | Description | |
||||
| --- | --- | --- | |
||||
| debug_mode | <code>boolean</code> | Greeter theme debug mode. | |
||||
| detect_theme_errors | <code>boolean</code> | Provide an option to load a fallback theme when theme errors are detected. | |
||||
| screensaver_timeout | <code>number</code> | Blank the screen after this many seconds of inactivity. | |
||||
| secure_mode | <code>boolean</code> | Don't allow themes to make remote http requests. | |
||||
| time_format | <code>string</code> | A moment.js format string to be used by the greeter to generate localized time for display. | |
||||
| time_language | <code>string</code> | Language to use when displaying the time or `auto` to use the system's language. | |
||||
| theme | <code>string</code> | The name of the theme to be used by the greeter. | |
||||
|
||||
<a id="LightDM.GreeterConfig+features"></a> |
||||
|
||||
### greeterConfig.features : <code>Object</code> |
||||
Holds keys/values from the `features` section of the config file. |
||||
|
||||
**Properties** |
||||
|
||||
| Name | Type | Description | |
||||
| --- | --- | --- | |
||||
| battery | <code>Boolean</code> | Enable greeter and themes to ger battery status. | |
||||
| backlight | <code>Object</code> | | |
||||
| enabled | <code>Boolean</code> | Enable greeter and themes to control display backlight. | |
||||
| value | <code>Number</code> | The amount to increase/decrease brightness by greeter. | |
||||
| steps | <code>Number</code> | How many steps are needed to do the change. | |
||||
|
@ -0,0 +1,24 @@
|
||||
<a id="LightDM.Language"></a> |
||||
|
||||
## LightDM.Language |
||||
Interface for object that holds info about a language on the system. Language objects are not |
||||
created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
|
||||
<a id="LightDM.Language+code"></a> |
||||
|
||||
### language.code : <code>String</code> |
||||
The code for the language. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Language+name"></a> |
||||
|
||||
### language.name : <code>String</code> |
||||
The name for the layout. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Language+territory"></a> |
||||
|
||||
### language.territory : <code>String</code> |
||||
The territory for the language. |
||||
|
||||
**Read only**: true |
@ -0,0 +1,24 @@
|
||||
<a id="LightDM.Layout"></a> |
||||
|
||||
## LightDM.Layout |
||||
Interface for object that holds info about a keyboard layout on the system. Language |
||||
objects are not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
|
||||
<a id="LightDM.Layout+description"></a> |
||||
|
||||
### layout.description : <code>String</code> |
||||
The description for the layout. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Layout+name"></a> |
||||
|
||||
### layout.name : <code>String</code> |
||||
The name for the layout. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Layout+short_description"></a> |
||||
|
||||
### layout.short\_description : <code>String</code> |
||||
The territory for the layout. |
||||
|
||||
**Read only**: true |
@ -0,0 +1,24 @@
|
||||
<a id="LightDM.Session"></a> |
||||
|
||||
## LightDM.Session |
||||
Interface for object that holds info about a session. Session objects are not |
||||
created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
|
||||
<a id="LightDM.Session+name"></a> |
||||
|
||||
### session.name : <code>String</code> |
||||
The name for the session. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Session+key"></a> |
||||
|
||||
### session.key : <code>String</code> |
||||
The key for the session. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.Session+comment"></a> |
||||
|
||||
### session.comment : <code>String</code> |
||||
The comment for the session. |
||||
|
||||
**Read only**: true |
@ -0,0 +1,47 @@
|
||||
<a id="LightDM.ThemeUtils"></a> |
||||
|
||||
## LightDM.ThemeUtils |
||||
Provides various utility methods for use in greeter themes. The greeter will automatically |
||||
create an instance of this class when it starts. The instance can be accessed |
||||
with the global variable: [`theme_utils`](#dl-window-theme_utils). |
||||
|
||||
<a id="LightDM.ThemeUtils+bind_this"></a> |
||||
|
||||
### themeUtils.bind\_this(context) ⇒ <code>Object</code> |
||||
Binds `this` to class, `context`, for all of the class's methods. |
||||
|
||||
**Returns**: <code>Object</code> - `context` with `this` bound to it for all of its methods. |
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| context | <code>Object</code> | An ES6 class instance with at least one method. | |
||||
|
||||
<a id="LightDM.ThemeUtils+dirlist"></a> |
||||
|
||||
### themeUtils.dirlist(path, only_images, callback) |
||||
Returns the contents of directory found at `path` provided that the (normalized) `path` |
||||
meets at least one of the following conditions: |
||||
* Is located within the greeter themes' root directory. |
||||
* Has been explicitly allowed in the greeter's config file. |
||||
* Is located within the greeter's shared data directory (`/var/lib/lightdm-data`). |
||||
* Is located in `/tmp`. |
||||
|
||||
|
||||
| Param | Type | Default | Description | |
||||
| --- | --- | --- | --- | |
||||
| path | <code>String</code> | | The abs path to desired directory. | |
||||
| only_images | <code>Boolean</code> | <code>true</code> | Include only images in the results. Default `true`. | |
||||
| callback | <code>function</code> | | Callback function to be called with the result. | |
||||
|
||||
<a id="LightDM.ThemeUtils+get_current_localized_time"></a> |
||||
|
||||
### themeUtils.get\_current\_localized\_time() ⇒ <code>String</code> |
||||
Get the current time in a localized format. Time format and language are auto-detected |
||||
by default, but can be set manually in the greeter config file. |
||||
* `language` defaults to the system's language, but can be set manually in the config file. |
||||
* When `time_format` config file option has a valid value, time will be formatted |
||||
according to that value. |
||||
* When `time_format` does not have a valid value, the time format will be `LT` |
||||
which is `1:00 PM` or `13:00` depending on the system's locale. |
||||
|
||||
**Returns**: <code>String</code> - The current localized time. |
@ -0,0 +1,54 @@
|
||||
<a id="LightDM.User"></a> |
||||
|
||||
## LightDM.User |
||||
Interface for object that holds info about a user account on the system. User |
||||
objects are not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
|
||||
<a id="LightDM.User+display_name"></a> |
||||
|
||||
### user.display\_name : <code>String</code> |
||||
The display name for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+language"></a> |
||||
|
||||
### user.language : <code>String</code> |
||||
The language for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+layout"></a> |
||||
|
||||
### user.layout : <code>String</code> |
||||
The keyboard layout for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+image"></a> |
||||
|
||||
### user.image : <code>String</code> |
||||
The image for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+home_directory"></a> |
||||
|
||||
### user.home\_directory : <code>String</code> |
||||
The home_directory for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+username"></a> |
||||
|
||||
### user.username : <code>String</code> |
||||
The username for the user. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+logged_in"></a> |
||||
|
||||
### user.logged\_in : <code>Boolean</code> |
||||
Whether or not the user is currently logged in. |
||||
|
||||
**Read only**: true |
||||
<a id="LightDM.User+session"></a> |
||||
|
||||
### user.session : <code>String</code> \| <code>Null</code> |
||||
The last session that the user logged into. |
||||
|
||||
**Read only**: true |
@ -0,0 +1,37 @@
|
||||
'use strict' |
||||
const jsdoc2md = require("jsdoc-to-markdown") |
||||
const fs = require('fs') |
||||
const path = require('path') |
||||
|
||||
const outputDir = "./docs/" |
||||
|
||||
function generateFiles(file) { |
||||
const templateData = jsdoc2md.getTemplateDataSync({ |
||||
files: file, |
||||
//configure: "./jsdoc.json"
|
||||
}) |
||||
|
||||
let classNames = templateData.reduce( (classNames, identifier) => { |
||||
if (identifier.kind == 'class') { |
||||
classNames.push(identifier.name) |
||||
} |
||||
return classNames |
||||
}, []) |
||||
|
||||
for (const className of classNames) { |
||||
const template = `{{#class name="${className}"}}{{>docs}}{{/class}}` |
||||
console.log(`rendering ${className}, template: ${template}`) |
||||
|
||||
const output = jsdoc2md.renderSync({ |
||||
data: templateData, |
||||
template: template, |
||||
partial: ["templates/partials/**/*.hbs"], |
||||
"global-index-format": "none", |
||||
"module-index-format": "none" |
||||
}) |
||||
|
||||
fs.writeFileSync(path.resolve(outputDir, `${className}.md`), output) |
||||
} |
||||
} |
||||
|
||||
generateFiles(["src/*.js"]) |
@ -0,0 +1,17 @@
|
||||
{ |
||||
"plugins": [], |
||||
"recurseDepth": 10, |
||||
"source": { |
||||
"include": ["test"], |
||||
"includePattern": ".+\\.js(doc|x)?$", |
||||
"excludePattern": "(node_modules)" |
||||
}, |
||||
"templates": { |
||||
"cleverLinks": false, |
||||
"monospaceLinks": false |
||||
}, |
||||
"opts": { |
||||
"recurse": "true", |
||||
"destination": "./docs/" |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,19 @@
|
||||
{ |
||||
"name": "docs", |
||||
"version": "1.0.0", |
||||
"description": "", |
||||
"main": "index.js", |
||||
"directories": { |
||||
"src": "src" |
||||
}, |
||||
"scripts": { |
||||
"build": "node index.js", |
||||
"clean": "rm docs/* -f" |
||||
}, |
||||
"keywords": [], |
||||
"author": "", |
||||
"license": "ISC", |
||||
"devDependencies": { |
||||
"jsdoc-to-markdown": "^7.0.1" |
||||
} |
||||
} |
@ -0,0 +1,441 @@
|
||||
/* |
||||
* LightDMGreeter.js |
||||
* |
||||
* Copyright © 2017 Antergos Developers <dev@antergos.com> |
||||
* |
||||
* This file is part of Web Greeter. |
||||
* |
||||
* Web Greeter is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* Web Greeter is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* The following additional terms are in effect as per Section 7 of the license: |
||||
* |
||||
* The preservation of all legal notices and author attributions in |
||||
* the material or in the Appropriate Legal Notices displayed |
||||
* by works containing it is required. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with web-greeter; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
|
||||
/** |
||||
* Base class for the greeter's Theme JavaScript API. Greeter themes will interact |
||||
* directly with an object derived from this class to facilitate the user log-in process. |
||||
* The greeter will automatically create an instance when it starts. |
||||
* The instance can be accessed using the global variable: [`lightdm`](#dl-window-lightdm). |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class Greeter { |
||||
|
||||
constructor() { |
||||
if ( 'lightdm' in window ) { |
||||
return window.lightdm; |
||||
} |
||||
|
||||
window.lightdm = ThemeUtils.bind_this( this ); |
||||
|
||||
return window.lightdm; |
||||
} |
||||
|
||||
/** |
||||
* The username of the user being authenticated or {@link null} |
||||
* if no authentication is in progress |
||||
* @type {String|Null} |
||||
* @readonly |
||||
*/ |
||||
get authentication_user() {} |
||||
|
||||
/** |
||||
* Whether or not the guest account should be automatically logged |
||||
* into when the timer expires. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get autologin_guest() {} |
||||
|
||||
/** |
||||
* The number of seconds to wait before automatically logging in. |
||||
* @type {Number} |
||||
* @readonly |
||||
*/ |
||||
get autologin_timeout() {} |
||||
|
||||
/** |
||||
* The username with which to automattically log in when the timer expires. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get autologin_user() {} |
||||
|
||||
/** |
||||
* The battery data |
||||
* @type {Battery} |
||||
* @readonly |
||||
*/ |
||||
get batteryData() {} |
||||
|
||||
/** |
||||
* Gets the brightness |
||||
* @type {Number} |
||||
*/ |
||||
get brightness() {} |
||||
/** |
||||
* Sets the brightness |
||||
* @param {Number} quantity The quantity to set |
||||
*/ |
||||
set brightness( quantity ) {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can access to battery data. |
||||
* @type {boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_access_battery() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can control display brightness. |
||||
* @type {boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_access_brightness() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can make the system hibernate. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_hibernate() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can make the system restart. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_restart() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can make the system shutdown. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_shutdown() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter can make the system suspend/sleep. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get can_suspend() {} |
||||
|
||||
/** |
||||
* The name of the default session. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get default_session() {} |
||||
|
||||
/** |
||||
* Whether or not guest sessions are supported. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get has_guest_account() {} |
||||
|
||||
/** |
||||
* Whether or not user accounts should be hidden. |
||||
* @type {boolean} |
||||
* @readonly |
||||
*/ |
||||
get hide_users_hint() {} |
||||
|
||||
/** |
||||
* The system's hostname. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get hostname() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter is in the process of authenticating. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get in_authentication() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter has successfully authenticated. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get is_authenticated() {} |
||||
|
||||
/** |
||||
* The current language or {@link null} if no language. |
||||
* @type {Language|null} |
||||
* @readonly |
||||
*/ |
||||
get language() {} |
||||
|
||||
/** |
||||
* A list of languages to present to the user. |
||||
* @type {Language[]} |
||||
* @readonly |
||||
*/ |
||||
get languages() {} |
||||
|
||||
/** |
||||
* The currently active layout for the selected user. |
||||
* @type {Layout} |
||||
*/ |
||||
get layout() {} |
||||
|
||||
/** |
||||
* A list of keyboard layouts to present to the user. |
||||
* @type {Layout[]} |
||||
* @readonly |
||||
*/ |
||||
get layouts() {} |
||||
|
||||
/** |
||||
* Whether or not the greeter was started as a lock screen. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get lock_hint() {} |
||||
|
||||
/** |
||||
* Whether or not the guest account should be selected by default. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get select_guest_hint() {} |
||||
|
||||
/** |
||||
* The username to select by default. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get select_user_hint() {} |
||||
|
||||
/** |
||||
* List of available sessions. |
||||
* @type {Session[]} |
||||
* @readonly |
||||
*/ |
||||
get sessions() {} |
||||
|
||||
/** |
||||
* Check if a manual login option should be shown. If {@link true}, the theme should |
||||
* provide a way for a username to be entered manually. Otherwise, themes that show |
||||
* a user list may limit logins to only those users. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get show_manual_login_hint() {} |
||||
|
||||
/** |
||||
* Check if a remote login option should be shown. If {@link true}, the theme should provide |
||||
* a way for a user to log into a remote desktop server. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
* @internal |
||||
*/ |
||||
get show_remote_login_hint() {} |
||||
|
||||
/** |
||||
* List of available users. |
||||
* @type {User[]} |
||||
* @readonly |
||||
*/ |
||||
get users() {} |
||||
|
||||
|
||||
/** |
||||
* Starts the authentication procedure for a user. |
||||
* |
||||
* @param {String|null} username A username or {@link null} to prompt for a username. |
||||
*/ |
||||
authenticate( username ) {} |
||||
|
||||
/** |
||||
* Starts the authentication procedure for the guest user. |
||||
*/ |
||||
authenticate_as_guest() {} |
||||
|
||||
/** |
||||
* Updates the battery data |
||||
*/ |
||||
batteryUpdate() {} |
||||
|
||||
/** |
||||
* Set the brightness to quantity |
||||
* @param {Number} quantity The quantity to set |
||||
*/ |
||||
brightnessSet( quantity ) {} |
||||
|
||||
/** |
||||
* Increase the brightness by quantity |
||||
* @param {Number} quantity The quantity to increase |
||||
*/ |
||||
brightnessIncrease( quantity ) {} |
||||
|
||||
/** |
||||
* Decrease the brightness by quantity |
||||
* @param {Number} quantity The quantity to decrease |
||||
*/ |
||||
brightnessDecrease( quantity ) {} |
||||
|
||||
/** |
||||
* Cancel user authentication that is currently in progress. |
||||
*/ |
||||
cancel_authentication() {} |
||||
|
||||
/** |
||||
* Cancel the automatic login. |
||||
*/ |
||||
cancel_autologin() {} |
||||
|
||||
/** |
||||
* Triggers the system to hibernate. |
||||
* @returns {Boolean} {@link true} if hibernation initiated, otherwise {@link false} |
||||
*/ |
||||
hibernate() {} |
||||
|
||||
/** |
||||
* Provide a response to a prompt. |
||||
* @param {*} response |
||||
*/ |
||||
respond( response ) {} |
||||
|
||||
/** |
||||
* Triggers the system to restart. |
||||
* @returns {Boolean} {@link true} if restart initiated, otherwise {@link false} |
||||
*/ |
||||
restart() {} |
||||
|
||||
/** |
||||
* Set the language for the currently authenticated user. |
||||
* @param {String} language The language in the form of a locale specification (e.g. |
||||
* 'de_DE.UTF-8') |
||||
* @returns {Boolean} {@link true} if successful, otherwise {@link false} |
||||
*/ |
||||
set_language( language ) {} |
||||
|
||||
/** |
||||
* Triggers the system to shutdown. |
||||
* @returns {Boolean} {@link true} if shutdown initiated, otherwise {@link false} |
||||
*/ |
||||
shutdown() {} |
||||
|
||||
/** |
||||
* Start a session for the authenticated user. |
||||
* @param {String|null} session The session to log into or {@link null} to use the default. |
||||
* @returns {Boolean} {@link true} if successful, otherwise {@link false} |
||||
*/ |
||||
start_session( session ) {} |
||||
|
||||
/** |
||||
* Triggers the system to suspend/sleep. |
||||
* @returns {Boolean} {@link true} if suspend/sleep initiated, otherwise {@link false} |
||||
*/ |
||||
suspend() {} |
||||
|
||||
|
||||
/** |
||||
* Gets emitted when the greeter has completed authentication. |
||||
* @type {Signal} |
||||
*/ |
||||
authentication_complete; |
||||
|
||||
/** |
||||
* Gets emitted when the automatic login timer has expired. |
||||
* @type {Signal} |
||||
*/ |
||||
autologin_timer_expired; |
||||
|
||||
/** |
||||
* Gets emitted when brightness is updated |
||||
* @type {Signal} |
||||
*/ |
||||
brightness_update; |
||||
|
||||
/** |
||||
* Gets emitted when the user has logged in and the greeter is no longer needed. |
||||
* @type {Signal} |
||||
*/ |
||||
idle; |
||||
|
||||
/** |
||||
* Gets emitted when the user is returning to a greeter that |
||||
* was previously marked idle. |
||||
* @type {Signal} |
||||
*/ |
||||
reset; |
||||
|
||||
/** |
||||
* Gets emitted when the greeter should show a message to the user. |
||||
* @type {Signal} |
||||
*/ |
||||
show_message; |
||||
|
||||
/** |
||||
* Gets emitted when the greeter should show a prompt to the user. |
||||
* @type {Signal} |
||||
*/ |
||||
show_prompt; |
||||
|
||||
} |
||||
|
||||
class Signal { |
||||
|
||||
connect( callback ) {} |
||||
|
||||
disconnect( callback ) {} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Moment.js instance - Loaded and instantiated automatically by the greeter. |
||||
* @name moment |
||||
* @type {object} |
||||
* @version 2.17.0 |
||||
* @memberOf window |
||||
* @see [Moment.js Documentation](http://momentjs.com/docs)
|
||||
*/ |
||||
|
||||
/** |
||||
* jQuery instance - Themes must manually load the included vendor script in order to use this object. |
||||
* @name jQuery |
||||
* @type {object} |
||||
* @version 3.1.1 |
||||
* @memberOf window |
||||
* @see [jQuery Documentation](http://api.jquery.com)
|
||||
*/ |
||||
|
||||
/** |
||||
* jQuery instance |
||||
* @name $ |
||||
* @memberOf window |
||||
* @see {@link window.jQuery} |
||||
*/ |
||||
|
||||
/** |
||||
* JS-Cookie instance - Themes must manually load the included vendor script in order to use this object. |
||||
* @name Cookies |
||||
* @type {object} |
||||
* @version 2.1.3 |
||||
* @memberOf window |
||||
* @see [JS Cookie Documentation](https://github.com/js-cookie/js-cookie/tree/latest#readme)
|
||||
*/ |
||||
|
||||
|
||||
|
@ -0,0 +1,86 @@
|
||||
/* |
||||
* GreeterConfig.js |
||||
* |
||||
* Copyright © 2017 Antergos Developers <dev@antergos.com> |
||||
* |
||||
* This file is part of Web Greeter. |
||||
* |
||||
* Web Greeter is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* Web Greeter is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* The following additional terms are in effect as per Section 7 of the license: |
||||
* |
||||
* The preservation of all legal notices and author attributions in |
||||
* the material or in the Appropriate Legal Notices displayed |
||||
* by works containing it is required. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with web-greeter; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
|
||||
/** |
||||
* Provides greeter themes with a way to access values from the greeter's config |
||||
* file located at `/etc/lightdm/web-greeter.yml`. The greeter will |
||||
* create an instance of this class when it starts. The instance can be accessed |
||||
* with the global variable: [`greeter_config`](#dl-window-greeter_config). |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class GreeterConfig { |
||||
/** |
||||
* Holds keys/values from the `branding` section of the config file. |
||||
* |
||||
* @type {object} |
||||
* @property {string} background_images_dir Path to directory that contains background images |
||||
* for use in greeter themes. |
||||
* @property {string} logo Path to distro logo image for use in greeter themes. |
||||
* @property {string} user_image Default user image/avatar. This is used by greeter themes |
||||
* for users that have not configured a `.face` image. |
||||
* @readonly |
||||
*/ |
||||
get branding() {} |
||||
|
||||
/** |
||||
* Holds keys/values from the `greeter` section of the config file. |
||||
* |
||||
* @type {object} |
||||
* @property {boolean} debug_mode Greeter theme debug mode. |
||||
* @property {boolean} detect_theme_errors Provide an option to load a fallback theme when theme |
||||
* errors are detected. |
||||
* @property {number} screensaver_timeout Blank the screen after this many seconds of inactivity. |
||||
* @property {boolean} secure_mode Don't allow themes to make remote http requests. |
||||
* @property {string} time_format A moment.js format string to be used by the greeter to |
||||
* generate localized time for display. |
||||
* @property {string} time_language Language to use when displaying the time or `auto` |
||||
* to use the system's language. |
||||
* @property {string} theme The name of the theme to be used by the greeter. |
||||
* @readonly |
||||
*/ |
||||
get greeter() {} |
||||
|
||||
|
||||
/** |
||||
* Holds keys/values from the `features` section of the config file. |
||||
* |
||||
* @type {Object} |
||||
* @property {Boolean} battery Enable greeter and themes to ger battery status. |
||||
* @property {Object} backlight |
||||
* @property {Boolean} enabled Enable greeter and themes to control display backlight. |
||||
* @property {Number} value The amount to increase/decrease brightness by greeter. |
||||
* @property {Number} steps How many steps are needed to do the change. |
||||
*/ |
||||
get features() {} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,293 @@
|
||||
/* |
||||
* Copyright © 2015-2017 Antergos |
||||
* |
||||
* LightDMObjects.js |
||||
* |
||||
* This file is part of Web Greeter |
||||
* |
||||
* Web Greeter is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, |
||||
* or any later version. |
||||
* |
||||
* Web Greeter is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* The following additional terms are in effect as per Section 7 of the license: |
||||
* |
||||
* The preservation of all legal notices and author attributions in |
||||
* the material or in the Appropriate Legal Notices displayed |
||||
* by works containing it is required. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
/** |
||||
* The global window object. |
||||
* |
||||
* @name window |
||||
* @type {object} |
||||
* @global |
||||
*/ |
||||
|
||||
/** |
||||
* The greeter's Theme JavaScript API. |
||||
* |
||||
* @namespace LightDM |
||||
*/ |
||||
|
||||
|
||||
/** |
||||
* Interface for object that holds info about a session. Session objects are not |
||||
* created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class Session { |
||||
constructor( { comment, key, name } ) { |
||||
this._comment = comment; |
||||
this._key = key; |
||||
this._name = name; |
||||
} |
||||
|
||||
/** |
||||
* The name for the session. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get name() { |
||||
return this._name; |
||||
} |
||||
|
||||
/** |
||||
* The key for the session. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get key() { |
||||
return this._key; |
||||
} |
||||
|
||||
/** |
||||
* The comment for the session. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get comment() { |
||||
return this._comment; |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Interface for object that holds info about a language on the system. Language objects are not |
||||
* created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class Language { |
||||
constructor( { code, name, territory } ) { |
||||
this._code = code; |
||||
this._name = name; |
||||
this._territory = territory; |
||||
} |
||||
|
||||
/** |
||||
* The code for the language. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get code() { |
||||
return this._code; |
||||
} |
||||
|
||||
/** |
||||
* The name for the layout. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get name() { |
||||
return this._name; |
||||
} |
||||
|
||||
/** |
||||
* The territory for the language. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get territory() { |
||||
return this._territory; |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Interface for object that holds info about a keyboard layout on the system. Language |
||||
* objects are not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class Layout { |
||||
constructor( { description, name, short_description } ) { |
||||
this._description = description; |
||||
this._name = name; |
||||
this._short_description = short_description; |
||||
} |
||||
|
||||
/** |
||||
* The description for the layout. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get description() { |
||||
return this._description; |
||||
} |
||||
|
||||
/** |
||||
* The name for the layout. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get name() { |
||||
return this._name; |
||||
} |
||||
|
||||
/** |
||||
* The territory for the layout. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get short_description() { |
||||
return this._short_description; |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Interface for object that holds info about a user account on the system. User |
||||
* objects are not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class User { |
||||
constructor( user_info ) { |
||||
Object.keys(user_info).forEach( key => { |
||||
this[`_${key}`] = user_info[key]; |
||||
} ); |
||||
} |
||||
|
||||
/** |
||||
* The display name for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get display_name() { |
||||
return this._display_name; |
||||
} |
||||
|
||||
/** |
||||
* The language for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get language() { |
||||
return this._language; |
||||
} |
||||
|
||||
/** |
||||
* The keyboard layout for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get layout() { |
||||
return this._layout; |
||||
} |
||||
|
||||
/** |
||||
* The image for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get image() { |
||||
return this._image; |
||||
} |
||||
|
||||
/** |
||||
* The home_directory for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get home_directory() { |
||||
return this._home_directory; |
||||
} |
||||
|
||||
/** |
||||
* The username for the user. |
||||
* @type {String} |
||||
* @readonly |
||||
*/ |
||||
get username() { |
||||
return this._username; |
||||
} |
||||
|
||||
/** |
||||
* Whether or not the user is currently logged in. |
||||
* @type {Boolean} |
||||
* @readonly |
||||
*/ |
||||
get logged_in() { |
||||
return this._logged_in; |
||||
} |
||||
|
||||
/** |
||||
* The last session that the user logged into. |
||||
* @type {String|Null} |
||||
* @readonly |
||||
*/ |
||||
get session() { |
||||
return this._session; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Interface for object that holds info about the battery on the system. This object is not created by the theme's code, but rather by the [`LightDM.Greeter`](#dl-LightDM-Greeter) class. |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class Battery { |
||||
constructor( {level, name, state} ) { |
||||
this._level = level; |
||||
this._name = name; |
||||
this._state = state; |
||||
} |
||||
|
||||
/** |
||||
* The battery level. |
||||
* @type {String|Null} |
||||
* @readonly |
||||
*/ |
||||
get level() { |
||||
return this._level; |
||||
} |
||||
|
||||
/** |
||||
* The battery's name. |
||||
* @type {String|Null} |
||||
* @readonly |
||||
*/ |
||||
get name() { |
||||
return this._name; |
||||
} |
||||
|
||||
/** |
||||
* The state for the battery |
||||
* @type {String|Null} |
||||
* @readonly |
||||
*/ |
||||
get state() { |
||||
return this._state; |
||||
} |
||||
} |
@ -0,0 +1,157 @@
|
||||
/* |
||||
* ThemeUtils.js |
||||
* |
||||
* Copyright © 2017 Antergos Developers <dev@antergos.com> |
||||
* |
||||
* This file is part of Web Greeter. |
||||
* |
||||
* Web Greeter is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* Web Greeter is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* The following additional terms are in effect as per Section 7 of the license: |
||||
* |
||||
* The preservation of all legal notices and author attributions in |
||||
* the material or in the Appropriate Legal Notices displayed |
||||
* by works containing it is required. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with web-greeter; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
|
||||
let localized_invalid_date = null, |
||||
time_language = null, |
||||
time_format = null, |
||||
_ThemeUtils = null; |
||||
|
||||
|
||||
/** |
||||
* Provides various utility methods for use in greeter themes. The greeter will automatically |
||||
* create an instance of this class when it starts. The instance can be accessed |
||||
* with the global variable: [`theme_utils`](#dl-window-theme_utils). |
||||
* |
||||
* @memberOf LightDM |
||||
*/ |
||||
class ThemeUtils { |
||||
|
||||
constructor( instance ) { |
||||
if ( null !== _ThemeUtils ) { |
||||
return _ThemeUtils; |
||||
} |
||||
|
||||
moment.locale( window.navigator.languages ); |
||||
|
||||
localized_invalid_date = moment('today', '!@#'); |
||||
_ThemeUtils = instance; |
||||
} |
||||
|
||||
/** |
||||
* Binds `this` to class, `context`, for all of the class's methods. |
||||
* |
||||
* @param {Object} context An ES6 class instance with at least one method. |
||||
* |
||||
* @return {Object} `context` with `this` bound to it for all of its methods. |
||||
*/ |
||||
bind_this( context ) { |
||||
let excluded_methods = ['constructor']; |
||||
|
||||
function not_excluded( _method, _context ) { |
||||
let is_excluded = excluded_methods.findIndex( excluded_method => _method === excluded_method ) > -1, |
||||
is_method = 'function' === typeof _context[_method]; |
||||
|
||||
return is_method && !is_excluded; |
||||
} |
||||
|
||||
for ( let obj = context; obj; obj = Object.getPrototypeOf( obj ) ) { |
||||
// Stop once we have traveled all the way up the inheritance chain
|
||||
if ( 'Object' === obj.constructor.name ) { |
||||
break; |
||||
} |
||||
|
||||
for ( let method of Object.getOwnPropertyNames( obj ) ) { |
||||
if ( not_excluded( method, context ) ) { |
||||
context[method] = context[method].bind( context ); |
||||
} |
||||
} |
||||
} |
||||
|
||||
return context; |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Returns the contents of directory found at `path` provided that the (normalized) `path` |
||||
* meets at least one of the following conditions: |
||||
* * Is located within the greeter themes' root directory. |
||||
* * Has been explicitly allowed in the greeter's config file. |
||||
* * Is located within the greeter's shared data directory (`/var/lib/lightdm-data`). |
||||
* * Is located in `/tmp`. |
||||
* |
||||
* @param {String} path The abs path to desired directory. |
||||
* @param {Boolean} only_images Include only images in the results. Default `true`. |
||||
* @param {function(String[])} callback Callback function to be called with the result. |
||||
*/ |
||||
dirlist( path, only_images = true, callback ) { |
||||
if ( '' === path || 'string' !== typeof path ) { |
||||
console.error(`theme_utils.dirlist(): path must be a non-empty string!`); |
||||
return callback([]); |
||||
|
||||
} else if ( null !== path.match(/^[^/].+/) ) { |
||||
console.error(`theme_utils.dirlist(): path must be absolute!`); |
||||
return callback([]); |
||||
} |
||||
|
||||
if ( null !== path.match(/\/\.+(?=\/)/) ) { |
||||
// No special directory names allowed (eg ../../)
|
||||
path = path.replace(/\/\.+(?=\/)/g, '' ); |
||||
} |
||||
|
||||
try { |
||||
return _ThemeUtils.dirlist( path, only_images, callback ); |
||||
} catch( err ) { |
||||
console.error(`theme_utils.dirlist(): ${err}`); |
||||
return callback([]); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Get the current time in a localized format. Time format and language are auto-detected |
||||
* by default, but can be set manually in the greeter config file. |
||||
* * `language` defaults to the system's language, but can be set manually in the config file. |
||||
* * When `time_format` config file option has a valid value, time will be formatted |
||||
* according to that value. |
||||
* * When `time_format` does not have a valid value, the time format will be `LT` |
||||
* which is `1:00 PM` or `13:00` depending on the system's locale. |
||||
* |
||||
* @return {String} The current localized time. |
||||
*/ |
||||
get_current_localized_time() { |
||||
if ( null === time_language ) { |
||||
let config = greeter_config.greeter, |
||||
manual_language = ( '' !== config.time_language && 'auto' !== config.time_language ), |
||||
manual_time_format = ( '' !== config.time_format && 'auto' !== config.time_format ); |
||||
|
||||
time_language = manual_language ? config.time_language : window.navigator.language; |
||||
time_format = manual_time_format ? config.time_format : 'LT'; |
||||
|
||||
if ( manual_language ) { |
||||
moment.locale( time_language ); |
||||
} |
||||
} |
||||
|
||||
let local_time = moment().format( time_format ); |
||||
|
||||
if ( local_time === localized_invalid_date ) { |
||||
local_time = moment().format( 'LT' ); |
||||
} |
||||
|
||||
return local_time; |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
{{#orphans ~}} |
||||
{{>docs~}} |
||||
{{/orphans~}} |
@ -0,0 +1,2 @@
|
||||
{{#if access}}**Access**: {{{access}}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if augments}}**Extends**: {{>linked-type-list types=augments delimiter=", " }} |
||||
{{/if}} |
@ -0,0 +1,2 @@
|
||||
{{#if author}}{{#each author}}**Author**: {{{inlineLinks this}}} |
||||
{{/each}}{{/if~}} |
@ -0,0 +1,29 @@
|
||||
{{>deprecated~}} |
||||
{{>description~}} |
||||
{{!-- {{>scope~}} --}} |
||||
{{>summary~}} |
||||
{{>augments~}} |
||||
{{>implements~}} |
||||
{{>mixes~}} |
||||
{{>default~}} |
||||
{{>chainable~}} |
||||
{{>overrides~}} |
||||
{{>returns~}} |
||||
{{>category~}} |
||||
{{>throws~}} |
||||
{{>fires~}} |
||||
{{>this~}} |
||||
{{>access~}} |
||||
{{>readOnly~}} |
||||
{{>requires~}} |
||||
{{>customTags~}} |
||||
{{>see~}} |
||||
{{>since~}} |
||||
{{>version~}} |
||||
{{>authors~}} |
||||
{{>license~}} |
||||
{{>copyright~}} |
||||
{{>todo~}} |
||||
{{>params~}} |
||||
{{>properties~}} |
||||
{{>examples~}} |
@ -0,0 +1,2 @@
|
||||
{{#if category}}**Category**: {{inlineLinks category}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if chainable}}**Chainable** |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if copyright}}**Copyright**: {{{inlineLinks copyright}}} |
||||
{{/if~}} |
@ -0,0 +1,3 @@
|
||||
{{#if customTags}}{{#each customTags}}**{{titleCase tag}}**: {{#with (parseType value)~}} |
||||
{{#if type}}{{>link to=type}}{{/if}}{{#if description}}{{{inlineLinks description}}}{{/if}}{{/with}} |
||||
{{/each}}{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#unless (equal defaultvalue undefined)}}**Default**: {{>defaultvalue}} |
||||
{{/unless}} |
@ -0,0 +1,3 @@
|
||||
{{#if deprecated}}***Deprecated*** |
||||
|
||||
{{/if~}} |
@ -0,0 +1,3 @@
|
||||
{{#if description}}{{{inlineLinks description}}} |
||||
|
||||
{{/if}} |
@ -0,0 +1,4 @@
|
||||
{{#examples}} |
||||
**Example**{{#if caption}} *({{caption}})* {{else}} {{/if}} |
||||
{{{inlineLinks example}}} |
||||
{{/examples}} |
@ -0,0 +1,3 @@
|
||||
{{#if fires~}} |
||||
**Emits**: {{>linked-type-list types=fires delimiter=", " }} |
||||
{{/if}} |
@ -0,0 +1,2 @@
|
||||
{{#if implements}}**Implements**: {{>linked-type-list types=implements delimiter=", " }} |
||||
{{/if}} |
@ -0,0 +1,2 @@
|
||||
{{#if license}}**License**: {{inlineLinks license}} |
||||
{{/if~}} |
@ -0,0 +1,3 @@
|
||||
{{#if mixes~}} |
||||
**Mixes**: {{>linked-type-list types=mixes delimiter=", " }} |
||||
{{/if}} |
@ -0,0 +1,2 @@
|
||||
{{#if overrides}}**Overrides**: {{>link to=overrides}} |
||||
{{/if~}} |
@ -0,0 +1,4 @@
|
||||
{{#if optional}}[{{/if~}} |
||||
{{#if variable}}...{{/if~}} |
||||
{{{name}~}} |
||||
{{#if optional}}]{{/if}} |
@ -0,0 +1,9 @@
|
||||
{{#if params}} |
||||
{{#params}}**Params** |
||||
|
||||
{{#each this~}} |
||||
{{indent}}- {{name}}{{#if type}} {{>linked-type-list types=type.names delimiter=" | " }}{{/if}}{{#unless (equal defaultvalue undefined)}} {{>defaultvalue equals=true ~}}{{/unless}}{{#if description}} - {{{inlineLinks description}}}{{/if}} |
||||
{{/each}} |
||||
|
||||
{{/params~}} |
||||
{{/if}} |
@ -0,0 +1,20 @@
|
||||
{{#if params}} |
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
{{#each (tableHeadHtml params "name|Param" "type|Type" "defaultvalue|Default" "description|Description")}}<th>{{this}}</th>{{/each}} |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{#tableRow params "name" "type" "defaultvalue" "description" ~}} |
||||
<tr> |
||||
{{#if @col1}}<td>{{>param-table-name}}</td>{{/if~}} |
||||
{{#if @col2}}<td>{{>linked-type-list types=type.names delimiter=" | " html=true}}</td>{{/if~}} |
||||
{{#if @col3}}<td>{{>defaultvalue}}</td>{{/if~}} |
||||
{{#if @col4}}<td>{{{md (inlineLinks description)}}}</td>{{/if}} |
||||
</tr> |
||||
{{~/tableRow}} |
||||
</tbody> |
||||
</table> |
||||
|
||||
{{/if}} |
@ -0,0 +1,12 @@
|
||||
{{#if params}} |
||||
|
||||
{{tableHead params "name|Param" "type|Type" "defaultvalue|Default" "description|Description" ~}} |
||||
|
||||
{{#tableRow params "name" "type" "defaultvalue" "description" ~}} |
||||
| {{#if @col1}}{{>param-table-name}} | {{/if~}} |
||||
{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \| " }} | {{/if~}} |
||||
{{#if @col3}}{{>defaultvalue}} | {{/if~}} |
||||
{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}} |
||||
{{/tableRow}} |
||||
|
||||
{{/if}} |
@ -0,0 +1,4 @@
|
||||
{{#if (optionEquals "param-list-format" "list")}}{{>params-list~}}{{/if~}} |
||||
{{#if (optionEquals "param-list-format" "table")~}} |
||||
{{#if (optionEquals "no-gfm" true)}}{{>params-table-html~}}{{else}}{{>params-table~}}{{/if~}} |
||||
{{/if~}} |
@ -0,0 +1,7 @@
|
||||
{{#if properties}}**Properties** |
||||
|
||||
{{#each properties~}} |
||||
{{#if (regexp-test name "\w+\.\w+")}} {{/if}}- {{{name}}} {{>linked-type-list types=type.names delimiter=" \| " ~}}{{#if description}} - {{{inlineLinks description}}}{{/if}} |
||||
{{/each}} |
||||
|
||||
{{/if~}} |
@ -0,0 +1,21 @@
|
||||
{{#if properties~}}**Properties** |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
{{#each (tableHeadHtml properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description")}}<th>{{this}}</th>{{/each}} |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{#tableRow properties "name" "type" "defaultvalue" "description" ~}} |
||||
<tr> |
||||
{{#if @col1}}<td>{{>param-table-name}}</td>{{/if~}} |
||||
{{#if @col2}}<td>{{>linked-type-list types=type.names delimiter=" | " html=true}}</td>{{/if~}} |
||||
{{#if @col3}}<td>{{>defaultvalue}}</td>{{/if~}} |
||||
{{#if @col4}}<td>{{{md (inlineLinks description)}}}</td>{{/if}} |
||||
</tr> |
||||
{{~/tableRow}} |
||||
</tbody> |
||||
</table> |
||||
|
||||
{{/if}} |
@ -0,0 +1,12 @@
|
||||
{{#if properties}}**Properties** |
||||
|
||||
{{tableHead properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description" ~}} |
||||
|
||||
{{#tableRow properties "name" "type" "defaultvalue" "description" ~}} |
||||
| {{#if @col1}}{{>param-table-name}} | {{/if~}} |
||||
{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \| " }} | {{/if~}} |
||||
{{#if @col3}}{{>defaultvalue}} | {{/if~}} |
||||
{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}} |
||||
{{/tableRow}} |
||||
|
||||
{{/if}} |
@ -0,0 +1,4 @@
|
||||
{{#if (optionEquals "property-list-format" "list")}}{{>properties-list~}}{{/if~}} |
||||
{{#if (optionEquals "property-list-format" "table")~}} |
||||
{{#if (optionEquals "no-gfm" true)}}{{>properties-table-html}}{{else}}{{>properties-table}}{{/if~}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if readonly}}**Read only**: true |
||||
{{/if~}} |
@ -0,0 +1,3 @@
|
||||
{{#if requires~}} |
||||
**Requires**: {{>linked-type-list types=requires delimiter=", " }} |
||||
{{/if}} |
@ -0,0 +1,12 @@
|
||||
{{#if returns}} |
||||
{{#if returns.[0].description~}} |
||||
**Returns**: {{#each returns~}} |
||||
{{#if type~}} |
||||
{{#if type.names}}{{>linked-type-list types=type.names delimiter=" \| " ~}}{{/if}} |
||||
{{~#if description}} - {{{inlineLinks description}}}{{/if~}} |
||||
{{else~}} |
||||
{{{inlineLinks description}~}} |
||||
{{/if~}} |
||||
{{~/each}} |
||||
|
||||
{{/if}}{{/if}} |
@ -0,0 +1,10 @@
|
||||
{{#if scope}} |
||||
**Kind**: {{#if (equal kind "event") ~}} |
||||
event emitted{{#if memberof}} by {{>link to=memberof}}{{/if}} |
||||
{{else~}} |
||||
{{scope}} {{#if virtual}}abstract {{/if}}{{kindInThisContext}}{{#if memberof}} of {{>link to=memberof}}{{/if}} |
||||
{{/if~}} |
||||
{{else~}} |
||||
{{#if isExported}}**Kind**: Exported {{kind}} |
||||
{{/if~}} |
||||
{{/if~}} |
@ -0,0 +1,12 @@
|
||||
{{#if see~}} |
||||
|
||||
{{#if (equal see.length 1)~}} |
||||
**See**: {{{inlineLinks see.[0]}}} |
||||
{{else~}} |
||||
**See** |
||||
|
||||
{{#each see}}- {{{inlineLinks this}}} |
||||
{{/each}} |
||||
|
||||
{{/if~}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if since}}**Since**: {{{inlineLinks since}}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if summary}}**Summary**: {{{inlineLinks summary}}} |
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if thisvalue}}**this**: {{>link to=thisvalue}} |
||||
{{/if~}} |
@ -0,0 +1,8 @@
|
||||
{{#if exceptions~}} |
||||
**Throws**: |
||||
|
||||
{{#each exceptions~}} |
||||
- {{#if type.names}}{{>linked-type-list types=type.names}} {{/if}}{{{inlineLinks description}}} |
||||
{{/each}} |
||||
|
||||
{{/if}} |
@ -0,0 +1,22 @@
|
||||
{{#if todoList~}} |
||||
**Todo** |
||||
|
||||
{{#if (option "no-gfm")~}} |
||||
|
||||
{{#each todoList~}} |
||||
{{#if done}}- {{{inlineLinks task}}} ✓ |
||||
{{else}}- {{{inlineLinks task}}} |
||||
{{/if~}} |
||||
{{/each~}} |
||||
|
||||
{{else~}} |
||||
|
||||
{{#each todoList~}} |
||||
{{#if done}}- [x] {{{inlineLinks task}}} |
||||
{{else}}- [ ] {{{inlineLinks task}}} |
||||
{{/if~}} |
||||
{{/each~}} |
||||
|
||||
{{/if}} |
||||
|
||||
{{/if~}} |
@ -0,0 +1,2 @@
|
||||
{{#if version}}**Version**: {{inlineLinks version}} |
||||
{{/if~}} |
@ -0,0 +1,5 @@
|
||||
{{>header~}} |
||||
{{>body}} |
||||
{{!-- {{>member-index~}} --}} |
||||
{{>separator~}} |
||||
{{>members~}} |
@ -0,0 +1,3 @@
|
||||
<a id="{{{anchorName}}}"></a> |
||||
|
||||
{{>heading-indent}}{{>sig-name}} |
@ -0,0 +1,4 @@
|
||||
{{string-repeat " " (add level baseLevel)}}* {{#unless (equal _title undefined)}}_{{_title}}_{{else}}{{>sig-link}}{{/unless}} |
||||
{{#groupBy (option "group-by")~}} |
||||
{{>member-index-grouped baseLevel=(add ../level ../baseLevel 1)~}} |
||||
{{/groupBy~}} |
@ -0,0 +1,4 @@
|
||||
{{>index-indent}}* {{>sig-link-parent}} |
||||
{{#indexChildren ~}} |
||||
{{>member-index-list~}} |
||||
{{/indexChildren}} |
@ -0,0 +1,26 @@
|
||||
{{setLevel this 0~}} |
||||
{{#if (descendants min=(option 'memberIndex.minDescendants'))~}} |
||||
{{#if isExported~}} |
||||
{{#if (equal (depth) 0)}} |
||||
{{#if (optionEquals "member-index-format" "list")}} |
||||
|
||||
{{>member-index-list}} |
||||
|
||||
{{else~}} |
||||
|
||||
{{>member-index-grouped}} |
||||
|
||||
{{/if~}} |
||||
{{/if~}} |
||||
{{else~}} |
||||
{{#if (optionEquals "member-index-format" "list")}} |
||||
|
||||
{{>member-index-list}} |
||||
|
||||
{{else}} |
||||
|
||||
{{>member-index-grouped}} |
||||
|
||||
{{/if~}} |
||||
{{/if~}} |
||||
{{/if}} |
@ -0,0 +1,3 @@
|
||||
{{#children inherited=undefined ~}} |
||||
{{>docs~}} |
||||
{{/children~}} |
@ -0,0 +1,11 @@
|
||||
{{#globals kind=kind ~}} |
||||
{{#if @first~}}{{>heading-indent}}{{../title}} |
||||
|
||||
<dl> |
||||
{{/if~}} |
||||
<dt>{{>sig-link-html}}</dt> |
||||
<dd>{{{md (inlineLinks description)}}}</dd> |
||||
{{#if @last~}}</dl> |
||||
|
||||
{{/if~}} |
||||
{{/globals~}} |
@ -0,0 +1,9 @@
|
||||
{{#globals kind=kind~}} |
||||
{{#if @first~}}{{>heading-indent}}{{../title}} |
||||
|
||||
{{/if~}} |
||||
{{>member-index-grouped~}} |
||||
{{#if @last}} |
||||
|
||||
{{/if~}} |
||||
{{/globals}} |
@ -0,0 +1,11 @@
|
||||
{{#unless (optionEquals "global-index-format" "none")~}} |
||||
{{#if (optionEquals "global-index-format" "dl")}} |
||||
{{>global-index-dl kind=kind title=title ~}} |
||||
{{/if~}} |
||||
{{#if (optionEquals "global-index-format" "grouped")}} |
||||
{{>global-index-grouped kind=kind title=title }} |
||||
{{/if~}} |
||||
{{#if (optionEquals "global-index-format" "table")}} |
||||
{{>global-index-table kind=kind title=title ~}} |
||||
{{/if~}} |
||||
{{/unless~}} |
@ -0,0 +1,22 @@
|
||||
{{#globals kind=kind~}} |
||||
{{#if @first~}} |
||||
{{>heading-indent}}{{../title}} |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>Global</th><th>Description</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{/if~}} |
||||
<tr> |
||||
<td>{{>sig-link-html}}</td> |
||||
<td>{{{md (inlineLinks description)}}}</td> |
||||
</tr> |
||||
{{#if @last~}} |
||||
</tbody> |
||||
</table> |
||||
|
||||
{{/if~}} |
||||
{{/globals}} |
@ -0,0 +1,10 @@
|
||||
{{>global-index-kinds kind="class" title="Classes" ~}} |
||||
{{>global-index-kinds kind="mixin" title="Mixins" ~}} |
||||
{{>global-index-kinds kind="member" title="Members" ~}} |
||||
{{>global-index-kinds kind="namespace" title="Objects" ~}} |
||||
{{>global-index-kinds kind="constant" title="Constants" ~}} |
||||
{{>global-index-kinds kind="function" title="Functions" ~}} |
||||
{{>global-index-kinds kind="event" title="Events" ~}} |
||||
{{>global-index-kinds kind="typedef" title="Typedefs" ~}} |
||||
{{>global-index-kinds kind="external" title="External" ~}} |
||||
{{>global-index-kinds kind="interface" title="Interfaces" ~}} |
@ -0,0 +1,6 @@
|
||||
{{! a main index is only shown if at least 2 global or modules exist ~}} |
||||
|
||||
{{#if (showMainIndex)~}} |
||||
{{>module-index~}} |
||||
{{>global-index~}} |
||||
{{/if~}} |
@ -0,0 +1,11 @@
|
||||
{{#modules~}} |
||||
{{#if @first~}}{{>heading-indent}}Modules |
||||
|
||||
<dl> |
||||
{{/if~}} |
||||
<dt>{{>sig-link-html}}</dt> |
||||
<dd>{{{md (inlineLinks description)}}}</dd> |
||||
{{#if @last~}}</dl> |
||||
|
||||
{{/if~}} |
||||
{{/modules~}} |
@ -0,0 +1,7 @@
|
||||
{{#modules~}} |
||||
{{#if @first~}}{{>heading-indent}}Modules |
||||
|
||||
{{/if~}} |
||||
{{>member-index-grouped~}} |
||||
{{/modules}} |
||||
|
@ -0,0 +1,22 @@
|
||||
{{#modules~}} |
||||
{{#if @first~}} |
||||
{{>heading-indent}}Modules |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>Module</th><th>Description</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{/if~}} |
||||
<tr> |
||||
<td>{{>sig-link-html}}</td> |
||||
<td>{{{md (inlineLinks description)}}}</td> |
||||
</tr> |
||||
{{#if @last~}} |
||||
</tbody> |
||||
</table> |
||||
|
||||
{{/if~}} |
||||
{{/modules}} |
@ -0,0 +1,5 @@
|
||||
{{#unless (optionEquals "module-index-format" "none")~}} |
||||
{{#if (optionEquals "module-index-format" "dl")}}{{>module-index-dl ~}}{{/if~}} |
||||
{{#if (optionEquals "module-index-format" "grouped")}}{{>module-index-grouped ~}}{{/if~}} |
||||
{{#if (optionEquals "module-index-format" "table")}}{{>module-index-table ~}}{{/if~}} |
||||
{{/unless~}} |
@ -0,0 +1,2 @@
|
||||
{{>main-index~}} |
||||
{{>all-docs~}} |
@ -0,0 +1 @@
|
||||
{{string-repeat "#" (headingDepth)}} |
@ -0,0 +1 @@
|
||||
{{string-repeat " " (indexDepth)}} |
@ -0,0 +1,5 @@
|
||||
{{#if (option "separators")}} |
||||
|
||||
* * * |
||||
|
||||
{{/if~}} |
@ -0,0 +1,14 @@
|
||||
{{#if name}}{{#sig no-gfm=true ~}} |
||||
{{{@depOpen}~}} |
||||
<a href="#{{{anchorName}}}"> |
||||
{{~{@codeOpen}~}} |
||||
{{#if @prefix}}{{@prefix}} {{/if~}} |
||||
{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}} |
||||
{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}} |
||||
{{{@codeClose}~}} |
||||
</a> |
||||
{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}} |
||||
{{#if @returnTypes}} {{>linked-type-list types=@returnTypes html=true delimiter=" | " }}{{/if~}} |
||||
{{#if @suffix}} {{@suffix}}{{/if~}} |
||||
{{{@depClose}~}} |
||||
{{~/sig}}{{/if~}} |
@ -0,0 +1,13 @@
|
||||
{{#if name}}{{#sig~}} |
||||
{{{@depOpen}~}} |
||||
[{{{@codeOpen}~}} |
||||
{{#if @prefix}}{{@prefix}} {{/if~}} |
||||
{{#if (isClassMember)}}{{@parent~}}{{/if~}} |
||||
{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}} |
||||
{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}} |
||||
{{{@codeClose}}}](#{{{anchorName}}}) |
||||
{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}} |
||||
{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \| " }}{{/if~}} |
||||
{{#if @suffix}} {{@suffix}}{{/if~}} |
||||
{{{@depClose}~}} |
||||
{{~/sig}}{{/if~}} |
@ -0,0 +1,14 @@
|
||||
{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}} |
||||
{{#if name}}{{#sig~}} |
||||
{{{@depOpen}~}} |
||||
[{{{@codeOpen}~}} |
||||
{{#if @prefix}}{{@prefix}} {{/if~}} |
||||
{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}} |
||||
{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}} |
||||
{{{@codeClose}}}](#{{{anchorName}}}) |
||||
{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}} |
||||
{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \| " }}{{/if~}} |
||||
{{#if @suffix}} {{@suffix}}{{/if~}} |
||||
{{{@depClose}~}} |
||||
{{~/sig}}{{/if~}} |
||||
{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}} |
@ -0,0 +1,15 @@
|
||||
{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}} |
||||
{{#if name}}{{#sig~}} |
||||
{{{@depOpen}~}} |
||||
{{{@codeOpen}~}} |
||||
{{#if @prefix}}{{@prefix}} {{/if~}} |
||||
{{@parent~}} |
||||
{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{escape name}}}{{/if~}} |
||||
{{#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}} |
||||
{{{@codeClose}~}} |
||||
{{#if @returnSymbol}} {{@returnSymbol}}{{/if~}} |
||||
{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \| " }}{{/if~}} |
||||
{{#if @suffix}} {{@suffix}}{{/if~}} |
||||
{{{@depClose}~}} |
||||
{{~/sig}}{{/if~}} |
||||
{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}} |
@ -0,0 +1 @@
|
||||
{{#unless (equal defaultvalue undefined)}}<code>{{#if equals}} = {{/if}}{{#if (equal type.names.[0] "string")}}{{json-stringify defaultvalue}}{{else}}{{defaultvalue}}{{/if}}</code>{{/unless}} |
@ -0,0 +1,25 @@
|
||||
{{! usage: link to="namepath" html=true/false caption="optional caption"~}} |
||||
|
||||
{{~#if html~}} |
||||
<code> |
||||
|
||||
{{~#link to~}} |
||||
{{#if url~}} |
||||
<a href="{{{url}}}">{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if}}</a> |
||||
{{~else~}} |
||||
{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if~}} |
||||
{{/if~}} |
||||
{{/link~}} |
||||
|
||||
</code> |
||||
{{~else~}} |
||||
|
||||
{{#link to~}} |
||||
{{#if url~}} |
||||
[<code>{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if}}</code>]({{{url}}}) |
||||
{{~else~}} |
||||
<code>{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if~}}</code> |
||||
{{~/if~}} |
||||
{{/link~}} |
||||
|
||||
{{/if~}} |
Loading…
Reference in new issue