Beispiel #1
0
        public string GetLogoDark(bool general)
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();
                return(TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.Dark, general));
            }

            /*** simple scheme ***/
            return(TenantInfoSettingsHelper.GetAbsoluteCompanyLogoPath(SettingsManager.Load <TenantInfoSettings>()));
            /***/
        }
Beispiel #2
0
        /// <summary>
        /// Get logo stream or null in case of default logo
        /// </summary>
        public Stream GetWhitelabelMailLogo()
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();
                return(TenantWhiteLabelSettingsHelper.GetWhitelabelLogoData(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.Dark, true));
            }

            /*** simple scheme ***/
            return(TenantInfoSettingsHelper.GetStorageLogoData(SettingsManager.Load <TenantInfoSettings>()));
            /***/
        }
Beispiel #3
0
        public TenantLogoManager(
            TenantWhiteLabelSettingsHelper tenantWhiteLabelSettingsHelper,
            SettingsManager settingsManager,
            TenantInfoSettingsHelper tenantInfoSettingsHelper,
            TenantManager tenantManager,
            IConfiguration configuration,
            ICacheNotify <TenantLogoCacheItem> cacheNotify)
        {
            TenantWhiteLabelSettingsHelper = tenantWhiteLabelSettingsHelper;
            SettingsManager          = settingsManager;
            TenantInfoSettingsHelper = tenantInfoSettingsHelper;
            TenantManager            = tenantManager;
            Configuration            = configuration;
            var hideSettings = (Configuration["web:hide-settings"] ?? "").Split(new[] { ',', ';', ' ' });

            WhiteLabelEnabled = !hideSettings.Contains("WhiteLabel", StringComparer.CurrentCultureIgnoreCase);
            Cache             = AscCache.Memory;
            CacheNotify       = cacheNotify;
        }