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

Script output background colour change? #324

Closed
jarrah31 opened this issue Aug 7, 2020 · 15 comments
Closed

Script output background colour change? #324

jarrah31 opened this issue Aug 7, 2020 · 15 comments

Comments

@jarrah31
Copy link

jarrah31 commented Aug 7, 2020

Would it be possible to advise how I would change the background colour of the script output window to black please?

Thanks.

@bugy
Copy link
Owner

bugy commented Aug 7, 2020 via email

@olm52
Copy link

olm52 commented Aug 8, 2020

I guess that is not possible to change selected items color, now green?
I would like also to change "Script Server" at the menu top with the title of my menu.

@jarrah31
Copy link
Author

jarrah31 commented Aug 8, 2020

Thanks bugy, do you know which part of the css code block would do this please? Would there be an existing line I need to modify or add a new entry? (sorry, css mystifies me)

@bugy
Copy link
Owner

bugy commented Aug 8, 2020

Hi @hifi25nl, only by HTML/CSS changes, unfortunately
If you want to change it, you would need to modify the following files (and build the project with webpack):

@bugy
Copy link
Owner

bugy commented Aug 8, 2020

@jarrah31 you would need to modify the following file:
https://github.com/bugy/script-server/blob/master/web-src/src/common/components/log_panel.vue

line 143 (in master), you need to change:
background: #f4f2f0; to background: black; and then build the project with npm run build (you would need npm to be installed)
Or, you can try to find this background: #f4f2f0; in the compiled css file (it should be inside web/index.blabla.css) and replace it. Then no build will be needed

@jarrah31
Copy link
Author

Thanks Bugy! You know, I actually found this entry in index-deps.css before starting this thread, but changing it made no difference so assumed it must be something else. Having you confirm this was the right location/entry I realised browser cache was preventing me from seeing the change, so a quick cache clean up and problem resolved! :)

@bugy
Copy link
Owner

bugy commented Aug 10, 2020

@jarrah31 I'm glad it worked :)
I'll keep the ticket open, so people can vote/discuss UI styling feature.
May be, one day I'll add configurable colors :)

@jarrah31
Copy link
Author

A dark mode option would be useful please because the black output screen is in stark contrast to the rest of the UI now.

@mitchtchesnitch
Copy link

+1 to Dark Theme:D Greatly appreciate all of your efforts @bugy , this tool has saved me dozens of hours of work so far, and counting.

@bugy bugy added this to the 1.17.0 milestone Nov 18, 2020
@bugy
Copy link
Owner

bugy commented Nov 30, 2020

Hey all, I'm working on a possibility to have custom color themes for script-server (e.g. you can replace default cyan color with yellow, for example). You would be able to define the main colors in a separate css file (in the conf folder), which will be loaded automatically. It won't be possible to define the color of some specific elements, though.
I would provide a sample dark theme css file, so you would be able to copy and use it for your project.

It would be nice to gather some requirements, to make sure I don't miss something important. At the moment I'm going to have support for those colors:

  1. Main accent color
  2. Background color
  3. Font color
  4. Custom images

If you would prefer to change something else, please tell me

CC @antonellocaroli

PS a theme will be single for the whole server, so it won't be possible to switch between themes in runtime.
PPS if you have any preferences on the default accent color for dark theme, please tell me :)

@antonellocaroli
Copy link

Thanks @bugy , I think that's enough!

@mitchtchesnitch
Copy link

Absolutely @bugy , this would be awesome!

@jarrah31
Copy link
Author

Thanks @bugy that would be really useful because I've since discovered another problem. I've changed the script output screen to black which works great for scripts where I've defined colour, but any script that just echos their output to screen has a default black colour, so I can't see their output on my modified black background. Having the ability to specify font colour will be very useful because I've been unable to find relevant css entry within /script-server/web/css/*.css files.

@bugy
Copy link
Owner

bugy commented Dec 25, 2020

Hi all, I implemented a possibility to define custom themes, for that, you would need to create a file:
conf/theme/theme.css and (re)define default variables

You can find examples in samples/themes/dark and samples/themes/orange
It goes without saying, that you can use these sample themes (especially the dark one) as your default one.

All the variables can be found in web-src/src/assets/css/shared.css file, but usually you would need to override only those, which are in samples

Important note: when you change/add a theme, users have to refresh the page and caches in the browser (in windows + chrome, it's Ctrl + F5, for example)

@jarrah31
Copy link
Author

Thank you @bugy

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

5 participants