Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: very experimental support for scanning on a remote host #793

Merged
merged 3 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ module.exports = {
{ allowArgumentsExplicitlyTypedAsAny: true },
],
"@typescript-eslint/no-this-alias": "off",

// Make sure type imports are used where necessary
"@typescript-eslint/consistent-type-imports": [
"error",
{
fixStyle: "inline-type-imports",
disallowTypeAnnotations: false,
},
],
"@typescript-eslint/consistent-type-exports": "error",
},
overrides: [
{
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '16.x'
node-version: '18.x'
type-checking: true
lint: true

Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, macos-latest] # TODO: Get Windows to work again 🤷🏻‍♂️

steps:
Expand All @@ -62,7 +62,7 @@ jobs:
steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: "16.x" # This should be LTS
node-version: "18.x" # This should be LTS
build: 'true'
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
x64/
x86/
bld/
[Bb]in/
# [Bb]in/
[Oo]bj/
[Ll]og/

Expand Down
15 changes: 12 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"name": "Debug TS adapter",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
"type": "node",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
// only exclude node_modules from the workspace folder
// If we exclude node_modules from .dev-server/..., we don't get sourcemaps
"!${workspaceFolder}/node_modules/**"
],
"sourceMapPathOverrides": {
"../src/*": "${workspaceFolder}/src/*"
}
},
{
"type": "node",
Expand All @@ -26,4 +35,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": [
Expand Down
4 changes: 2 additions & 2 deletions admin/build/index.js.map

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion admin/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Checkbox from "@material-ui/core/Checkbox";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Grid from "@material-ui/core/Grid";
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
import { createStyles, makeStyles, type Theme } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography";
import { SettingsApp } from "iobroker-react/app";
Expand Down Expand Up @@ -55,6 +55,27 @@ const SettingsPageContent: React.FC = React.memo(() => {
return (
<div className={classes.root}>
<Grid container spacing={8}>
<Grid item xs={4}>
<TextField
label={_("Use remote server:")}
fullWidth={true}
InputLabelProps={{
// Avoid overlapping the text if it was filled out
shrink: true,
}}
placeholder="address:port"
value={settings.server}
onChange={(event) =>
handleChange("server", event.target.value)
}
/>
<Typography variant="body2">
{_(
"when configured, the local bluetooth adapter is not used",
)}
</Typography>
</Grid>

<Grid item xs={4}>
<TextField
label={_("Select device:")}
Expand Down
Loading