You've already forked EasyImages2.0
mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-12-13 11:43:58 +08:00
v2.7.2
* 2023-02-05 v2.7.2 - 增加删除单条历史上传记录 - 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理, 正在实验中 - - 作为 [Tinyfilemanager](https://github.com/prasathmani/tinyfilemanager) 的替代品 更轻量化 简单化 - 修复开启登录上传后,上传者账号上传失败 [#87](https://github.com/icret/EasyImages2.0/issues/87#issue-1569794639) - 修复检测登录状态错误 - 优化排版和移动端显示
This commit is contained in:
@@ -25,13 +25,28 @@ include_once __DIR__ . "/header.php";
|
||||
console.log('url list: ' + value['url']) // 获取所有链接
|
||||
if (value['url'] !== undefined) {
|
||||
let v_url = parseURL(value['url']); // 获取链接路径 console.log(parseURL(value['url']).path);
|
||||
$('.listNum').append('<div class="col-md-4 col-sm-6 col-lg-3"><div class="card"><li><img src="../public/images/loading.svg" data-image="' + value['thumb'] + '" data-original="" alt="简单图床-EasyImage"></li><div class="bottom-bar"><a href="' + value['url'] + '" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="打开" style="margin-left:10px;"></i></a><a href="#" class="copy" data-clipboard-text="' + value['url'] + '" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a><a href="info.php?img=' + v_url.path + '" data-toggle="tooltip" title="信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a><a href="down.php?dw=' + v_url.path + '" data-toggle="tooltip" title="下载" target="_blank" style="margin-left:10px;"><i class="icon icon-cloud-download"></i></a><a href="' + value['del'] + '" target="_blank"><i class="icon icon-trash" data-toggle="tooltip" title="删除" style="margin-left:10px;"></i></a><a href="#" data-toggle="tooltip" title="文件名" class="copy text-ellipsis" data-clipboard-text="' + value['srcName'] + '" style="margin-left:10px;">' + value['srcName'] + '</a></div></div></div>')
|
||||
$('.listNum').append('<div class="col-md-4 col-sm-6 col-lg-3"><div class="card"><li><img src="../public/images/loading.svg" data-image="' + value['thumb'] + '" data-original="" alt="简单图床-EasyImage"></li><div class="bottom-bar"><a href="' + value['url'] + '" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="打开" style="margin-left:10px;"></i></a><a href="#" class="copy" data-clipboard-text="' + value['url'] + '" data-toggle="tooltip" title="复制链接" style="margin-left:10px;"><i class="icon icon-copy"></i></a><a href="info.php?img=' + v_url.path + '" data-toggle="tooltip" title="详细信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a><a href="down.php?dw=' + v_url.path + '" data-toggle="tooltip" title="下载文件" target="_blank" style="margin-left:10px;"><i class="icon icon-cloud-download"></i></a><a href="#" data-toggle="tooltip" title="删除记录" class="Remove"id="' + value['srcName'] + '" style="margin-left:10px;"><i class="icon icon-remove-sign"></i></a></a><a href="' + value['del'] + '" target="_blank"><i class="icon icon-trash" data-toggle="tooltip" title="删除文件" style="margin-left:10px;"></i></a><a href="#" data-toggle="tooltip" title="源文件名" class="copy text-ellipsis" data-clipboard-text="' + value['srcName'] + '" style="margin-left:10px;">' + value['srcName'] + '</a></div></div></div>')
|
||||
}
|
||||
})
|
||||
$('.history_clear').append('<h3 class="header-dividing" style="text-align: center;" data-toggle="tooltip" title="非上传记录|清空缓存|浏览器版本低不显示<br/>点击清空历史上传记录"><button class="btn btn-mini btn-primary" type="button"><i class="icon icon-eye-open"></i> 历史上传记录</button></h3>');
|
||||
} else {
|
||||
$('.listNum').append('<h2 class="alert alert-danger">上传历史记录不存在~~ <br /><small>非上传记录 | 清空缓存 | 浏览器版本低不显示~!</small></h2>');
|
||||
};
|
||||
|
||||
// 删除指定存储条目
|
||||
$('.Remove').on('click', function() {
|
||||
|
||||
let Remove = $('.Remove').attr("id");
|
||||
$.zui.store.remove(Remove); // 删除指定存储条目
|
||||
|
||||
new $.zui.Messager('已删除 ' + Remove + ' 上传记录', {
|
||||
type: "success", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
|
||||
setTimeout(location.reload.bind(location), 2000); // 延迟2秒刷新
|
||||
})
|
||||
|
||||
// 清空所有本地存储的条目
|
||||
$('button').on('click', function() {
|
||||
new $.zui.Messager('已清空' + $.zui.store.length() + "条历史记录", {
|
||||
@@ -43,12 +58,7 @@ include_once __DIR__ . "/header.php";
|
||||
setTimeout(location.reload.bind(location), 2000); // 延迟2秒刷新
|
||||
})
|
||||
|
||||
// viewjs
|
||||
new Viewer(document.getElementById('viewjs'), {
|
||||
url: 'data-original',
|
||||
});
|
||||
|
||||
// 复制url
|
||||
// 复制 文件名/URL
|
||||
var clipboard = new Clipboard('.copy');
|
||||
clipboard.on('success', function(e) {
|
||||
new $.zui.Messager("复制成功", {
|
||||
@@ -65,6 +75,11 @@ include_once __DIR__ . "/header.php";
|
||||
}).show();
|
||||
});
|
||||
|
||||
// viewjs
|
||||
new Viewer(document.getElementById('viewjs'), {
|
||||
url: 'data-original',
|
||||
});
|
||||
|
||||
//懒加载
|
||||
var lazy = new Lazy({
|
||||
onload: function(elem) {
|
||||
|
||||
Reference in New Issue
Block a user