refactor: remove unused variables

This commit is contained in:
divocat
2025-10-03 04:15:41 +03:00
parent db8e8e8298
commit 96bcc36cf1
3 changed files with 13 additions and 38 deletions

View File

@@ -7,7 +7,7 @@
'require tools.widgets as widgets';
function createConfigSection(section, map, network) {
function createConfigSection(section) {
const s = section;
let o = s.tab('basic', _('Basic Settings'));

View File

@@ -251,33 +251,6 @@ async function checkBypass() {
}
}
// Modal Functions
function createModalContent(title, content) {
return [
E('div', {
'class': 'panel-body',
style: 'max-height: 70vh; overflow-y: auto; margin: 1em 0; padding: 1.5em; ' +
'font-family: monospace; white-space: pre-wrap; word-wrap: break-word; ' +
'line-height: 1.5; font-size: 14px;'
}, [
E('pre', { style: 'margin: 0;' }, content)
]),
E('div', {
'class': 'right',
style: 'margin-top: 1em;'
}, [
E('button', {
'class': 'btn',
'click': ev => copyToClipboard('```txt\n' + content + '\n```', ev.target)
}, _('Copy to Clipboard')),
E('button', {
'class': 'btn',
'click': ui.hideModal
}, _('Close'))
])
];
}
function showConfigModal(command, title) {
// Create and show modal immediately with loading state
const modalContent = E('div', { 'class': 'panel-body' }, [

View File

@@ -8,23 +8,23 @@
'require view.podkop.utils as utils';
'require view.podkop.main as main';
return view.extend({
const EntryNode = {
async render() {
main.injectGlobalStyles();
const m = new form.Map('podkop', '', null, ['main', 'extra']);
const podkopFormMap = new form.Map('podkop', '', null, ['main', 'extra']);
// Main Section
const mainSection = m.section(form.TypedSection, 'main');
const mainSection = podkopFormMap.section(form.TypedSection, 'main');
mainSection.anonymous = true;
configSection.createConfigSection(mainSection, m, network);
configSection.createConfigSection(mainSection);
// Additional Settings Tab (main section)
additionalTab.createAdditionalSection(mainSection, network);
additionalTab.createAdditionalSection(mainSection);
// Diagnostics Tab (main section)
diagnosticTab.createDiagnosticsSection(mainSection);
const map_promise = m.render().then(node => {
const podkopFormMapPromise = podkopFormMap.render().then(node => {
// Set up diagnostics event handlers
diagnosticTab.setupDiagnosticsEventHandlers(node);
@@ -56,13 +56,15 @@ return view.extend({
});
// Extra Section
const extraSection = m.section(form.TypedSection, 'extra', _('Extra configurations'));
const extraSection = podkopFormMap.section(form.TypedSection, 'extra', _('Extra configurations'));
extraSection.anonymous = false;
extraSection.addremove = true;
extraSection.addbtntitle = _('Add Section');
extraSection.multiple = true;
configSection.createConfigSection(extraSection, m, network);
configSection.createConfigSection(extraSection);
return map_promise;
return podkopFormMapPromise;
}
});
}
return view.extend(EntryNode);