SpyGuard/app/frontend/dist/js/chunk-2d0baeaa.14768760.js.map
2022-11-06 15:51:33 +01:00

1 line
15 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/views/generate-ap.vue","webpack:///src/views/generate-ap.vue","webpack:///./src/views/generate-ap.vue?1b7e","webpack:///./src/views/generate-ap.vue?929c"],"names":["render","_vm","this","_c","_self","staticClass","error","ssid_name","on","$event","generate_ap","attrs","ssid_qr","_v","_s","$t","ssid_password","staticStyle","domProps","reboot_option","reboot","_e","staticRenderFns","name","components","data","capture_token","capture_start","interval","attempts","methods","console","clearInterval","axios","timeout","then","show_ap","window","setTimeout","start_capture","get_capture_token","get_device","check_device","router","params","device_name","created","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAAgB,GAAbJ,EAAIK,MAAiBH,EAAG,MAAM,CAAEF,EAAIM,UAAWJ,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,cAAcG,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOR,EAAIS,iBAAiB,CAACP,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,SAAS,CAACA,EAAG,MAAM,CAACQ,MAAM,CAAC,IAAMV,EAAIW,QAAQ,GAAK,eAAe,GAAGT,EAAG,MAAM,CAACE,YAAY,wBAAwBM,MAAM,CAAC,eAAe,QAAQR,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,MAAMA,EAAG,OAAO,CAACE,YAAY,cAAc,CAACJ,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIc,GAAG,6BAA6B,OAAOZ,EAAG,MAAMA,EAAG,KAAK,CAACF,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIM,cAAcJ,EAAG,OAAO,CAACE,YA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KACA,KACA,MAIa,aAAAyB,E","file":"js/chunk-2d0baeaa.14768760.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrapper\"},[_c('div',{staticClass:\"center\"},[((_vm.error == false))?_c('div',[(_vm.ssid_name)?_c('div',[_c('div',{staticClass:\"card apcard\",on:{\"click\":function($event){return _vm.generate_ap()}}},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column col-5\"},[_c('center',[_c('img',{attrs:{\"src\":_vm.ssid_qr,\"id\":\"qrcode\"}})])],1),_c('div',{staticClass:\"divider-vert white-bg\",attrs:{\"data-content\":\"OR\"}}),_c('div',{staticClass:\"column col-5\"},[_c('br'),_c('span',{staticClass:\"light-grey\"},[_vm._v(_vm._s(_vm.$t(\"generate-ap.network_name\"))+\" \")]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.ssid_name))]),_c('span',{staticClass:\"light-grey\"},[_vm._v(_vm._s(_vm.$t(\"generate-ap.network_password\"))+\" \")]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.ssid_password))])])])]),_c('br'),_c('br'),_c('br'),_c('br'),_vm._v(\" \"),_c('br'),_c('br'),_c('br'),_c('br'),_c('br'),_c('br'),_c('span',{staticClass:\"legend\"},[_vm._v(_vm._s(_vm.$t(\"generate-ap.tap_msg\")))])]):_c('div',[_c('svg',{staticStyle:{\"margin\":\"auto\",\"background\":\"none\",\"display\":\"block\",\"shape-rendering\":\"auto\"},attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\",\"width\":\"194px\",\"height\":\"194px\",\"viewBox\":\"0 0 100 100\",\"preserveAspectRatio\":\"xMidYMid\"}},[_c('circle',{attrs:{\"cx\":\"50\",\"cy\":\"50\",\"r\":\"0\",\"fill\":\"none\",\"stroke\":\"#dfdfdf\",\"stroke-width\":\"1\"}},[_c('animate',{attrs:{\"attributeName\":\"r\",\"repeatCount\":\"indefinite\",\"dur\":\"2.941176470588235s\",\"values\":\"0;43\",\"keyTimes\":\"0;1\",\"keySplines\":\"0 0.2 0.8 1\",\"calcMode\":\"spline\",\"begin\":\"0s\"}}),_c('animate',{attrs:{\"attributeName\":\"opacity\",\"repeatCount\":\"indefinite\",\"dur\":\"2.941176470588235s\",\"values\":\"1;0\",\"keyTimes\":\"0;1\",\"keySplines\":\"0.2 0 0.8 1\",\"calcMode\":\"spline\",\"begin\":\"0s\"}})]),_c('circle',{attrs:{\"cx\":\"50\",\"cy\":\"50\",\"r\":\"0\",\"fill\":\"none\",\"stroke\":\"#dadada\",\"stroke-width\":\"1\"}},[_c('animate',{attrs:{\"attributeName\":\"r\",\"repeatCount\":\"indefinite\",\"dur\":\"2.941176470588235s\",\"values\":\"0;43\",\"keyTimes\":\"0;1\",\"keySplines\":\"0 0.2 0.8 1\",\"calcMode\":\"spline\",\"begin\":\"-1.4705882352941175s\"}}),_c('animate',{attrs:{\"attributeName\":\"opacity\",\"repeatCount\":\"indefinite\",\"dur\":\"2.941176470588235s\",\"values\":\"1;0\",\"keyTimes\":\"0;1\",\"keySplines\":\"0.2 0 0.8 1\",\"calcMode\":\"spline\",\"begin\":\"-1.4705882352941175s\"}})])]),_c('p',{staticClass:\"legend\"},[_vm._v(_vm._s(_vm.$t(\"generate-ap.generate_ap_msg\")))])])]):_c('div',[_c('p',[_c('strong',{domProps:{\"innerHTML\":_vm._s(_vm.$t('generate-ap.error_msg1'))}}),_c('br'),_c('br'),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.$t('generate-ap.error_msg2'))}}),_c('br'),_c('br')]),(_vm.reboot_option)?_c('button',{staticClass:\"btn\",on:{\"click\":function($event){return _vm.reboot()}}},[_vm._v(_vm._s(_vm.$t(\"generate-ap.restart_btn\")))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrapper\">\r\n <div class=\"center\">\r\n <div v-if=\"(error == false)\">\r\n <div v-if=\"ssid_name\">\r\n <div class=\"card apcard\" v-on:click=\"generate_ap()\">\r\n <div class=\"columns\">\r\n <div class=\"column col-5\">\r\n <center><img :src=\"ssid_qr\" id=\"qrcode\"></center>\r\n </div>\r\n <div class=\"divider-vert white-bg\" data-content=\"OR\"></div>\r\n <div class=\"column col-5\"><br />\r\n <span class=\"light-grey\">{{ $t(\"generate-ap.network_name\") }} </span><br />\r\n <h4>{{ ssid_name }}</h4>\r\n <span class=\"light-grey\">{{ $t(\"generate-ap.network_password\") }} </span><br />\r\n <h4>{{ ssid_password }}</h4>\r\n </div>\r\n </div>\r\n </div>\r\n <br /><br /><br /><br /> <br /><br /><br /><br /><br /><br />\r\n <!-- Requite a CSS MEME for that shit :) -->\r\n <span class=\"legend\">{{ $t(\"generate-ap.tap_msg\") }}</span>\r\n </div>\r\n <div v-else>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"margin: auto; background: none; display: block; shape-rendering: auto;\" width=\"194px\" height=\"194px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\r\n <circle cx=\"50\" cy=\"50\" r=\"0\" fill=\"none\" stroke=\"#dfdfdf\" stroke-width=\"1\">\r\n <animate attributeName=\"r\" repeatCount=\"indefinite\" dur=\"2.941176470588235s\" values=\"0;43\" keyTimes=\"0;1\" keySplines=\"0 0.2 0.8 1\" calcMode=\"spline\" begin=\"0s\"></animate>\r\n <animate attributeName=\"opacity\" repeatCount=\"indefinite\" dur=\"2.941176470588235s\" values=\"1;0\" keyTimes=\"0;1\" keySplines=\"0.2 0 0.8 1\" calcMode=\"spline\" begin=\"0s\"></animate>\r\n </circle><circle cx=\"50\" cy=\"50\" r=\"0\" fill=\"none\" stroke=\"#dadada\" stroke-width=\"1\">\r\n <animate attributeName=\"r\" repeatCount=\"indefinite\" dur=\"2.941176470588235s\" values=\"0;43\" keyTimes=\"0;1\" keySplines=\"0 0.2 0.8 1\" calcMode=\"spline\" begin=\"-1.4705882352941175s\"></animate>\r\n <animate attributeName=\"opacity\" repeatCount=\"indefinite\" dur=\"2.941176470588235s\" values=\"1;0\" keyTimes=\"0;1\" keySplines=\"0.2 0 0.8 1\" calcMode=\"spline\" begin=\"-1.4705882352941175s\"></animate>\r\n </circle>\r\n </svg>\r\n <p class=\"legend\">{{ $t(\"generate-ap.generate_ap_msg\") }}</p>\r\n </div>\r\n </div>\r\n <div v-else>\r\n <p>\r\n <strong v-html=\"$t('generate-ap.error_msg1')\"></strong>\r\n <br /><br />\r\n <span v-html=\"$t('generate-ap.error_msg2')\"></span>\r\n <br /><br /> \r\n </p>\r\n <button v-if=\"reboot_option\" class=\"btn\" v-on:click=\"reboot()\">{{ $t(\"generate-ap.restart_btn\") }}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport axios from 'axios'\r\nimport router from '../router'\r\n\r\nexport default {\r\n name: 'generate-ap',\r\n components: {},\r\n data() {\r\n return {\r\n ssid_name: false,\r\n ssid_qr: false,\r\n ssid_password: false,\r\n capture_token: false,\r\n capture_start: false,\r\n interval: false,\r\n error: false,\r\n reboot_option: window.config.reboot_option,\r\n attempts: 3\r\n }\r\n },\r\n methods: {\r\n generate_ap: function() {\r\n console.log(\"[generate-ap.vue] Trying to start a new access point\");\r\n clearInterval(this.interval);\r\n this.ssid_name = false\r\n axios.get('/api/network/ap/start', { timeout: 30000 })\r\n .then(response => (this.show_ap(response.data)))\r\n },\r\n show_ap: function(data) {\r\n if (data.status) {\r\n console.log(\"[generate-ap.vue] Access point created, showing SSID\");\r\n window.access_point = data.ssid\r\n this.ssid_name = data.ssid\r\n this.ssid_password = data.password\r\n this.ssid_qr = data.qrcode\r\n this.start_capture()\r\n } else {\r\n console.log(\"[generate-ap.vue] Issue when creating AP, let's retry\");\r\n if(this.attempts != 0){\r\n setTimeout(function () { this.generate_ap() }.bind(this), 10000)\r\n this.attempts -= 1;\r\n } else {\r\n console.log(\"[generate-ap.vue] Fatal error when creating AP, showing the error message\");\r\n this.error = true\r\n }\r\n }\r\n },\r\n start_capture: function() {\r\n console.log(\"[generate-ap.vue] Starting the capture in background\");\r\n axios.get('/api/capture/start', { timeout: 30000 })\r\n .then(response => (this.get_capture_token(response.data)))\r\n },\r\n reboot: function() {\r\n console.log(\"[generate-ap.vue] Rebooting the device\");\r\n axios.get('/api/misc/reboot', { timeout: 30000 })\r\n .then(response => { console.log(response)})\r\n },\r\n get_capture_token: function(data) {\r\n if (data.status) {\r\n console.log(\"[generate-ap.vue] Capture token retrieved, waiting a device to connect\");\r\n this.capture_token = data.capture_token\r\n this.capture_start = Date.now()\r\n this.get_device()\r\n }\r\n },\r\n get_device: function() {\r\n this.interval = setInterval(() => {\r\n axios.get(`/api/device/get/${this.capture_token}`, { timeout: 30000 })\r\n .then(response => (this.check_device(response.data)))\r\n }, 500);\r\n },\r\n check_device: function(data) {\r\n if (data.status) {\r\n console.log(\"[generate-ap.vue] Device connected, going to capture view.\");\r\n clearInterval(this.interval);\r\n var capture_token = this.capture_token\r\n var capture_start = this.capture_start\r\n var device_name = data.name\r\n router.replace({\r\n name: 'capture',\r\n params: {\r\n capture_token: capture_token,\r\n capture_start: capture_start,\r\n device_name: device_name\r\n }\r\n });\r\n }\r\n }\r\n },\r\n created: function() {\r\n console.log(\"[generate-ap.vue] Showing generate-ap.vue\")\r\n this.generate_ap();\r\n }\r\n}\r\n</script>\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./generate-ap.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./generate-ap.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./generate-ap.vue?vue&type=template&id=4b88361e&\"\nimport script from \"./generate-ap.vue?vue&type=script&lang=js&\"\nexport * from \"./generate-ap.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}