From 69e8c56e3e8d507ef8de957e6c77e96555a09672 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 19 Jul 2021 00:34:48 +0800 Subject: [PATCH 01/20] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 35bfeb8ab..caa7e7756 100644 --- a/README.md +++ b/README.md @@ -109,3 +109,12 @@ Telegram Notification Sample: If you love this project, please consider giving me a ⭐. + +# Contribute + +If you want to report a bug or request a new featue. Free feel to open a new issue. + + +If you want to modify Uptime Kuma, this guideline maybe useful for you: https://github.com/louislam/uptime-kuma/wiki/%5BDev%5D-Setup-Development-Environment + + From 7cba9ce231b9b1e31d73255f7d84bca00491f1b7 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Sun, 18 Jul 2021 18:35:40 +0200 Subject: [PATCH 02/20] Remove debug spam --- server/server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/server.js b/server/server.js index bd5894775..0d0ce51f1 100644 --- a/server/server.js +++ b/server/server.js @@ -50,7 +50,6 @@ let needSetup = false; version, }) - console.log('a user connected'); totalClient++; if (needSetup) { @@ -59,7 +58,6 @@ let needSetup = false; } socket.on('disconnect', () => { - console.log('user disconnected'); totalClient--; }); From d2ccfd5366a593a7d974aba9a374074a8cbec1cf Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 19 Jul 2021 00:39:07 +0800 Subject: [PATCH 03/20] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index caa7e7756..b79178e69 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,6 @@ If you love this project, please consider giving me a ⭐. If you want to report a bug or request a new featue. Free feel to open a new issue. - If you want to modify Uptime Kuma, this guideline maybe useful for you: https://github.com/louislam/uptime-kuma/wiki/%5BDev%5D-Setup-Development-Environment - +English proofread is needed too, because my grammar is not that great sadly. Feel free to correct my grammar in this Readme, source code or wiki. From 01b0e82d52abcdb09187e9b6fbf70d8d47f1e17e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 19 Jul 2021 00:40:10 +0800 Subject: [PATCH 04/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b79178e69..6aed01bcd 100644 --- a/README.md +++ b/README.md @@ -116,4 +116,4 @@ If you want to report a bug or request a new featue. Free feel to open a new iss If you want to modify Uptime Kuma, this guideline maybe useful for you: https://github.com/louislam/uptime-kuma/wiki/%5BDev%5D-Setup-Development-Environment -English proofread is needed too, because my grammar is not that great sadly. Feel free to correct my grammar in this Readme, source code or wiki. +English proofreading is needed too, because my grammar is not that great sadly. Feel free to correct my grammar in this Readme, source code or wiki. From 05fdaf0c964e0b50837a4de5cdee79c09aceeb6f Mon Sep 17 00:00:00 2001 From: LouisLam Date: Mon, 19 Jul 2021 00:43:25 +0800 Subject: [PATCH 05/20] update package-lock.json --- package-lock.json | 199 +++++++++++++++++++++++++++++++--------------- 1 file changed, 134 insertions(+), 65 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5b4f4d4aa..92c91a935 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,37 +40,43 @@ "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==" }, "@types/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg==" + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==" }, "@types/cors": { - "version": "2.8.10", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.10.tgz", - "integrity": "sha512-C7srjHiVG3Ey1nR6d511dtDkCEjxuN9W1HWAEjGq8kpcwmNM6JJkpC0xvabM7BXTG2wDq8Eu33iH9aQKa7IvLQ==" + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" + }, + "@types/estree": { + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", + "dev": true }, "@types/node": { - "version": "15.12.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.4.tgz", - "integrity": "sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA==" + "version": "16.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.3.3.tgz", + "integrity": "sha512-8h7k1YgQKxKXWckzFCMfsIwn0Y61UK6tlD6y2lOb3hTOIMlK3t9/QwHOhc81TwU+RMf0As5fj7NPjroERCnejQ==" }, "@vitejs/plugin-legacy": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.4.3.tgz", - "integrity": "sha512-lxZUJaMWYMQuqvZM1wPzDP6KABQgA/drVL5fnaygEPcz9adc2OHhfFNN/SvvHQ1V0rP8gybIc7uA+iI1gAdkVQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.4.4.tgz", + "integrity": "sha512-pVYeQUDPG5InWwrTu7acy187WWjGonJnL/GMqMLmeKCFiwkZ6UcsoUjojiKmCUI0nAJTrrKH5lhjTqkccY9Iow==", "dev": true, "requires": { "@babel/standalone": "^7.14.7", - "core-js": "^3.15.1", + "core-js": "^3.15.2", "magic-string": "^0.25.7", "regenerator-runtime": "^0.13.7", - "systemjs": "^6.10.1" + "systemjs": "^6.10.2" } }, "@vitejs/plugin-vue": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.2.3.tgz", - "integrity": "sha512-LlnLpObkGKZ+b7dcpL4T24l13nPSHLjo+6Oc7MbZiKz5PMAUzADfNJ3EKfYIQ0l0969nxf2jp/9vsfnuJ7h6fw==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.2.5.tgz", + "integrity": "sha512-GIR31mdXTEfvElmBUaRhDc5v7lfdkEdawWQqJRiaRL/5qKsH+xusukglkvJz5y7+c6dEpxgmvcATv2BbB7+fzQ==", "dev": true }, "@vue/compiler-core": { @@ -95,17 +101,18 @@ } }, "@vue/compiler-sfc": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.1.1.tgz", - "integrity": "sha512-lSgMsZaYHF+bAgryq5aUqpvyfhu52GJI2/4LoiJCE5uaxc6FCZfxfgqgw/d9ltiZghv+HiISFtmQVAVvlsk+/w==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.1.5.tgz", + "integrity": "sha512-mtMY6xMvZeSRx9MTa1+NgJWndrkzVTdJ1pQAmAKQuxyb5LsHVvrgP7kcQFvxPHVpLVTORbTJWHaiqoKrJvi1iA==", "dev": true, "requires": { "@babel/parser": "^7.13.9", "@babel/types": "^7.13.0", - "@vue/compiler-core": "3.1.1", - "@vue/compiler-dom": "3.1.1", - "@vue/compiler-ssr": "3.1.1", - "@vue/shared": "3.1.1", + "@types/estree": "^0.0.48", + "@vue/compiler-core": "3.1.5", + "@vue/compiler-dom": "3.1.5", + "@vue/compiler-ssr": "3.1.5", + "@vue/shared": "3.1.5", "consolidate": "^0.16.0", "estree-walker": "^2.0.1", "hash-sum": "^2.0.0", @@ -116,16 +123,78 @@ "postcss-modules": "^4.0.0", "postcss-selector-parser": "^6.0.4", "source-map": "^0.6.1" + }, + "dependencies": { + "@vue/compiler-core": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.5.tgz", + "integrity": "sha512-TXBhFinoBaXKDykJzY26UEuQU1K07FOp/0Ie+OXySqqk0bS0ZO7Xvl7UmiTUPYcLrWbxWBR7Bs/y55AI0MNc2Q==", + "dev": true, + "requires": { + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.1.5", + "estree-walker": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-dom": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.1.5.tgz", + "integrity": "sha512-ZsL3jqJ52OjGU/YiT/9XiuZAmWClKInZM2aFJh9gnsAPqOrj2JIELMbkIFpVKR/CrVO/f2VxfPiiQdQTr65jcQ==", + "dev": true, + "requires": { + "@vue/compiler-core": "3.1.5", + "@vue/shared": "3.1.5" + } + }, + "@vue/shared": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", + "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==", + "dev": true + } } }, "@vue/compiler-ssr": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.1.1.tgz", - "integrity": "sha512-7H6krZtVt3h/YzfNp7eYK41hMDz8ZskiBy+Wby+EDRINX6BD9JQ5C8zyy2xAa7T6Iz2VrQzsaJ/Bb52lTPSS5A==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.1.5.tgz", + "integrity": "sha512-CU5N7Di/a4lyJ18LGJxJYZS2a8PlLdWpWHX9p/XcsjT2TngMpj3QvHVRkuik2u8QrIDZ8OpYmTyj1WDNsOV+Dg==", "dev": true, "requires": { - "@vue/compiler-dom": "3.1.1", - "@vue/shared": "3.1.1" + "@vue/compiler-dom": "3.1.5", + "@vue/shared": "3.1.5" + }, + "dependencies": { + "@vue/compiler-core": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.5.tgz", + "integrity": "sha512-TXBhFinoBaXKDykJzY26UEuQU1K07FOp/0Ie+OXySqqk0bS0ZO7Xvl7UmiTUPYcLrWbxWBR7Bs/y55AI0MNc2Q==", + "dev": true, + "requires": { + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.1.5", + "estree-walker": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-dom": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.1.5.tgz", + "integrity": "sha512-ZsL3jqJ52OjGU/YiT/9XiuZAmWClKInZM2aFJh9gnsAPqOrj2JIELMbkIFpVKR/CrVO/f2VxfPiiQdQTr65jcQ==", + "dev": true, + "requires": { + "@vue/compiler-core": "3.1.5", + "@vue/shared": "3.1.5" + } + }, + "@vue/shared": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", + "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==", + "dev": true + } } }, "@vue/devtools-api": { @@ -531,9 +600,9 @@ } }, "bootstrap": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.1.tgz", - "integrity": "sha512-Fl79+wsLOZKoiU345KeEaWD0ik8WKRI5zm0YSPj2oF1Qr+BO7z0fco6GbUtqjoG1h4VI89PeKJnMsMMVQdKKTw==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.2.tgz", + "integrity": "sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==" }, "brace-expansion": { "version": "1.1.11", @@ -758,9 +827,9 @@ } }, "dayjs": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.5.tgz", - "integrity": "sha512-BUFis41ikLz+65iH6LHQCDm4YPMj5r1YFLdupPIyM4SGcXMmtiLQ7U37i+hGS8urIuqe7I/ou3IS1jVc4nbN4g==" + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.6.tgz", + "integrity": "sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw==" }, "debug": { "version": "4.3.1", @@ -903,9 +972,9 @@ } }, "engine.io-client": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-5.1.1.tgz", - "integrity": "sha512-jPFpw2HLL0lhZ2KY0BpZhIJdleQcUO9W1xkIpo0h3d6s+5D6+EV/xgQw9qWOmymszv2WXef/6KUUehyxEKomlQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-5.1.2.tgz", + "integrity": "sha512-blRrgXIE0A/eurWXRzvfCLG7uUFJqfTGFsyJzXSK71srMMGJ2VraBLg8Mdw28uUxSpVicepBN9X7asqpD1mZcQ==", "requires": { "base64-arraybuffer": "0.1.4", "component-emitter": "~1.3.0", @@ -927,9 +996,9 @@ } }, "esbuild": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.9.tgz", - "integrity": "sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw==", + "version": "0.12.15", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.15.tgz", + "integrity": "sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==", "dev": true }, "escape-html": { @@ -2425,9 +2494,9 @@ } }, "nodemailer": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.6.2.tgz", - "integrity": "sha512-YSzu7TLbI+bsjCis/TZlAXBoM4y93HhlIgo0P5oiA2ua9Z4k+E2Fod//ybIzdJxOlXGRcHIh/WaeCBehvxZb/Q==" + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.6.3.tgz", + "integrity": "sha512-faZFufgTMrphYoDjvyVpbpJcYzwyFnbAMmQtj1lVBYAUSm3SOy2fIdd9+Mr4UxPosBa0JRw9bJoIwQn+nswiew==" }, "nopt": { "version": "3.0.6", @@ -2980,9 +3049,9 @@ } }, "rollup": { - "version": "2.52.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.2.tgz", - "integrity": "sha512-4RlFC3k2BIHlUsJ9mGd8OO+9Lm2eDF5P7+6DNQOp5sx+7N/1tFM01kELfbxlMX3MxT6owvLB1ln4S3QvvQlbUA==", + "version": "2.53.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.53.2.tgz", + "integrity": "sha512-1CtEYuS5CRCzFZ7SNW5528SlDlk4VDXIRGwbm/2POQxA/G4+7/crIqJwkmnj8Q/74hGx4oVlNvh4E1CJQ5hZ6w==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -3007,9 +3076,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.35.1.tgz", - "integrity": "sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==", + "version": "1.35.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.35.2.tgz", + "integrity": "sha512-jhO5KAR+AMxCEwIH3v+4zbB2WB0z67V1X0jbapfVwQQdjHZUGUyukpnoM6+iCMfsIUC016w9OPKQ5jrNOS9uXw==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0" @@ -3230,19 +3299,19 @@ } }, "socket.io": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.1.2.tgz", - "integrity": "sha512-xK0SD1C7hFrh9+bYoYCdVt+ncixkSLKtNLCax5aEy1o3r5PaO5yQhVb97exIe67cE7lAK+EpyMytXWTWmyZY8w==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.1.3.tgz", + "integrity": "sha512-tLkaY13RcO4nIRh1K2hT5iuotfTaIQw7cVIe0FUykN3SuQi0cm7ALxuyT5/CtDswOMWUzMGTibxYNx/gU7In+Q==", "requires": { "@types/cookie": "^0.4.0", - "@types/cors": "^2.8.8", + "@types/cors": "^2.8.10", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.1", - "engine.io": "~5.1.0", - "socket.io-adapter": "~2.3.0", - "socket.io-parser": "~4.0.3" + "engine.io": "~5.1.1", + "socket.io-adapter": "~2.3.1", + "socket.io-parser": "~4.0.4" } }, "socket.io-adapter": { @@ -3251,15 +3320,15 @@ "integrity": "sha512-8cVkRxI8Nt2wadkY6u60Y4rpW3ejA1rxgcK2JuyIhmF+RMNpTy1QRtkHIDUOf3B4HlQwakMsWbKftMv/71VMmw==" }, "socket.io-client": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.1.2.tgz", - "integrity": "sha512-RDpWJP4DQT1XeexmeDyDkm0vrFc0+bUsHDKiVGaNISJvJonhQQOMqV9Vwfg0ZpPJ27LCdan7iqTI92FRSOkFWQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.1.3.tgz", + "integrity": "sha512-hISFn6PDpgDifVUiNklLHVPTMv1LAk8poHArfIUdXa+gKgbr0MZbAlquDFqCqsF30yBqa+jg42wgos2FK50BHA==", "requires": { "@types/component-emitter": "^1.2.10", "backo2": "~1.0.2", "component-emitter": "~1.3.0", "debug": "~4.3.1", - "engine.io-client": "~5.1.1", + "engine.io-client": "~5.1.2", "parseuri": "0.0.6", "socket.io-parser": "~4.0.4" } @@ -3654,14 +3723,14 @@ } }, "vite": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.3.8.tgz", - "integrity": "sha512-QiEx+iqNnJntSgSF2fWRQvRey9pORIrtNJzNyBJXwc+BdzWs83FQolX84cTBo393cfhObrtWa6180dAa4NLDiQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.4.2.tgz", + "integrity": "sha512-2MifxD2I9fjyDmmEzbULOo3kOUoqX90A58cT6mECxoVQlMYFuijZsPQBuA14mqSwvV3ydUsqnq+BRWXyO9Qa+w==", "dev": true, "requires": { "esbuild": "^0.12.8", "fsevents": "~2.3.2", - "postcss": "^8.3.4", + "postcss": "^8.3.5", "resolve": "^1.20.0", "rollup": "^2.38.5" } From 851ceef3d54c35cf2cf8e56e25a2803ff36192cb Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Sun, 18 Jul 2021 20:21:17 +0200 Subject: [PATCH 06/20] Use `NODE_ENV` from Express and Socket.IO --- src/mixins/socket.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mixins/socket.js b/src/mixins/socket.js index f0a3b1a6a..be79e67b1 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -35,7 +35,8 @@ export default { window.addEventListener('resize', this.onResize); let wsHost; - if (localStorage.dev === "dev") { + const env = process.env.NODE_ENV || 'development'; + if (env === "development") { wsHost = ":3001" } else { wsHost = "" @@ -45,6 +46,10 @@ export default { transports: ['websocket'] }); + if (!socket.connected) { + console.error("Failed to connect to the backend") + } + socket.on('info', (info) => { this.info = info; }); From 59ebe134f177bfd0ab10bf0a1707125f6584ece7 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Sun, 18 Jul 2021 20:46:45 +0200 Subject: [PATCH 07/20] Fix indentation --- src/mixins/socket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixins/socket.js b/src/mixins/socket.js index be79e67b1..441089924 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -163,7 +163,7 @@ export default { }, getSocket() { - return socket; + return socket; }, toastRes(res) { From 5bd3184ebf7c7732d46722acc8f5e8d362e07524 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Sun, 18 Jul 2021 20:59:00 +0200 Subject: [PATCH 08/20] Use connect_error event --- src/mixins/socket.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mixins/socket.js b/src/mixins/socket.js index 441089924..cf7cb1218 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -46,9 +46,9 @@ export default { transports: ['websocket'] }); - if (!socket.connected) { - console.error("Failed to connect to the backend") - } + socket.on("connect_error", (err) => { + console.error(`Failed to connect to the backend. Socket.io connect_error: ${err.message}`); + }); socket.on('info', (info) => { this.info = info; From cbb9d3f91b444463747249a7064267bd98a01575 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 19 Jul 2021 20:18:27 +0800 Subject: [PATCH 09/20] set version for docker --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6aed01bcd..c544f3bb9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It is a self-hosted monitoring tool like "Uptime Robot". docker volume create uptime-kuma # Start the container -docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma +docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1 ``` Browse to http://localhost:3001 after started. @@ -35,7 +35,7 @@ Browse to http://localhost:3001 after started. Change Port and Volume ```bash -docker run -d --restart=always -p :3001 -v :/app/data --name uptime-kuma louislam/uptime-kuma +docker run -d --restart=always -p :3001 -v :/app/data --name uptime-kuma louislam/uptime-kuma:1 ``` ### Without Docker From 77af41bfffac0ecf4de470d1521fd8de08bf1e33 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Mon, 19 Jul 2021 23:06:42 +0800 Subject: [PATCH 10/20] env default to production --- src/mixins/socket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mixins/socket.js b/src/mixins/socket.js index cf7cb1218..6ad627244 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -35,8 +35,8 @@ export default { window.addEventListener('resize', this.onResize); let wsHost; - const env = process.env.NODE_ENV || 'development'; - if (env === "development") { + const env = process.env.NODE_ENV || "production"; + if (env === "development" || localStorage.dev === "dev") { wsHost = ":3001" } else { wsHost = "" From 71dd68bb6df1e14b512c8d11611d09dd15ec3ba5 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 20 Jul 2021 13:04:21 +0800 Subject: [PATCH 11/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c544f3bb9..24c507992 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ If you love this project, please consider giving me a ⭐. # Contribute -If you want to report a bug or request a new featue. Free feel to open a new issue. +If you want to report a bug or request a new feature. Free feel to open a new issue. If you want to modify Uptime Kuma, this guideline maybe useful for you: https://github.com/louislam/uptime-kuma/wiki/%5BDev%5D-Setup-Development-Environment From 657acf748bd6af1a3e6bfcb306500b216c953f7c Mon Sep 17 00:00:00 2001 From: LouisLam Date: Tue, 20 Jul 2021 20:04:54 +0800 Subject: [PATCH 12/20] update to 1.0.6 --- README.md | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 24c507992..7d3159d86 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ PS: For every new release, it takes some time to build the docker image, please ```bash git fetch --all -git checkout 1.0.5 --force +git checkout 1.0.6 --force npm install npm run build pm2 restart uptime-kuma diff --git a/package.json b/package.json index cd416f77d..02095fd8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.0.5", + "version": "1.0.6", "license": "MIT", "repository": { "type": "git", @@ -12,10 +12,10 @@ "update": "", "build": "vite build", "vite-preview-dist": "vite preview --host", - "build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.0.5 --target release . --push", + "build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.0.6 --target release . --push", "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", "build-docker-nightly-amd64": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push", - "setup": "git checkout 1.0.5 && npm install && npm run build", + "setup": "git checkout 1.0.6 && npm install && npm run build", "version-global-replace": "node extra/version-global-replace.js", "mark-as-nightly": "node extra/mark-as-nightly.js" }, From 02b4dfc100d3b828fc7c1aba6b0f18c1d0892653 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Tue, 20 Jul 2021 20:18:56 +0800 Subject: [PATCH 13/20] prevent the telegram getUpdates URL go out of box --- src/components/NotificationDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 6477ef766..fa99a19f2 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -55,7 +55,7 @@