mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	update 2023-07-04 21:35:49
This commit is contained in:
		| @ -1,7 +0,0 @@ | ||||
| ##### luci-app-fileassistant  文件助手 | ||||
|  | ||||
| + luci改成系统类目里 | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png) github-actions[bot]
					github-actions[bot]