Chore: adjust connection table width

This commit is contained in:
Dreamacro 2022-04-01 11:37:18 +08:00
parent 2866bafc6a
commit 22c91fd7ad
3 changed files with 51 additions and 51 deletions

View File

@ -35,7 +35,7 @@
"@types/react-window": "^1.8.5", "@types/react-window": "^1.8.5",
"@typescript-eslint/eslint-plugin": "^5.17.0", "@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0", "@typescript-eslint/parser": "^5.17.0",
"@vitejs/plugin-react": "^1.2.0", "@vitejs/plugin-react": "^1.3.0",
"eslint": "^8.12.0", "eslint": "^8.12.0",
"eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.1.4", "eslint-config-airbnb-typescript": "^16.1.4",
@ -45,17 +45,17 @@
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0", "eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react-hooks": "^4.4.0", "eslint-plugin-react-hooks": "^4.4.0",
"sass": "^1.49.9", "sass": "^1.49.10",
"type-fest": "^2.12.1", "type-fest": "^2.12.2",
"typescript": "^4.6.3", "typescript": "^4.6.3",
"vite": "^2.9.0", "vite": "^2.9.1",
"vite-plugin-pwa": "^0.11.13", "vite-plugin-pwa": "^0.11.13",
"vite-plugin-windicss": "^1.8.3", "vite-plugin-windicss": "^1.8.3",
"vite-tsconfig-paths": "^3.4.1", "vite-tsconfig-paths": "^3.4.1",
"windicss": "^3.5.1" "windicss": "^3.5.1"
}, },
"dependencies": { "dependencies": {
"@react-hookz/web": "^13.1.0", "@react-hookz/web": "^13.2.0",
"@tanstack/react-table": "^8.0.0-alpha.11", "@tanstack/react-table": "^8.0.0-alpha.11",
"axios": "^0.26.1", "axios": "^0.26.1",
"classnames": "^2.3.1", "classnames": "^2.3.1",
@ -67,7 +67,7 @@
"neverthrow": "^4.3.1", "neverthrow": "^4.3.1",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-router-dom": "^6.2.2", "react-router-dom": "^6.3.0",
"react-virtualized-auto-sizer": "^1.0.6", "react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.6", "react-window": "^1.8.6",
"swr": "^1.2.2", "swr": "^1.2.2",

86
pnpm-lock.yaml generated
View File

@ -1,7 +1,7 @@
lockfileVersion: 5.3 lockfileVersion: 5.3
specifiers: specifiers:
'@react-hookz/web': ^13.1.0 '@react-hookz/web': ^13.2.0
'@tanstack/react-table': ^8.0.0-alpha.11 '@tanstack/react-table': ^8.0.0-alpha.11
'@types/lodash-es': ^4.17.6 '@types/lodash-es': ^4.17.6
'@types/node': ^17.0.23 '@types/node': ^17.0.23
@ -13,7 +13,7 @@ specifiers:
'@types/react-window': ^1.8.5 '@types/react-window': ^1.8.5
'@typescript-eslint/eslint-plugin': ^5.17.0 '@typescript-eslint/eslint-plugin': ^5.17.0
'@typescript-eslint/parser': ^5.17.0 '@typescript-eslint/parser': ^5.17.0
'@vitejs/plugin-react': ^1.2.0 '@vitejs/plugin-react': ^1.3.0
axios: ^0.26.1 axios: ^0.26.1
classnames: ^2.3.1 classnames: ^2.3.1
dayjs: ^1.11.0 dayjs: ^1.11.0
@ -33,22 +33,22 @@ specifiers:
neverthrow: ^4.3.1 neverthrow: ^4.3.1
react: ^18.0.0 react: ^18.0.0
react-dom: ^18.0.0 react-dom: ^18.0.0
react-router-dom: ^6.2.2 react-router-dom: ^6.3.0
react-virtualized-auto-sizer: ^1.0.6 react-virtualized-auto-sizer: ^1.0.6
react-window: ^1.8.6 react-window: ^1.8.6
sass: ^1.49.9 sass: ^1.49.10
swr: ^1.2.2 swr: ^1.2.2
type-fest: ^2.12.1 type-fest: ^2.12.2
typescript: ^4.6.3 typescript: ^4.6.3
use-immer: ^0.6.0 use-immer: ^0.6.0
vite: ^2.9.0 vite: ^2.9.1
vite-plugin-pwa: ^0.11.13 vite-plugin-pwa: ^0.11.13
vite-plugin-windicss: ^1.8.3 vite-plugin-windicss: ^1.8.3
vite-tsconfig-paths: ^3.4.1 vite-tsconfig-paths: ^3.4.1
windicss: ^3.5.1 windicss: ^3.5.1
dependencies: dependencies:
'@react-hookz/web': 13.1.0_react-dom@18.0.0+react@18.0.0 '@react-hookz/web': 13.2.0_react-dom@18.0.0+react@18.0.0
'@tanstack/react-table': 8.0.0-alpha.11_react-dom@18.0.0+react@18.0.0 '@tanstack/react-table': 8.0.0-alpha.11_react-dom@18.0.0+react@18.0.0
axios: 0.26.1 axios: 0.26.1
classnames: 2.3.1 classnames: 2.3.1
@ -60,7 +60,7 @@ dependencies:
neverthrow: 4.3.1 neverthrow: 4.3.1
react: 18.0.0 react: 18.0.0
react-dom: 18.0.0_react@18.0.0 react-dom: 18.0.0_react@18.0.0
react-router-dom: 6.2.2_react-dom@18.0.0+react@18.0.0 react-router-dom: 6.3.0_react-dom@18.0.0+react@18.0.0
react-virtualized-auto-sizer: 1.0.6_react-dom@18.0.0+react@18.0.0 react-virtualized-auto-sizer: 1.0.6_react-dom@18.0.0+react@18.0.0
react-window: 1.8.6_react-dom@18.0.0+react@18.0.0 react-window: 1.8.6_react-dom@18.0.0+react@18.0.0
swr: 1.2.2_react@18.0.0 swr: 1.2.2_react@18.0.0
@ -77,7 +77,7 @@ devDependencies:
'@types/react-window': 1.8.5 '@types/react-window': 1.8.5
'@typescript-eslint/eslint-plugin': 5.17.0_689ff565753ecf7c3328c07fad067df5 '@typescript-eslint/eslint-plugin': 5.17.0_689ff565753ecf7c3328c07fad067df5
'@typescript-eslint/parser': 5.17.0_eslint@8.12.0+typescript@4.6.3 '@typescript-eslint/parser': 5.17.0_eslint@8.12.0+typescript@4.6.3
'@vitejs/plugin-react': 1.2.0 '@vitejs/plugin-react': 1.3.0
eslint: 8.12.0 eslint: 8.12.0
eslint-config-airbnb: 19.0.4_3feb31751c277f688db057d8eb6c50f7 eslint-config-airbnb: 19.0.4_3feb31751c277f688db057d8eb6c50f7
eslint-config-airbnb-typescript: 16.1.4_1a3f98bf42a335fa5aa49fc0ce2fcb90 eslint-config-airbnb-typescript: 16.1.4_1a3f98bf42a335fa5aa49fc0ce2fcb90
@ -87,13 +87,13 @@ devDependencies:
eslint-plugin-node: 11.1.0_eslint@8.12.0 eslint-plugin-node: 11.1.0_eslint@8.12.0
eslint-plugin-promise: 6.0.0_eslint@8.12.0 eslint-plugin-promise: 6.0.0_eslint@8.12.0
eslint-plugin-react-hooks: 4.4.0_eslint@8.12.0 eslint-plugin-react-hooks: 4.4.0_eslint@8.12.0
sass: 1.49.9 sass: 1.49.10
type-fest: 2.12.1 type-fest: 2.12.2
typescript: 4.6.3 typescript: 4.6.3
vite: 2.9.0_sass@1.49.9 vite: 2.9.1_sass@1.49.10
vite-plugin-pwa: 0.11.13_vite@2.9.0 vite-plugin-pwa: 0.11.13_vite@2.9.1
vite-plugin-windicss: 1.8.3_vite@2.9.0 vite-plugin-windicss: 1.8.3_vite@2.9.1
vite-tsconfig-paths: 3.4.1_vite@2.9.0 vite-tsconfig-paths: 3.4.1_vite@2.9.1
windicss: 3.5.1 windicss: 3.5.1
packages: packages:
@ -1376,8 +1376,8 @@ packages:
resolution: {integrity: sha512-6k/pU2jNlgYvKOy84vpCAZ8MGVwybvAdjzrh4UicCVOCPxz0LSBws1OE6O5TO4sPHaSw+yLfNzNK8RicGFc1Kw==} resolution: {integrity: sha512-6k/pU2jNlgYvKOy84vpCAZ8MGVwybvAdjzrh4UicCVOCPxz0LSBws1OE6O5TO4sPHaSw+yLfNzNK8RicGFc1Kw==}
dev: false dev: false
/@react-hookz/web/13.1.0_react-dom@18.0.0+react@18.0.0: /@react-hookz/web/13.2.0_react-dom@18.0.0+react@18.0.0:
resolution: {integrity: sha512-U7/KB0OI6umgABmzAWqWyeQ3v+BPeYGkEbjEyH/4DBdJfCskVfv5y9GZ0aFlo8uFGzeNlGYE1acFzXliVdy/qQ==} resolution: {integrity: sha512-F5xJ6hukXxpIrs4moBGGpX++GBNv0/a/vTcNBcN5uNR7U8gb6KiqlPFM0IF62MENszNkxTcBy0QBXWGWViDrcQ==}
peerDependencies: peerDependencies:
js-cookie: ^3.0.1 js-cookie: ^3.0.1
react: ^16.8 || ^17 || ^18 react: ^16.8 || ^17 || ^18
@ -1768,8 +1768,8 @@ packages:
eslint-visitor-keys: 3.3.0 eslint-visitor-keys: 3.3.0
dev: true dev: true
/@vitejs/plugin-react/1.2.0: /@vitejs/plugin-react/1.3.0:
resolution: {integrity: sha512-Rywwt0IXXg6yQ0hv3cMT3mtdDcGIw31mGaa+MMMAT651LhoXLF2yFy4LrakiTs7UKs7RPBo9eNgaS8pgl2A6Qw==} resolution: {integrity: sha512-H+yIupjUE4a+E4oeWUv4xUJIMR0DWBIMUG/DYgvj0J9Vu1rdHAlJ5JdbI+N1KDUD7Ee2fZ1DMPZ/NBg6mXtoCw==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
dependencies: dependencies:
'@babel/core': 7.17.8 '@babel/core': 7.17.8
@ -1983,8 +1983,8 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001322 caniuse-lite: 1.0.30001323
electron-to-chromium: 1.4.101 electron-to-chromium: 1.4.103
escalade: 3.1.1 escalade: 3.1.1
node-releases: 2.0.2 node-releases: 2.0.2
picocolors: 1.0.0 picocolors: 1.0.0
@ -2011,8 +2011,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/caniuse-lite/1.0.30001322: /caniuse-lite/1.0.30001323:
resolution: {integrity: sha512-neRmrmIrCGuMnxGSoh+x7zYtQFFgnSY2jaomjU56sCkTA6JINqQrxutF459JpWcWRajvoyn95sOXq4Pqrnyjew==} resolution: {integrity: sha512-e4BF2RlCVELKx8+RmklSEIVub1TWrmdhvA5kEUueummz1XyySW0DVk+3x9HyhU9MuWTa2BhqLgEuEmUwASAdCA==}
dev: true dev: true
/chalk/2.4.2: /chalk/2.4.2:
@ -2193,8 +2193,8 @@ packages:
jake: 10.8.4 jake: 10.8.4
dev: true dev: true
/electron-to-chromium/1.4.101: /electron-to-chromium/1.4.103:
resolution: {integrity: sha512-XJH+XmJjACx1S7ASl/b//KePcda5ocPnFH2jErztXcIS8LpP0SE6rX8ZxiY5/RaDPnaF1rj0fPaHfppzb0e2Aw==} resolution: {integrity: sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==}
dev: true dev: true
/es-abstract/1.19.2: /es-abstract/1.19.2:
@ -3606,8 +3606,8 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/react-router-dom/6.2.2_react-dom@18.0.0+react@18.0.0: /react-router-dom/6.3.0_react-dom@18.0.0+react@18.0.0:
resolution: {integrity: sha512-AtYEsAST7bDD4dLSQHDnk/qxWLJdad5t1HFa1qJyUrCeGgEuCSw0VB/27ARbF9Fi/W5598ujvJOm3ujUCVzuYQ==} resolution: {integrity: sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==}
peerDependencies: peerDependencies:
react: '>=16.8' react: '>=16.8'
react-dom: '>=16.8' react-dom: '>=16.8'
@ -3615,11 +3615,11 @@ packages:
history: 5.3.0 history: 5.3.0
react: 18.0.0 react: 18.0.0
react-dom: 18.0.0_react@18.0.0 react-dom: 18.0.0_react@18.0.0
react-router: 6.2.2_react@18.0.0 react-router: 6.3.0_react@18.0.0
dev: false dev: false
/react-router/6.2.2_react@18.0.0: /react-router/6.3.0_react@18.0.0:
resolution: {integrity: sha512-/MbxyLzd7Q7amp4gDOGaYvXwhEojkJD5BtExkuKmj39VEE0m3l/zipf6h2WIB2jyAO0lI6NGETh4RDcktRm4AQ==} resolution: {integrity: sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==}
peerDependencies: peerDependencies:
react: '>=16.8' react: '>=16.8'
dependencies: dependencies:
@ -3795,8 +3795,8 @@ packages:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
dev: true dev: true
/sass/1.49.9: /sass/1.49.10:
resolution: {integrity: sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A==} resolution: {integrity: sha512-w37zfWJwKu4I78U4z63u1mmgoncq+v3iOB4yzQMPyAPVHHawaQSnu9C9ysGQnZEhW609jkcLioJcMCqm75JMdg==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
hasBin: true hasBin: true
dependencies: dependencies:
@ -4071,8 +4071,8 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
/type-fest/2.12.1: /type-fest/2.12.2:
resolution: {integrity: sha512-AiknQSEqKVGDDjtZqeKrUoTlcj7FKhupmnVUgz6KoOKtvMwRGE6hUNJ/nVear+h7fnUPO1q/htSkYKb1pyntkQ==} resolution: {integrity: sha512-qt6ylCGpLjZ7AaODxbpyBZSs9fCI9SkL3Z9q2oxMBQhs/uyY+VD8jHA8ULCGmWQJlBgqvO3EJeAngOHD8zQCrQ==}
engines: {node: '>=12.20'} engines: {node: '>=12.20'}
dev: true dev: true
@ -4151,7 +4151,7 @@ packages:
resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==}
dev: true dev: true
/vite-plugin-pwa/0.11.13_vite@2.9.0: /vite-plugin-pwa/0.11.13_vite@2.9.1:
resolution: {integrity: sha512-Ssj14m3TRVLfkFEAWSMcFE2d1cSdEZyrVTzfY2lSL+umHYvcIFHVDAY143sygtBCb44OPczsAOmWwBTxwOvh7g==} resolution: {integrity: sha512-Ssj14m3TRVLfkFEAWSMcFE2d1cSdEZyrVTzfY2lSL+umHYvcIFHVDAY143sygtBCb44OPczsAOmWwBTxwOvh7g==}
peerDependencies: peerDependencies:
vite: ^2.0.0 vite: ^2.0.0
@ -4160,7 +4160,7 @@ packages:
fast-glob: 3.2.11 fast-glob: 3.2.11
pretty-bytes: 5.6.0 pretty-bytes: 5.6.0
rollup: 2.70.1 rollup: 2.70.1
vite: 2.9.0_sass@1.49.9 vite: 2.9.1_sass@1.49.10
workbox-build: 6.5.2 workbox-build: 6.5.2
workbox-window: 6.5.2 workbox-window: 6.5.2
transitivePeerDependencies: transitivePeerDependencies:
@ -4168,7 +4168,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/vite-plugin-windicss/1.8.3_vite@2.9.0: /vite-plugin-windicss/1.8.3_vite@2.9.1:
resolution: {integrity: sha512-RIw2GD6H6cKNE8wZXVOBs4L1uTicVS0FaAkeqXvy1oyuXLC4SXmvnzEuoK0+qFuWJjW0ECNwE8eU+ZZhzNQKUg==} resolution: {integrity: sha512-RIw2GD6H6cKNE8wZXVOBs4L1uTicVS0FaAkeqXvy1oyuXLC4SXmvnzEuoK0+qFuWJjW0ECNwE8eU+ZZhzNQKUg==}
peerDependencies: peerDependencies:
vite: ^2.0.1 vite: ^2.0.1
@ -4176,13 +4176,13 @@ packages:
'@windicss/plugin-utils': 1.8.3 '@windicss/plugin-utils': 1.8.3
debug: 4.3.4 debug: 4.3.4
kolorist: 1.5.1 kolorist: 1.5.1
vite: 2.9.0_sass@1.49.9 vite: 2.9.1_sass@1.49.10
windicss: 3.5.1 windicss: 3.5.1
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/vite-tsconfig-paths/3.4.1_vite@2.9.0: /vite-tsconfig-paths/3.4.1_vite@2.9.1:
resolution: {integrity: sha512-SgK3/pnTuJ3i+gMSAWLR6VCPSw26bnxawrmXGvCDjJgk8MAQgmbCrFrAzfwbwZBXSqSuvWEuX04Wt73qJKx8fQ==} resolution: {integrity: sha512-SgK3/pnTuJ3i+gMSAWLR6VCPSw26bnxawrmXGvCDjJgk8MAQgmbCrFrAzfwbwZBXSqSuvWEuX04Wt73qJKx8fQ==}
peerDependencies: peerDependencies:
vite: '>2.0.0-0' vite: '>2.0.0-0'
@ -4191,13 +4191,13 @@ packages:
globrex: 0.1.2 globrex: 0.1.2
recrawl-sync: 2.2.2 recrawl-sync: 2.2.2
tsconfig-paths: 3.14.1 tsconfig-paths: 3.14.1
vite: 2.9.0_sass@1.49.9 vite: 2.9.1_sass@1.49.10
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/vite/2.9.0_sass@1.49.9: /vite/2.9.1_sass@1.49.10:
resolution: {integrity: sha512-5NAnNqzPmZzJvrswZGeTS2JHrBGIzIWJA2hBTTMYuoBVEMh0xwE0b5yyIXFxf7F07hrK4ugX2LJ7q6t7iIbd4Q==} resolution: {integrity: sha512-vSlsSdOYGcYEJfkQ/NeLXgnRv5zZfpAsdztkIrs7AZHV8RCMZQkwjo4DS5BnrYTqoWqLoUe1Cah4aVO4oNNqCQ==}
engines: {node: '>=12.2.0'} engines: {node: '>=12.2.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -4216,7 +4216,7 @@ packages:
postcss: 8.4.12 postcss: 8.4.12
resolve: 1.22.0 resolve: 1.22.0
rollup: 2.70.1 rollup: 2.70.1
sass: 1.49.9 sass: 1.49.10
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true

View File

@ -286,8 +286,8 @@ export default function Connections () {
</Header> </Header>
{ devices.length > 1 && <Devices devices={devices} selected={device} onChange={handleDeviceSelected} /> } { devices.length > 1 && <Devices devices={devices} selected={device} onChange={handleDeviceSelected} /> }
<Card ref={cardRef} className="connections-card relative"> <Card ref={cardRef} className="connections-card relative">
<div className="overflow-auto min-h-full"> <div className="overflow-auto min-h-full min-w-full">
<table {...instance.getTableProps()} className="flex-1"> <table {...instance.getTableProps()}>
<thead> <thead>
<tr {...headerGroup.getHeaderGroupProps()} className="connections-header"> <tr {...headerGroup.getHeaderGroupProps()} className="connections-header">
{ headers } { headers }