SOGo new features: configuration template and access/configure button

@MadPatrick @mrmarkuz do you think it worse to make a PR to allow the mount of this files

What other paths we could need

1 Like

What about using a variable like it’s done in traefik? This way we could add volumes as we like.

lazzy way but people could do whatever they want after :stuck_out_tongue:

1 Like

I think css, img and js are the most important paths for customizing the theme.

/usr/lib/GNUstep/SOGo/WebServerResources/css/

/usr/lib/GNUstep/SOGo/WebServerResources/img/

/usr/lib/GNUstep/SOGo/WebServerResources/js/

1 Like

@MadPatrick do you confirm ?

1 Like

I’m not a specialist just a amateur :wink:
Would be great to incorporate these features and maybe it is possible within the UI.
As fas as i’ve seen is the theme just a JS file.
I’ve not seen any css features and IMG besides the login logo.

According this link it looks it is possible to work with CSS, but as fas as i understand it is done in the JS file

The suggestion of MrMarkuz looks for me good.

3 Likes

can we use this as an example in the readme @MadPatrick

can we store it in a persistent place ?

1 Like

You can use the files i’ve posted

If you like i can also adjust it to something else if you like.

1 Like

I can confirm the adjustments as MrMarkuz posted survived the last update to 5.12.1

1 Like

Not after a restoration

1 Like

using your custom_theme.js I have a blank page with an error

Uncaught ReferenceError: angular is not defined
    at custom_theme.js?lm=1747728495:4:5
    at custom_theme.js?lm=1747728495:42:5

I enabled

SOGoUIAdditionalJSFiles = (js/custom_theme.js);

1 Like

This is the code i’m using


(function() {
    'use strict';

    angular.module('SOGo.Common')
      .config(configure)

    /**
     * @ngInject
     */
    configure.$inject = ['$mdThemingProvider'];
    function configure($mdThemingProvider) {
      var blueMap = $mdThemingProvider.extendPalette('indigo', {
        '200': '#3e4044',
        '300': '#292b30',
        '1000': '#4C566A',
        '50': '#313131',
        'A100': '#444444',
        '500': '#00558c',
        'contrastDefaultColor': 'light',
        'contrastLightColors': '50 100 200 300 400 500 600 A100 A200 A400 A700',
        'contrastStrongLightColors': '700 800 900 A700'
      });
      $mdThemingProvider.definePalette('frost-grey', blueMap);

      $mdThemingProvider.theme('default')
        .primaryPalette('indigo', {
          'default': '400',
          'hue-1': '400',
          'hue-2': '600',
          'hue-3': 'A700'
        })
        .accentPalette('grey', {
          'default': '400',
          'hue-1': '300',
          'hue-2': '500',
          'hue-3': 'A700'
        })
        .backgroundPalette('grey');

      $mdThemingProvider.generateThemesOnDemand(false);
    }
  })();
1 Like

and in /home/sogo1/.config/state/templates/sogo.conf.local


    SOGoPageTitle = "Webmail";
    SOGoUIAdditionalJSFiles = (js/custom_theme.js);
1 Like

thank I find my dumb error

2 Likes

:joy:
Is this something which should be added somewhere.
Maybe in the UI with a switch that want to enable the custom_theme ?

Just thinking out loud

Well you won’t like what I am saying, enabling custom_theme needs a lot of manual steps by the sysadmin

OGoUIAdditionalJSFiles can be an array, a set of multiple files or a specific file and we cannot presume on the name of files. If we create a toggle in the UI of SOGo, we need also a textarea to list all used files.

the js folder inside the container gets a lot of other files we cannot mount easily like this a local folder. The idea could be to try to mount to another folder but I have not tested it

You have overwritten the default sogo logo, so this cannot be automatically mounted to the container

In short I am going to close my PR and I propose you could document to the readme of SOGo all the necessary steps you need to make this workable

2 Likes

The logo sogo-full.svg is still the original logo in the container.
Currently with the adjust as by MrMarkuz is see the logo from /home/sogo1/.config/state

2 Likes

We added the customization to the ns8-sogo README, see GitHub - NethServer/ns8-sogo: SOGo for NethServer 8

3 Likes