2018-02-19 19:56:45 +08:00
|
|
|
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('SOGo.Common')
|
|
|
|
.config(configure)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ngInject
|
|
|
|
*/
|
|
|
|
configure.$inject = ['$mdThemingProvider'];
|
|
|
|
function configure($mdThemingProvider) {
|
|
|
|
|
2018-07-06 17:54:12 +08:00
|
|
|
// Overwrite values to prevent flipping colors on login screen
|
2018-07-15 22:34:25 +08:00
|
|
|
$mdThemingProvider.definePalette('mailcow-blue', {
|
|
|
|
'50': 'E3F2FD',
|
|
|
|
'100': 'BBDEFB',
|
|
|
|
'200': '90CAF9',
|
|
|
|
'300': '64B5F6',
|
|
|
|
'400': '42A5F5',
|
|
|
|
'500': '2196F3',
|
|
|
|
'600': '1E88E5',
|
|
|
|
'700': '1976D2',
|
|
|
|
'800': '1565C0',
|
|
|
|
'900': '0D47A1',
|
|
|
|
'1000': '0D47A1',
|
|
|
|
'A100': '82B1FF',
|
|
|
|
'A200': '448AFF',
|
|
|
|
'A400': '2979ff',
|
|
|
|
'A700': '2962ff',
|
|
|
|
'contrastDefaultColor': 'dark',
|
|
|
|
'contrastLightColors': ['700', '800', '900'],
|
|
|
|
'contrastDarkColors': undefined
|
|
|
|
});
|
|
|
|
|
2018-07-06 17:54:12 +08:00
|
|
|
$mdThemingProvider.definePalette('sogo-green', {
|
|
|
|
'50': 'E3F2FD',
|
|
|
|
'100': 'BBDEFB',
|
|
|
|
'200': '90CAF9',
|
|
|
|
'300': '64B5F6',
|
|
|
|
'400': '42A5F5',
|
|
|
|
'500': '2196F3',
|
|
|
|
'600': '1E88E5',
|
|
|
|
'700': '1976D2',
|
|
|
|
'800': '1565C0',
|
|
|
|
'900': '0D47A1',
|
|
|
|
'1000': '0D47A1',
|
|
|
|
'A100': '82B1FF',
|
|
|
|
'A200': '448AFF',
|
|
|
|
'A400': '2979ff',
|
|
|
|
'A700': '2962ff',
|
|
|
|
'contrastDefaultColor': 'dark',
|
|
|
|
'contrastLightColors': ['700', '800', '900'],
|
|
|
|
'contrastDarkColors': undefined
|
|
|
|
});
|
|
|
|
|
2018-07-15 22:34:25 +08:00
|
|
|
$mdThemingProvider.definePalette('default', {
|
|
|
|
'50': 'E3F2FD',
|
|
|
|
'100': 'BBDEFB',
|
|
|
|
'200': '90CAF9',
|
|
|
|
'300': '64B5F6',
|
|
|
|
'400': '42A5F5',
|
|
|
|
'500': '2196F3',
|
|
|
|
'600': '1E88E5',
|
|
|
|
'700': '1976D2',
|
|
|
|
'800': '1565C0',
|
|
|
|
'900': '0D47A1',
|
|
|
|
'1000': '0D47A1',
|
|
|
|
'A100': '82B1FF',
|
|
|
|
'A200': '448AFF',
|
|
|
|
'A400': '2979ff',
|
|
|
|
'A700': '2962ff',
|
|
|
|
'contrastDefaultColor': 'dark',
|
|
|
|
'contrastLightColors': ['700', '800', '900'],
|
|
|
|
'contrastDarkColors': undefined
|
|
|
|
});
|
|
|
|
|
2018-02-19 19:56:45 +08:00
|
|
|
/**
|
|
|
|
* Define the Alternative theme
|
|
|
|
*/
|
|
|
|
$mdThemingProvider.theme('mailcow')
|
2018-07-15 22:34:25 +08:00
|
|
|
.primaryPalette('mailcow-blue', {
|
2018-02-19 19:56:45 +08:00
|
|
|
'default': '700', // top toolbar
|
2018-04-26 19:51:55 +08:00
|
|
|
'hue-1': '500',
|
|
|
|
'hue-2': '700', // sidebar toolbar
|
2018-02-19 19:56:45 +08:00
|
|
|
'hue-3': 'A700'
|
|
|
|
})
|
2018-07-15 22:34:25 +08:00
|
|
|
.accentPalette('mailcow-blue', {
|
2018-07-06 17:54:12 +08:00
|
|
|
'default': '800', // fab buttons
|
2018-02-19 19:56:45 +08:00
|
|
|
'hue-1': '50', // center list toolbar
|
2018-07-06 17:54:12 +08:00
|
|
|
'hue-2': '500',
|
2018-02-19 19:56:45 +08:00
|
|
|
'hue-3': 'A700'
|
|
|
|
})
|
|
|
|
.backgroundPalette('grey', {
|
|
|
|
'default': '50', // center list background
|
|
|
|
'hue-1': '100',
|
|
|
|
'hue-2': '200',
|
|
|
|
'hue-3': '300'
|
|
|
|
});
|
|
|
|
$mdThemingProvider.theme('default')
|
2018-07-15 22:34:25 +08:00
|
|
|
.primaryPalette('mailcow-blue', {
|
2018-02-19 19:56:45 +08:00
|
|
|
'default': '700', // top toolbar
|
2018-04-26 19:51:55 +08:00
|
|
|
'hue-1': '500',
|
|
|
|
'hue-2': '700', // sidebar toolbar
|
2018-07-06 17:54:12 +08:00
|
|
|
'hue-3': 'A200'
|
2018-02-19 19:56:45 +08:00
|
|
|
})
|
2018-07-15 22:34:25 +08:00
|
|
|
.accentPalette('mailcow-blue', {
|
2018-07-06 17:54:12 +08:00
|
|
|
'default': '800', // fab buttons
|
2018-02-19 19:56:45 +08:00
|
|
|
'hue-1': '50', // center list toolbar
|
2018-07-06 17:54:12 +08:00
|
|
|
'hue-2': '500',
|
2018-02-19 19:56:45 +08:00
|
|
|
'hue-3': 'A700'
|
|
|
|
})
|
|
|
|
.backgroundPalette('grey', {
|
|
|
|
'default': '50', // center list background
|
|
|
|
'hue-1': '100',
|
|
|
|
'hue-2': '200',
|
|
|
|
'hue-3': '300'
|
|
|
|
});
|
|
|
|
|
|
|
|
$mdThemingProvider.setDefaultTheme('mailcow');
|
|
|
|
$mdThemingProvider.generateThemesOnDemand(false);
|
2018-07-28 04:16:18 +08:00
|
|
|
$mdThemingProvider.alwaysWatchTheme(true);
|
2018-02-19 19:56:45 +08:00
|
|
|
}
|
|
|
|
})();
|