From 955488467c8f86aa1994d9a9cccd9dfe7922e459 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Tue, 27 Oct 2020 13:48:23 +0800 Subject: [PATCH] Update opkg.js --- .../htdocs/luci-static/resources/view/opkg.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/feeds/luci/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/package/feeds/luci/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index a5abfc168c..e139370fe5 100644 --- a/package/feeds/luci/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/package/feeds/luci/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -232,7 +232,7 @@ function display(pattern) var avail = packages.available.pkgs[name], inst = packages.installed.pkgs[name]; - if (!inst || !inst.installed) + if (!inst || !inst.installed || pkg.name.includes('luci-app-opkg') || (!pkg.name.includes('luci-app') && !pkg.name.includes('luci-theme') && !pkg.name.includes('default-settings'))) continue; if (!avail || compareVersion(avail.version, pkg.version) <= 0) @@ -260,6 +260,9 @@ function display(pattern) }, _('Remove…')); } else { + if (pkg.name.includes('kmod') || pkg.name.includes('luci-i18n')) + continue; + var inst = packages.installed.pkgs[name]; ver = truncateVersion(pkg.version || '-'); @@ -370,6 +373,12 @@ function handleMode(ev) currentDisplayMode = tab.getAttribute('data-mode'); + if (currentDisplayMode == "updates"){ + var filterv = document.querySelector('input[name="filter"]') + if ( filterv.value == "luci-app-") + filterv.value = "" + } + display(document.querySelector('input[name="filter"]').value); ev.target.blur(); @@ -687,7 +696,7 @@ function handleInstall(ev) errs || inst || '', E('div', { 'class': 'right' }, [ E('label', { 'class': 'cbi-checkbox', 'style': 'float:left' }, [ - E('input', { 'id': 'overwrite-cb', 'type': 'checkbox', 'name': 'overwrite', 'disabled': isReadonlyView }), ' ', + E('input', { 'id': 'overwrite-cb', 'type': 'checkbox', 'name': 'overwrite', 'checked': 'checked', 'disabled': isReadonlyView }), ' ', E('label', { 'for': 'overwrite-cb' }), ' ', _('Overwrite files from other package(s)') ]), @@ -881,6 +890,10 @@ function handleOpkg(ev) ]); var argv = [ cmd, '--force-removal-of-dependent-packages' ]; + + argv.push('--force-checksum'); + + argv.push('--force-depends'); if (rem && rem.checked) argv.push('--autoremove'); @@ -1027,7 +1040,7 @@ return view.extend({ E('div', {}, [ E('label', {}, _('Filter') + ':'), E('span', { 'class': 'control-group' }, [ - E('input', { 'type': 'text', 'name': 'filter', 'placeholder': _('Type to filter…'), 'value': query, 'keyup': handleKeyUp }), + E('input', { 'type': 'text', 'name': 'filter', 'placeholder': _('Type to filter…'), 'value': 'luci-app-', 'keyup': handleKeyUp }), E('button', { 'class': 'btn cbi-button', 'click': handleReset }, [ _('Clear') ]) ]) ]),