add user tip and fix some bug

This commit is contained in:
suwings 2018-01-24 16:56:35 +08:00
parent 7a0e4c7166
commit 26b970b189
8 changed files with 70 additions and 15 deletions

View File

@ -25,7 +25,7 @@
<!--前端完全开源,您可以自由更改,但仅限于使用在 Mcserver Manager 程序-->
<!--版权所有 Mcserver Manager 8 开发者 (Suwings) 双羽 -->
<!--前端开源使用 请遵循 MIT 协议即可已经其他额外附属条件,勿删除版权信息-->
<!--前端开源使用 请遵循协议即可已经其他额外附属条件,勿删除版权信息-->
</head>
<!--百度数据统计,如果您不想被统计,请删除这段代码-->

View File

@ -125,6 +125,10 @@
break;
case "退出":
window.location.href = "/fs_auth/logout";
break;
case "使用提示":
functionMudule.userInfo();
break;
default:
console.error("--------------- 选择操作未执行 ---------------");
break;
@ -199,6 +203,11 @@
api: "",
title: true
},
{
name: "使用提示",
class: "glyphicon glyphicon-asterisk",
api: ""
},
{
name: "退出",
class: "glyphicon glyphicon-log-out",

View File

@ -85,7 +85,8 @@ exports.rename = (filesStack, newName) => {
exports.upload = (file, progress) => { //$("#m-upload-file")[0].files[0]
if (typeof FormData != "function") {
tools.popWindow("很遗憾,您的浏览器不兼容异步文件上传。请使用现代浏览器!");
//兼容性
alert("很遗憾,您的浏览器不兼容异步文件上传。请使用现代浏览器!");
return null;
}
var oMyForm = new FormData();
@ -107,4 +108,14 @@ exports.upload = (file, progress) => { //$("#m-upload-file")[0].files[0]
}, false);
oReq.send(oMyForm);
});
};
};
exports.userInfo = () => {
tools.popWindowHtml([
"<div style='text-align: left;'>1. 因单页应用缘故不可同时在同一浏览器内打开两个文件管理",
"2. 复制目录不可复制到目录本身内",
"3. 单击文件即可下载,单击目录即可进入目录",
"4. 如需编辑文件,请下载修改再上传,会自动覆盖重名文件</div>"
].join("<br />"), "使用须知", 20000);
}

View File

@ -2,16 +2,27 @@
import swal from 'sweetalert2';
//弹出提示框
exports.popWindow = (data) => {
//弹出提示框
exports.popWindow = (data, title, timer) => {
console.log("弹出:", data);
swal({
title: "",
title: title || "",
text: '' + data,
timer: 2000
timer: timer || 5000
});
};
exports.popWindowHtml = (html, title, timer) => {
//可能的 XSS 攻击!
swal({
title: title || "",
type: 'info',
html: html,
width: 600
});
}
exports.confirm = (msg, callbackt, callbackf) => {
swal({
title: 'Are you sure?',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -8,9 +8,10 @@
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="renderer" content="webkit" />
<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no" />
<title>MCserver Online File Manager</title>
<title>文件在线管理 | Mcserver Manager</title>
<link rel="stylesheet" href="./static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="./static/main.css" />
<link href="./favicon.ico" rel="shortcut icon">
</head>
<body>