Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon Overhaul #5496

Open
DaanSelen opened this issue Nov 2, 2023 · 42 comments
Open

Icon Overhaul #5496

DaanSelen opened this issue Nov 2, 2023 · 42 comments

Comments

@DaanSelen
Copy link

Is your feature request related to a problem? Please describe.
The thing I don't like about meshcentral at the moment is it's old-looking UI, which would be an improvement if modernized.

Describe the solution you'd like
A clean new UI, for easy navigation and modern looking, ( in my opinion the current UI looks like Windows 7 era).

Describe alternatives you've considered
I have tried tehse examples, and I am particularly fond of the GitHub repo made by ijustw0rkhere.
https://github.com/ijustw0rkhere/mesh-materialui and https://cheesefather.com/wp-content/uploads/2023/03/Untitled-3.jpg

Additional context
No additional context

@si458
Copy link
Collaborator

si458 commented Nov 2, 2023

All that repo is, is a style sheet, which u can apply yourself ontop of your existing meshcentral install

I can't fully remember how it's done/works, but I'll look into it for you!

@DaanSelen
Copy link
Author

DaanSelen commented Nov 2, 2023

Thank you for your response, I have created a fork from the ijustw0rkhere repository to create a custom stylesheet. So if you have specific changes you can contact me.

It would help if there were guidelines for changing it.

@HeyVern
Copy link

HeyVern commented Nov 2, 2023

I was also able to accomplish alot with modifying files and using the override file feature. I hesitate to suggest a major overhaul to the existing interface as there is SO MUCH FUNCTIONALITY hidden in the existing one. I have grown quite fond of it after doing some deep dives. A new interface would mean that level of functionality would have to be ported over and likely cause an inevitable loss of functionality in the beginning.

If I would suggest anything is maybe we would put together a styled Icon replacement pack.

@DaanSelen
Copy link
Author

An icon replacement pack of maybe some color changes might go a long long way.

@tomsik-radek
Copy link

I agree, newer icon pack (not from Windows 7 or Vista) would make MC feel much fresher.

@DaanSelen
Copy link
Author

I agree, newer icon pack (not from Windows 7 or Vista) would make MC feel much fresher.

I agree that it would be nice to move beyond Windows 7 looks, I would like to maybe suggest a font change.

@HeyVern
Copy link

HeyVern commented Nov 3, 2023

Is this a step in the right direction?
Capture

@tomsik-radek
Copy link

tomsik-radek commented Nov 3, 2023

Is this a step in the right direction?

I personally like this. It has very much Windows 11 aesthetic (including front facing icons) without being fully Windows icons.

@tomsik-radek
Copy link

Also, not sure if I should make a separate ticket, but some docs for the meshcentral-web folder would be nice (or maybe I'm blind). I can only find the video on it, but no text documentation. Is it even possible to have different style sheets per Meshcentral domain?

@DaanSelen
Copy link
Author

DaanSelen commented Nov 3, 2023

Is this a step in the right direction? Capture

I love the initiative, and it's a very big improvement on the current icons. Could you message me the icon pack, if you'd like me to fork and stage the change, to test with it.

@DaanSelen
Copy link
Author

image

I'm sorry for referencing my own personal repo. But I like the look of this with it's icons. However I do not have the knowledge to see where the icons are stored, I do not see any apparent .png files.

@tomsik-radek
Copy link

I'm sorry for referencing my own personal repo. But I like the look of this with it's icons. However I do not have the knowledge to see where the icons are stored, I do not see any apparent .png files.

Honestly, no. Material Design icons don't really fit this, unless you redid the entire CSS to be like Android. I think going Windows 11 style is the way to go

@DaanSelen DaanSelen changed the title GUI Overhaul Icon Overhaul Nov 3, 2023
@DaanSelen
Copy link
Author

I'm sorry for referencing my own personal repo. But I like the look of this with it's icons. However I do not have the knowledge to see where the icons are stored, I do not see any apparent .png files.

Honestly, no. Material Design icons don't really fit this, unless you redid the entire CSS to be like Android. I think going Windows 11 style is the way to go

Fair enough, I am also for @HeyVern design if that fits better.

@rodrigolzd
Copy link

I think it would be far more useful to have the ability to upload and set custom icons for each device group.

In my case I have over 80 device groups, and honestly Looking at all the same icon is hard sometimes.

image

@si458
Copy link
Collaborator

si458 commented Nov 8, 2023

just started to look at this,
started to write something so if you have images inside the data folder, use them to replace icons,
then realised this already exists! HOW TO - https://cheesefather.com/2023/02/add-custom-icons-to-meshcentral/
create a folder called meshcentral-web next to meshcentral-data then inside it create public then inside it create images
then inside images just put all your images, and it will use them instead on server start up!

yes it doesnt change the colour of the web ui, but at least its a start by allowing change of the icons!
you can literally replace ANY image inside meshcentral/public/images/

@si458
Copy link
Collaborator

si458 commented Nov 8, 2023

you can also do the customise per domain!!! but its not documented! i will add all i found to the docs!!!
you create a folder called meshcentral-web-DOMAINHERE instead of meshcentral-web

@tomsik-radek
Copy link

you can also do the customise per domain!!! but its not documented! i will add all i found to the docs!!! you create a folder called meshcentral-web-DOMAINHERE instead of meshcentral-data

I think you meant meshcentral-web, not meshcentral-data. It makes sense, "" domain gets meshcentral-web, "supplier" domain gets meshcentral-web-supplier folder

This is what I was wondering about, no mention of that in here https://www.youtube.com/watch?v=UOIjWnsxsN8

Thanks!

@si458
Copy link
Collaborator

si458 commented Nov 8, 2023

@tomsik-radek u r correct, corrected mistake

@DaanSelen
Copy link
Author

In general, I would like to see if there is an audience for modernizing the current standard icons, for a more current-date looking UI.

@silversword411
Copy link
Contributor

Definitely modernizing the theme and improving the look is always appreciated :)

