Skip to content

Commit

Permalink
1.7.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
frainzy1477 committed Jul 1, 2020
1 parent 99167b7 commit 85279b8
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions luasrc/view/clash/status.htm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@




var dnew = document.getElementById('_downloadnew');
var web = document.getElementById('_web');
var webb = document.getElementById('_webb');
var clash = document.getElementById('_clash');
Expand Down Expand Up @@ -194,7 +194,11 @@
}
if(status.typeconf==0 || status.typeconf==''){
conf_path.innerHTML = status.typeconf ? '<b><font color="red"><%:NOT SELECTED%></font></b>' : '<b><font color="red"><%:NOT RUNNING%></font></b>';
}
}
if(status.new_version > status.current_version)
{
dnew.innerHTML ='<center><br><a href="https://github.com/frainzy1477/luci-app-clash/releases/download/'+status.new_version+'/luci-app-clash_'+status.new_version+'_all.ipk" class="btn" style="height:20px;font-size:15px;margin-top:-20px;background-color:#568fa1;color:#ffffff;" target="_blank"><%:Download Update%></a></center>';
}
IP.getIpifyIP();
IP.getIpipnetIP();

Expand Down Expand Up @@ -234,17 +238,7 @@
}
});

var dnew = document.getElementById('_downloadnew');

XHR.get('<%=luci.dispatcher.build_url("admin", "services", "clash", "status")%>', null, function(x, status) {
if ( x && x.status == 200 ) {
if(status.new_version > status.current_version)
{
dnew.innerHTML ='<center><br><a href="https://github.com/frainzy1477/luci-app-clash/releases/download/'+status.new_version+'/luci-app-clash_'+status.new_version+'_all.ipk" class="btn" style="height:20px;font-size:15px;margin-top:-20px;background-color:#568fa1;color:#ffffff;" target="_blank"><%:Download Update%></a></center>';

}
}
});

XHR.poll(5,'<%=luci.dispatcher.build_url("admin", "services", "clash", "check_status")%>', null, function(x, status) {});

Expand Down

0 comments on commit 85279b8

Please sign in to comment.