From f4d361488c32be19af04b174397471a75134c4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Mon, 15 Feb 2021 16:35:10 +0100 Subject: [PATCH 1/5] Adding nonet feature --- app/frontend/src/views/home.vue | 2 +- app/frontend/src/views/splash-screen.vue | 2 +- server/backend/app/classes/config.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/frontend/src/views/home.vue b/app/frontend/src/views/home.vue index 6f7b52a..b296302 100644 --- a/app/frontend/src/views/home.vue +++ b/app/frontend/src/views/home.vue @@ -22,7 +22,7 @@ export default { var saved_ssid = this.saved_ssid var list_ssids = this.list_ssids var internet = this.internet - if (window.config.iface_out.charAt(0) == "e"){ + if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n'){ router.push({ name: 'generate-ap' }); } else { router.push({ name: 'wifi-select', diff --git a/app/frontend/src/views/splash-screen.vue b/app/frontend/src/views/splash-screen.vue index d61362e..a93895c 100644 --- a/app/frontend/src/views/splash-screen.vue +++ b/app/frontend/src/views/splash-screen.vue @@ -23,7 +23,7 @@ axios.get('/api/network/status', { timeout: 10000 }) .then(response => { if (response.data.internet) this.internet = true - if (window.config.iface_out.charAt(0) == 'e') { + if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n') { setTimeout(function () { this.goto_home(); }.bind(this), 1000); } else { this.get_wifi_networks(); diff --git a/server/backend/app/classes/config.py b/server/backend/app/classes/config.py index 3839543..608d820 100644 --- a/server/backend/app/classes/config.py +++ b/server/backend/app/classes/config.py @@ -62,7 +62,7 @@ class Config(object): config[cat][key] = value if key == "out": config[cat][key] = value - elif re.match("^(eth[0-9]|en[a-z0-9]{20})$", value) and key == "out": + elif re.match("^(nonet|eth[0-9]|en[a-z0-9]{20})$", value) and key == "out": config[cat][key] = value else: return {"status": False, @@ -137,7 +137,7 @@ class Config(object): :return: list of the interfaces """ try: - return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))] + return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))]+["nonet"] except: return ["No network interfaces"] From 488c0cdb1bc345c44b335ab3bce87a2cf737324d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Mon, 15 Feb 2021 20:46:56 +0100 Subject: [PATCH 2/5] No internet feature --- app/backend/package-lock.json | 166 +++++++++++------------ app/backend/package.json | 2 +- app/frontend/package-lock.json | 166 ++++++++++++----------- app/frontend/package.json | 2 +- app/frontend/src/locales/cat.json | 1 + app/frontend/src/locales/en.json | 1 + app/frontend/src/locales/es.json | 1 + app/frontend/src/locales/fr.json | 7 +- app/frontend/src/views/generate-ap.vue | 4 +- app/frontend/src/views/home.vue | 2 +- app/frontend/src/views/splash-screen.vue | 2 +- app/frontend/src/views/wifi-select.vue | 5 +- server/backend/app/classes/config.py | 4 +- 13 files changed, 185 insertions(+), 178 deletions(-) diff --git a/app/backend/package-lock.json b/app/backend/package-lock.json index 08e0cf7..af8b754 100644 --- a/app/backend/package-lock.json +++ b/app/backend/package-lock.json @@ -1728,6 +1728,16 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "cacache": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", @@ -1754,6 +1764,34 @@ "unique-filename": "^1.1.1" } }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -1775,6 +1813,25 @@ "path-exists": "^4.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -1839,6 +1896,16 @@ "minipass": "^3.1.1" } }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "terser-webpack-plugin": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", @@ -1855,6 +1922,18 @@ "terser": "^4.6.12", "webpack-sources": "^1.4.3" } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.1.2", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz", + "integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -2468,9 +2547,9 @@ "dev": true }, "axios": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", - "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { "follow-redirects": "^1.10.0" } @@ -11020,87 +11099,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.0.0-rc.1", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-rc.1.tgz", - "integrity": "sha512-yR+BS90EOXTNieasf8ce9J3TFCpm2DGqoqdbtiwQ33hon3FyIznLX7sKavAq1VmfBnOeV6It0Htg4aniv8ph1g==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-router": { "version": "3.4.5", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.5.tgz", diff --git a/app/backend/package.json b/app/backend/package.json index e1797f1..d884f31 100644 --- a/app/backend/package.json +++ b/app/backend/package.json @@ -8,7 +8,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "axios": "^0.20.0", + "axios": "^0.21.1", "core-js": "^3.6.5", "vue": "^2.6.11", "vue-router": "^3.4.5" diff --git a/app/frontend/package-lock.json b/app/frontend/package-lock.json index 1a12fee..e53114f 100644 --- a/app/frontend/package-lock.json +++ b/app/frontend/package-lock.json @@ -1806,16 +1806,6 @@ "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", "dev": true }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, "cacache": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", @@ -1842,34 +1832,6 @@ "unique-filename": "^1.1.1" } }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -1891,25 +1853,6 @@ "path-exists": "^4.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -1974,16 +1917,6 @@ "minipass": "^3.1.1" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "terser-webpack-plugin": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", @@ -2000,18 +1933,6 @@ "terser": "^4.6.12", "webpack-sources": "^1.4.3" } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.1.2", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz", - "integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - } } } }, @@ -2621,9 +2542,9 @@ "dev": true }, "axios": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", - "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { "follow-redirects": "^1.10.0" } @@ -11386,6 +11307,87 @@ } } }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.1.2", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz", + "integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-router": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz", diff --git a/app/frontend/package.json b/app/frontend/package.json index 5655dd9..126b0c8 100644 --- a/app/frontend/package.json +++ b/app/frontend/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@fnando/sparkline": "^0.3.10", - "axios": "^0.20.0", + "axios": "^0.21.1", "core-js": "^3.6.5", "sass": "^1.27.0", "sass-loader": "^10.0.4", diff --git a/app/frontend/src/locales/cat.json b/app/frontend/src/locales/cat.json index d3b19be..7ad99c1 100644 --- a/app/frontend/src/locales/cat.json +++ b/app/frontend/src/locales/cat.json @@ -65,6 +65,7 @@ "not_connected": "Sembla que no esteu connectat a Internet.", "please_config": "Configureu la connexió Wi-Fi.", "lets_do_btn": "D'acord, fem això.", + "no_internet": "Utilitzeu-lo fora de línia", "wifi_connected": "Wi-Fi connectat", "wifi_not_connected": "Wi-Fi no connectat. Torneu-ho a provar.", "tap_keyboard": "Toqueu el teclat virtual per començar", diff --git a/app/frontend/src/locales/en.json b/app/frontend/src/locales/en.json index e7786bf..9a4097b 100644 --- a/app/frontend/src/locales/en.json +++ b/app/frontend/src/locales/en.json @@ -65,6 +65,7 @@ "not_connected": "You seem to not be connected to Internet.", "please_config": "Please configure the Wi-Fi connection.", "lets_do_btn": "Ok, let's do that.", + "no_internet": "Use it offline", "wifi_connected": "Wi-Fi connected", "wifi_not_connected": "Wi-Fi not connected. Please retry.", "tap_keyboard": "Tap on the virtual keyboard to start", diff --git a/app/frontend/src/locales/es.json b/app/frontend/src/locales/es.json index e58bd85..b0dc075 100644 --- a/app/frontend/src/locales/es.json +++ b/app/frontend/src/locales/es.json @@ -63,6 +63,7 @@ "wifi_name": "Nombre de Wi-Fi", "refresh_btn": "Actualizar lista de redes", "not_connected": "Parece que no estás conectado a Internet", + "no_internet": "Úselo sin conexión", "please_config": "Configure la conexión Wi-Fi.", "lets_do_btn": "Ok, hagámoslo", "wifi_connected": "Wi-Fi conectado", diff --git a/app/frontend/src/locales/fr.json b/app/frontend/src/locales/fr.json index 248c819..f786109 100644 --- a/app/frontend/src/locales/fr.json +++ b/app/frontend/src/locales/fr.json @@ -62,9 +62,10 @@ "yes_btn": "Oui, utilisez celle-là", "wifi_name": "Nom du réseau", "refresh_btn": "Rafraichir la liste des réseaux", - "not_connected": "Vous semblez ne pas être connecté à Internet.", - "please_config": "Configurez la connexion Wi-Fi.", - "lets_do_btn": "Oui, allons-y", + "not_connected": "Vous ne semblez pas être connecté à Internet.", + "please_config": "Merci de configurer une connexion Wi-Fi.", + "lets_do_btn": "Oui, configurer le Wi-Fi", + "no_internet": "Utiliser sans internet", "wifi_connected": "Wi-Fi connecté", "wifi_not_connected": "Wi-Fi non connecté. Ressayez.", "tap_keyboard": "Appuez sur cet espace pour écrire", diff --git a/app/frontend/src/views/generate-ap.vue b/app/frontend/src/views/generate-ap.vue index 663238c..a6eebad 100644 --- a/app/frontend/src/views/generate-ap.vue +++ b/app/frontend/src/views/generate-ap.vue @@ -32,7 +32,7 @@

- + @@ -54,7 +54,7 @@ export default { capture_start: false, interval: false, error: false, - reboot_option: false, + reboot_option: window.config.reboot_option, attempts: 3, translation: {} } diff --git a/app/frontend/src/views/home.vue b/app/frontend/src/views/home.vue index b296302..2e8f1c2 100644 --- a/app/frontend/src/views/home.vue +++ b/app/frontend/src/views/home.vue @@ -22,7 +22,7 @@ export default { var saved_ssid = this.saved_ssid var list_ssids = this.list_ssids var internet = this.internet - if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n'){ + if (window.config.iface_out.charAt(0) == 'e'){ router.push({ name: 'generate-ap' }); } else { router.push({ name: 'wifi-select', diff --git a/app/frontend/src/views/splash-screen.vue b/app/frontend/src/views/splash-screen.vue index a93895c..d61362e 100644 --- a/app/frontend/src/views/splash-screen.vue +++ b/app/frontend/src/views/splash-screen.vue @@ -23,7 +23,7 @@ axios.get('/api/network/status', { timeout: 10000 }) .then(response => { if (response.data.internet) this.internet = true - if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n') { + if (window.config.iface_out.charAt(0) == 'e') { setTimeout(function () { this.goto_home(); }.bind(this), 1000); } else { this.get_wifi_networks(); diff --git a/app/frontend/src/views/wifi-select.vue b/app/frontend/src/views/wifi-select.vue index f132f27..fc84e93 100644 --- a/app/frontend/src/views/wifi-select.vue +++ b/app/frontend/src/views/wifi-select.vue @@ -31,7 +31,7 @@

{{ $t("wifi-select.not_connected") }}
{{ $t("wifi-select.please_config") }}

- +
@@ -117,6 +117,9 @@ export default { }); } }, + force_ap: function() { + router.push({ name: 'generate-ap' }); + }, onChange(input) { this.input = input this.password = this.input; diff --git a/server/backend/app/classes/config.py b/server/backend/app/classes/config.py index 608d820..3839543 100644 --- a/server/backend/app/classes/config.py +++ b/server/backend/app/classes/config.py @@ -62,7 +62,7 @@ class Config(object): config[cat][key] = value if key == "out": config[cat][key] = value - elif re.match("^(nonet|eth[0-9]|en[a-z0-9]{20})$", value) and key == "out": + elif re.match("^(eth[0-9]|en[a-z0-9]{20})$", value) and key == "out": config[cat][key] = value else: return {"status": False, @@ -137,7 +137,7 @@ class Config(object): :return: list of the interfaces """ try: - return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))]+["nonet"] + return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))] except: return ["No network interfaces"] From 1b678b2e097e5b9eed92ba339c244a1cdf654093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Mon, 15 Feb 2021 21:03:23 +0100 Subject: [PATCH 3/5] Update cat and es json files --- app/frontend/src/locales/cat.json | 2 +- app/frontend/src/locales/es.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/frontend/src/locales/cat.json b/app/frontend/src/locales/cat.json index 7ad99c1..a21d106 100644 --- a/app/frontend/src/locales/cat.json +++ b/app/frontend/src/locales/cat.json @@ -26,7 +26,7 @@ }, "report": { "show_full_report": "Mostra l'informe complet", - "start_new_capture": "Inicieu una nova captura", + "start_new_capture": "Nova captura", "save_capture": "Desa la captura", "numbers": [ "zero", diff --git a/app/frontend/src/locales/es.json b/app/frontend/src/locales/es.json index b0dc075..f12ef84 100644 --- a/app/frontend/src/locales/es.json +++ b/app/frontend/src/locales/es.json @@ -26,7 +26,7 @@ }, "report": { "show_full_report": "Mostrar el informe completo", - "start_new_capture": "Iniciar una nueva captura", + "start_new_capture": "Nueva captura", "save_capture": "Guardar la captura", "numbers": [ "cero", From b8af8d6cbf3b1377c587f71ce673c38681270a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Mon, 15 Feb 2021 21:20:49 +0100 Subject: [PATCH 4/5] Debug on condition when changing wifi network --- app/frontend/src/views/wifi-select.vue | 48 ++++++++++++-------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/app/frontend/src/views/wifi-select.vue b/app/frontend/src/views/wifi-select.vue index fc84e93..50c2d9c 100644 --- a/app/frontend/src/views/wifi-select.vue +++ b/app/frontend/src/views/wifi-select.vue @@ -4,35 +4,33 @@

-   +  
-
-