update 04-08 21:08

This commit is contained in:
github-actions[bot]
2022-04-08 21:08:51 +08:00
parent 282992a955
commit 2860070fad
3 changed files with 7 additions and 8 deletions

View File

@@ -6,8 +6,6 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Fileassistant
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk

View File

@@ -0,0 +1 @@
# luci-app-fileassistant 文件助手

View File

@@ -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/nas/fileassistant/delete',
iwxhr.get('/cgi-bin/luci/admin/services/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/nas/fileassistant/install',
iwxhr.get('/cgi-bin/luci/admin/services/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/nas/fileassistant/rename',
iwxhr.get('/cgi-bin/luci/admin/services/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/nas/fileassistant/open?path='
window.open('/cgi-bin/luci/admin/services/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/nas/fileassistant/list',
iwxhr.get('/cgi-bin/luci/admin/services/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/nas/fileassistant/upload", true);
xhr.open("POST", "/cgi-bin/luci/admin/services/fileassistant/upload", true);
xhr.onload = function() {
if (xhr.status == 200) {
var res = JSON.parse(xhr.responseText);