Fixed the snackbar

This commit is contained in:
n1474335 2022-12-09 20:46:01 +00:00
parent 771a013c9f
commit ff45f61b68
5 changed files with 14 additions and 4 deletions

View File

@ -398,6 +398,16 @@ module.exports = function (grunt) {
`find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`
].join(" "),
stdout: false
},
fixSnackbarMarkup: {
command: [
`[[ "$OSTYPE" == "darwin"* ]]`,
"&&",
`sed -i '' 's/<div id=snackbar-container\\/>/<div id=snackbar-container>/g' ./node_modules/snackbarjs/src/snackbar.js`,
"||",
`sed -i 's/<div id=snackbar-container\\/>/<div id=snackbar-container>/g' ./node_modules/snackbarjs/src/snackbar.js`
].join(" "),
stdout: false
}
},
});

View File

@ -184,7 +184,7 @@
"testui": "npx grunt testui",
"testuidev": "npx nightwatch --env=dev",
"lint": "npx grunt lint",
"postinstall": "npx grunt exec:fixCryptoApiImports",
"postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup",
"newop": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newOperation.mjs",
"minor": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newMinorVersion.mjs",
"getheapsize": "node -e 'console.log(`node heap limit = ${require(\"v8\").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'",

View File

@ -107,4 +107,4 @@
background-image:
linear-gradient(to top, var(--input-highlight-colour) 2px, rgba(0, 0, 0, 0) 2px),
linear-gradient(to top, var(--primary-border-colour) 1px, rgba(0, 0, 0, 0) 1px);
}
}

View File

@ -111,7 +111,7 @@ class StatusBarPanel {
*/
chrEncSelectClick(e) {
// preventDefault is required to stop the URL being modified and popState being triggered
e.preventDefault(); // TODO - this breaks the menus when you click the button itself
e.preventDefault();
const chrEncVal = parseInt(e.target.getAttribute("data-val"), 10);

View File

@ -1274,7 +1274,7 @@ class OutputWaiter {
* Handler for copy click events.
* Copies the output to the clipboard
*/
async copyClick() { // TODO - do we need this?
async copyClick() {
const dish = this.getOutputDish(this.manager.tabs.getActiveTab("output"));
if (dish === null) {
this.app.alert("Could not find data to copy. Has this output been baked yet?", 3000);