From eb7eab0edbc597798ce74818d8f4330319f0e200 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 21:35:49 +0800 Subject: [PATCH] update 2023-07-04 21:35:49 --- luci-app-fileassistant/README.md | 7 ------- .../luci-static/resources/fileassistant/fb.js | 12 ++++++------ .../luasrc/controller/fileassistant.lua | 18 +++++++++--------- 3 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 luci-app-fileassistant/README.md diff --git a/luci-app-fileassistant/README.md b/luci-app-fileassistant/README.md deleted file mode 100644 index 625f5fdd..00000000 --- a/luci-app-fileassistant/README.md +++ /dev/null @@ -1,7 +0,0 @@ -##### luci-app-fileassistant 文件助手 - -+ luci改成系统类目里 - -![软件图](https://raw.githubusercontent.com/kenzok8/kenzok8/main/screenshot/fileassistant.png) -![软件图](https://raw.githubusercontent.com/kenzok8/kenzok8/main/screenshot/fileassistant1.png) - diff --git a/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js b/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js index ffe844ed..2e3addef 100644 --- a/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js +++ b/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js @@ -19,7 +19,7 @@ String.prototype.replaceAll = function(search, replacement) { function removePath(filename, isdir) { var c = confirm('你确定要删除 ' + filename + ' 吗?'); if (c) { - iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/delete', + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/delete', { path: concatPath(currentPath, filename), isdir: isdir @@ -44,7 +44,7 @@ String.prototype.replaceAll = function(search, replacement) { } var c = confirm('你确定要安装 ' + filename + ' 吗?'); if (c) { - iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/install', + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/install', { filepath: concatPath(currentPath, filename), isdir: isdir @@ -76,7 +76,7 @@ String.prototype.replaceAll = function(search, replacement) { newname = newname.trim(); if (newname != filename) { var newpath = concatPath(currentPath, newname); - iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/rename', + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/rename', { filepath: concatPath(currentPath, filename), newpath: newpath @@ -93,7 +93,7 @@ String.prototype.replaceAll = function(search, replacement) { function openpath(filename, dirname) { dirname = dirname || currentPath; - window.open('/cgi-bin/luci/admin/system/fileassistant/open?path=' + window.open('/cgi-bin/luci/admin/nas/fileassistant/open?path=' + encodeURIComponent(dirname) + '&filename=' + encodeURIComponent(filename)); } @@ -210,7 +210,7 @@ String.prototype.replaceAll = function(search, replacement) { opt = opt || {}; path = concatPath(path, ''); if (currentPath != path) { - iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/list', + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/list', {path: path}, function (x, res) { if (res.ec === 0) { @@ -255,7 +255,7 @@ String.prototype.replaceAll = function(search, replacement) { formData.append('upload-dir', concatPath(currentPath, '')); formData.append('upload-file', uploadinput.files[0]); var xhr = new XMLHttpRequest(); - xhr.open("POST", "/cgi-bin/luci/admin/system/fileassistant/upload", true); + xhr.open("POST", "/cgi-bin/luci/admin/nas/fileassistant/upload", true); xhr.onload = function() { if (xhr.status == 200) { var res = JSON.parse(xhr.responseText); diff --git a/luci-app-fileassistant/luasrc/controller/fileassistant.lua b/luci-app-fileassistant/luasrc/controller/fileassistant.lua index 02be23e2..0899edf3 100644 --- a/luci-app-fileassistant/luasrc/controller/fileassistant.lua +++ b/luci-app-fileassistant/luasrc/controller/fileassistant.lua @@ -1,32 +1,32 @@ module("luci.controller.fileassistant", package.seeall) function index() - entry({"admin", "system"}, firstchild(), _("System") , 45).dependent = false + entry({"admin", "nas"}, firstchild(), _("NAS") , 45).dependent = false - entry({"admin", "system"}, firstchild(), "System", 44).dependent = false + entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false local page - page = entry({"admin", "system", "fileassistant"}, template("fileassistant"), _("文件助手"), 1) + page = entry({"admin", "nas", "fileassistant"}, template("fileassistant"), _("文件助手"), 1) page.i18n = "base" page.dependent = true page.acl_depends = { "luci-app-fileassistant" } - page = entry({"admin", "system", "fileassistant", "list"}, call("fileassistant_list"), nil) + page = entry({"admin", "nas", "fileassistant", "list"}, call("fileassistant_list"), nil) page.leaf = true - page = entry({"admin", "system", "fileassistant", "open"}, call("fileassistant_open"), nil) + page = entry({"admin", "nas", "fileassistant", "open"}, call("fileassistant_open"), nil) page.leaf = true - page = entry({"admin", "system", "fileassistant", "delete"}, call("fileassistant_delete"), nil) + page = entry({"admin", "nas", "fileassistant", "delete"}, call("fileassistant_delete"), nil) page.leaf = true - page = entry({"admin", "system", "fileassistant", "rename"}, call("fileassistant_rename"), nil) + page = entry({"admin", "nas", "fileassistant", "rename"}, call("fileassistant_rename"), nil) page.leaf = true - page = entry({"admin", "system", "fileassistant", "upload"}, call("fileassistant_upload"), nil) + page = entry({"admin", "nas", "fileassistant", "upload"}, call("fileassistant_upload"), nil) page.leaf = true - page = entry({"admin", "system", "fileassistant", "install"}, call("fileassistant_install"), nil) + page = entry({"admin", "nas", "fileassistant", "install"}, call("fileassistant_install"), nil) page.leaf = true end