You've already forked EasyImages2.0
mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-12-13 11:43:58 +08:00
* 2023-01-30 v2.7.0 dev
- 增加粘贴上传状态 - 增加前端显示缩略图链接 - 增加图片详细信息登录后显示更多信息 - 修复图片详细信息中随机图片排版混乱
This commit is contained in:
1
public/images/file.svg
Normal file
1
public/images/file.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1674710977078" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="39463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M659.72 64.19H270.4c-78.06 0-141.33 63.28-141.33 141.33v612.95c0 78.06 63.28 141.33 141.33 141.33h485.49c78.06 0 141.33-63.28 141.33-141.33V301.69c0-31.83-12.64-62.35-35.15-84.85l-117.5-117.5a120.017 120.017 0 0 0-84.85-35.15z" fill="#53B7F4" p-id="39464"></path><path d="M862.07 216.84l-117.5-117.5a120.001 120.001 0 0 0-61.75-32.9v131.88c0 41.87 33.94 75.81 75.81 75.81H894a119.975 119.975 0 0 0-31.93-57.29zM529.42 366.1l-51.53 51.53c-7.81 7.81-7.81 20.47 0 28.28 7.81 7.81 20.47 7.81 28.28 0l51.53-51.53c26.21-26.21 68.85-26.21 95.06 0s26.21 68.85 0 95.06l-51.53 51.53c-26.21 26.21-68.85 26.21-95.06 0a67.079 67.079 0 0 1-7.88-9.48c-6.24-9.11-18.69-11.44-27.8-5.19-9.12 6.25-11.44 18.69-5.19 27.8 3.7 5.4 7.94 10.5 12.59 15.15 41.8 41.8 109.82 41.8 151.63 0l51.53-51.53c41.8-41.8 41.8-109.82 0-151.63-41.81-41.8-109.83-41.8-151.63 0.01z" fill="#29A3D3" p-id="39465"></path><path d="M520.11 622.09l-51.53 51.53c-26.21 26.21-68.85 26.21-95.06 0-26.21-26.21-26.21-68.85 0-95.06l51.53-51.53c26.21-26.21 68.85-26.21 95.06 0 2.76 2.76 5.28 5.77 7.5 8.94 6.33 9.05 18.8 11.25 27.85 4.92s11.25-18.8 4.92-27.85c-3.55-5.08-7.59-9.88-11.99-14.28-41.8-41.8-109.82-41.8-151.63 0l-51.53 51.53c-41.8 41.8-41.8 109.82 0 151.62 41.8 41.8 109.82 41.8 151.63 0l51.53-51.53c7.81-7.81 7.81-20.47 0-28.28-7.81-7.82-20.47-7.82-28.28-0.01z" fill="#29A3D3" p-id="39466"></path><path d="M681.04 354.1c-41.8-41.8-109.82-41.8-151.63 0l-51.53 51.53c-7.81 7.81-7.81 20.47 0 28.28 7.81 7.81 20.47 7.81 28.28 0l51.53-51.53c26.21-26.21 68.85-26.21 95.06 0s26.21 68.85 0 95.06l-51.53 51.53c-26.21 26.21-68.85 26.21-95.06 0a67.079 67.079 0 0 1-7.88-9.48c-6.24-9.11-18.69-11.44-27.8-5.19-9.12 6.25-11.44 18.69-5.19 27.8 3.7 5.4 7.94 10.5 12.59 15.15 41.8 41.8 109.82 41.8 151.63 0l51.53-51.53c41.81-41.8 41.81-109.82 0-151.62z" fill="#FFFFFF" p-id="39467"></path><path d="M520.11 610.09l-51.53 51.53c-26.21 26.21-68.85 26.21-95.06 0-26.21-26.21-26.21-68.85 0-95.06l51.53-51.53c26.21-26.21 68.85-26.21 95.06 0 2.76 2.76 5.28 5.77 7.5 8.94 6.33 9.05 18.8 11.25 27.85 4.92s11.25-18.8 4.92-27.85c-3.55-5.08-7.59-9.88-11.99-14.28-41.8-41.8-109.82-41.8-151.63 0l-51.53 51.53c-41.8 41.8-41.8 109.82 0 151.62 41.8 41.8 109.82 41.8 151.63 0l51.53-51.53c7.81-7.81 7.81-20.47 0-28.28-7.81-7.82-20.47-7.82-28.28-0.01z" fill="#FFFFFF" p-id="39468"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" ?><svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
|
||||
.st0{fill:#00B8DF;}
|
||||
.st1{fill:#FF9A30;}
|
||||
.st2{fill:#FFFFFF;}
|
||||
.st3{fill:#61BEE2;}
|
||||
.st4{fill:#FD4233;}
|
||||
.st5{fill:#FF402F;}
|
||||
.st6{fill:#1D409D;}
|
||||
.st7{fill:#007732;}
|
||||
.st8{fill:#FF5A29;}
|
||||
</style><g/><g id="Ps"/><g id="Ai"/><g id="Ai_download"/><g id="Image"/><g id="Image_download"/><g id="Video"/><g id="Video_download"/><g id="Ps_download"/><g id="Doc"/><g id="Doc_download"/><g id="Music"/><g id="Music_download"/><g id="Pdf"/><g id="Pdf_download"/><g id="Word"/><g id="Word_download"/><g id="Exel"><g><g><path class="st7" d="M80,96h-8.3l-8-13l-8,13H48l11.4-17.7L48.7,61.7h8l7.4,12.3l7.2-12.3h7.8l-10.8,17L80,96z"/></g><g><path class="st7" d="M104,126H24c-5.5,0-10-4.5-10-10V12c0-5.5,4.5-10,10-10h40.7c2.7,0,5.2,1,7.1,2.9l39.3,39.3 c1.9,1.9,2.9,4.4,2.9,7.1V116C114,121.5,109.5,126,104,126z M24,6c-3.3,0-6,2.7-6,6v104c0,3.3,2.7,6,6,6h80c3.3,0,6-2.7,6-6V51.3 c0-1.6-0.6-3.1-1.8-4.2L68.9,7.8C67.8,6.6,66.3,6,64.7,6H24z"/></g></g></g><g id="Exel_download"/><g id="Powerpoint"/><g id="Powerpoint_download"/><g id="Zip"/><g id="Zip_download"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,172 +1,149 @@
|
||||
/**
|
||||
* 来自于copy_btn.js paste.js合并
|
||||
* 简单图床-复制
|
||||
* 2023-01-30
|
||||
*/
|
||||
var copyBtn = document.getElementsByClassName('copyBtn1')[0];
|
||||
copyBtn.onclick = function() {
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("links");
|
||||
copyVal.select();
|
||||
try {
|
||||
if (document.execCommand('copy', false, null)) {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
} else {
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//fail info
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
var copyBtn = document.getElementsByClassName('copyBtn2')[0];
|
||||
copyBtn.onclick = function() {
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("bbscode");
|
||||
copyVal.select();
|
||||
try {
|
||||
if (document.execCommand('copy', false, null)) {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
} else {
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//fail info
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
var copyBtn = document.getElementsByClassName('copyBtn3')[0];
|
||||
copyBtn.onclick = function() {
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("markdown");
|
||||
copyVal.select();
|
||||
try {
|
||||
if (document.execCommand('copy', false, null)) {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
} else {
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//fail info
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
var copyBtn = document.getElementsByClassName('copyBtn4')[0];
|
||||
copyBtn.onclick = function() {
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("html");
|
||||
copyVal.select();
|
||||
try {
|
||||
if (document.execCommand('copy', false, null)) {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
} else {
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//fail info
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
var copyBtn = document.getElementsByClassName('copyBtn5')[0];
|
||||
copyBtn.onclick = function() {
|
||||
var copyVal = document.getElementById("del");
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("thumb");
|
||||
copyVal.select();
|
||||
try {
|
||||
if (document.execCommand('copy', false, null)) {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
} else {
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//fail info
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
// btn状态
|
||||
$('#btnLinks').on('click', function() {
|
||||
var $btn = $(this);
|
||||
$btn.button('loading');
|
||||
var copyBtn = document.getElementsByClassName('copyBtn6')[0];
|
||||
copyBtn.onclick = function () {
|
||||
var copyVal = document.getElementById("del");
|
||||
copyVal.select();
|
||||
try {
|
||||
navigator.clipboard.writeText(copyVal.value).then(function () {
|
||||
//success info
|
||||
new $.zui.Messager("复制成功", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
console.log("复制成功");
|
||||
}, function () {
|
||||
//fail info
|
||||
alert("复制失败");
|
||||
});
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
|
||||
setTimeout(function() {
|
||||
$btn.button('reset');
|
||||
}, 2000);
|
||||
// 按钮状态
|
||||
|
||||
$('#btnLinks, #btnBbscode, #btnMarkDown, #btnHtml, #btnThumb, #btnDel').on('click', function () {
|
||||
$(this).button('loading').delay(2000).queue(function () {
|
||||
$(this).button('reset');
|
||||
})
|
||||
});
|
||||
|
||||
$('#btnBbscode').on('click', function() {
|
||||
var $btn = $(this);
|
||||
$btn.button('loading');
|
||||
|
||||
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
|
||||
setTimeout(function() {
|
||||
$btn.button('reset');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#btnMarkDown').on('click', function() {
|
||||
var $btn = $(this);
|
||||
$btn.button('loading');
|
||||
|
||||
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
|
||||
setTimeout(function() {
|
||||
$btn.button('reset');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#btnHtml').on('click', function() {
|
||||
var $btn = $(this);
|
||||
$btn.button('loading');
|
||||
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
|
||||
setTimeout(function() {
|
||||
$btn.button('reset');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#btndel').on('click', function() {
|
||||
var $btn = $(this);
|
||||
$btn.button('loading');
|
||||
|
||||
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
|
||||
setTimeout(function() {
|
||||
$btn.button('reset');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
/****************************************************************
|
||||
* 复制、截图 简单图床修改版
|
||||
*/
|
||||
(function() {
|
||||
document.addEventListener('paste', function(e) {
|
||||
|
||||
(function () {
|
||||
document.addEventListener('paste', function (e) {
|
||||
var items = ((e.clipboardData || window.clipboardData).items) || [];
|
||||
var file = null;
|
||||
|
||||
@@ -180,41 +157,85 @@ $('#btndel').on('click', function() {
|
||||
}
|
||||
|
||||
if (!file) {
|
||||
alert('粘贴内容非图片!');
|
||||
$.zui.messager.show('粘贴内容非图片!', {
|
||||
icon: 'bell',
|
||||
time: 3000,
|
||||
type: 'danger',
|
||||
placement: 'top'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
try {
|
||||
var result = JSON.parse(this.responseText);
|
||||
if (result.result === 'success') {
|
||||
var links = document.getElementById("links");
|
||||
links.innerHTML += result.url + "\n";
|
||||
|
||||
var bbscode = document.getElementById("bbscode");
|
||||
bbscode.innerHTML += "[img]" + result.url + "[/img]\n";
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 1) {
|
||||
$.zui.messager.show('粘贴上传中...', {
|
||||
icon: 'bell',
|
||||
time: 3000,
|
||||
type: 'primary',
|
||||
placement: 'top'
|
||||
});
|
||||
$(".uploader").addClass("load-indicator loading"); // 增加正在上传状态
|
||||
}
|
||||
|
||||
var markdown = document.getElementById("markdown");
|
||||
markdown.innerHTML += "\n";
|
||||
if (xhr.readyState >= 4) {
|
||||
$.zui.messager.show('粘贴上传中...', {
|
||||
icon: 'bell',
|
||||
time: 3000,
|
||||
type: 'primary',
|
||||
placement: 'top'
|
||||
});
|
||||
$(".uploader").removeClass("load-indicator loading"); // 移除正在上传状态
|
||||
}
|
||||
}
|
||||
|
||||
var html = document.getElementById("html");
|
||||
html.innerHTML += "<img src=\"" + result.url + "\" />\n";
|
||||
xhr.onload = function () {
|
||||
var result = JSON.parse(this.responseText);
|
||||
if (result.result === 'success') {
|
||||
var links = document.getElementById("links");
|
||||
links.innerHTML += result.url + "\n";
|
||||
|
||||
var del = document.getElementById("del");
|
||||
del.innerHTML += result.del + "\n";
|
||||
var bbscode = document.getElementById("bbscode");
|
||||
bbscode.innerHTML += "[img]" + result.url + "[/img]\n";
|
||||
|
||||
} else {
|
||||
alert('上传失败1');
|
||||
}
|
||||
} catch (e) {
|
||||
alert('上传失败2');
|
||||
var markdown = document.getElementById("markdown");
|
||||
markdown.innerHTML += "\n";
|
||||
|
||||
var html = document.getElementById("html");
|
||||
html.innerHTML += "<img src=\"" + result.url + "\" />\n";
|
||||
|
||||
var del = document.getElementById("thumb");
|
||||
del.innerHTML += result.thumb + "\n";
|
||||
|
||||
var del = document.getElementById("del");
|
||||
del.innerHTML += result.del + "\n";
|
||||
|
||||
$.zui.messager.show('粘贴上传成功...', {
|
||||
icon: 'bell',
|
||||
time: 4000,
|
||||
type: 'success',
|
||||
placement: 'top'
|
||||
});
|
||||
|
||||
} else {
|
||||
$.zui.messager.show('上传失败...' + result.message, {
|
||||
icon: 'bell',
|
||||
time: 4000,
|
||||
type: 'primary',
|
||||
placement: 'top'
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.onerror = function() {
|
||||
alert('上传失败3');
|
||||
xhr.onerror = function () {
|
||||
$.zui.messager.show('因网络问题导致的上传失败...', {
|
||||
icon: 'bell',
|
||||
time: 4000,
|
||||
type: 'primary',
|
||||
placement: 'top'
|
||||
});
|
||||
};
|
||||
xhr.open('POST', './application/upload.php', true);
|
||||
xhr.send(formData);
|
||||
@@ -223,7 +244,7 @@ $('#btndel').on('click', function() {
|
||||
/******************************************************************/
|
||||
|
||||
// 导航状态
|
||||
$('.nav-pills').find('a').each(function() {
|
||||
$('.nav-pills').find('a').each(function () {
|
||||
if (this.href == document.location.href) {
|
||||
$(this).parent().addClass('active'); // this.className = 'active';
|
||||
}
|
||||
|
||||
14
public/static/holder.min.js
vendored
Normal file
14
public/static/holder.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user