diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d0b42945 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,49 @@ +name: meshtastic-web build + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build-and-package: + runs-on: ubuntu-latest + + steps: + # Checks-out repository + - name: Checkout + uses: actions/checkout@v2 + + # Build project + - uses: actions/setup-node@v2 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --ignore-optional + - run: yarn lint + - run: yarn build + - run: yarn package + - run: tree build/output + + # Create a zip file from the output folder + - name: Create output zip file + uses: papeloto/action-zip@v1 + with: + files: build/output/ + dest: output.zip + + # Upload Artifact + - name: Upload a Build Artifact + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + files: | + output.zip diff --git a/src/components/nodes/Node.tsx b/src/components/nodes/Node.tsx new file mode 100644 index 00000000..4180e53f --- /dev/null +++ b/src/components/nodes/Node.tsx @@ -0,0 +1,31 @@ +import React from 'react'; + +import Avatar from 'boring-avatars'; + +import type { Protobuf } from '@meshtastic/meshtasticjs'; + +type DefaultDivProps = JSX.IntrinsicElements['div']; + +export interface NodeProps { + node: Protobuf.NodeInfo; +} + +export const Node = ({ + node, + ...props +}: NodeProps & DefaultDivProps): JSX.Element => { + return ( +
+ +
{node.user?.longName}
+
+ ); +}; diff --git a/src/components/templates/PrimaryTemplate.tsx b/src/components/templates/PrimaryTemplate.tsx index 482fc8e4..14994474 100644 --- a/src/components/templates/PrimaryTemplate.tsx +++ b/src/components/templates/PrimaryTemplate.tsx @@ -35,7 +35,6 @@ export const PrimaryTemplate = ({
{children}
- {footer && (
{button &&
{button}
} diff --git a/src/core/slices/meshtasticSlice.ts b/src/core/slices/meshtasticSlice.ts index 9285bb18..ea650fdf 100644 --- a/src/core/slices/meshtasticSlice.ts +++ b/src/core/slices/meshtasticSlice.ts @@ -57,7 +57,7 @@ export const meshtasticSlice = createSlice({ }, setMyNodeInfo: (state, action: PayloadAction) => { state.myNodeInfo = action.payload; - }, + }, setUser: (state, action: PayloadAction) => { state.user = action.payload; }, diff --git a/src/pages/settings/Radio.tsx b/src/pages/settings/Radio.tsx index 22571a8d..78354441 100644 --- a/src/pages/settings/Radio.tsx +++ b/src/pages/settings/Radio.tsx @@ -28,7 +28,6 @@ export const Radio = ({ navOpen, setNavOpen }: RadioProps): JSX.Element => { const onSubmit = handleSubmit((data) => { void connection.setPreferences(data); }); - return (