From 9393775e90fefc12921c1d165143ebe06061151f Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 16 May 2025 02:55:28 +0800 Subject: [PATCH 1/3] Update index.py --- plugins/mysql/index.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index be43d7620..a778d116b 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -3504,6 +3504,12 @@ def doFullSyncUser(version=''): return False time_s = time.time() + + ssl_mode = '--ssl-mode=DISABLED' + if pk_version.parse(version) > pk_version.parse("8.0"): + ssl_mode = '--ssl-mode=REQUIRED' + + if not os.path.exists(bak_file): dmp_option += ' ' if mw.inArray(mdb8,version): @@ -3513,7 +3519,7 @@ def doFullSyncUser(version=''): dmp_option += " --master-data=1 --apply-slave-statements --include-master-host-port --compress " dump_sql_data = getServerDir() + "/bin/mysqldump --single-transaction --default-character-set=utf8mb4 -q " + dmp_option + " -h" + ip + " -P" + \ - port + " -u" + user + " -p'" + apass + "' --ssl-mode=DISABLED " + sync_db + " > " + bak_file + port + " -u" + user + " -p'" + apass + "' " + ssl_mode + " " + sync_db + " > " + bak_file print(dump_sql_data) time_s = time.time() r = mw.execShell(dump_sql_data) From 665d278b52bdda19e37fd7cec93c5ba46f2448d6 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 16 May 2025 02:56:35 +0800 Subject: [PATCH 2/3] Update index.py --- plugins/mysql/index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index a778d116b..b9e1eb6d7 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -3509,7 +3509,6 @@ def doFullSyncUser(version=''): if pk_version.parse(version) > pk_version.parse("8.0"): ssl_mode = '--ssl-mode=REQUIRED' - if not os.path.exists(bak_file): dmp_option += ' ' if mw.inArray(mdb8,version): From 92c000f63e31e819e09467d480c2d11181583486 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 16 May 2025 04:15:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/static/app/files.js | 37 +++++----- web/static/js/jquery.contextify.min.js | 124 +++++++++++++++++++++++++++++++-- 2 files changed, 135 insertions(+), 26 deletions(-) diff --git a/web/static/app/files.js b/web/static/app/files.js index e4aba414d..dda0daf83 100755 --- a/web/static/app/files.js +++ b/web/static/app/files.js @@ -676,17 +676,9 @@ function getFiles(Path) { }); $(".folderBox,.folderBoxTr").mousedown(function(e){ - // console.log(e); - var count = totalFile(); - if(e.which == 3) { - if(count <= 1){ - var a = $(this); - var option = rightMenuClick(a.attr("filetype"),a.attr("data-path"),a.find("input").val()); - a.contextify(option); - } else{ - rightMenuClickAll(e); - } - } + var box = $(this); + var option = rightMenuClick(box.attr("filetype"),box.attr("data-path"),box.find("input").val()); + box.contextify(option); }); //每页行数 @@ -733,7 +725,7 @@ function bindselect(){ $(".ui-selectee").find("input").prop("checked", false); $(".ui-selecting").find("input").prop("checked", true); showSeclect(); - $("#rmenu").hide() + $("#rmenu").hide(); } }); $("#filesBody,#fileCon").selectable("refresh"); @@ -1739,6 +1731,9 @@ function onAccess(){ } } +function forcePpageRefresh(){ + location.reload(true); +} //右键菜单 function rightMenuClick(type,path,name){ @@ -1755,8 +1750,7 @@ function rightMenuClick(type,path,name){ options.items.push({text: lan.files.file_menu_del, onclick: function() { deleteDir(path)} }); - } - else if(isText(type)){ + } else if(isText(type)){ options.items.push({text: lan.files.file_menu_edit, onclick: function() { onlineEditFile(0,path); }},{text: lan.files.file_menu_down, onclick: function() { @@ -1764,8 +1758,7 @@ function rightMenuClick(type,path,name){ }},{ text: lan.files.file_menu_del, onclick: function() { deleteFile(path); }}); - } - else if(displayZip != -1){ + } else if(displayZip != -1){ options.items.push({text: lan.files.file_menu_unzip, onclick: function() { unZip(path,displayZip); }},{text: lan.files.file_menu_down, onclick: function() { @@ -1773,8 +1766,7 @@ function rightMenuClick(type,path,name){ }},{text: lan.files.file_menu_del, onclick: function() { deleteFile(path); }}); - } - else if(isImage(type)){ + } else if(isImage(type)){ options.items.push({text: lan.files.file_menu_img, onclick: function() { getImage(path); }},{text: lan.files.file_menu_down, onclick: function() { @@ -1782,14 +1774,17 @@ function rightMenuClick(type,path,name){ }},{text: lan.files.file_menu_del, onclick: function() { deleteFile(path); }}); - } - else{ + } else { options.items.push({text: lan.files.file_menu_down, onclick: function() { getFileBytes(path); }},{text: lan.files.file_menu_del, onclick: function() { deleteFile(path); }}); } + + options.items.push({text: '强制刷新页面', onclick: function() { + forcePpageRefresh(); + }}); return options; } @@ -1820,7 +1815,7 @@ function getPathSize(){ } $("body").not(".def-log").click(function(){ - $("#rmenu").hide() + $("#rmenu").hide(); }); //指定路径 diff --git a/web/static/js/jquery.contextify.min.js b/web/static/js/jquery.contextify.min.js index 7cc68d13e..5cc55d0ad 100755 --- a/web/static/js/jquery.contextify.min.js +++ b/web/static/js/jquery.contextify.min.js @@ -1,6 +1,120 @@ /*! -* jQuery Contextify v1.0.7 (http://contextify.js.org) -* Copyright (c) 2016 Adam Bouqdib -* Licensed under GPL-2.0 (http://abemedia.co.uk/license) -*/ -(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery,window)}}(function($,window){var pluginName="contextify",defaults={items:[],action:"contextmenu",menuId:"contextify-menu",menuClass:"dropdown-menu",headerClass:"dropdown-header",dividerClass:"divider",before:false},contextifyId=0;function Plugin(element,options){this.element=element;this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}Plugin.prototype.init=function(){var options=$.extend({},this.options,$(this.element).data()),that=$(this);options.id=contextifyId;$(this.element).attr("data-contextify-id",options.id).on("contextmenu",function(e){e.preventDefault();if(typeof(options.before)==="function"){options.before(this,options)}var menu=$('