MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / showSuccess

Method showSuccess

pixelizer.js:1185–1213  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

1183 }
1184
1185 showSuccess(message) {
1186 // 创建成功提示
1187 const successDiv = document.createElement('div');
1188 successDiv.className = 'success-message';
1189 successDiv.style.cssText = `
1190 position: fixed;
1191 top: 20px;
1192 right: 20px;
1193 background: #4caf50;
1194 color: white;
1195 padding: 16px 24px;
1196 border-radius: 8px;
1197 box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
1198 z-index: 1000;
1199 max-width: 400px;
1200 font-size: 14px;
1201 line-height: 1.4;
1202 `;
1203 successDiv.textContent = message;
1204
1205 document.body.appendChild(successDiv);
1206
1207 // 2秒后自动消失
1208 setTimeout(() => {
1209 if (successDiv.parentNode) {
1210 successDiv.parentNode.removeChild(successDiv);
1211 }
1212 }, 2000);
1213 }
1214
1215 cancelProcessing() {
1216 if (this.currentWorker) {

Callers 2

exportPNGMethod · 0.95
printResultMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected