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

Change default colour scheme #25

Closed
smoretti opened this issue Jan 14, 2020 · 1 comment
Closed

Change default colour scheme #25

smoretti opened this issue Jan 14, 2020 · 1 comment

Comments

@smoretti
Copy link

Hi

Is there a way to change the default colour scheme without changing scheme order in the javascript/script.js file?

In the default_settings.cfg file for example.

@veidenberg
Copy link
Owner

veidenberg commented Jan 21, 2020

Hi

You can set the colorscheme by adding settingsmodel.colorscheme("Scheme name") to the web page script, e.g. to be called when the web page loads.

To get the default colorscheme name from default_setings.cfg, you need (in the web page script) to download it from the server and parse it, or let the server to extract the setting value:

  1. In the default_settings.cfg, add the setting, e.g. colorscheme = Clustal
  2. Read the setting in server: in wasabi_server.py add colorscheme = getconf('colorscheme')
  3. Make it accessbile by request: in wasabi_server.py, add to post_checkserver function: status["colorscheme"] = colorscheme
  4. script.js calls the "checkserver" request on page load and reads data from the server in function startup(). Add there (after line 5410): if(data.colorscheme) settingsmodel.colorscheme(data.colorscheme);
    Note: default_settings.cfg is only read when the Wasabi server is run for the first time. After that, the copy Wasabi data/server_settings.cfg is used instead, so edit that one. Also, restart wasabi_server.py after editing the configfile.

I should add a more general way of setting defaults for javascript-side settings from the server-side config file. Meanwhile, the above workaround hopefully helps.

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

No branches or pull requests

2 participants