11 changed files with 130 additions and 120 deletions
@ -4,9 +4,9 @@ name: meshtastic-web build |
|||||
on: |
on: |
||||
# Triggers the workflow on push or pull request events but only for the master branch |
# Triggers the workflow on push or pull request events but only for the master branch |
||||
push: |
push: |
||||
branches: [ master ] |
branches: [master] |
||||
pull_request: |
pull_request: |
||||
branches: [ master ] |
branches: [master] |
||||
|
|
||||
# Allows you to run this workflow manually from the Actions tab |
# Allows you to run this workflow manually from the Actions tab |
||||
workflow_dispatch: |
workflow_dispatch: |
||||
@ -19,31 +19,31 @@ jobs: |
|||||
# Checks-out repository |
# Checks-out repository |
||||
- name: Checkout |
- name: Checkout |
||||
uses: actions/checkout@v2 |
uses: actions/checkout@v2 |
||||
|
- uses: pnpm/[email protected] |
||||
# Build project |
with: |
||||
|
version: 6.14.3 |
||||
- uses: actions/setup-node@v2 |
- uses: actions/setup-node@v2 |
||||
with: |
with: |
||||
node-version: '14' |
node-version: '16' |
||||
cache: 'yarn' |
cache: 'pnpm' |
||||
- run: yarn install --ignore-optional |
- run: pnpm lint |
||||
- run: yarn lint |
- run: pnpm build |
||||
- run: yarn build |
- run: pnpm package |
||||
- run: yarn package |
|
||||
- run: tree build/output |
- run: tree build/output |
||||
|
|
||||
# Create a zip file from the output folder |
# Create a zip file from the output folder |
||||
- name: Create output zip file |
- name: Create output zip file |
||||
uses: papeloto/action-zip@v1 |
uses: papeloto/action-zip@v1 |
||||
with: |
with: |
||||
files: build/output/ |
files: build/output/ |
||||
dest: output.zip |
dest: output.zip |
||||
|
|
||||
# Upload Artifact |
# Upload Artifact |
||||
- name: Upload a Build Artifact |
- name: Upload a Build Artifact |
||||
uses: "marvinpinto/action-automatic-releases@latest" |
uses: 'marvinpinto/action-automatic-releases@latest' |
||||
with: |
with: |
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}" |
repo_token: '${{ secrets.GITHUB_TOKEN }}' |
||||
automatic_release_tag: "latest" |
automatic_release_tag: 'latest' |
||||
prerelease: false |
prerelease: false |
||||
files: | |
files: | |
||||
output.zip |
output.zip |
||||
|
|||||
@ -1,28 +0,0 @@ |
|||||
import React from 'react'; |
|
||||
|
|
||||
import Avatar from 'boring-avatars'; |
|
||||
|
|
||||
import type { Protobuf } from '@meshtastic/meshtasticjs'; |
|
||||
|
|
||||
type DefaultDivProps = JSX.IntrinsicElements['div']; |
|
||||
|
|
||||
export interface NodeProps extends DefaultDivProps { |
|
||||
node: Protobuf.NodeInfo; |
|
||||
} |
|
||||
|
|
||||
export const Node = ({ node, ...props }: NodeProps): JSX.Element => { |
|
||||
return ( |
|
||||
<div |
|
||||
{...props} |
|
||||
className="flex items-center w-full p-2 mt-6 space-x-4 border rounded-md shadow-md dark:bg-primaryDark dark:border-gray-600 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-900" |
|
||||
> |
|
||||
<Avatar |
|
||||
size={30} |
|
||||
name={node.user?.longName ?? 'UNK'} |
|
||||
variant="beam" |
|
||||
colors={['#213435', '#46685B', '#648A64', '#A6B985', '#E1E3AC']} |
|
||||
/> |
|
||||
<div>{node.user?.longName}</div> |
|
||||
</div> |
|
||||
); |
|
||||
}; |
|
||||
@ -1,3 +1,9 @@ |
|||||
import { IHTTPConnection } from '@meshtastic/meshtasticjs'; |
import { |
||||
|
IBLEConnection, |
||||
|
IHTTPConnection, |
||||
|
ISerialConnection, |
||||
|
} from '@meshtastic/meshtasticjs'; |
||||
|
|
||||
export const connection = new IHTTPConnection(); |
export const connection = new IHTTPConnection(); |
||||
|
export const bleConnection = new IBLEConnection(); |
||||
|
export const serialConnection = new ISerialConnection(); |
||||
|
|||||
Loading…
Reference in new issue