mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-03-11 17:15:38 +00:00
Fixed bugs in filter windowed dragbar text area
This commit is contained in:
parent
0182eb5277
commit
dd95406b31
11 changed files with 33 additions and 23 deletions
3
dist/BlueMarble-For-GreasyFork.user.css
vendored
3
dist/BlueMarble-For-GreasyFork.user.css
vendored
|
|
@ -385,6 +385,9 @@ input[type=file] {
|
|||
#bm-window-filter.bm-windowed .bm-filter-color h2 {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
#bm-window-filter #bm-filter-windowed-color-totals {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* src/WindowWizard.css */
|
||||
#bm-wizard-tlist {
|
||||
|
|
|
|||
26
dist/BlueMarble-For-GreasyFork.user.js
vendored
26
dist/BlueMarble-For-GreasyFork.user.js
vendored
|
|
@ -2,7 +2,7 @@
|
|||
// @name Blue Marble
|
||||
// @name:en Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.91.8
|
||||
// @version 0.91.10
|
||||
// @description A userscript to enhance the user experience on Wplace.live. This includes, but is not limited to: uploading images to display locally on a canvas, adding a button to move the Wplace color palette menu, and other QoL features.
|
||||
// @description:en A userscript to enhance the user experience on Wplace.live. This includes, but is not limited to: uploading images to display locally on a canvas, adding a button to move the Wplace color palette menu, and other QoL features.
|
||||
// @author SwingTheVine
|
||||
|
|
@ -2821,7 +2821,7 @@ Did you try clicking the canvas first?`);
|
|||
button.onclick = () => {
|
||||
const windowedColorTotals = document.querySelector("#bm-filter-windowed-color-totals");
|
||||
if (windowedColorTotals) {
|
||||
windowedColorTotals.style.display = button.dataset["status"] == "expanded" ? "none" : "";
|
||||
windowedColorTotals.style.display = button.dataset["buttonStatus"] == "expanded" ? "none" : "";
|
||||
}
|
||||
instance.handleMinimization(button);
|
||||
};
|
||||
|
|
@ -2859,18 +2859,20 @@ Did you try clicking the canvas first?`);
|
|||
__privateMethod(this, _WindowFilter_instances, buildColorList_fn).call(this, scrollableContainer);
|
||||
__privateMethod(this, _WindowFilter_instances, sortColorList_fn).call(this, this.sortPrimary, this.sortSecondary, this.showUnused);
|
||||
}
|
||||
/** The information about a specific color on the palette.
|
||||
* @typedef {Object} ColorData
|
||||
* @property {number | string} colorTotal
|
||||
* @property {string} colorTotalLocalized
|
||||
* @property {number | string} colorCorrect
|
||||
* @property {string} colorCorrectLocalized
|
||||
* @property {string} colorPercent
|
||||
* @property {number} colorIncorrect
|
||||
*/
|
||||
/** Updates the information inside the colors in the color list.
|
||||
* If the color list does not exist yet, it returns the color information instead.
|
||||
* This assumes the information inside each element is the same between fullscreen and windowed mode.
|
||||
* @since 0.90.60
|
||||
* @returns {Object<number, {
|
||||
* colorTotal: number | string,
|
||||
* colorTotalLocalized: string,
|
||||
* colorCorrect: number | string,
|
||||
* colorCorrectLocalized: string,
|
||||
* colorPercent: string,
|
||||
* colorIncorrect: number
|
||||
* }}
|
||||
* @returns {Object.<number, ColorData>}
|
||||
*/
|
||||
updateColorList() {
|
||||
__privateMethod(this, _WindowFilter_instances, calculatePixelStatistics_fn).call(this);
|
||||
|
|
@ -2930,7 +2932,7 @@ Did you try clicking the canvas first?`);
|
|||
}
|
||||
const pixelDesc = document.querySelector(`#${this.windowID} .bm-filter-color[data-id="${colorID}"] .bm-filter-color-pxl-desc`);
|
||||
if (pixelDesc) {
|
||||
pixelDesc.textContent = `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixels. Completed: ${colorPercent}`;
|
||||
pixelDesc.textContent = `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixel${colorIncorrect == 1 ? "" : "s"}. Completed: ${colorPercent}`;
|
||||
}
|
||||
}
|
||||
__privateMethod(this, _WindowFilter_instances, sortColorList_fn).call(this, this.sortPrimary, this.sortSecondary, this.showUnused);
|
||||
|
|
@ -3045,7 +3047,7 @@ Did you try clicking the canvas first?`);
|
|||
button.disabled = true;
|
||||
}
|
||||
}
|
||||
).buildElement().buildElement().addSmall({ "textContent": color.id == -2 ? "???????" : colorValueHex }).buildElement().buildElement().addDiv({ "class": "bm-flex-between" }).addHeader(2, { "textContent": (color.premium ? "\u2605 " : "") + color.name }).buildElement().addDiv({ "class": "bm-flex-between", "style": "gap: 1.5ch;" }).addSmall({ "textContent": `#${color.id.toString().padStart(2, 0)}` }).buildElement().addSmall({ "class": "bm-filter-color-pxl-cnt", "textContent": `${colorCorrectLocalized} / ${colorTotalLocalized}` }).buildElement().buildElement().addP({ "class": "bm-filter-color-pxl-desc", "textContent": `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixels. Completed: ${colorPercent}` }).buildElement().buildElement().buildElement();
|
||||
).buildElement().buildElement().addSmall({ "textContent": color.id == -2 ? "???????" : colorValueHex }).buildElement().buildElement().addDiv({ "class": "bm-flex-between" }).addHeader(2, { "textContent": (color.premium ? "\u2605 " : "") + color.name }).buildElement().addDiv({ "class": "bm-flex-between", "style": "gap: 1.5ch;" }).addSmall({ "textContent": `#${color.id.toString().padStart(2, 0)}` }).buildElement().addSmall({ "class": "bm-filter-color-pxl-cnt", "textContent": `${colorCorrectLocalized} / ${colorTotalLocalized}` }).buildElement().buildElement().addP({ "class": "bm-filter-color-pxl-desc", "textContent": `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixel${colorIncorrect == 1 ? "" : "s"}. Completed: ${colorPercent}` }).buildElement().buildElement().buildElement();
|
||||
}
|
||||
}
|
||||
colorList.buildOverlay(parentElement);
|
||||
|
|
|
|||
4
dist/BlueMarble-Standalone.user.js
vendored
4
dist/BlueMarble-Standalone.user.js
vendored
File diff suppressed because one or more lines are too long
2
dist/BlueMarble.user.css
vendored
2
dist/BlueMarble.user.css
vendored
File diff suppressed because one or more lines are too long
4
dist/BlueMarble.user.js
vendored
4
dist/BlueMarble.user.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -51,7 +51,7 @@
|
|||
<a href="https://discord.gg/tpeBPy46hf" target="_blank" rel="noopener noreferrer"><img alt="Contact Me" src="https://img.shields.io/badge/Contact_Me-gray?style=flat&logo=Discord&logoColor=white&logoSize=auto&labelColor=cornflowerblue"></a>
|
||||
<a href="https://bluemarble.lol/" target="_blank" rel="noopener noreferrer"><img alt="Blue Marble Website" src="https://img.shields.io/badge/Blue_Marble_Website-crqch-blue?style=flat&logo=globe&logoColor=white"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="WakaTime" src="https://img.shields.io/badge/Coding_Time-212hrs_17mins-blue?style=flat&logo=wakatime&logoColor=black&logoSize=auto&labelColor=white"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-1123-black?style=flat"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-1125-black?style=flat"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Lines of Code" src="https://img.shields.io/badge/Lines_Of_Code-6620-blue?style=flat"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Comments" src="https://img.shields.io/badge/Lines_Of_Comments-5414-blue?style=flat"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Compression" src="https://img.shields.io/badge/Compression-71.85%25-blue"></a>
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.91.8",
|
||||
"version": "0.91.10",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.91.8",
|
||||
"version": "0.91.10",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"jsdoc": "^4.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.91.8",
|
||||
"version": "0.91.10",
|
||||
"type": "module",
|
||||
"homepage": "https://bluemarble.lol/",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// @name Blue Marble
|
||||
// @name:en Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.91.8
|
||||
// @version 0.91.10
|
||||
// @description A userscript to enhance the user experience on Wplace.live. This includes, but is not limited to: uploading images to display locally on a canvas, adding a button to move the Wplace color palette menu, and other QoL features.
|
||||
// @description:en A userscript to enhance the user experience on Wplace.live. This includes, but is not limited to: uploading images to display locally on a canvas, adding a button to move the Wplace color palette menu, and other QoL features.
|
||||
// @author SwingTheVine
|
||||
|
|
|
|||
|
|
@ -135,4 +135,9 @@
|
|||
/* Filter window header 2 in windowed mode */
|
||||
#bm-window-filter.bm-windowed .bm-filter-color h2 {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
/* Filter window dragbar text area in windowed mode */
|
||||
#bm-window-filter #bm-filter-windowed-color-totals {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ export default class WindowFilter extends Overlay {
|
|||
button.onclick = () => {
|
||||
const windowedColorTotals = document.querySelector('#bm-filter-windowed-color-totals');
|
||||
if (windowedColorTotals) {
|
||||
windowedColorTotals.style.display = (button.dataset['status'] == 'expanded') ? 'none' : '';
|
||||
windowedColorTotals.style.display = (button.dataset['buttonStatus'] == 'expanded') ? 'none' : '';
|
||||
}
|
||||
instance.handleMinimization(button);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue