1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00
Files
browser/src/services/constantsService.js
Oscar Hinton a99ce875ca Website icons (#285)
* Initial attempt at adding favicons.

* Cache the favicons for 30 days.

* Refactor faviconService, remove unused faviconDirective.

* Change icon url to icons.bitwarden.com. Update style to support dynamic size of icon.

* Use hostname instead of domain.

* Fix getFavicon throwing an exception if the uri is not a valid url.

* Add enabled property to faviconService to prevent slow calls to storage. Fixed chrome not displaying chrome://favicon properly.

* Fix chrome disable favicon not working as expected.

* Add default icon.

* Fix jshint errors.

* Cleanup of faviconService, removed caching related code. Add faviconComponent for handling favicons.

* Remove faviconService, moved functionallity into faviconComponent.

* Fix faviconComponent not updating when uri changes.

* Rename favicon to icon.

* Improve whitelist.
2017-10-12 14:48:29 -04:00

84 lines
2.4 KiB
JavaScript

function ConstantsService(i18nService) {
return {
environmentUrlsKey: 'environmentUrls',
disableGaKey: 'disableGa',
disableAddLoginNotificationKey: 'disableAddLoginNotification',
disableContextMenuItemKey: 'disableContextMenuItem',
disableFaviconKey: 'disableFavicon',
disableAutoTotpCopyKey: 'disableAutoTotpCopy',
enableAutoFillOnPageLoadKey: 'enableAutoFillOnPageLoad',
lockOptionKey: 'lockOption',
lastActiveKey: 'lastActive',
encType: {
AesCbc256_B64: 0,
AesCbc128_HmacSha256_B64: 1,
AesCbc256_HmacSha256_B64: 2,
Rsa2048_OaepSha256_B64: 3,
Rsa2048_OaepSha1_B64: 4,
Rsa2048_OaepSha256_HmacSha256_B64: 5,
Rsa2048_OaepSha1_HmacSha256_B64: 6
},
cipherType: {
login: 1,
secureNote: 2,
card: 3
},
fieldType: {
text: 0,
hidden: 1,
boolean: 2
},
twoFactorProvider: {
u2f: 4,
yubikey: 3,
duo: 2,
authenticator: 0,
email: 1,
remember: 5
},
twoFactorProviderInfo: [
{
type: 0,
name: i18nService.authenticatorAppTitle,
description: i18nService.authenticatorAppDesc,
active: true,
free: true,
displayOrder: 0,
priority: 1
},
{
type: 3,
name: i18nService.yubiKeyTitle,
description: i18nService.yubiKeyDesc,
active: true,
displayOrder: 1,
priority: 3
},
{
type: 2,
name: 'Duo',
description: i18nService.duoDesc,
active: true,
displayOrder: 2,
priority: 2
},
{
type: 4,
name: i18nService.u2fTitle,
description: i18nService.u2fDesc,
active: true,
displayOrder: 3,
priority: 4
},
{
type: 1,
name: i18nService.emailTitle,
description: i18nService.emailDesc,
active: true,
displayOrder: 4,
priority: 0
}
]
};
}