Add preliminary plugin support

-Plugins can now be enabled via settings.json after dropping the plugin files into the new plugins directory
-Enabling plugins will allow extending the normal functionality of the explorer with new database collections, menus, pages and apis + open up a new url for data to be sent from the plugin to the explorer
-A new plugins section was added to the settings with a definition for the generic-snapshots plugin
-Locale strings are now loaded and shared out via the settings so there is generally no more need to explicitly include the locale.js file
-The locale object has been updated to localization within the explorer
-A number of new locale strings have been added and their values replaced with the locale string within the explorer
-Added plugin support verbiage and a link to the generic-snapshots crowdfunding task to the README
This commit is contained in:
Joe Uhren
2024-06-16 18:58:12 -06:00
parent 7ebdb5e868
commit 788454051c
35 changed files with 1196 additions and 728 deletions
+2 -2
View File
@@ -6,6 +6,7 @@ const style_min_filename = 'style.min.css'
const custom_filename = 'custom.scss';
const custom_min_filename = 'custom.min.css'
const theme_selector_template_text = `$theme-name: "replace";`;
const settings = require('../lib/settings');
let compile_theme_css = false;
let compile_custom_css = false;
let theme_name = '';
@@ -15,7 +16,6 @@ if (!fs.existsSync(`${css_path}${theme_selector_filename}`)) {
// theme file doesn't exist, so it is necessary to compile the css
compile_theme_css = true;
} else {
const settings = require('../lib/settings');
const last_theme = fs.readFileSync(`${css_path}${theme_selector_filename}`, 'utf-8');
theme_name = settings.shared_pages.theme;
@@ -56,7 +56,7 @@ if (!fs.existsSync(`${css_path}${custom_min_filename}`)) {
// check if it necessary to compile any css files
if (compile_theme_css || compile_custom_css) {
console.log('Compiling CSS.. Please wait..');
console.log(`${settings.localization.compiling_css}.. ${settings.localization.please_wait}..`);
const sass = require('sass');