mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-13 23:16:53 +03:00
refactor: remove unused variables
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
'require tools.widgets as widgets';
|
'require tools.widgets as widgets';
|
||||||
|
|
||||||
|
|
||||||
function createConfigSection(section, map, network) {
|
function createConfigSection(section) {
|
||||||
const s = section;
|
const s = section;
|
||||||
|
|
||||||
let o = s.tab('basic', _('Basic Settings'));
|
let o = s.tab('basic', _('Basic Settings'));
|
||||||
|
|||||||
@@ -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) {
|
function showConfigModal(command, title) {
|
||||||
// Create and show modal immediately with loading state
|
// Create and show modal immediately with loading state
|
||||||
const modalContent = E('div', { 'class': 'panel-body' }, [
|
const modalContent = E('div', { 'class': 'panel-body' }, [
|
||||||
|
|||||||
@@ -8,23 +8,23 @@
|
|||||||
'require view.podkop.utils as utils';
|
'require view.podkop.utils as utils';
|
||||||
'require view.podkop.main as main';
|
'require view.podkop.main as main';
|
||||||
|
|
||||||
return view.extend({
|
const EntryNode = {
|
||||||
async render() {
|
async render() {
|
||||||
main.injectGlobalStyles();
|
main.injectGlobalStyles();
|
||||||
|
|
||||||
const m = new form.Map('podkop', '', null, ['main', 'extra']);
|
const podkopFormMap = new form.Map('podkop', '', null, ['main', 'extra']);
|
||||||
|
|
||||||
// Main Section
|
// Main Section
|
||||||
const mainSection = m.section(form.TypedSection, 'main');
|
const mainSection = podkopFormMap.section(form.TypedSection, 'main');
|
||||||
mainSection.anonymous = true;
|
mainSection.anonymous = true;
|
||||||
configSection.createConfigSection(mainSection, m, network);
|
configSection.createConfigSection(mainSection);
|
||||||
|
|
||||||
// Additional Settings Tab (main section)
|
// Additional Settings Tab (main section)
|
||||||
additionalTab.createAdditionalSection(mainSection, network);
|
additionalTab.createAdditionalSection(mainSection);
|
||||||
|
|
||||||
// Diagnostics Tab (main section)
|
// Diagnostics Tab (main section)
|
||||||
diagnosticTab.createDiagnosticsSection(mainSection);
|
diagnosticTab.createDiagnosticsSection(mainSection);
|
||||||
const map_promise = m.render().then(node => {
|
const podkopFormMapPromise = podkopFormMap.render().then(node => {
|
||||||
// Set up diagnostics event handlers
|
// Set up diagnostics event handlers
|
||||||
diagnosticTab.setupDiagnosticsEventHandlers(node);
|
diagnosticTab.setupDiagnosticsEventHandlers(node);
|
||||||
|
|
||||||
@@ -56,13 +56,15 @@ return view.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Extra Section
|
// Extra Section
|
||||||
const extraSection = m.section(form.TypedSection, 'extra', _('Extra configurations'));
|
const extraSection = podkopFormMap.section(form.TypedSection, 'extra', _('Extra configurations'));
|
||||||
extraSection.anonymous = false;
|
extraSection.anonymous = false;
|
||||||
extraSection.addremove = true;
|
extraSection.addremove = true;
|
||||||
extraSection.addbtntitle = _('Add Section');
|
extraSection.addbtntitle = _('Add Section');
|
||||||
extraSection.multiple = true;
|
extraSection.multiple = true;
|
||||||
configSection.createConfigSection(extraSection, m, network);
|
configSection.createConfigSection(extraSection);
|
||||||
|
|
||||||
return map_promise;
|
return podkopFormMapPromise;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
return view.extend(EntryNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user