A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Print
-
@Alexandre-Venditti69 console.log(notification)
will dump out the structure of the notification object so u might find the url there -
showLastPhoto: function(result, sendResult = true, showLastOnly = false) { var autoValidate = showLastOnly ? true : result.options.autoValidate this.IsShooting = true var con = document.querySelector("#EXT-SELFIES") con.classList.add("shown") var rd = document.querySelector("#EXT-SELFIES .result") rd.style.backgroundImage = `url(modules/EXT-Selfies/photos/${result.uri})` rd.classList.add("shown") if (autoValidate) { if (this.config.usePreview) { var preview = document.querySelector("#EXT-SELFIES .preview") preview.classList.remove("shown") } setTimeout(()=>{ this.lastPhoto = result if (sendResult) this.sendNotification("EXT_SELFIES-RESULT", result) this.closeDisplayer() }, this.config.resultDuration) } }, validateSelfie: function(result) { var preview = document.querySelector("#EXT-SELFIES .preview") preview.classList.remove("shown") var pannel = document.getElementById("EXT-SELFIES-PANNEL") pannel.classList.add("shown") var sendIcon = document.getElementById("EXT-SELFIES-SEND") sendIcon.onclick = ()=> { this.lastPhoto = result // Sauvegarde le selfie en local this.sendNotification("EXT_SELFIES-RESULT", result) // Envoi la notif pour EXT-SSender this.closeDisplayer() }
Dans cette partie, j’ai rajouté à SendIcon :
this.sendSocketNotification("printResult", payload) Mon node helper reçoit cette notification et exécutera printResult function (payload) {}
Est ce un bon début ?
-
@sdetweil thanks for your intention 🙏🏼
-
@sdetweil I read the print.js library, it is of substantial size, does such a volume remain “compatible” with a simple raspberry?
-
@Alexandre-Venditti69 no clue… raspberry pi 3 has 1 gig or memory and pi4 can have up to 8gig.
-
@Alexandre-Venditti69 said in Print:
Est ce un bon début ?
sorry, I have no idea.
I would have thought u could print directly from the browser, and not have to go to the helper.never tried printing