From 88802b0f7214318ebc373b2da325fd1b8e4f75a8 Mon Sep 17 00:00:00 2001 From: spike <2411123479@qq.com> Date: Wed, 29 Nov 2023 20:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A0=E6=B3=95=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E7=9A=84toast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/common.js b/themes/common.js index 534bebc..a164a07 100644 --- a/themes/common.js +++ b/themes/common.js @@ -213,6 +213,8 @@ async function paste_upload_files(files) { Object.defineProperty(uploadInputElement, "files", {value: files, enumerable: true}); uploadInputElement.dispatchEvent(event); // toast_push('🎉上传文件成功', 2000) + } else { + toast_push('⚠️请先删除上传区中的历史文件,再尝试粘贴。', 2000) } } } @@ -221,7 +223,7 @@ function toast_push(msg, duration) { duration = isNaN(duration) ? 3000 : duration; const m = document.createElement('div'); m.innerHTML = msg; - m.style.cssText = "font-size: var(--text-md) !important; color: rgb(255, 255, 255);background-color: rgba(0, 0, 0, 0.6);padding: 10px 15px;margin: 0 0 0 -60px;border-radius: 4px;position: fixed; top: 50%;left: 50%;width: 130px;text-align: center;"; + m.style.cssText = "font-size: var(--text-md) !important; color: rgb(255, 255, 255);background-color: rgba(0, 0, 0, 0.6);padding: 10px 15px;margin: 0 0 0 -60px;border-radius: 4px;position: fixed; top: 50%;left: 50%;width: auto; text-align: center;"; document.body.appendChild(m); setTimeout(function () { var d = 0.5;