Best Python code snippet using fMBT_python
tools_app.js
Source:tools_app.js
...271 ],272 });273 }274 videoDetail = () => {275 this.closeWindow();276 }277 showModifyVideo = video => {278 const {title, describe} = video;279 this.setState({280 showModifyVideoWindow: true,281 argsGroup: [282 {label: "è§é¢æ é¢", key: "title", val: title},283 {label: "æè¿°", key: "describe", val: describe, type: "multiline"},284 ],285 instance: video,286 });287 }288 modifyVideo = (value) => {289 const that = this;290 const {instance} = this.state;291 Object.assign(instance, value)292 Req({293 method: "POST",294 url: "/backend/aip/video",295 data: instance296 }).then(() => {297 that.renderVideoList();298 });299 this.closeWindow();300 }301 showDeleteVideo = video => {302 const {id, title} = video;303 this.setState({304 showDeleteVideoWindow: true,305 argsGroup: [],306 msg: "确认ä¸æ¶è§é¢ " + title,307 instance: id,308 })309 }310 deleteVideo = () => {311 const that = this;312 const {instance} = this.state;313 Req({314 method: "DELETE",315 url: "/backend/aip/video?id=" + instance,316 }).then(() => {317 that.renderVideoList();318 });319 this.closeWindow();320 }321 render = () => {322 const {323 showScanWindow = false,324 showNewVideoWindow = false,325 showVideoDetailWindow = false,326 showModifyVideoWindow = false,327 showDeleteVideoWindow = false,328 argsGroup = [],329 viewContentHTML = "",330 pageComponentHTML = "",331 msg = ""332 } = this.state;333 return (...
liff-starter - Copy.js
Source:liff-starter - Copy.js
...17 });18 });19 // closeWindow call20 document.getElementById('closewindowbutton').addEventListener('click', function () {21 liff.closeWindow();22 });23 // sendMessages call24 document.getElementById('sendmessagebutton').addEventListener('click', function () {25 liff.sendMessages([{26 type: 'text',27 text: "ยิà¸à¹à¸à¸ª1"28 29 }]).then(function () {30 liff.closeWindow();31 }).catch(function (error) {32 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);33 });34 });35 // sendMessages call36 document.getElementById('sendmessagebutton2').addEventListener('click', function () {37 liff.sendMessages([{38 type: 'text',39 text: "ยิà¸à¹à¸à¸ª2"40 41 }]).then(function () {42 liff.closeWindow();43 }).catch(function (error) {44 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);45 });46 });47 // sendMessages call48 document.getElementById('sendmessagebutton3').addEventListener('click', function () {49 liff.sendMessages([{50 type: 'text',51 text: "ยิà¸à¹à¸à¸ª3"52 53 }]).then(function () {54 liff.closeWindow();55 }).catch(function (error) {56 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);57 });58 });59 // sendMessages call60 document.getElementById('sendmessagebutton4').addEventListener('click', function () {61 liff.sendMessages([{62 type: 'text',63 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡1"64 65 }]).then(function () {66 liff.closeWindow();67 }).catch(function (error) {68 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);69 });70 });71 // sendMessages call72 document.getElementById('sendmessagebutton5').addEventListener('click', function () {73 liff.sendMessages([{74 type: 'text',75 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡2"76 77 }]).then(function () {78 liff.closeWindow();79 }).catch(function (error) {80 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);81 });82 });83 // sendMessages call84 document.getElementById('sendmessagebutton6').addEventListener('click', function () {85 liff.sendMessages([{86 type: 'text',87 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡3"88 89 }]).then(function () {90 liff.closeWindow();91 }).catch(function (error) {92 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);93 });94 });95 // sendMessages call96 document.getElementById('sendmessagebutton7').addEventListener('click', function () {97 liff.sendMessages([{98 type: 'text',99 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹1"100 101 }]).then(function () {102 liff.closeWindow();103 }).catch(function (error) {104 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);105 });106 });107 // sendMessages call108 document.getElementById('sendmessagebutton8').addEventListener('click', function () {109 liff.sendMessages([{110 type: 'text',111 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹2"112 113 }]).then(function () {114 liff.closeWindow();115 }).catch(function (error) {116 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);117 });118 });119 // sendMessages call120 document.getElementById('sendmessagebutton9').addEventListener('click', function () {121 liff.sendMessages([{122 type: 'text',123 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹3"124 125 }]).then(function () {126 liff.closeWindow();127 }).catch(function (error) {128 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);129 });130 });131 // sendMessages call132 document.getElementById('sendmessagebutton10').addEventListener('click', function () {133 liff.sendMessages([{134 type: 'text',135 text: "ยิà¸à¹à¸à¸·à¹à¸à¸"136 137 }]).then(function () {138 liff.closeWindow();139 }).catch(function (error) {140 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);141 });142 });143 // sendMessages call144 document.getElementById('sendmessagebutton11').addEventListener('click', function () {145 liff.sendMessages([{146 type: 'text',147 text: "à¸à¸£à¸°à¸à¸²à¸¨à¹à¸à¸·à¹à¸à¸"148 149 }]).then(function () {150 liff.closeWindow();151 }).catch(function (error) {152 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);153 });154 });155 // sendMessages call156 document.getElementById('sendmessagebutton12').addEventListener('click', function () {157 liff.sendMessages([{158 type: 'text',159 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸²à¸¢à¸3"160 161 }]).then(function () {162 liff.closeWindow();163 }).catch(function (error) {164 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);165 });166 });167 // sendMessages call168 document.getElementById('sendmessagebutton13').addEventListener('click', function () {169 liff.sendMessages([{170 type: 'text',171 text: "à¸à¸²à¸¢à¸ªà¸´à¸à¸à¹à¸²"172 173 }]).then(function () {174 liff.closeWindow();175 }).catch(function (error) {176 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);177 });178 });179 // sendMessages call180 document.getElementById('sendmessagebutton14').addEventListener('click', function () {181 liff.sendMessages([{182 type: 'text',183 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸¥à¸¸à¹à¸¡2"184 185 }]).then(function () {186 liff.closeWindow();187 }).catch(function (error) {188 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);189 });190 });191 // sendMessages call192 document.getElementById('sendmessagebutton15').addEventListener('click', function () {193 liff.sendMessages([{194 type: 'text',195 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸¥à¸¸à¹à¸¡3"196 197 }]).then(function () {198 liff.closeWindow();199 }).catch(function (error) {200 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);201 });202 });203 // sendMessages call204 document.getElementById('sendmessagebutton16').addEventListener('click', function () {205 liff.sendMessages([{206 type: 'text',207 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹1"208 209 }]).then(function () {210 liff.closeWindow();211 }).catch(function (error) {212 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);213 });214 });215 // sendMessages call216 document.getElementById('sendmessagebutton17').addEventListener('click', function () {217 liff.sendMessages([{218 type: 'text',219 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹2"220 221 }]).then(function () {222 liff.closeWindow();223 }).catch(function (error) {224 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);225 });226 });227 // sendMessages call228 document.getElementById('sendmessagebutton18').addEventListener('click', function () {229 liff.sendMessages([{230 type: 'text',231 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹3"232 233 }]).then(function () {234 liff.closeWindow();235 }).catch(function (error) {236 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);237 });238 });239 // sendMessages call240 document.getElementById('sendmessagebutton19').addEventListener('click', function () {241 liff.sendMessages([{242 type: 'text',243 text: "ยิà¸à¸£à¸¹à¸1"244 245 }]).then(function () {246 liff.closeWindow();247 }).catch(function (error) {248 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);249 });250 });251 // sendMessages call252 document.getElementById('sendmessagebutton20').addEventListener('click', function () {253 liff.sendMessages([{254 type: 'text',255 text: "ยิà¸à¸£à¸¹à¸2"256 257 }]).then(function () {258 liff.closeWindow();259 }).catch(function (error) {260 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);261 });262 });263 // sendMessages call264 document.getElementById('sendmessagebutton21').addEventListener('click', function () {265 liff.sendMessages([{266 type: 'text',267 text: "ยิà¸à¸£à¸¹à¸3"268 269 }]).then(function () {270 liff.closeWindow();271 }).catch(function (error) {272 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);273 });274 });275 // sendMessages call276 document.getElementById('sendmessagebutton22').addEventListener('click', function () {277 liff.sendMessages([{278 type: 'text',279 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡1"280 281 }]).then(function () {282 liff.closeWindow();283 }).catch(function (error) {284 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);285 });286 });287 // sendMessages call288 document.getElementById('sendmessagebutton23').addEventListener('click', function () {289 liff.sendMessages([{290 type: 'text',291 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡2"292 293 }]).then(function () {294 liff.closeWindow();295 }).catch(function (error) {296 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);297 });298 });299 // sendMessages call300 document.getElementById('sendmessagebutton24').addEventListener('click', function () {301 liff.sendMessages([{302 type: 'text',303 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡3"304 305 }]).then(function () {306 liff.closeWindow();307 }).catch(function (error) {308 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);309 });310 });311 // sendMessages call312 document.getElementById('sendmessagebutton25').addEventListener('click', function () {313 liff.sendMessages([{314 type: 'text',315 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸1"316 317 }]).then(function () {318 liff.closeWindow();319 }).catch(function (error) {320 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);321 });322 });323 // sendMessages call324 document.getElementById('sendmessagebutton26').addEventListener('click', function () {325 liff.sendMessages([{326 type: 'text',327 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸2"328 329 }]).then(function () {330 liff.closeWindow();331 }).catch(function (error) {332 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);333 });334 });335 // sendMessages call336 document.getElementById('sendmessagebutton27').addEventListener('click', function () {337 liff.sendMessages([{338 type: 'text',339 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸3"340 341 }]).then(function () {342 liff.closeWindow();343 }).catch(function (error) {344 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);345 });346 });347 // sendMessages call348 document.getElementById('sendmessagebutton28').addEventListener('click', function () {349 liff.sendMessages([{350 type: 'text',351 text: "ยิà¸01"352 353 }]).then(function () {354 liff.closeWindow();355 }).catch(function (error) {356 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);357 });358 });359 // sendMessages call360 document.getElementById('sendmessagebutton29').addEventListener('click', function () {361 liff.sendMessages([{362 type: 'text',363 text: "ยิà¸02"364 365 }]).then(function () {366 liff.closeWindow();367 }).catch(function (error) {368 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);369 });370 });371 // sendMessages call372 document.getElementById('sendmessagebutton30').addEventListener('click', function () {373 liff.sendMessages([{374 type: 'text',375 text: "ยิà¸03"376 377 }]).then(function () {378 liff.closeWindow();379 }).catch(function (error) {380 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);381 });382 });383 // sendMessages call384 document.getElementById('sendmessagebutton31').addEventListener('click', function () {385 liff.sendMessages([{386 type: 'text',387 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡01"388 389 }]).then(function () {390 liff.closeWindow();391 }).catch(function (error) {392 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);393 });394 });395 // sendMessages call396 document.getElementById('sendmessagebutton32').addEventListener('click', function () {397 liff.sendMessages([{398 type: 'text',399 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡02"400 401 }]).then(function () {402 liff.closeWindow();403 }).catch(function (error) {404 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);405 });406 });407 // sendMessages call408 document.getElementById('sendmessagebutton33').addEventListener('click', function () {409 liff.sendMessages([{410 type: 'text',411 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡03"412 413 }]).then(function () {414 liff.closeWindow();415 }).catch(function (error) {416 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);417 });418 });419 // sendMessages call420 document.getElementById('sendmessagebutton34').addEventListener('click', function () {421 liff.sendMessages([{422 type: 'text',423 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹1"424 425 }]).then(function () {426 liff.closeWindow();427 }).catch(function (error) {428 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);429 });430 });431 // sendMessages call432 document.getElementById('sendmessagebutton35').addEventListener('click', function () {433 liff.sendMessages([{434 type: 'text',435 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹2"436 437 }]).then(function () {438 liff.closeWindow();439 }).catch(function (error) {440 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);441 });442 });443 // sendMessages call444 document.getElementById('sendmessagebutton36').addEventListener('click', function () {445 liff.sendMessages([{446 type: 'text',447 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹3"448 449 }]).then(function () {450 liff.closeWindow();451 }).catch(function (error) {452 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);453 });454 });455 // sendMessages call456 document.getElementById('sendmessagebutton37').addEventListener('click', function () {457 liff.sendMessages([{458 type: 'text',459 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥1"460 461 }]).then(function () {462 liff.closeWindow();463 }).catch(function (error) {464 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);465 });466 });467 // sendMessages call468 document.getElementById('sendmessagebutton38').addEventListener('click', function () {469 liff.sendMessages([{470 type: 'text',471 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥2"472 473 }]).then(function () {474 liff.closeWindow();475 }).catch(function (error) {476 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);477 });478 });479 // sendMessages call480 document.getElementById('sendmessagebutton39').addEventListener('click', function () {481 liff.sendMessages([{482 type: 'text',483 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥3"484 485 }]).then(function () {486 liff.closeWindow();487 }).catch(function (error) {488 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);489 });490 });491 // sendMessages call492 document.getElementById('sendmessagebutton40').addEventListener('click', function () {493 liff.sendMessages([{494 type: 'text',495 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥1"496 497 }]).then(function () {498 liff.closeWindow();499 }).catch(function (error) {500 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);501 });502 });503 // sendMessages call504 document.getElementById('sendmessagebutton41').addEventListener('click', function () {505 liff.sendMessages([{506 type: 'text',507 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥2"508 509 }]).then(function () {510 liff.closeWindow();511 }).catch(function (error) {512 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);513 });514 });515 // sendMessages call516 document.getElementById('sendmessagebutton42').addEventListener('click', function () {517 liff.sendMessages([{518 type: 'text',519 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥3"520 521 }]).then(function () {522 liff.closeWindow();523 }).catch(function (error) {524 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);525 });526 });527 // sendMessages call528 document.getElementById('sendmessagebutton43').addEventListener('click', function () {529 liff.sendMessages([{530 type: 'text',531 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥1"532 533 }]).then(function () {534 liff.closeWindow();535 }).catch(function (error) {536 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);537 });538 });539 // sendMessages call540 document.getElementById('sendmessagebutton44').addEventListener('click', function () {541 liff.sendMessages([{542 type: 'text',543 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥2"544 545 }]).then(function () {546 liff.closeWindow();547 }).catch(function (error) {548 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);549 });550 });551 // sendMessages call552 document.getElementById('sendmessagebutton45').addEventListener('click', function () {553 liff.sendMessages([{554 type: 'text',555 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥3"556 557 }]).then(function () {558 liff.closeWindow();559 }).catch(function (error) {560 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);561 });562 });563 // get access token564 document.getElementById('getaccesstoken').addEventListener('click', function () {565 const accessToken = liff.getAccessToken();566 document.getElementById('accesstokenfield').textContent = accessToken;567 toggleAccessToken();568 });569 // get profile call570 document.getElementById('getprofilebutton').addEventListener('click', function () {571 liff.getProfile().then(function (profile) {572 document.getElementById('useridprofilefield').textContent = profile.userId;...
liff-starter.js
Source:liff-starter.js
...17 });18 });19 // closeWindow call20 document.getElementById('closewindowbutton').addEventListener('click', function () {21 liff.closeWindow();22 });23 // sendMessages call24 document.getElementById('sendmessagebutton').addEventListener('click', function () {25 liff.sendMessages([{26 type: 'text',27 text: "ยิà¸à¹à¸à¸ª1"28 29 }]).then(function () {30 liff.closeWindow();31 }).catch(function (error) {32 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);33 });34 });35 // sendMessages call36 document.getElementById('sendmessagebutton2').addEventListener('click', function () {37 liff.sendMessages([{38 type: 'text',39 text: "ยิà¸à¹à¸à¸ª2"40 41 }]).then(function () {42 liff.closeWindow();43 }).catch(function (error) {44 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);45 });46 });47 // sendMessages call48 document.getElementById('sendmessagebutton3').addEventListener('click', function () {49 liff.sendMessages([{50 type: 'text',51 text: "ยิà¸à¹à¸à¸ª3"52 53 }]).then(function () {54 liff.closeWindow();55 }).catch(function (error) {56 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);57 });58 });59 // sendMessages call60 document.getElementById('sendmessagebutton4').addEventListener('click', function () {61 liff.sendMessages([{62 type: 'text',63 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡1"64 65 }]).then(function () {66 liff.closeWindow();67 }).catch(function (error) {68 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);69 });70 });71 // sendMessages call72 document.getElementById('sendmessagebutton5').addEventListener('click', function () {73 liff.sendMessages([{74 type: 'text',75 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡2"76 77 }]).then(function () {78 liff.closeWindow();79 }).catch(function (error) {80 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);81 });82 });83 // sendMessages call84 document.getElementById('sendmessagebutton6').addEventListener('click', function () {85 liff.sendMessages([{86 type: 'text',87 text: "ยิà¸à¸à¸¥à¸¸à¹à¸¡3"88 89 }]).then(function () {90 liff.closeWindow();91 }).catch(function (error) {92 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);93 });94 });95 // sendMessages call96 document.getElementById('sendmessagebutton7').addEventListener('click', function () {97 liff.sendMessages([{98 type: 'text',99 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹1"100 101 }]).then(function () {102 liff.closeWindow();103 }).catch(function (error) {104 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);105 });106 });107 // sendMessages call108 document.getElementById('sendmessagebutton8').addEventListener('click', function () {109 liff.sendMessages([{110 type: 'text',111 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹2"112 113 }]).then(function () {114 liff.closeWindow();115 }).catch(function (error) {116 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);117 });118 });119 // sendMessages call120 document.getElementById('sendmessagebutton9').addEventListener('click', function () {121 liff.sendMessages([{122 type: 'text',123 text: "/à¹à¸¡à¹à¹à¸à¸à¸à¸µà¹3"124 125 }]).then(function () {126 liff.closeWindow();127 }).catch(function (error) {128 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);129 });130 });131 // sendMessages call132 document.getElementById('sendmessagebutton10').addEventListener('click', function () {133 liff.sendMessages([{134 type: 'text',135 text: "ยิà¸à¹à¸à¸·à¹à¸à¸"136 137 }]).then(function () {138 liff.closeWindow();139 }).catch(function (error) {140 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);141 });142 });143 // sendMessages call144 document.getElementById('sendmessagebutton11').addEventListener('click', function () {145 liff.sendMessages([{146 type: 'text',147 text: "à¸à¸£à¸°à¸à¸²à¸¨à¹à¸à¸·à¹à¸à¸"148 149 }]).then(function () {150 liff.closeWindow();151 }).catch(function (error) {152 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);153 });154 });155 // sendMessages call156 document.getElementById('sendmessagebutton12').addEventListener('click', function () {157 liff.sendMessages([{158 type: 'text',159 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸²à¸¢à¸3"160 161 }]).then(function () {162 liff.closeWindow();163 }).catch(function (error) {164 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);165 });166 });167 // sendMessages call168 document.getElementById('sendmessagebutton13').addEventListener('click', function () {169 liff.sendMessages([{170 type: 'text',171 text: "à¸à¸²à¸¢à¸ªà¸´à¸à¸à¹à¸²"172 173 }]).then(function () {174 liff.closeWindow();175 }).catch(function (error) {176 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);177 });178 });179 // sendMessages call180 document.getElementById('sendmessagebutton14').addEventListener('click', function () {181 liff.sendMessages([{182 type: 'text',183 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸¥à¸¸à¹à¸¡2"184 185 }]).then(function () {186 liff.closeWindow();187 }).catch(function (error) {188 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);189 });190 });191 // sendMessages call192 document.getElementById('sendmessagebutton15').addEventListener('click', function () {193 liff.sendMessages([{194 type: 'text',195 text: "à¸à¸£à¸°à¸à¸²à¸¨à¸à¸¥à¸¸à¹à¸¡3"196 197 }]).then(function () {198 liff.closeWindow();199 }).catch(function (error) {200 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);201 });202 });203 // sendMessages call204 document.getElementById('sendmessagebutton16').addEventListener('click', function () {205 liff.sendMessages([{206 type: 'text',207 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹1"208 209 }]).then(function () {210 liff.closeWindow();211 }).catch(function (error) {212 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);213 });214 });215 // sendMessages call216 document.getElementById('sendmessagebutton17').addEventListener('click', function () {217 liff.sendMessages([{218 type: 'text',219 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹2"220 221 }]).then(function () {222 liff.closeWindow();223 }).catch(function (error) {224 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);225 });226 });227 // sendMessages call228 document.getElementById('sendmessagebutton18').addEventListener('click', function () {229 liff.sendMessages([{230 type: 'text',231 text: "/à¹à¸¡à¹à¹à¸à¸à¸ªà¹à¸¥à¸à¸µà¹3"232 233 }]).then(function () {234 liff.closeWindow();235 }).catch(function (error) {236 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);237 });238 });239 // sendMessages call240 document.getElementById('sendmessagebutton19').addEventListener('click', function () {241 liff.sendMessages([{242 type: 'text',243 text: "ยิà¸à¸£à¸¹à¸1"244 245 }]).then(function () {246 liff.closeWindow();247 }).catch(function (error) {248 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);249 });250 });251 // sendMessages call252 document.getElementById('sendmessagebutton20').addEventListener('click', function () {253 liff.sendMessages([{254 type: 'text',255 text: "ยิà¸à¸£à¸¹à¸2"256 257 }]).then(function () {258 liff.closeWindow();259 }).catch(function (error) {260 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);261 });262 });263 // sendMessages call264 document.getElementById('sendmessagebutton21').addEventListener('click', function () {265 liff.sendMessages([{266 type: 'text',267 text: "ยิà¸à¸£à¸¹à¸3"268 269 }]).then(function () {270 liff.closeWindow();271 }).catch(function (error) {272 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);273 });274 });275 // sendMessages call276 document.getElementById('sendmessagebutton22').addEventListener('click', function () {277 liff.sendMessages([{278 type: 'text',279 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡1"280 281 }]).then(function () {282 liff.closeWindow();283 }).catch(function (error) {284 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);285 });286 });287 // sendMessages call288 document.getElementById('sendmessagebutton23').addEventListener('click', function () {289 liff.sendMessages([{290 type: 'text',291 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡2"292 293 }]).then(function () {294 liff.closeWindow();295 }).catch(function (error) {296 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);297 });298 });299 // sendMessages call300 document.getElementById('sendmessagebutton24').addEventListener('click', function () {301 liff.sendMessages([{302 type: 'text',303 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡3"304 305 }]).then(function () {306 liff.closeWindow();307 }).catch(function (error) {308 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);309 });310 });311 // sendMessages call312 document.getElementById('sendmessagebutton25').addEventListener('click', function () {313 liff.sendMessages([{314 type: 'text',315 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸1"316 317 }]).then(function () {318 liff.closeWindow();319 }).catch(function (error) {320 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);321 });322 });323 // sendMessages call324 document.getElementById('sendmessagebutton26').addEventListener('click', function () {325 liff.sendMessages([{326 type: 'text',327 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸2"328 329 }]).then(function () {330 liff.closeWindow();331 }).catch(function (error) {332 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);333 });334 });335 // sendMessages call336 document.getElementById('sendmessagebutton27').addEventListener('click', function () {337 liff.sendMessages([{338 type: 'text',339 text: "/à¹à¸¡à¹à¹à¸à¸à¸£à¸¹à¸3"340 341 }]).then(function () {342 liff.closeWindow();343 }).catch(function (error) {344 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);345 });346 });347 // sendMessages call348 document.getElementById('sendmessagebutton28').addEventListener('click', function () {349 liff.sendMessages([{350 type: 'text',351 text: "ยิà¸01"352 353 }]).then(function () {354 liff.closeWindow();355 }).catch(function (error) {356 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);357 });358 });359 // sendMessages call360 document.getElementById('sendmessagebutton29').addEventListener('click', function () {361 liff.sendMessages([{362 type: 'text',363 text: "ยิà¸02"364 365 }]).then(function () {366 liff.closeWindow();367 }).catch(function (error) {368 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);369 });370 });371 // sendMessages call372 document.getElementById('sendmessagebutton30').addEventListener('click', function () {373 liff.sendMessages([{374 type: 'text',375 text: "ยิà¸03"376 377 }]).then(function () {378 liff.closeWindow();379 }).catch(function (error) {380 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);381 });382 });383 // sendMessages call384 document.getElementById('sendmessagebutton31').addEventListener('click', function () {385 liff.sendMessages([{386 type: 'text',387 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡01"388 389 }]).then(function () {390 liff.closeWindow();391 }).catch(function (error) {392 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);393 });394 });395 // sendMessages call396 document.getElementById('sendmessagebutton32').addEventListener('click', function () {397 liff.sendMessages([{398 type: 'text',399 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡02"400 401 }]).then(function () {402 liff.closeWindow();403 }).catch(function (error) {404 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);405 });406 });407 // sendMessages call408 document.getElementById('sendmessagebutton33').addEventListener('click', function () {409 liff.sendMessages([{410 type: 'text',411 text: "สูà¹à¸à¸¥à¸¸à¹à¸¡03"412 413 }]).then(function () {414 liff.closeWindow();415 }).catch(function (error) {416 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);417 });418 });419 // sendMessages call420 document.getElementById('sendmessagebutton34').addEventListener('click', function () {421 liff.sendMessages([{422 type: 'text',423 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹1"424 425 }]).then(function () {426 liff.closeWindow();427 }).catch(function (error) {428 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);429 });430 });431 // sendMessages call432 document.getElementById('sendmessagebutton35').addEventListener('click', function () {433 liff.sendMessages([{434 type: 'text',435 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹2"436 437 }]).then(function () {438 liff.closeWindow();439 }).catch(function (error) {440 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);441 });442 });443 // sendMessages call444 document.getElementById('sendmessagebutton36').addEventListener('click', function () {445 liff.sendMessages([{446 type: 'text',447 text: "/à¹à¸¡à¹à¹à¸à¸à¹à¸«à¸¡à¹3"448 449 }]).then(function () {450 liff.closeWindow();451 }).catch(function (error) {452 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);453 });454 });455 // sendMessages call456 document.getElementById('sendmessagebutton37').addEventListener('click', function () {457 liff.sendMessages([{458 type: 'text',459 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥1"460 461 }]).then(function () {462 liff.closeWindow();463 }).catch(function (error) {464 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);465 });466 });467 // sendMessages call468 document.getElementById('sendmessagebutton38').addEventListener('click', function () {469 liff.sendMessages([{470 type: 'text',471 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥2"472 473 }]).then(function () {474 liff.closeWindow();475 }).catch(function (error) {476 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);477 });478 });479 // sendMessages call480 document.getElementById('sendmessagebutton39').addEventListener('click', function () {481 liff.sendMessages([{482 type: 'text',483 text: "ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥3"484 485 }]).then(function () {486 liff.closeWindow();487 }).catch(function (error) {488 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);489 });490 });491 // sendMessages call492 document.getElementById('sendmessagebutton40').addEventListener('click', function () {493 liff.sendMessages([{494 type: 'text',495 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥1"496 497 }]).then(function () {498 liff.closeWindow();499 }).catch(function (error) {500 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);501 });502 });503 // sendMessages call504 document.getElementById('sendmessagebutton41').addEventListener('click', function () {505 liff.sendMessages([{506 type: 'text',507 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥2"508 509 }]).then(function () {510 liff.closeWindow();511 }).catch(function (error) {512 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);513 });514 });515 // sendMessages call516 document.getElementById('sendmessagebutton42').addEventListener('click', function () {517 liff.sendMessages([{518 type: 'text',519 text: "ยิà¸à¸£à¸¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¹à¸¥3"520 521 }]).then(function () {522 liff.closeWindow();523 }).catch(function (error) {524 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);525 });526 });527 // sendMessages call528 document.getElementById('sendmessagebutton43').addEventListener('click', function () {529 liff.sendMessages([{530 type: 'text',531 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥1"532 533 }]).then(function () {534 liff.closeWindow();535 }).catch(function (error) {536 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);537 });538 });539 // sendMessages call540 document.getElementById('sendmessagebutton44').addEventListener('click', function () {541 liff.sendMessages([{542 type: 'text',543 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥2"544 545 }]).then(function () {546 liff.closeWindow();547 }).catch(function (error) {548 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);549 });550 });551 // sendMessages call552 document.getElementById('sendmessagebutton45').addEventListener('click', function () {553 liff.sendMessages([{554 type: 'text',555 text: "/ยิà¸à¸£à¸¹à¸à¸ªà¹à¸¥3"556 557 }]).then(function () {558 liff.closeWindow();559 }).catch(function (error) {560 window.alert("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¹à¸à¹: " + error);561 });562 });563 // get access token564 document.getElementById('getaccesstoken').addEventListener('click', function () {565 const accessToken = liff.getAccessToken();566 document.getElementById('accesstokenfield').textContent = accessToken;567 toggleAccessToken();568 });569 // get profile call570 document.getElementById('getprofilebutton').addEventListener('click', function () {571 liff.getProfile().then(function (profile) {572 document.getElementById('useridprofilefield').textContent = profile.userId;...
WindowsArea.js
Source:WindowsArea.js
1import React, { useState, useContext } from "react";2//Components3import Fenetre from "../Fenetres/Fenetre";4import ContentPdt from "../Fenetres/ContentPdt";5import ContentTrash from "../Fenetres/ContentTrash";6import ContentCv from "../Fenetres/ContentCv";7import ContentProjets from "../Fenetres/ContentProjets";8import ContentInternet from "../Fenetres/ContentInternet"9import ContentImages from "../Fenetres/ContentImages";10import ContentPopup from "../Fenetres/ContentPopup";11import ContentNotepad from "../Fenetres/ContentNotepad";12import Form from "../Fenetres/Form";13import postetravail from "../../assets/5131-tOo-Postedetravail.png";14import logointernet from "../../assets/internetlogo.png";15import notepadlogo from "../../assets/Notepad_Vista_10.png"16import Piano from "./../Fenetres/Piano"17//Assets18import Icone from "../Icones/Icone";19import trashlogo from "../../assets/ModernXP-76-Trash-Full-icon.png";20import ContentFormations from "../Fenetres/ContentFormations";21import ContentCompetences from "../Fenetres/ContentCompetences";22//Context23import LangContext from "../Context/LangContext"24function WindowsArea(props) {25 const [fullScreenPdt, setFullscreenPdt] = useState(false);26 const [fullScreenPopup, setFullscreenPopup] = useState(false);27 const [fullScreenInternet, setFullScreenInternet] = useState(false);28 const [fullScreenContact, setFullScreenContact] = useState(false);29 const [fullScreenTrash, setFullScreenTrash] = useState(false);30 const [fullScreenCv, setfullScreenCv] = useState(false);31 const [fullScreenProjets, setfullScreenProjets] = useState(false);32 const [fullScreenImages, setFullscreenImages] = useState(false);33 const [fullScreenFormations, setFullscreenFormations] = useState(false);34 const [fullScreenCompetences, setFullscreenCompetences] = useState(false);35 const [fullScreenPiano, setFullscreenPiano] = useState(false);36 const [fullScreenNotepad, setFullscreenNotepad] = useState(false);37 const [pianowidth, setPianoWidth] = useState('490')38 const [scale, setScale] = useState(1)39 const lang = useContext(LangContext);40 const enTrue = lang.language === "English"41 //Augmenter l'échelle quand le cv est fullscreen42 function setthatScale() {43 fullScreenCv ? setScale(1) : setScale(1.8);44 }45 //Fullscreen state pour chaque fenetre46 function makefullScreen(win) {47 if (win === "Poste de travail" || win === "Computer") setFullscreenPdt(!fullScreenPdt);48 else if (win === "Popup") setFullscreenPopup(!fullScreenPopup);49 else if (win === "Internet Explorer") setFullScreenInternet(!fullScreenInternet);50 else if (win === "Me contacter" || win === "Contact Me") setFullScreenContact(!fullScreenContact);51 else if (win === "Mes Projets" || win === "My Projects") setfullScreenProjets(!fullScreenProjets);52 else if (win === "Corbeille" || win === "Trash") setFullScreenTrash(!fullScreenTrash);53 else if (win === "Mes Images" || win === "My Pictures") setFullscreenImages(!fullScreenImages);54 else if (win === "Mes Formations" || win === "My Education") setFullscreenFormations(!fullScreenFormations);55 else if (win === "Mes Compétences" || win === "My Skills") setFullscreenCompetences(!fullScreenCompetences);56 else if (win === "Bloc-notes" || win === "Notepad") setFullscreenNotepad(!fullScreenNotepad);57 else if (win === "Piano") { setFullscreenPiano(!fullScreenPiano); setPianoWidth(800) }58 else if ((win === "Mon Cv.pdf" || win === "Resume.pdf") && fullScreenCv === false) { setfullScreenCv(true); setthatScale() };59 if ((win === "Mon Cv.pdf" || win === "Resume.pdf") && fullScreenCv) { setfullScreenCv(false); setthatScale() }60 }61 //fermer le menu deroulant ou la fenetre langue quand le bureau est cliqué62 function closeAll() {63 props.closemenu();64 props.closelang()65 }66 return (67 <div className="windows_all" onClick={() => closeAll()}>68 {props.windowsArray.map((window, index) => {69 if (window === "Poste de travail" && props.posteTravail === true)70 return (71 <Fenetre72 putOnTop={props.putOnTop}73 key={window}74 closeWindow={props.closeWindow}75 hideWindow={props.hideWindow}76 width={"65vw"}77 height={"50vh"}78 text={enTrue ? "Computer" : "Poste de travail"}79 logo={postetravail}80 content={<ContentPdt />}81 array={props.windowsArray}82 moveItem={props.moveItem}83 makefullScreen={makefullScreen}84 fullScreen={fullScreenPdt}85 />86 );87 else if (window === "Piano" && props.piano === true)88 return (89 <Fenetre90 putOnTop={props.putOnTop}91 key={window}92 content={<Piano pianowidth />}93 width={"500px"}94 height={"150px"}95 closeWindow={props.closeWindow}96 text={"Piano"}97 logo={98 "https://www.pngrepo.com/png/38467/512/piano-top-view.png"99 }100 hideWindow={props.hideWindow}101 array={props.windowsArray}102 moveItem={props.moveItem}103 makefullScreen={makefullScreen}104 fullScreen={fullScreenPiano}105 />106 );107 else if (window === "Bloc-notes" && props.notepad === true)108 return (109 <Fenetre110 putOnTop={props.putOnTop}111 key={window}112 content={<ContentNotepad />}113 width={"500px"}114 height={"350px"}115 closeWindow={props.closeWindow}116 text={enTrue ? "Notepad" : "Bloc-notes"}117 logo={118 notepadlogo119 }120 hideWindow={props.hideWindow}121 array={props.windowsArray}122 moveItem={props.moveItem}123 makefullScreen={makefullScreen}124 fullScreen={fullScreenNotepad}125 />126 );127 else if (window === "Popup" && props.popup === true)128 return (129 <Fenetre130 putOnTop={props.putOnTop}131 key={window}132 content={<ContentPopup />}133 width={"500px"}134 height={"380px"}135 closeWindow={props.closeWindow}136 text={"Popup"}137 logo={138 logointernet139 }140 hideWindow={props.hideWindow}141 array={props.windowsArray}142 moveItem={props.moveItem}143 makefullScreen={makefullScreen}144 fullScreen={fullScreenPopup}145 />146 );147 else if (window === "Mes Images" && props.mesimages === true)148 return (149 <Fenetre150 putOnTop={props.putOnTop}151 key={window}152 content={<ContentImages />}153 width={"700px"}154 height={"500px"}155 closeWindow={props.closeWindow}156 text={enTrue ? "My Pictures" : "Mes Images"}157 logo={158 "https://icons.iconarchive.com/icons/dtafalonso/modern-xp/256/ModernXP-62-Folder-Images-icon.png"159 }160 hideWindow={props.hideWindow}161 array={props.windowsArray}162 moveItem={props.moveItem}163 makefullScreen={makefullScreen}164 fullScreen={fullScreenImages}165 />166 );167 else if (window === "Mes Formations" && props.mesformations === true)168 return (169 <Fenetre170 putOnTop={props.putOnTop}171 key={window}172 content={<ContentFormations />}173 width={"700px"}174 height={"500px"}175 closeWindow={props.closeWindow}176 text={enTrue ? "My Education" : "Mes Formations"}177 logo={178 "https://icons.iconarchive.com/icons/dtafalonso/modern-xp/256/ModernXP-62-Folder-Images-icon.png"179 }180 hideWindow={props.hideWindow}181 array={props.windowsArray}182 moveItem={props.moveItem}183 makefullScreen={makefullScreen}184 fullScreen={fullScreenFormations}185 />186 );187 else if (window === "Mes Compétences" && props.mescompetences === true)188 return (189 <Fenetre190 putOnTop={props.putOnTop}191 key={window}192 content={<ContentCompetences />}193 width={"700px"}194 height={"500px"}195 closeWindow={props.closeWindow}196 text={enTrue ? "My Skills" : "Mes Compétences"}197 logo={198 "https://iconarchive.com/download/i95231/dtafalonso/modern-xp/ModernXP-16-Folder-Documents.ico"199 }200 hideWindow={props.hideWindow}201 array={props.windowsArray}202 moveItem={props.moveItem}203 makefullScreen={makefullScreen}204 fullScreen={fullScreenCompetences}205 />206 );207 else if (window === "Internet Explorer" && props.internet === true)208 return (209 <Fenetre210 putOnTop={props.putOnTop}211 key={window}212 content={<ContentInternet />}213 width={"800px"}214 height={"600px"}215 closeWindow={props.closeWindow}216 text={"Internet Explorer"}217 logo={218 logointernet219 }220 hideWindow={props.hideWindow}221 array={props.windowsArray}222 moveItem={props.moveItem}223 makefullScreen={makefullScreen}224 fullScreen={fullScreenInternet}225 />226 );227 else if (window === "Me contacter" && props.mail === true)228 return (229 <Fenetre230 putOnTop={props.putOnTop}231 key={window}232 content={<Form />}233 width={"550px"}234 height={"350px"}235 closeWindow={props.closeWindow}236 text={enTrue ? "Contact Me" : "Me contacter"}237 logo={238 "https://upload.wikimedia.org/wikipedia/fr/5/53/Outlook_express_logo-200-200.jpg"239 }240 hideWindow={props.hideWindow}241 array={props.windowsArray}242 moveItem={props.moveItem}243 makefullScreen={makefullScreen}244 fullScreen={fullScreenContact}245 />246 );247 else if (window === "Mes Projets" && props.mesprojets === true)248 return (249 <Fenetre250 putOnTop={props.putOnTop}251 key={window}252 content={<ContentProjets />}253 width={"50vw"}254 height={"50vh"}255 closeWindow={props.closeWindow}256 text={enTrue ? "My Projects" : "Mes Projets"}257 logo={258 "https://icons.iconarchive.com/icons/dtafalonso/modern-xp/512/ModernXP-38-Folder-Music-icon.png"259 }260 hideWindow={props.hideWindow}261 array={props.windowsArray}262 moveItem={props.moveItem}263 makefullScreen={makefullScreen}264 fullScreen={fullScreenProjets}265 />266 );267 else if (window === "Corbeille" && props.trash === true)268 return (269 <Fenetre270 putOnTop={props.putOnTop}271 key={window}272 content={<ContentTrash />}273 width={"550px"}274 height={"300px"}275 closeWindow={props.closeWindow}276 text={enTrue ? "Trash" : "Corbeille"}277 logo={trashlogo}278 hideWindow={props.hideWindow}279 array={props.windowsArray}280 moveItem={props.moveItem}281 makefullScreen={makefullScreen}282 fullScreen={fullScreenTrash}283 />284 );285 else if (window === "Mon Cv.pdf" && props.cv === true)286 return (287 <Fenetre288 putOnTop={props.putOnTop}289 key={window}290 content={<ContentCv scale={scale} />}291 width={"706px"}292 height={"500px"}293 closeWindow={props.closeWindow}294 text={enTrue ? "Resume.pdf" : "Mon Cv.pdf"}295 logo={296 "https://seeklogo.com/images/A/adobe-pdf-logo-1480D328A9-seeklogo.com.png"297 }298 hideWindow={props.hideWindow}299 array={props.windowsArray}300 moveItem={props.moveItem}301 makefullScreen={makefullScreen}302 fullScreen={fullScreenCv}303 scale={scale}304 />305 );306 })}307 <div className="icones">308 <Icone309 showWindow={props.showWindow}310 name={enTrue ? "Trash" : "Corbeille"}311 logo={trashlogo}312 bottom={"71px"}313 right={"44px"}314 />315 <Icone316 showWindow={props.showWindow}317 name={enTrue ? "Resume.pdf" : "Mon Cv.pdf"}318 logo={319 "https://seeklogo.com/images/A/adobe-pdf-logo-1480D328A9-seeklogo.com.png"320 }321 bottom={"40px"}322 top={"20px"}323 left={"45px"}324 />325 </div>326 </div>327 );328}...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!