2 Developing: FAQ
athena edited this page 4 months ago

FAQ

Q: How can I use Jupiter functions from an extension?

Assuming you have them in the src/js/extensions/ folder, you can require() them like so:

const notifications = require('../components/notifications');

Q: Should I add new items to jupiter_config?

That depends. If your modifications are to the source files, then yeah, you should.

If your modifications are adding an extension, however, it'd be better to use the extensions_config (AKA x_config) object for the extensions themselves.

Q: How do I change default colors?

Frankly, you shouldn't.

Changing these can result in some weird shades if you're not doing them properly (and if you're using config.dynamic_accents).

Instead, modify the --accent-... variables in src/css/core/_css_variables.scss. You can also disable config.dynamic_accents to ensure only your color is used.

Q: How can I have one page be normal and another be an app configuration?

Simply declare a new custom_config object before calling the JupiterUI script. More information in developing/5-overrides.md

Example:

<script>
    let custom_config = {
        enable_app_configuration: true
    }
</script>
<script src="jupiterui.js></script>