feat(podkop): add show_version command

- Update init script to include show_version command
- Add show_version function to display current version
- Update EXTRA_COMMANDS to include show_version
- Remove version from web and config
This commit is contained in:
Ivan K
2025-02-15 17:30:14 +03:00
parent aa86445332
commit eb18537370
3 changed files with 9 additions and 16 deletions

View File

@@ -17,18 +17,6 @@ return view.extend({
m = new form.Map('podkop', _('Podkop configuration'), null, ['main', 'second']);
m = new form.Map('podkop', _('Podkop'), null, ['main', 'second']);
L.uci.load('podkop').then(() => {
const version = L.uci.get('podkop', 'main', 'version') || '';
if (version) {
m.title = _('Podkop') + ' v' + version;
if (!window.location.search.includes('v=')) {
const newUrl = window.location.pathname + '?v=' + version;
window.history.replaceState(null, '', newUrl);
}
}
});
s = m.section(form.TypedSection, 'main');
s.anonymous = true;