Members
-
<constant> DISABLE_ALL_ERROR_HANDLERS
-
Constant that allows to easily disable all error handlers
- Source:
Methods
-
addonCategory(category) → {bitbucket/util/navbuilder.Builder}
-
Parameters:
Name Type Description categorystring The category of requests to filter by.
- Source:
Returns:
-
createEmptyPage() → {Promise}
-
Return a promise resolved with an empty REST page
- Source:
Returns:
- Type
- Promise
-
getUserPreferredTheme() → {string}
-
Verifies if the module had initialize, if not it will call updateUserPreferredTheme,
it will return the current theme.- Source:
Returns:
- current theme
- Type
- string
-
init()
-
Initialize theme module and adds media listeners.
- Source:
-
mergeStrategies() → {bitbucket/util/navbuilder.Builder}
-
- Source:
Returns:
-
setBitbucketTheme(theme) → {string}
-
Sets the required attributes by Atlaskit and AUI to turn ON/OFF their Dark themes
Parameters:
Name Type Description themeObject Any of the available themes in THEME_CONST.theme
- Source:
Returns:
theme - current theme
- Type
- string
-
setThemeToAPI() → {Promise}
-
setThemeToAPI does an API call to set theme in user preferences:
POST rest/atlassian-theme/1/user-preferences
- Source:
Returns:
- a promise that resolves with the current theme
- Type
- Promise
-
setUserPreferredTheme() → {Promise}
-
Sets a new theme if the theme passed inside data is valid, data is used to simulate
a REST call in case this functionality is moved to an API.We use a promise for 'set' to simulate a service call that will be implemented in
later releases.Currently it will store the selected theme in client storage.
- Source:
Returns:
- a promise that resolves with the current theme
- Type
- Promise
-
updateUserPreferredTheme()
-
Reads the current theme from attributes and sets the corresponding theme.
- Source: