diff --git a/.eslintcache b/.eslintcache index 81e97ee..b5d4ded 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/root/code/my/utools/nat-utools/src/index.tsx":"1","/root/code/my/utools/nat-utools/src/react/reportWebVitals.ts":"2","/root/code/my/utools/nat-utools/src/pages/manager/index.tsx":"3","/root/code/my/utools/nat-utools/src/model/nat.ts":"4","/root/code/my/utools/nat-utools/src/store/server.ts":"5","/root/code/my/utools/nat-utools/src/components/icon/index.tsx":"6","/root/code/my/utools/nat-utools/src/components/nat-edit/index.tsx":"7","/root/code/my/utools/nat-utools/src/components/alert/index.tsx":"8","/root/code/my/utools/nat-utools/src/components/nat-log/index.tsx":"9","/root/code/my/utools/nat-utools/src/components/help/index.tsx":"10"},{"size":697,"mtime":1627279865447,"results":"11","hashOfConfig":"12"},{"size":425,"mtime":1627263151942,"results":"13","hashOfConfig":"12"},{"size":3269,"mtime":1627279795438,"results":"14","hashOfConfig":"12"},{"size":510,"mtime":1627267804565,"results":"15","hashOfConfig":"12"},{"size":4235,"mtime":1627279817838,"results":"16","hashOfConfig":"12"},{"size":406,"mtime":1627263151934,"results":"17","hashOfConfig":"12"},{"size":1626,"mtime":1627269048414,"results":"18","hashOfConfig":"12"},{"size":842,"mtime":1627268262179,"results":"19","hashOfConfig":"12"},{"size":1109,"mtime":1627270225081,"results":"20","hashOfConfig":"12"},{"size":783,"mtime":1627278401400,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"35h0pq",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/root/code/my/utools/nat-utools/src/index.tsx",[],"/root/code/my/utools/nat-utools/src/react/reportWebVitals.ts",[],["43","44"],"/root/code/my/utools/nat-utools/src/pages/manager/index.tsx",[],"/root/code/my/utools/nat-utools/src/model/nat.ts",[],"/root/code/my/utools/nat-utools/src/store/server.ts",["45"],"/root/code/my/utools/nat-utools/src/components/icon/index.tsx",[],"/root/code/my/utools/nat-utools/src/components/nat-edit/index.tsx",[],"/root/code/my/utools/nat-utools/src/components/alert/index.tsx",[],"/root/code/my/utools/nat-utools/src/components/nat-log/index.tsx",[],"/root/code/my/utools/nat-utools/src/components/help/index.tsx",[],{"ruleId":"46","replacedBy":"47"},{"ruleId":"48","replacedBy":"49"},{"ruleId":"50","severity":1,"message":"51","line":2,"column":30,"nodeType":"52","messageId":"53","endLine":2,"endColumn":34},"no-native-reassign",["54"],"no-negated-in-lhs",["55"],"@typescript-eslint/no-unused-vars","'toJS' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/mnt/e/code/pro/utools/nat-utools/src/index.tsx":"1","/mnt/e/code/pro/utools/nat-utools/src/react/reportWebVitals.ts":"2","/mnt/e/code/pro/utools/nat-utools/src/pages/manager/index.tsx":"3","/mnt/e/code/pro/utools/nat-utools/src/model/nat.ts":"4","/mnt/e/code/pro/utools/nat-utools/src/store/server.ts":"5","/mnt/e/code/pro/utools/nat-utools/src/components/icon/index.tsx":"6","/mnt/e/code/pro/utools/nat-utools/src/components/alert/index.tsx":"7","/mnt/e/code/pro/utools/nat-utools/src/components/help/index.tsx":"8","/mnt/e/code/pro/utools/nat-utools/src/components/nat-edit/index.tsx":"9","/mnt/e/code/pro/utools/nat-utools/src/components/nat-log/index.tsx":"10"},{"size":697,"mtime":1627282191594,"results":"11","hashOfConfig":"12"},{"size":425,"mtime":1627282191598,"results":"13","hashOfConfig":"12"},{"size":3512,"mtime":1628044105015,"results":"14","hashOfConfig":"12"},{"size":510,"mtime":1627282191595,"results":"15","hashOfConfig":"12"},{"size":4400,"mtime":1628044184011,"results":"16","hashOfConfig":"12"},{"size":406,"mtime":1627282191591,"results":"17","hashOfConfig":"12"},{"size":842,"mtime":1627282191589,"results":"18","hashOfConfig":"12"},{"size":1442,"mtime":1628043988331,"results":"19","hashOfConfig":"12"},{"size":1626,"mtime":1627282191593,"results":"20","hashOfConfig":"12"},{"size":1109,"mtime":1627282191594,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"olkzyp",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/mnt/e/code/pro/utools/nat-utools/src/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/react/reportWebVitals.ts",[],"/mnt/e/code/pro/utools/nat-utools/src/pages/manager/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/model/nat.ts",[],"/mnt/e/code/pro/utools/nat-utools/src/store/server.ts",[],"/mnt/e/code/pro/utools/nat-utools/src/components/icon/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/components/alert/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/components/help/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/components/nat-edit/index.tsx",[],"/mnt/e/code/pro/utools/nat-utools/src/components/nat-log/index.tsx",[]] \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4982d4d..afcfe35 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,9 @@ /dist /node_modules /build -/build-preload /.cache +/utools/build +/utools/index.js # Logs logs diff --git a/package.json b/package.json index 733ef89..40ad297 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,8 @@ "serve": "craco build && cra-build-watch", "serve:preload": "cd ./preload && npm run serve", "build": "npm run build:html && npm run build:preload", - "build:html": "craco build", + "build:html": "rm -rf ./utools/build && craco build && cp -r ./build ./utools", "build:preload": "cd ./preload && npm run build", - "build:demo": "env-cmd -f .env.staging craco build", - "test": "craco test", "commit": "git-cz" }, "dependencies": { diff --git a/preload/package.json b/preload/package.json index 47c7c3f..9d8dbc2 100644 --- a/preload/package.json +++ b/preload/package.json @@ -5,8 +5,8 @@ "homepage": ".", "main": "./dist/index.js", "scripts": { - "serve": "parcel src/index.ts --out-dir ../build-preload --target node --bundle-node-modules", - "build": "rm -rf ../build-preload && parcel build src/index.ts --out-dir ../build-preload --target node --bundle-node-modules --no-source-maps" + "serve": "parcel src/index.ts --out-dir ../utools/ --target node --bundle-node-modules", + "build": "rm -rf ../utools/index.js && parcel build src/index.ts --out-dir ../utools --target node --bundle-node-modules --no-source-maps" }, "dependencies": { "localtunnel": "^2.0.1", diff --git a/src/components/help/index.module.scss b/src/components/help/index.module.scss index d92bfe1..595eff8 100644 --- a/src/components/help/index.module.scss +++ b/src/components/help/index.module.scss @@ -27,6 +27,9 @@ color: #666; padding: 16px 0; line-height: 1.7; + max-height: 50vh; + overflow-y: auto; + overflow-x: hidden; } .btn { diff --git a/src/components/help/index.tsx b/src/components/help/index.tsx index ebf7caf..0503895 100644 --- a/src/components/help/index.tsx +++ b/src/components/help/index.tsx @@ -11,8 +11,28 @@ const Help: FC = () => {
+ 该 utools 扩展是基于 localtunnel 的封装,目前已在 GitHub 开源: + utools.shellOpenExternal('https://github.com/lblblong/nat-utools')} + > + https://github.com/lblblong/nat-utools + +
++ 点击右下角 + + 号按钮,输入你本地服务监听的端口号,如果需要自定义子域名则输入自定义的子域名,然后点击确定,即可获得可被外网访问的地址 +
++