prettier for java
This commit is contained in:
parent
39912da311
commit
0431150323
4 changed files with 4097 additions and 1636 deletions
19
package-lock.json
generated
19
package-lock.json
generated
|
|
@ -12,6 +12,9 @@
|
|||
"express": "^4.18.2",
|
||||
"socket.io": "^4.7.2",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "3.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@socket.io/component-emitter": {
|
||||
|
|
@ -679,6 +682,22 @@
|
|||
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.7.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz",
|
||||
"integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-addr": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
|
|
|
|||
10
package.json
10
package.json
|
|
@ -7,12 +7,20 @@
|
|||
"start": "node server.js",
|
||||
"dev": "NODE_ENV=development node server.js"
|
||||
},
|
||||
"keywords": ["chess","socket.io","rooms","docker"],
|
||||
"keywords": [
|
||||
"chess",
|
||||
"socket.io",
|
||||
"rooms",
|
||||
"docker"
|
||||
],
|
||||
"author": "Didictateur",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
"socket.io": "^4.7.2",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "3.7.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,21 +2,31 @@
|
|||
function showToast(message, opts) {
|
||||
try {
|
||||
opts = opts || {};
|
||||
const wrap = document.createElement('div');
|
||||
wrap.className = 'cn-toast';
|
||||
wrap.textContent = message || '';
|
||||
wrap.style.position = 'fixed';
|
||||
wrap.style.left = '50%';
|
||||
wrap.style.transform = 'translateX(-50%)';
|
||||
wrap.style.top = opts.top || '18px';
|
||||
wrap.style.background = opts.background || 'rgba(0,0,0,0.8)';
|
||||
wrap.style.color = opts.color || '#fff';
|
||||
wrap.style.padding = '8px 12px';
|
||||
wrap.style.borderRadius = '6px';
|
||||
const wrap = document.createElement("div");
|
||||
wrap.className = "cn-toast";
|
||||
wrap.textContent = message || "";
|
||||
wrap.style.position = "fixed";
|
||||
wrap.style.left = "50%";
|
||||
wrap.style.transform = "translateX(-50%)";
|
||||
wrap.style.top = opts.top || "18px";
|
||||
wrap.style.background = opts.background || "rgba(0,0,0,0.8)";
|
||||
wrap.style.color = opts.color || "#fff";
|
||||
wrap.style.padding = "8px 12px";
|
||||
wrap.style.borderRadius = "6px";
|
||||
wrap.style.zIndex = 99999;
|
||||
wrap.style.fontSize = '14px';
|
||||
wrap.style.boxShadow = '0 6px 18px rgba(0,0,0,0.25)';
|
||||
wrap.style.fontSize = "14px";
|
||||
wrap.style.boxShadow = "0 6px 18px rgba(0,0,0,0.25)";
|
||||
document.body.appendChild(wrap);
|
||||
setTimeout(()=>{ try{ wrap.style.transition = 'opacity 300ms ease'; wrap.style.opacity = '0'; setTimeout(()=>{ try{ wrap.remove(); }catch(_){ } }, 320); }catch(_){ } }, opts.duration || 3500);
|
||||
setTimeout(() => {
|
||||
try {
|
||||
wrap.style.transition = "opacity 300ms ease";
|
||||
wrap.style.opacity = "0";
|
||||
setTimeout(() => {
|
||||
try {
|
||||
wrap.remove();
|
||||
} catch (_) {}
|
||||
}, 320);
|
||||
} catch (_) {}
|
||||
}, opts.duration || 3500);
|
||||
} catch (_) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue