Giter Site home page Giter Site logo

Change default colour scheme about wasabi HOT 1 CLOSED

veidenberg avatar veidenberg commented on August 27, 2024
Change default colour scheme

from wasabi.

Comments (1)

veidenberg avatar veidenberg commented on August 27, 2024

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.

from wasabi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.