diff --git a/app/script/convert.sh b/app/script/convert.sh index 945efad..88e19ea 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -1,6 +1,6 @@ #!/bin/bash -Linux_Version="8.0.4" +Linux_Version="8.0.5" Windows_Version="7.9.0" Btm_Version="2.2.9" diff --git a/install.sql b/install.sql index 1cbb116..b969712 100644 --- a/install.sql +++ b/install.sql @@ -12,9 +12,9 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES ('bt_key', ''), ('whitelist', '0'), ('download_page', '1'), -('new_version', '8.0.4'), +('new_version', '8.0.5'), ('update_msg', '暂无更新日志'), -('update_date', '2023-11-19'), +('update_date', '2024-01-12'), ('new_version_win', '7.9.0'), ('update_msg_win', '暂无更新日志'), ('update_date_win', '2023-07-20'), diff --git a/public/install/install_6.0.sh b/public/install/install_6.0.sh index 516bf08..fd02236 100644 --- a/public/install/install_6.0.sh +++ b/public/install/install_6.0.sh @@ -40,7 +40,7 @@ cd ~ setup_path="/www" python_bin=$setup_path/server/panel/pyenv/bin/python cpu_cpunt=$(cat /proc/cpuinfo|grep processor|wc -l) - +panelPort=$(expr $RANDOM % 55535 + 10000) # if [ "$1" ];then # IDC_CODE=$1 # fi @@ -508,7 +508,7 @@ Install_Python_Lib(){ chmod -R 700 $pyenv_path/pyenv/bin is_package=$($python_bin -m psutil 2>&1|grep package) if [ "$is_package" = "" ];then - wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip.txt -T 5 + wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip.txt -T 15 $pyenv_path/pyenv/bin/pip install -U pip $pyenv_path/pyenv/bin/pip install -U setuptools==65.5.0 $pyenv_path/pyenv/bin/pip install -r $pyenv_path/pyenv/pip.txt @@ -584,10 +584,10 @@ Install_Python_Lib(){ if [ "${os_version}" != "" ];then pyenv_file="/www/pyenv.tar.gz" - wget -O $pyenv_file $download_Url/install/pyenv/pyenv-${os_type}${os_version}-x${is64bit}.tar.gz -T 10 + wget -O $pyenv_file $download_Url/install/pyenv/pyenv-${os_type}${os_version}-x${is64bit}.tar.gz -T 15 if [ "$?" != "0" ];then get_node_url $download_Url - wget -O $pyenv_file $download_Url/install/pyenv/pyenv-${os_type}${os_version}-x${is64bit}.tar.gz -T 10 + wget -O $pyenv_file $download_Url/install/pyenv/pyenv-${os_type}${os_version}-x${is64bit}.tar.gz -T 15 fi tmp_size=$(du -b $pyenv_file|awk '{print $1}') if [ $tmp_size -lt 703460 ];then @@ -618,7 +618,7 @@ Install_Python_Lib(){ cd /www python_src='/www/python_src.tar.xz' python_src_path="/www/Python-${py_version}" - wget -O $python_src $download_Url/src/Python-${py_version}.tar.xz -T 5 + wget -O $python_src $download_Url/src/Python-${py_version}.tar.xz -T 15 tmp_size=$(du -b $python_src|awk '{print $1}') if [ $tmp_size -lt 10703460 ];then rm -f $python_src @@ -672,11 +672,8 @@ Install_Python_Lib(){ fi } Install_Bt(){ - panelPort="8888" if [ -f ${setup_path}/server/panel/data/port.pl ];then panelPort=$(cat ${setup_path}/server/panel/data/port.pl) - else - panelPort=$(expr $RANDOM % 55535 + 10000) fi if [ "${PANEL_PORT}" ];then panelPort=$PANEL_PORT @@ -701,9 +698,9 @@ Install_Bt(){ sleep 1 fi - wget -O /etc/init.d/bt ${download_Url}/install/src/bt6.init -T 10 - wget -O /www/server/panel/install/public.sh ${Btapi_Url}/install/public.sh -T 10 - wget -O panel.zip ${Btapi_Url}/install/src/panel6.zip -T 10 + wget -O /etc/init.d/bt ${download_Url}/install/src/bt6.init -T 15 + wget -O /www/server/panel/install/public.sh ${Btapi_Url}/install/public.sh -T 15 + wget -O panel.zip ${Btapi_Url}/install/src/panel6.zip -T 15 if [ -f "${setup_path}/server/panel/data/default.db" ];then if [ -d "/${setup_path}/server/panel/old_data" ];then @@ -716,6 +713,11 @@ Install_Bt(){ mv -f ${setup_path}/server/panel/data/system.db ${setup_path}/server/panel/old_data/system.db mv -f ${setup_path}/server/panel/data/port.pl ${setup_path}/server/panel/old_data/port.pl mv -f ${setup_path}/server/panel/data/admin_path.pl ${setup_path}/server/panel/old_data/admin_path.pl + + if [ -f "${setup_path}/server/panel/data/db/default.db" ];then + mv -f ${setup_path}/server/panel/data/db/ ${setup_path}/server/panel/old_data/ + fi + fi if [ ! -f "/usr/bin/unzip" ]; then @@ -734,6 +736,11 @@ Install_Bt(){ mv -f ${setup_path}/server/panel/old_data/system.db ${setup_path}/server/panel/data/system.db mv -f ${setup_path}/server/panel/old_data/port.pl ${setup_path}/server/panel/data/port.pl mv -f ${setup_path}/server/panel/old_data/admin_path.pl ${setup_path}/server/panel/data/admin_path.pl + + if [ -f "${setup_path}/server/panel/old_data/db/default.db" ];then + mv -f ${setup_path}/server/panel/old_data/db/ ${setup_path}/server/panel/data/db + fi + if [ -d "/${setup_path}/server/panel/old_data" ];then rm -rf ${setup_path}/server/panel/old_data fi @@ -743,6 +750,11 @@ Install_Bt(){ ls -lh panel.zip Red_Error "ERROR: Failed to download, please try install again!" "ERROR: 下载宝塔失败,请尝试重新安装!" fi + + SYS_LOG_CHECK=$(grep ^weekly /etc/logrotate.conf) + if [ "${SYS_LOG_CHECK}" ];then + sed -i 's/rotate [0-9]*/rotate 8/g' /etc/logrotate.conf + fi rm -f panel.zip rm -f ${setup_path}/server/panel/class/*.pyc @@ -753,8 +765,8 @@ Install_Bt(){ chmod -R +x ${setup_path}/server/panel/script ln -sf /etc/init.d/bt /usr/bin/bt echo "${panelPort}" > ${setup_path}/server/panel/data/port.pl - wget -O /etc/init.d/bt ${download_Url}/install/src/bt7.init -T 10 - wget -O /www/server/panel/init.sh ${download_Url}/install/src/bt7.init -T 10 + wget -O /etc/init.d/bt ${download_Url}/install/src/bt7.init -T 15 + wget -O /www/server/panel/init.sh ${download_Url}/install/src/bt7.init -T 15 wget -O /www/server/panel/data/softList.conf ${download_Url}/install/conf/softList.conf rm -f /www/server/panel/class/*.so @@ -805,14 +817,13 @@ Set_Bt_Panel(){ /www/server/panel/pyenv/bin/pip3 install psycopg2-binary /www/server/panel/pyenv/bin/pip3 install flask -U /www/server/panel/pyenv/bin/pip3 install flask-sock + /www/server/panel/pyenv/bin/pip3 install -I gevent btpip install simple-websocket==0.10.0 btpip install natsort + btpip uninstall enum34 -y + btpip install geoip2==4.7.0 auth_path=$(cat ${admin_auth}) cd ${setup_path}/server/panel/ - if [ "$SET_SSL" == true ]; then - btpip install -I pyOpenSSl 2>/dev/null - btpython /www/server/panel/tools.py ssl - fi /etc/init.d/bt start $python_bin -m py_compile tools.py $python_bin tools.py username @@ -824,6 +835,10 @@ Set_Bt_Panel(){ echo "${password}" > ${setup_path}/server/panel/default.pl chmod 600 ${setup_path}/server/panel/default.pl sleep 3 + if [ "$SET_SSL" == true ]; then + btpip install -I pyOpenSSl 2>/dev/null + btpython /www/server/panel/tools.py ssl + fi /etc/init.d/bt restart sleep 3 isStart=$(ps aux |grep 'BT-Panel'|grep -v grep|awk '{print $2}') @@ -982,7 +997,7 @@ echo " +---------------------------------------------------------------------- | Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved. +---------------------------------------------------------------------- -| The WebPanel URL will be http://SERVER_IP:8888 when installed. +| The WebPanel URL will be http://SERVER_IP:${panelPort} when installed. +---------------------------------------------------------------------- | 为了您的正常使用,请确保使用全新或纯净的系统安装宝塔面板,不支持已部署项目/环境的系统安装 +---------------------------------------------------------------------- diff --git a/public/install/public.sh b/public/install/public.sh index 0c9e95d..21758ed 100644 --- a/public/install/public.sh +++ b/public/install/public.sh @@ -9,8 +9,13 @@ export PATH export LANG=en_US.UTF-8 export LANGUAGE=en_US:en +NODE_FILE_CHECK=$(cat /www/server/panel/data/node.json |grep 125.88.182.172) +if [ "${NODE_FILE_CHECK}" ];then + rm -f /www/server/panel/data/node.json +fi + get_node_url(){ - nodes=(https://dg2.bt.cn https://download.bt.cn https://ctcc1-node.bt.cn https://cmcc1-node.bt.cn https://ctcc2-node.bt.cn https://hk1-node.bt.cn https://na1-node.bt.cn https://jp1-node.bt.cn); + nodes=(https://dg2.bt.cn https://download.bt.cn https://ctcc1-node.bt.cn https://cmcc1-node.bt.cn https://ctcc2-node.bt.cn https://hk1-node.bt.cn https://na1-node.bt.cn https://jp1-node.bt.cn https://cf1-node.aapanel.com); if [ "$1" ];then nodes=($(echo ${nodes[*]}|sed "s#${1}##")) @@ -40,8 +45,8 @@ get_node_url(){ fi i=$(($i+1)) - if [ $TIME_TOTAL -lt 200 ];then - if [ $RES -ge 3000 ];then + if [ $TIME_TOTAL -lt 300 ];then + if [ $RES -ge 2390 ];then break; fi fi diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index 1e9ae30..db5a12b 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/update/LinuxPanel-8.0.4.zip b/public/install/update/LinuxPanel-8.0.5.zip similarity index 66% rename from public/install/update/LinuxPanel-8.0.4.zip rename to public/install/update/LinuxPanel-8.0.5.zip index 6cbc135..16824d7 100644 Binary files a/public/install/update/LinuxPanel-8.0.4.zip and b/public/install/update/LinuxPanel-8.0.5.zip differ diff --git a/public/install/update6.sh b/public/install/update6.sh index ba6dd4a..8a73df0 100644 --- a/public/install/update6.sh +++ b/public/install/update6.sh @@ -18,6 +18,11 @@ if [ ! -f "/www/server/panel/pyenv/bin/python3" ];then echo "请截图发帖至论坛www.bt.cn/bbs求助" exit 0; fi +Centos6Check=$(cat /etc/redhat-release | grep ' 6.' | grep -iE 'centos|Red Hat') +if [ "${Centos6Check}" ];then + echo "Centos6不支持升级宝塔面板,建议备份数据重装更换Centos7/8安装宝塔面板" + exit 1 +fi public_file=/www/server/panel/install/public.sh if [ ! -f $public_file ];then @@ -42,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.1' + version='8.0.5' fi armCheck=$(uname -m|grep arm) if [ "${armCheck}" ];then @@ -58,6 +63,7 @@ if [ $dsize -lt 10240 ];then echo "获取更新包失败,请稍后更新或联系宝塔运维" exit; fi + unzip -o /tmp/panel.zip -d $setup_path/server/ > /dev/null rm -f /tmp/panel.zip cd $setup_path/server/panel/ @@ -67,6 +73,8 @@ if [ "${check_bt}" = "" ];then wget -O /etc/init.d/bt $download_Url/install/src/bt7.init -T 20 chmod +x /etc/init.d/bt fi +echo "==============================================================" +echo "正在修复面板依赖问题" rm -f /www/server/panel/*.pyc rm -f /www/server/panel/class/*.pyc #pip install flask_sqlalchemy @@ -92,12 +100,23 @@ pymysql=$(echo "$pip_list"|grep pymysql) if [ "$pymysql" = "" ];then $mypip install pymysql fi +GEVENT_V=$(btpip list 2> /dev/null|grep "gevent "|awk '{print $2}'|cut -f 1 -d '.') +if [ "${GEVENT_V}" -le "1" ];then + /www/server/panel/pyenv/bin/pip3 install -I gevent +fi + +btpip uninstall enum34 -y +btpip install geoip2==4.7.0 +btpip install pandas pymysql=$(echo "$pip_list"|grep pycryptodome) if [ "$pymysql" = "" ];then $mypip install pycryptodome fi +echo "修复面板依赖完成!" +echo "===========================================" + #psutil=$(echo "$pip_list"|grep psutil|awk '{print $2}'|grep '5.7.') #if [ "$psutil" = "" ];then # $mypip install -U psutil diff --git a/public/install/update_panel.sh b/public/install/update_panel.sh index a2dbacf..17f01ef 100644 --- a/public/install/update_panel.sh +++ b/public/install/update_panel.sh @@ -14,10 +14,14 @@ if [ "${is64bit}" != '64' ];then echo "退出、不做任何操作" exit 1 fi +Centos6Check=$(cat /etc/redhat-release | grep ' 6.' | grep -iE 'centos|Red Hat') +if [ "${Centos6Check}" ];then + echo "Centos6不支持升级宝塔面板,建议备份数据重装更换Centos7/8安装宝塔面板" + exit 1 +fi Btapi_Url='http://www.example.com' - up_plugin=0 download_file(){ diff --git a/public/static/css/download.css b/public/static/css/download.css index f6fd84a..958c181 100644 --- a/public/static/css/download.css +++ b/public/static/css/download.css @@ -1,716 +1,716 @@ -.nav .new, -.wapnava .new, -.nava.bbs { - display: flex; - align-items: center; -} -.nava.bbs .icon { - width: 20px; - height: 20px; - margin-right: 6px; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAg1JREFUWEftlz9IG1Ecx7+/d63dOwqV6GhXm1i6mM1SyB+sYCfzZ5WCg1BxMF26OHQodGoucXATw6WC2eKYswiC6NAqdhBxFLpU7L1fueKFmF4uL3eSZMiDW+5+fz7v+37v/d4Rejyox/nRfwDPtjNj2o0cCarMb+DgIFm8ahenrkDEyM6B+TUIM+2cFL//AiFvxvRFL/s6QNjI7BAwrRhc2YykjNaSxd1WDg0KZFg5ageGDOT24vr7AYBfBU5AfK6sOFMIgP3Uh/8lIN43Y4UJ5eQAJkupEAtx5gYQLqffCIseWUOy8u1V8dKx8SxCBjYA/FCFEMBTBmbdACLldBVMUwB+gmjNjOU/23Zd2wXPK9nHfM0vJfCRiI/MWCHaVQBHFUcJM67/m7yHAnRELLO1RMF0W4Lb9a42F12zbXMRdgAAEOEtLHnoBsCaNg7mFQDDXjUSCEC1+AYAAwU8FLgC8wszUTj2sQ2DlSATfRUWb9WSerExkvI2ZKBkSWtpP7l+GgzlrrcSgFsHsw8eKcS8HxgBnNTiut1X0BqgnK4yiydgXtpL6KXmRGEjs0pAzg/Arc+m9vDBO+vPzRe7Kf13FKsEniyl7G7W8WBNzIORAnAB4u++ATrO3OAQMdIfAFp2XvlSIAiA7Rs2sgsE/mTfCcy4PnqnGwYNrurvLKNzVe+/XzPVmdyXXc8V+Av1tCwwyQQB+wAAAABJRU5ErkJggg=='); - background-position: center; - background-repeat: no-repeat; - background-size: cover; - border-radius: 2px; - image-rendering: -webkit-optimize-contrast; - display: none; -} -.wapnava .new .icon, -.nav .new .icon { - width: 28px; - height: 28px; - margin-right: 4px; - image-rendering: -webkit-optimize-contrast; -} - - -.head_pc { - background-color: #fff; - position: relative; - z-index: 2; -} -canvas { - height: 100%; - width: 100%; - position: absolute; - top: 0; - z-index: 0; - opacity: 0.5; -} -.top-tips { - z-index: 1; -} -.wrap { - padding: 0; -} -.d1 { - background: linear-gradient(0deg, #fff, #d8efdb, #edf7ef); - padding-bottom: 60px; - position: relative; -} -.d1 .wrap { - padding-top: 60px; - position: relative; - z-index: 1; -} - -.d2 .wrap, -.d3 .wrap, -.d4 .wrap { - padding: 70px 0; -} - -.install-box { - position: relative; - top: 0; - display: flex; - align-items: center; - width: 24%; - padding: 30px 10px 16px 20px; - border-radius: 8px; - background-color: #fff; - box-shadow: 0 4px 8px 0 rgb(0 0 0 / 30%); - transition: all 0.3s; -} -.install-box:hover { - box-shadow: 0 6px 16px 0 rgb(0 0 0 / 50%); - top: -10px; -} -.install-box.linux, -.install-box.windows { - align-items: center; - width: 41.5%; -} - -.install-box + .install-box { - margin-left: 2%; -} - -.install-box::before { - content: ''; - position: absolute; - top: 20px; - right: 0; - bottom: 0; - width: 100%; - background-repeat: no-repeat; - background-position: right bottom; - background-size: auto 100%; - z-index: 10; - transition: all 0.25s; - opacity: 0.3; -} - -.install-box.linux::before { - background-image: url(../images/downico1_01.png); -} - -.install-box.windows::before { - background-image: url(../images/downico2_01.png); -} - -.install-box.cloud::before { - background-image: url(../images/downico3_01.png); -} - -.install-box.ssh::before { - background-image: url(../images/downico4_01.png); -} - -.install-box.app::before { - background-image: url(../images/downico5_01.png); -} - -.install-box .img { - position: relative; - flex: 0 0 44%; - z-index: 12; -} -.install-box .img img { - display: block; - width: 100%; -} - -.install-box .cont { - flex: 1; - position: relative; - display: flex; - flex-direction: column; - justify-content: space-between; - margin-left: 5%; - padding-bottom: 12px; - z-index: 12; -} - -.install-box.linux .cont, -.install-box.windows .cont { - padding-bottom: 10px; -} - -.install-box .bottom { - display: flex; - margin: 0 auto; -} - -.install-box .title { - margin-bottom: 14px; - line-height: 1; - font-size: 20px; - font-weight: bold; - transition: color 0.25s; -} - -.install-box.linux .title, -.install-box.windows .title { - font-size: 28px; -} - -.install-box .desc { - margin-bottom: 14px; - font-size: 12px; - color: #777; - transition: color 0.25s; -} - -.install-box.linux .desc, -.install-box.windows .desc { - font-size: 14px; -} - -.install-box .mark { - margin-bottom: 20px; - height: 22px; - overflow: hidden; -} -.install-box .mark span { - margin-right: 10px; - line-height: 22px; - height: 22px; - padding: 0 6px; - font-size: 12px; - border-radius: 2px; - display: inline-block; -} -.install-box .mark span:nth-child(1) { - border: #6bdc6b 1px solid; - color: #fff; - background-color: #6bdc6b; -} -.install-box .mark span:nth-child(2) { - border: #ffa565 1px solid; - color: #fff; - background-color: #ffa565; -} -.install-box .mark span:nth-child(3) { - border: #65a7ff 1px solid; - color: #fff; - background-color: #65a7ff; -} -.install-box .mark span:last-child { - margin-right: 0; -} - -.install-box .btn { - display: flex; - align-items: center; - justify-content: center; - height: 34px; - padding: 0 16px; - background-image: linear-gradient(#54b891, #22a53d); - border-radius: 6px; - color: #fff; - font-size: 14px; - font-weight: 700; - line-height: 1; - border: none; -} - -.install-box .btn.default { - margin-left: 10px; - background: none; - border: 1px solid #777; - color: #777; -} -.install-box .btn:hover { - filter: brightness(120%); - -webkit-filter: brightness(120%); -} - -.install-box:hover { - background-image: linear-gradient(#e5f5e5, #fff); -} - - -.wrap-title { - display: flex; - flex-wrap: wrap; - align-items: center; - margin-bottom: 50px; -} - -.wrap-title::before { - content: ''; - display: block; - width: 6px; - height: 36px; - margin-right: 20px; - background-color: #20a53a; -} - -.wrap-title .text { - margin-right: 20px; - line-height: 36px; - font-size: 36px; - font-weight: bold; -} - -.wrap-title a { - font-size: 16px; -} - -.d2 .desc, -.d2 .tips, -.d4 .tips { - line-height: 30px; -} - -.d2 .desc { - margin-bottom: 16px; -} - -.d2 .tips, -.d4 .tips { - margin-top: 16px; - /* color: #20a53a; */ -} - -.install-code { - display: flex; - flex-wrap: wrap; - align-items: center; - line-height: 30px; -} -.install-code .osname { - display: inline-block; - width: 160px; - font-weight: 700; -} - -.install-code + .install-code { - margin-top: 16px; -} -.install-code .code-cont { - display: flex; - align-items: center; -} -.install-code .command { - position: relative; - display: flex; - margin-left: 12px; - margin-right: 15px; - padding: 7px 10px; - border-radius: 3px; - background-color: #20202f; - box-shadow: 0 0 5px #ececec; - font-size: 16px; - color: #fff; - font-family: SimSun; - width: 950px; -} - -.install-code .ico-copy { - display: block; - width: 26px; - height: 30px; - background: url(../images/ico-copy.png) no-repeat left center; - cursor: pointer; - width: 65px; - text-indent: 2.4em; - font-weight: bold; - color: #20a53a; -} - -.d4 .desc { - margin-bottom: 16px; - line-height: 30px; -} - -.bird { - width: 25px; - height: 5px; - display: inline-block; - position: absolute; - transform: skew(20deg, 20deg); - animation: wave 2.5s ease-in-out infinite; - z-index: 0; -} - -.bird:before, -.bird:after { - content: ''; - width: 100%; - height: 100%; - background-color: #1aa837; - position: absolute; - border-radius: 20%; - opacity: 0.1; -} - -.bird:before { - right: 49%; - transform-origin: right; - transform: rotate(-40deg); - animation: flap-left 0.75s ease-in-out infinite; -} - -.bird:after { - left: 49%; - transform-origin: left; - transform: rotate(40deg); - animation: flap-right 0.75s linear infinite; -} - -/* ��װ�ű� */ -.layui-layer .install-code { - display: flex; - flex-wrap: wrap; - line-height: 30px; -} -.layui-layer .install-code .osname { - display: inline-block; - width: 160px; - font-weight: 700; - margin: 20px auto; - font-size: 18px; -} - -.layui-layer .install-code + .install-code { - margin-top: 16px; -} -.layui-layer .install-code .code-cont { - display: flex; - align-items: center; -} -.layui-layer .install-code .command { - position: relative; - display: flex; - margin-right: 15px; - padding: 7px 10px; - border-radius: 3px; - background-color: #20202f; - box-shadow: 0 0 5px #ececec; - color: #fff; - font-family: SimSun; - width: 950px; -} - -.layui-layer .install-code .ico-copy { - display: block; - width: 26px; - height: 30px; - background: url(../images/ico-copy.png) no-repeat left center; - cursor: pointer; - width: 65px; - text-indent: 2.4em; - font-weight: bold; - color: #20a53a; -} -.layui-layer .install-code { - flex-direction: column; - align-items: flex-start; -} -.layui-layer .install-code .code-cont { - width: 100%; -} -.layui-layer .install-code .command { - flex: 1; - width: 0; - margin-left: 0; - line-height: 30px; - font-size: 12px; - word-break: break-all; -} - -@keyframes wave { - 40% { - transform: translateY(40px) skew(20deg, 20deg); - } - 50% { - transform: translateY(50px) skew(20deg, 20deg); - } - 60% { - transform: translateY(40px) skew(20deg, 20deg); - } - 100% { - transform: translateY(0) skew(20deg, 20deg); - } -} - -@keyframes flap-left { - 60% { - transform: rotate(10deg); - } - 75% { - transform: rotate(20deg); - } - 100% { - transform: rotate(-40deg); - } -} - -@keyframes flap-right { - 60% { - transform: rotate(-10deg); - } - 75% { - transform: rotate(-20deg); - } - 100% { - transform: rotate(40deg); - } -} - -@media screen and (max-width: 1440px) { - .wrap { - width: 97%; - } -} - -@media only screen and (max-width: 1299px) { - .d2 .wrap, - .d3 .wrap, - .d4 .wrap { - padding: 60px 0; - } - -} -@media only screen and (max-width: 980px) { - .install-code { - flex-direction: column; - align-items: flex-start; - } - .install-code .code-cont { - width: 100%; - } - .install-code .command { - flex: 1; - width: 0; - margin-left: 0; - line-height: 18px; - font-size: 12px; - word-break: break-all; - } - .d2 .desc, - .d2 .tips { - line-height: 24px; - } -} - -@media only screen and (max-width: 768px) { - .d2 .wrap, - .d3 .wrap, - .d4 .wrap { - padding: 40px 0; - } - .d1 .wrap { - padding-top: 40px; - } - .wrap-title { - margin-bottom: 20px; - } - .wrap-title::before { - width: 3px; - height: 20px; - margin-right: 10px; - } - .wrap-title .text { - font-size: 20px; - margin-right: 10px; - } - .wrap-title a { - font-size: 12px; - } -} - -@media screen and (max-width: 1440px) { - .wrap { - width: 97%; - } -} - -@media only screen and (max-width: 1299px) { - .d2 .wrap, - .d3 .wrap, - .d4 .wrap { - padding: 60px 0; - } - - .install-box { - padding: 24px 20px 10px; - padding-right: 0; - } - - .install-box.linux .title, - .install-box.windows .title, - .install-box .title { - margin-bottom: 10px; - font-size: 20px; - } - - .install-box .img { - flex: 0 0 40%; - } - - .install-box.linux .title, - .install-box.windows .title { - margin-bottom: 16px; - } - - .install-box .desc { - font-size: 13px; - } - .install-box .btn { - padding: 0 12px; - height: 30px; - border-radius: 8px; - font-size: 12px; - } -} -@media only screen and (max-width: 1200px) { - .install-box .title { - font-size: 16px; - } - .install-box .desc { - font-size: 12px; - } -} -@media only screen and (max-width: 980px) { - .install-list { - justify-content: flex-start; - flex-wrap: wrap; - } - .install-box, - .install-box.linux, - .install-box.windows { - width: 48%; - padding: 15px; - align-items: center; - } - .install-box:nth-child(2n) { - margin-left: 4%; - } - .install-box.app { - margin-top: 30px; - margin-left: 0; - } - .install-box.monitor { - margin-top: 30px; - } - .install-box.linux .title, - .install-box.windows .title, - .install-box .title { - font-size: 16px; - } - .install-box .btn { - height: 24px; - padding: 0 10px; - border-radius: 6px; - font-weight: normal; - } - .install-box .btn + .btn { - margin-left: 5px; - } - - .install-code { - flex-direction: column; - align-items: flex-start; - } - .install-code .code-cont { - width: 100%; - } - .install-code .command { - flex: 1; - width: 0; - margin-left: 0; - line-height: 18px; - font-size: 12px; - word-break: break-all; - } - .online-install-cont { - flex-direction: column; - } - .online-install-cont .form { - margin-bottom: 20px; - } - .online-install-cont .pr-70 { - padding-right: 0; - } - .online-install-cont .pl-10 { - padding-left: 0; - } - .online-install-cont .first-line { - flex-wrap: wrap; - } - .online-install-cont .server-line { - width: 100%; - flex: none; - } - .online-install-cont .port-line { - flex: none; - margin-top: 20px; - width: 100%; - } - - .d2 .desc, - .d2 .tips { - line-height: 24px; - } -} - -@media only screen and (max-width: 768px) { - .d2 .wrap, - .d3 .wrap, - .d4 .wrap { - padding: 40px 0; - } - .d1 .wrap { - padding-top: 40px; - } - .install-box { - flex-wrap: wrap; - } - .install-box .img, - .install-box .cont { - flex: 0 0 100%; - } - .install-box .cont { - margin-top: 10px; - margin-left: 0; - padding: 0; - } - .install-box .title, - .install-box.linux .title, - .install-box.windows .title { - margin-bottom: 10px; - } - .install-box .desc { - margin-bottom: 10px; - } - - .wrap-title { - margin-bottom: 20px; - } - .wrap-title::before { - width: 3px; - height: 20px; - margin-right: 10px; - } - .wrap-title .text { - font-size: 20px; - margin-right: 10px; - } - .wrap-title a { - font-size: 12px; - } -} +.nav .new, +.wapnava .new, +.nava.bbs { + display: flex; + align-items: center; +} +.nava.bbs .icon { + width: 20px; + height: 20px; + margin-right: 6px; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAg1JREFUWEftlz9IG1Ecx7+/d63dOwqV6GhXm1i6mM1SyB+sYCfzZ5WCg1BxMF26OHQodGoucXATw6WC2eKYswiC6NAqdhBxFLpU7L1fueKFmF4uL3eSZMiDW+5+fz7v+37v/d4Rejyox/nRfwDPtjNj2o0cCarMb+DgIFm8ahenrkDEyM6B+TUIM+2cFL//AiFvxvRFL/s6QNjI7BAwrRhc2YykjNaSxd1WDg0KZFg5ageGDOT24vr7AYBfBU5AfK6sOFMIgP3Uh/8lIN43Y4UJ5eQAJkupEAtx5gYQLqffCIseWUOy8u1V8dKx8SxCBjYA/FCFEMBTBmbdACLldBVMUwB+gmjNjOU/23Zd2wXPK9nHfM0vJfCRiI/MWCHaVQBHFUcJM67/m7yHAnRELLO1RMF0W4Lb9a42F12zbXMRdgAAEOEtLHnoBsCaNg7mFQDDXjUSCEC1+AYAAwU8FLgC8wszUTj2sQ2DlSATfRUWb9WSerExkvI2ZKBkSWtpP7l+GgzlrrcSgFsHsw8eKcS8HxgBnNTiut1X0BqgnK4yiydgXtpL6KXmRGEjs0pAzg/Arc+m9vDBO+vPzRe7Kf13FKsEniyl7G7W8WBNzIORAnAB4u++ATrO3OAQMdIfAFp2XvlSIAiA7Rs2sgsE/mTfCcy4PnqnGwYNrurvLKNzVe+/XzPVmdyXXc8V+Av1tCwwyQQB+wAAAABJRU5ErkJggg=='); + background-position: center; + background-repeat: no-repeat; + background-size: cover; + border-radius: 2px; + image-rendering: -webkit-optimize-contrast; + display: none; +} +.wapnava .new .icon, +.nav .new .icon { + width: 28px; + height: 28px; + margin-right: 4px; + image-rendering: -webkit-optimize-contrast; +} + + +.head_pc { + background-color: #fff; + position: relative; + z-index: 2; +} +canvas { + height: 100%; + width: 100%; + position: absolute; + top: 0; + z-index: 0; + opacity: 0.5; +} +.top-tips { + z-index: 1; +} +.wrap { + padding: 0; +} +.d1 { + background: linear-gradient(0deg, #fff, #d8efdb, #edf7ef); + padding-bottom: 60px; + position: relative; +} +.d1 .wrap { + padding-top: 60px; + position: relative; + z-index: 1; +} + +.d2 .wrap, +.d3 .wrap, +.d4 .wrap { + padding: 70px 0; +} + +.install-box { + position: relative; + top: 0; + display: flex; + align-items: center; + width: 30%; + padding: 30px 10px 16px 20px; + border-radius: 8px; + background-color: #fff; + box-shadow: 0 4px 8px 0 rgb(0 0 0 / 30%); + transition: all 0.3s; +} +.install-box:hover { + box-shadow: 0 6px 16px 0 rgb(0 0 0 / 50%); + top: -10px; +} +.install-box.linux, +.install-box.windows { + align-items: center; + width: 41.5%; +} + +.install-box + .install-box { + margin-left: 2%; +} + +.install-box::before { + content: ''; + position: absolute; + top: 20px; + right: 0; + bottom: 0; + width: 100%; + background-repeat: no-repeat; + background-position: right bottom; + background-size: auto 100%; + z-index: 10; + transition: all 0.25s; + opacity: 0.3; +} + +.install-box.linux::before { + background-image: url(../images/downico1_01.png); +} + +.install-box.windows::before { + background-image: url(../images/downico2_01.png); +} + +.install-box.cloud::before { + background-image: url(../images/downico3_01.png); +} + +.install-box.ssh::before { + background-image: url(../images/downico4_01.png); +} + +.install-box.app::before { + background-image: url(../images/downico5_01.png); +} + +.install-box .img { + position: relative; + flex: 0 0 44%; + z-index: 12; +} +.install-box .img img { + display: block; + width: 100%; +} + +.install-box .cont { + flex: 1; + position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + margin-left: 5%; + padding-bottom: 12px; + z-index: 12; +} + +.install-box.linux .cont, +.install-box.windows .cont { + padding-bottom: 10px; +} + +.install-box .bottom { + display: flex; + margin: 0 auto; +} + +.install-box .title { + margin-bottom: 14px; + line-height: 1; + font-size: 20px; + font-weight: bold; + transition: color 0.25s; +} + +.install-box.linux .title, +.install-box.windows .title { + font-size: 28px; +} + +.install-box .desc { + margin-bottom: 14px; + font-size: 12px; + color: #777; + transition: color 0.25s; +} + +.install-box.linux .desc, +.install-box.windows .desc { + font-size: 14px; +} + +.install-box .mark { + margin-bottom: 20px; + height: 22px; + overflow: hidden; +} +.install-box .mark span { + margin-right: 10px; + line-height: 22px; + height: 22px; + padding: 0 6px; + font-size: 12px; + border-radius: 2px; + display: inline-block; +} +.install-box .mark span:nth-child(1) { + border: #6bdc6b 1px solid; + color: #fff; + background-color: #6bdc6b; +} +.install-box .mark span:nth-child(2) { + border: #ffa565 1px solid; + color: #fff; + background-color: #ffa565; +} +.install-box .mark span:nth-child(3) { + border: #65a7ff 1px solid; + color: #fff; + background-color: #65a7ff; +} +.install-box .mark span:last-child { + margin-right: 0; +} + +.install-box .btn { + display: flex; + align-items: center; + justify-content: center; + height: 34px; + padding: 0 16px; + background-image: linear-gradient(#54b891, #22a53d); + border-radius: 6px; + color: #fff; + font-size: 14px; + font-weight: 700; + line-height: 1; + border: none; +} + +.install-box .btn.default { + margin-left: 10px; + background: none; + border: 1px solid #777; + color: #777; +} +.install-box .btn:hover { + filter: brightness(120%); + -webkit-filter: brightness(120%); +} + +.install-box:hover { + background-image: linear-gradient(#e5f5e5, #fff); +} + + +.wrap-title { + display: flex; + flex-wrap: wrap; + align-items: center; + margin-bottom: 50px; +} + +.wrap-title::before { + content: ''; + display: block; + width: 6px; + height: 36px; + margin-right: 20px; + background-color: #20a53a; +} + +.wrap-title .text { + margin-right: 20px; + line-height: 36px; + font-size: 36px; + font-weight: bold; +} + +.wrap-title a { + font-size: 16px; +} + +.d2 .desc, +.d2 .tips, +.d4 .tips { + line-height: 30px; +} + +.d2 .desc { + margin-bottom: 16px; +} + +.d2 .tips, +.d4 .tips { + margin-top: 16px; + /* color: #20a53a; */ +} + +.install-code { + display: flex; + flex-wrap: wrap; + align-items: center; + line-height: 30px; +} +.install-code .osname { + display: inline-block; + width: 160px; + font-weight: 700; +} + +.install-code + .install-code { + margin-top: 16px; +} +.install-code .code-cont { + display: flex; + align-items: center; +} +.install-code .command { + position: relative; + display: flex; + margin-left: 12px; + margin-right: 15px; + padding: 7px 10px; + border-radius: 3px; + background-color: #20202f; + box-shadow: 0 0 5px #ececec; + font-size: 16px; + color: #fff; + font-family: SimSun; + width: 950px; +} + +.install-code .ico-copy { + display: block; + width: 26px; + height: 30px; + background: url(../images/ico-copy.png) no-repeat left center; + cursor: pointer; + width: 65px; + text-indent: 2.4em; + font-weight: bold; + color: #20a53a; +} + +.d4 .desc { + margin-bottom: 16px; + line-height: 30px; +} + +.bird { + width: 25px; + height: 5px; + display: inline-block; + position: absolute; + transform: skew(20deg, 20deg); + animation: wave 2.5s ease-in-out infinite; + z-index: 0; +} + +.bird:before, +.bird:after { + content: ''; + width: 100%; + height: 100%; + background-color: #1aa837; + position: absolute; + border-radius: 20%; + opacity: 0.1; +} + +.bird:before { + right: 49%; + transform-origin: right; + transform: rotate(-40deg); + animation: flap-left 0.75s ease-in-out infinite; +} + +.bird:after { + left: 49%; + transform-origin: left; + transform: rotate(40deg); + animation: flap-right 0.75s linear infinite; +} + +/* ��װ�ű� */ +.layui-layer .install-code { + display: flex; + flex-wrap: wrap; + line-height: 30px; +} +.layui-layer .install-code .osname { + display: inline-block; + width: 160px; + font-weight: 700; + margin: 20px auto; + font-size: 18px; +} + +.layui-layer .install-code + .install-code { + margin-top: 16px; +} +.layui-layer .install-code .code-cont { + display: flex; + align-items: center; +} +.layui-layer .install-code .command { + position: relative; + display: flex; + margin-right: 15px; + padding: 7px 10px; + border-radius: 3px; + background-color: #20202f; + box-shadow: 0 0 5px #ececec; + color: #fff; + font-family: SimSun; + width: 950px; +} + +.layui-layer .install-code .ico-copy { + display: block; + width: 26px; + height: 30px; + background: url(../images/ico-copy.png) no-repeat left center; + cursor: pointer; + width: 65px; + text-indent: 2.4em; + font-weight: bold; + color: #20a53a; +} +.layui-layer .install-code { + flex-direction: column; + align-items: flex-start; +} +.layui-layer .install-code .code-cont { + width: 100%; +} +.layui-layer .install-code .command { + flex: 1; + width: 0; + margin-left: 0; + line-height: 30px; + font-size: 12px; + word-break: break-all; +} + +@keyframes wave { + 40% { + transform: translateY(40px) skew(20deg, 20deg); + } + 50% { + transform: translateY(50px) skew(20deg, 20deg); + } + 60% { + transform: translateY(40px) skew(20deg, 20deg); + } + 100% { + transform: translateY(0) skew(20deg, 20deg); + } +} + +@keyframes flap-left { + 60% { + transform: rotate(10deg); + } + 75% { + transform: rotate(20deg); + } + 100% { + transform: rotate(-40deg); + } +} + +@keyframes flap-right { + 60% { + transform: rotate(-10deg); + } + 75% { + transform: rotate(-20deg); + } + 100% { + transform: rotate(40deg); + } +} + +@media screen and (max-width: 1440px) { + .wrap { + width: 97%; + } +} + +@media only screen and (max-width: 1299px) { + .d2 .wrap, + .d3 .wrap, + .d4 .wrap { + padding: 60px 0; + } + +} +@media only screen and (max-width: 980px) { + .install-code { + flex-direction: column; + align-items: flex-start; + } + .install-code .code-cont { + width: 100%; + } + .install-code .command { + flex: 1; + width: 0; + margin-left: 0; + line-height: 18px; + font-size: 12px; + word-break: break-all; + } + .d2 .desc, + .d2 .tips { + line-height: 24px; + } +} + +@media only screen and (max-width: 768px) { + .d2 .wrap, + .d3 .wrap, + .d4 .wrap { + padding: 40px 0; + } + .d1 .wrap { + padding-top: 40px; + } + .wrap-title { + margin-bottom: 20px; + } + .wrap-title::before { + width: 3px; + height: 20px; + margin-right: 10px; + } + .wrap-title .text { + font-size: 20px; + margin-right: 10px; + } + .wrap-title a { + font-size: 12px; + } +} + +@media screen and (max-width: 1440px) { + .wrap { + width: 97%; + } +} + +@media only screen and (max-width: 1299px) { + .d2 .wrap, + .d3 .wrap, + .d4 .wrap { + padding: 60px 0; + } + + .install-box { + padding: 24px 20px 10px; + padding-right: 0; + } + + .install-box.linux .title, + .install-box.windows .title, + .install-box .title { + margin-bottom: 10px; + font-size: 20px; + } + + .install-box .img { + flex: 0 0 40%; + } + + .install-box.linux .title, + .install-box.windows .title { + margin-bottom: 16px; + } + + .install-box .desc { + font-size: 13px; + } + .install-box .btn { + padding: 0 12px; + height: 30px; + border-radius: 8px; + font-size: 12px; + } +} +@media only screen and (max-width: 1200px) { + .install-box .title { + font-size: 16px; + } + .install-box .desc { + font-size: 12px; + } +} +@media only screen and (max-width: 980px) { + .install-list { + justify-content: flex-start; + flex-wrap: wrap; + } + .install-box, + .install-box.linux, + .install-box.windows { + width: 48%; + padding: 15px; + align-items: center; + } + .install-box:nth-child(2n) { + margin-left: 4%; + } + .install-box.app { + margin-top: 30px; + margin-left: 0; + } + .install-box.monitor { + margin-top: 30px; + } + .install-box.linux .title, + .install-box.windows .title, + .install-box .title { + font-size: 16px; + } + .install-box .btn { + height: 24px; + padding: 0 10px; + border-radius: 6px; + font-weight: normal; + } + .install-box .btn + .btn { + margin-left: 5px; + } + + .install-code { + flex-direction: column; + align-items: flex-start; + } + .install-code .code-cont { + width: 100%; + } + .install-code .command { + flex: 1; + width: 0; + margin-left: 0; + line-height: 18px; + font-size: 12px; + word-break: break-all; + } + .online-install-cont { + flex-direction: column; + } + .online-install-cont .form { + margin-bottom: 20px; + } + .online-install-cont .pr-70 { + padding-right: 0; + } + .online-install-cont .pl-10 { + padding-left: 0; + } + .online-install-cont .first-line { + flex-wrap: wrap; + } + .online-install-cont .server-line { + width: 100%; + flex: none; + } + .online-install-cont .port-line { + flex: none; + margin-top: 20px; + width: 100%; + } + + .d2 .desc, + .d2 .tips { + line-height: 24px; + } +} + +@media only screen and (max-width: 768px) { + .d2 .wrap, + .d3 .wrap, + .d4 .wrap { + padding: 40px 0; + } + .d1 .wrap { + padding-top: 40px; + } + .install-box { + flex-wrap: wrap; + } + .install-box .img, + .install-box .cont { + flex: 0 0 100%; + } + .install-box .cont { + margin-top: 10px; + margin-left: 0; + padding: 0; + } + .install-box .title, + .install-box.linux .title, + .install-box.windows .title { + margin-bottom: 10px; + } + .install-box .desc { + margin-bottom: 10px; + } + + .wrap-title { + margin-bottom: 20px; + } + .wrap-title::before { + width: 3px; + height: 20px; + margin-right: 10px; + } + .wrap-title .text { + font-size: 20px; + margin-right: 10px; + } + .wrap-title a { + font-size: 12px; + } +} diff --git a/public/static/images/bt_monitor.png b/public/static/images/bt_monitor.png index c608621..2615c73 100644 Binary files a/public/static/images/bt_monitor.png and b/public/static/images/bt_monitor.png differ diff --git a/wiki/update.md b/wiki/update.md index afee78f..4037edb 100644 --- a/wiki/update.md +++ b/wiki/update.md @@ -63,14 +63,21 @@ - class/plugin_deployment.py 文件,SetupPackage方法内替换 public.GetConfigValue('home') => 'https://www.bt.cn' +- class/config.py 文件,get_nps方法内data['nps'] = False改成True,get_nps_new方法下面加上 return public.returnMsg(False, "获取问卷失败") + - script/flush_plugin.py 文件,删除clear_hosts()一行 -- install/install_soft.sh 在bash执行之前加入以下代码 +- script/reload_check.py 文件,在第2行插入sys.exit() + +- script/local_fix.sh 文件,${D_NODE_URL}替换成www.example.com + +- tools.py 文件,u_input == 16下面的public.get_url()替换成'http://www.example.com' + +- install/install_soft.sh 在. 执行之前加入以下代码 ```shell sed -i "s/http:\/\/download.bt.cn\/install\/public.sh/http:\/\/www.example.com\/install\/public.sh/" lib.sh sed -i "s/https:\/\/download.bt.cn\/install\/public.sh/http:\/\/www.example.com\/install\/public.sh/" lib.sh - sed -i "/wget -O Tpublic.sh/d" $name.sh ``` - install/public.sh 用官网最新版的[public.sh](http://download.bt.cn/install/public.sh)替换,并去除最下面bt_check一行 @@ -81,6 +88,8 @@ PluginLoader.daemon_panel() + check_node_status() + - 去除WebRTC连接:BTPanel/static/js/public.js 删除stun.start();这一行 - 去除首页广告:BTPanel/static/js/index.js 文件删除两处index.recommend_paid_version()