更新 'SrcJyPublic.js'

master
src48597962 7 months ago
parent f9b0853ca0
commit 50738bb829
  1. 45
      SrcJyPublic.js

@ -413,15 +413,22 @@ function selectSource() {
let tmpList = sourceList; let tmpList = sourceList;
hikerPop.setUseStartActivity(false); hikerPop.setUseStartActivity(false);
let index = 0;
let names = sourceList.map((v,i) => { function getnames(list) {
let vname = v.name; let index = 0;
if(v.url == sourceUrl && v.name==sourceName){ let names = list.map((v,i) => {
index = i; let vname = v.name;
vname = `‘‘’’<strong><font color="`+getItem('主题颜色','#6dc9ff')+`">`+v.name+`</front></strong>`; if(v.url == sourceUrl && v.name==sourceName){
} index = i;
return vname; vname = `‘‘’’<strong><font color="`+getItem('主题颜色','#6dc9ff')+`">`+v.name+`</front></strong>`;
}); }
return vname;
});
return {names:names,index:index};
}
let index_names = getnames(sourceList);
let index = index_names.index;
let names = index_names.names;
let spen = 3; let spen = 3;
let inputBox; let inputBox;
let pop = hikerPop.selectBottomRes({ let pop = hikerPop.selectBottomRes({
@ -454,20 +461,22 @@ function selectSource() {
columns: 3, columns: 3,
title: "切换源分组", title: "切换源分组",
//position: groupnames.indexOf(sourceName), //position: groupnames.indexOf(sourceName),
click(a) { click(s) {
if(a.startsWith('[')){ if(s.startsWith('[')){
inputBox.setTitle('全部'); inputBox.setTitle('全部');
inputBox.setDefaultValue(a); inputBox.setDefaultValue(s);
sourceList = getGroupLists(sourceAllList, '全部'); sourceList = getGroupLists(sourceAllList, '全部');
tmpList = sourceList.filter(x => x.name.toLowerCase().includes(s.toLowerCase()));
names = getnames(tmpList).names;
names = names.filter(x => x.toLowerCase().includes(s.toLowerCase()));
}else{ }else{
inputBox.setTitle(a); inputBox.setTitle(s);
inputBox.setDefaultValue(""); inputBox.setDefaultValue("");
sourceList = getGroupLists(sourceAllList, a); sourceList = getGroupLists(sourceAllList, s);
tmpList = sourceList;
names = getnames(tmpList).names;
} }
tmpList = sourceList;
names = sourceList.map((v,i) => {
return v.name;
});
manage.list.length = 0; manage.list.length = 0;
names.forEach(x => { names.forEach(x => {
manage.list.push(x); manage.list.push(x);

Loading…
Cancel
Save