move stock env vars to local module

This commit is contained in:
Stewart Allen 2025-07-06 13:54:07 -04:00
commit b8e9649267
4 changed files with 32 additions and 34 deletions

View file

@ -2,6 +2,7 @@
import alerts from './alerts.js';
import settings from './settings.js'
import STACKS from './stacks.js';
import { broker } from '../moto/broker.js';
import { client as work } from './client.js';
@ -21,7 +22,6 @@ import { updateTool } from '../kiri-mode/cam/tools.js';
import { LANG } from './lang.js';
import { LOCAL, SETUP, SECURE } from './main.js';
import { UI } from './ui.js';
import STACKS from './stacks.js';
let UC = UI.prefix('kiri').inputAction(settings.conf.update),
und = undefined,

View file

@ -36,13 +36,17 @@ let { parseOpt, o2js, js2o, ls2o } = utils,
clone = Object.clone,
MODE = MODES.FDM,
viewMode = VIEWS.ARRANGE,
autoSaveTimer = null;
autoSaveTimer = null,
inits = parseInt(SDB.getItem('kiri-init') || stats.get('init') || 0) + 1;
// update version and init count
SDB.setItem('kiri-init', inits);
stats.set('init', inits);
stats.set('kiri', version);
// allow widget to straddle client / worker FOR NOW
self.kiri_catalog = FILES;
// API completion
export const dialog = {
show: showModal,
hide: hideModal,
@ -247,12 +251,6 @@ function auto_save() {
}, 1000);
}
// update version and init count
let inits = parseInt(SDB.getItem('kiri-init') || stats.get('init') || 0) + 1;
SDB.setItem('kiri-init', inits);
stats.set('init', inits);
stats.set('kiri', version);
/** ******************************************************************
* Utility Functions
******************************************************************* */