@DaanSelen
Copy link
Author

Does anyone have a png pack or should I look for one? I did like the previously mentioned logos.

@HeyVern
Copy link

HeyVern commented Nov 15, 2023

Capture
meshcentral icons.zip

Something to get you started. Hope this helps.

@cfoellmann
Copy link

you can also do the customise per domain!!! but its not documented! i will add all i found to the docs!!! you create a folder called meshcentral-web-DOMAINHERE instead of meshcentral-web

@si458 I have tried this.
I am running the docker image and it does not seem to work. I am no javascript dev but I had a look at the codebase and found

if ((obj.config.domains[i].webviewspath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../../meshcentral-web-' + i + '/views')))) { obj.config.domains[i].webviewspath = obj.path.join(__dirname, '../../meshcentral-web-' + i + '/views'); }

Possible that this does not work in the folder structure of the docker image? node_modules has this path in the container /opt/meshcentral/meshcentral/node_modules. Might be a minor fix.

@si458
Copy link
Collaborator

si458 commented Mar 7, 2024

@cfoellmann ah you are using docker!
yes every time you restart the docker container/recreate it, the chances are the folder might be deleted!
you need to create volume and attach it to /opt/meshcentral/meshcentral-web and /opt/meshcentral/meshcentral-web-DOMAIN to survive the restarts/reboots

example config.json for multiple domains/hosts
the volumes would be meshcentral-web, meshcentral-web-domain1 meshcentral-web-domain2

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "cert": "myserver.mydomain.com",
    "_WANonly": true,
    "_LANonly": true,
    "_sessionKey": "MyReallySecretPassword1",
    "_port": 443,
    "_aliasPort": 443,
    "_redirPort": 80,
    "_redirAliasPort": 80
  },
  "domains": {
    "": {
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    },
    "domain1": {
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    },
    "domain2": {
      "dns": "domain2.mydomain.com",
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "myemail@mydomain.com",
    "names": "myserver.mydomain.com",
    "skipChallengeVerification": true,
    "production": false
  }
}

@cfoellmann
Copy link

@si458 thanks for replying.
Sorry that I have not written up what I have done to test/fix this.

Yes, in docker the folder structure within the container is reset on a container deployment.
I have mapped both folders you suggest (and I already knew should be used) to the host file system:

services:
  meshcentral:
          volumes:
      # config.json and other important files live here. A must for data persistence
      - /var/lib/docker/compose/meshcentral/data:/opt/meshcentral/meshcentral-data
      # where file uploads for users live
      - /var/lib/docker/compose/meshcentral/user_files:/opt/meshcentral/meshcentral-files
      # location for the meshcentral-backups - this should be mounted to an external storage
      - /var/lib/docker/shares/docker_backup/meshcentral:/opt/meshcentral/meshcentral-backups
      # Template: RMM
      - /var/lib/docker/compose/meshcentral/web:/opt/meshcentral/meshcentral-web
      # Template: csystems
      - /var/lib/docker/compose/meshcentral/web-csystems:/opt/meshcentral/meshcentral-web-csystems

My testfiles are these:

image

Working:

  • web/public/favicon.ico is applied to both domains
  • all other files are not used by either domain

In the handlebars files I have just added a text to the footer (after the variable from config.json) to see if the template is used.

@si458
Copy link
Collaborator

si458 commented Mar 8, 2024

@cfoellmann hmmm weird? Will take another look when I get into the office as it works here fine? But I was only replacing any images in the images folder and not the views folder!?

@cfoellmann
Copy link

@si458 should I keep posting stuff here? Or create a new issue?

I keep testing:

  • views are just not working (is this even in the code? would be great to further customize meshcentral)
  • /opt/meshcentral/meshcentral-web/public/images gets applied to ALL domains

@si458
Copy link
Collaborator

si458 commented Mar 8, 2024

No here fine, will have a look as soon as I can

@cfoellmann
Copy link

cfoellmann commented Mar 8, 2024

another check: (run in the second domain - makes no difference i thing):

> showpaths
Parent:     /opt/meshcentral/meshcentral
Data:       /opt/meshcentral/meshcentral-data
Files:      /opt/meshcentral/meshcentral-files
Backup:     /opt/meshcentral/meshcentral-backups
Record:     /opt/meshcentral/meshcentral-recordings
WebPublic:  /opt/meshcentral/meshcentral/public
WebViews:   /opt/meshcentral/meshcentral/views
XWebPublic: /opt/meshcentral/meshcentral-web/views
XWebViews:  /opt/meshcentral/meshcentral-web/public

@si458
Copy link
Collaborator

si458 commented Mar 8, 2024

code is defo in there, so not sure why its not working?
what does your config.json look like? (hide secret info)

// Check if there is a web views path and/or web public path for this domain
if ((__dirname.endsWith('/node_modules/meshcentral')) || (__dirname.endsWith('\\node_modules\\meshcentral')) || (__dirname.endsWith('/node_modules/meshcentral/')) || (__dirname.endsWith('\\node_modules\\meshcentral\\'))) {
    if ((obj.config.domains[i].webviewspath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../../meshcentral-web-' + i + '/views')))) { obj.config.domains[i].webviewspath = obj.path.join(__dirname, '../../meshcentral-web-' + i + '/views'); }
    if ((obj.config.domains[i].webpublicpath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../../meshcentral-web-' + i + '/public')))) { obj.config.domains[i].webpublicpath = obj.path.join(__dirname, '../../meshcentral-web-' + i + '/public'); }
    if ((obj.config.domains[i].webemailspath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../../meshcentral-web-' + i + '/emails')))) { obj.config.domains[i].webemailspath = obj.path.join(__dirname, '../../meshcentral-web-' + i + '/emails'); }
} else {
    if ((obj.config.domains[i].webviewspath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../meshcentral-web-' + i + '/views')))) { obj.config.domains[i].webviewspath = obj.path.join(__dirname, '../meshcentral-web-' + i + '/views'); }
    if ((obj.config.domains[i].webpublicpath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../meshcentral-web-' + i + '/public')))) { obj.config.domains[i].webpublicpath = obj.path.join(__dirname, '../meshcentral-web-' + i + '/public'); }
    if ((obj.config.domains[i].webemailspath == null) && (obj.fs.existsSync(obj.path.join(__dirname, '../meshcentral-web-' + i + '/emails')))) { obj.config.domains[i].webemailspath = obj.path.join(__dirname, '../meshcentral-web-' + i + '/emails'); }
}

@si458
Copy link
Collaborator

si458 commented Mar 8, 2024

@cfoellmann ive spotted a few bugs with showpaths for starters,
but can you share your config.json plz? (hide secret info)

EDIT: i have also updated meshuser.js in master branch to show the correct paths you are using, you can update that file and restart meshcentral for them to show now 872794e

si458 added a commit that referenced this issue Mar 8, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@cfoellmann
Copy link

here is most of our config.json

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "settings": {
    "cert": "rmm.domain.com",
    "postgres": {
      "host": "10.1.15.111",
      "user": "postgres",
      "port": 5432,
      "password": "pw",
      "database": "meshcentral"
    },
    "sessionKey": "XXX",
    "port": 444,
    "aliasPort": 443,
    "redirPort": 0,
    "_redirAliasPort": 80,
    "_StrictTransportSecurity": false,
    "AllowFraming": true,
    "WebRTC": false,
    "SelfUpdate": false,
    "browserPong": 30,
    "AgentPing": 30,
    "AgentPong": 30,
    "_webPush": {},
    "desktopMultiplex": false,
    "manageCrossDomain": ["user//z83tdwqvp2ivgchy","user//~saml:foellmann@domain.com"],
    "TLSOffload": "10.1.15.1",
    "trustedProxy": "10.1.15.1",
    "MpsTlsOffload": true,
    "plugins":{
      "enabled": true
    }
  },
  "domains": {
    "": {
      "siteStyle": 2,
      "title": "RMM",
      "title2": "",
      "loginPicture": "logo-login2.png",
      "unknownUserRootRedirect": "https://rmm.domain.com/auth-saml",
      "minify": true,
      "NewAccounts": false,
      "certUrl": "https://10.1.15.1:443",
      "myServer": {
        "Backup": false,
        "Restore": false,
        "Upgrade": false,
        "ErrorLog": true,
        "Console": true,
        "Trace": true
      },
      "novnc": true,
      "mstsc": true,
      "ssh": true,
      "urlSwitching": true,
      "localSessionRecording": false,
      "showPasswordLogin": false,
      "authStrategies": {
        "saml": {
          "_note": "works"
        }
      },
      "smtp": {
        "_note": "works"
      }
    },
    "csystems": {
      "dns": "systems.domain.com",
      "siteStyle": 2,
      "title": "C Systems",
      "title2": "",
      "_titlePicture": "header-csystems_450x66.png",
      "loginPicture": "logo-login2.png",
      "unknownUserRootRedirect": "https://systems.domain.com/auth-saml",
      "minify": false,
      "NewAccounts": false,
      "certUrl": "https://10.1.15.1:443",
      "myServer": {
        "Backup": false,
        "Restore": false,
        "Upgrade": false,
        "ErrorLog": true,
        "Console": true,
        "Trace": true
      },
      "localSessionRecording": false,
      "showPasswordLogin": false,
      "authStrategies": {
        "saml": {
          "_note": "works"
        }
      },
      "smtp": {
        "_note": "works"
      }
    }
  }
}

I will try out the new showpaths command to check my environment.

@cfoellmann
Copy link

following output with the improved/fixed meshuser.js

> showpaths
Parent:     /opt/meshcentral/meshcentral
Data:       /opt/meshcentral/meshcentral-data
Files:      /opt/meshcentral/meshcentral-files
Backup:     /opt/meshcentral/meshcentral-backups
Record:     /opt/meshcentral/meshcentral-recordings
WebPublic:  /opt/meshcentral/meshcentral/public
WebViews:   /opt/meshcentral/meshcentral/views
WebEmails:  /opt/meshcentral/meshcentral/emails
XWebPublic: /opt/meshcentral/meshcentral-web/public
XWebViews:  /opt/meshcentral/meshcentral-web/views
DomainWebPublic: /opt/meshcentral/meshcentral-web-csystems/public
DomainWebViews: /opt/meshcentral/meshcentral-web-csystems/views

This shows proper paths.

I realized that NO views are being used. not even those in meshcentral-web/views

@si458
Copy link
Collaborator

si458 commented Mar 11, 2024

@cfoellmann thats weird, works fine here, open a new issue plz, and we check there,
include all the info

wdlut pushed a commit to wdlut/MeshCentral that referenced this issue Mar 19, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@cfoellmann
Copy link

Sorry for hijacking the issue.

To return to the issue itself:

We are modifying the template now. We will mimic Microsoft 365 Fabric UI with fluenticons https://fluenticons.co/ / https://github.com/microsoft/fluentui-system-icons which is MIT licensed.
Beside our choice of icons and UI style we are running into some issues while modifying the handlebar templates.

  1. We can not reference icon (files) from other domains (like cdn) because CORS is so tight
  2. We can not use custom files in the template overwrite filesystem. We would like to upload svg, css and other files for our templates and reference those. That would solve 1. without weakening security

are there ways to use additional files or is the a feature request?

@silversword411
Copy link
Contributor

are there ways to use additional files or is the a feature request?

Assets for the UI are under
https://github.com/Ylianst/MeshCentral/tree/master/public/images

What's wrong with adding to there?

@DaanSelen
Copy link
Author

Weirdly enough adding the meshcentral-web component to the root no longer works...

@cfoellmann
Copy link

are there ways to use additional files or is the a feature request?

Assets for the UI are under

https://github.com/Ylianst/MeshCentral/tree/master/public/images

What's wrong with adding to there?

We run the docker version.
I am using the "overwrite" option with web/public and web-domain/public which does not catch additional files.

But your reply gives me the idea to just map an external folder under public/images/additionals/

Should work!?

@cfoellmann
Copy link

Weirdly enough adding the meshcentral-web component to the root no longer works...

I can just say that in the docker version it still works. Might be the 1.1.22 that has a problem there.

@si458
Copy link
Collaborator

si458 commented May 1, 2024

Weirdly enough adding the meshcentral-web component to the root no longer works...

That's weird @DaanSelen ? Can u share ur whole folder structure?
As it should work no problems?

@DaanSelen
Copy link
Author

Hi Si456,

https://github.com/DaanSelen/meshcentral-material

This is what I use. With the install step-by-step in the .md. Is there something wrong when copying it in the meshcentral root. If the issue is not apparent I will give more details tomorrow.

@si458
Copy link
Collaborator

si458 commented May 1, 2024

So do u have /opt/meshcentral/meshcentral-web/ ?
And inside it is public/views?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants