Browse Source

update

tags/2.4 2.4
flucout 4 months ago
parent
commit
0ca1c9d0e3
  1. 44
      app/command/CleanViteJs.php
  2. 4
      app/controller/Index.php
  3. 6
      app/script/convert.sh
  4. 2
      app/view/admin/login.html
  5. 4
      public/install/install_6.0.sh
  6. BIN
      public/install/src/bt-monitor-2.3.0.zip
  7. BIN
      public/install/src/panel6.zip
  8. BIN
      public/install/update/LinuxPanel-8.2.0.zip
  9. 28
      public/install/update6.sh
  10. BIN
      public/win/panel/panel_8.0.0.zip

44
app/command/CleanViteJs.php

@ -99,8 +99,8 @@ class CleanViteJs extends Command
if(strpos($file, 'window.location.protocol.indexOf("https")>=0')!==false){ //index
$file = str_replace('(window.location.protocol.indexOf("https")>=0)', '1', $file);
$file = preg_replace('!setTimeout\(\(\(\)=>\w+\(\)\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(function\(\)\{return \w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(\(\)=>\{\w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(function\(\)\{\w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!recommendShow:\w+,!', 'recommendShow:!1,', $file);
$code = $this->getExtendCode($file, '"需求反馈"', 2);
if($code){
@ -124,16 +124,20 @@ class CleanViteJs extends Command
$end = strpos($file, $code)+strlen($code);
$code = substr($file, $start, $end - $start + 1);
$file = str_replace($code, '', $file);
$file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file);
$file = preg_replace('!computed\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = str_replace('startNegotiate(),', '', $file);
$flag = true;
}
if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2
$file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file);
$file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$flag = true;
}
if(strpos($file, '请冷静几秒钟,确认以下要删除的数据')!==false && strpos($file, '"计算结果:"')!==false){ //site
$code = $this->getExtendCode($file, '"计算结果:"', 2, '[', ']');
@ -148,21 +152,21 @@ class CleanViteJs extends Command
$flag = true;
}
if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup
/*if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup
$code = $this->getExtendCode($file, '"bt-waf-gray"', 2);
$code = $this->getExtendCode($file, $code, 1, '[', ']');
$code = $this->getExtendFunction($file, $code);
$file = str_replace($code, '""', $file);
$flag = true;
}
}*/
if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl
$code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendFunction($file, '"测试证书"', '{', '}');
$file = str_replace($code, '', $file);
$file = preg_replace('!\w+\.value="currentCertInfo":\w+\.value="busSslList"!', 'i.value="currentCertInfo":i.value="currentCertInfo"', $file);
$file = preg_replace('!\{\w+\.value="busSslList",\w+\(\)\}!', '{i.value="letsEncryptList"}', $file);
$file = str_replace('"currentCertInfo":"busSslList"', '"currentCertInfo":"currentCertInfo"', $file);
$file = preg_replace('!\{(\w+)\.value="busSslList",\w+\(\)\}!', '{$1.value="letsEncryptList"}', $file);
$flag = true;
}
@ -172,6 +176,20 @@ class CleanViteJs extends Command
$file = str_replace($code, '', $file);
$flag = true;
}
if(strpos($file, '"recom-view"')!==false){ //soft
$code = getExtendFunction($file, '"recom-view"');
$file = str_replace($code, 'void(0)', $file);
$flag = true;
}
if(strpos($file, '"打开插件文件目录"')!==false){ //soft.table
$code = getExtendFunction($file, '"(续费)"');
$file = str_replace($code, '""', $file);
$code = getExtendFunction($file, '"(续费)"');
$file = str_replace($code, '""', $file);
$flag = true;
}
for($i=0;$i<5;$i++){
$code = $this->getExtendCode($file, 'content:"需求反馈"', 2);

4
app/controller/Index.php

@ -8,13 +8,13 @@ class Index extends BaseController
{
public function index()
{
return 'Server is ok';
return '';
}
public function download()
{
if(config_get('download_page') == '0' && !request()->islogin){
return redirect('/admin/login');
return 'need login';
}
View::assign('siteurl', request()->root(true));
return view();

6
app/script/convert.sh

@ -1,8 +1,8 @@
#!/bin/bash
Linux_Version="8.1.0"
Windows_Version="7.9.0"
Btm_Version="2.2.9"
Linux_Version="8.2.0"
Windows_Version="8.0.0"
Btm_Version="2.3.0"
FILES=(
public/install/src/panel6.zip

2
app/view/admin/login.html

@ -23,7 +23,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">宝塔第三方云端管理中心</a>
<a class="navbar-brand" href="./">Cloud</a>
</div><!-- /.navbar-header -->
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">

4
public/install/install_6.0.sh

@ -134,8 +134,8 @@ Add_lib_Install(){
Get_Versions
if [ "${os_type}" == "el" ] && [ "${os_version}" == "7" ];then
cd /www/server/panel/class
btpython -c "import panelPlugin; plugin = panelPlugin.panelPlugin(); plugin.check_install_lib('1')"
echo "True" > /tmp/panelTask.pl
#btpython -c "import panelPlugin; plugin = panelPlugin.panelPlugin(); plugin.check_install_lib('1')"
#echo "True" > /tmp/panelTask.pl
fi
}
Get_Pack_Manager(){

BIN
public/install/src/bt-monitor-2.2.9.zip → public/install/src/bt-monitor-2.3.0.zip

BIN
public/install/src/panel6.zip

BIN
public/install/update/LinuxPanel-8.1.0.zip → public/install/update/LinuxPanel-8.2.0.zip

28
public/install/update6.sh

@ -47,7 +47,7 @@ download_Url=$NODE_URL
setup_path=/www
version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version)
if [ "$version" = '' ];then
version='8.0.5'
version='8.2.0'
fi
armCheck=$(uname -m|grep arm)
if [ "${armCheck}" ];then
@ -79,13 +79,18 @@ rm -f /www/server/panel/*.pyc
rm -f /www/server/panel/class/*.pyc
#pip install flask_sqlalchemy
#pip install itsdangerous==0.24
btpip install natsort
pip_list=$($mypip list)
pip_list=$($mypip list 2>&1)
request_v=$(btpip list 2>/dev/null|grep "requests "|awk '{print $2}'|cut -d '.' -f 2)
if [ "$request_v" = "" ] || [ "${request_v}" -gt "28" ];then
$mypip install requests==2.27.1
fi
NATSORT_C=$(echo $pip_list|grep natsort)
if [ -z "${NATSORT_C}" ];then
btpip install natsort
fi
openssl_v=$(echo "$pip_list"|grep pyOpenSSL)
if [ "$openssl_v" = "" ];then
$mypip install pyOpenSSL
@ -129,8 +134,16 @@ if [ "${PYMYSQL_SSL_CHECK}" ];then
fi
btpip uninstall enum34 -y
btpip install geoip2==4.7.0
btpip install pandas
GEOIP_C=$(echo $pip_list|grep geoip2)
if [ -z "${GEOIP_C}" ];then
btpip install geoip2==4.7.0
fi
PANDAS_C=$(echo $pip_list|grep pandas)
if [ -z "${PANDAS_C}" ];then
btpip install pandas
fi
pymysql=$(echo "$pip_list"|grep pycryptodome)
if [ "$pymysql" = "" ];then
@ -140,6 +153,11 @@ fi
echo "修复面板依赖完成!"
echo "==========================================="
RE_UPDATE=$(cat /www/server/panel/data/db/update)
if [ "$RE_UPDATE" -ge "4" ];then
echo "2" > /www/server/panel/data/db/update
fi
#psutil=$(echo "$pip_list"|grep psutil|awk '{print $2}'|grep '5.7.')
#if [ "$psutil" = "" ];then
# $mypip install -U psutil

BIN
public/win/panel/panel_7.9.0.zip → public/win/panel/panel_8.0.0.zip

Loading…
Cancel
Save