Skip to content

Commit d97cbfd

Browse files
Merge pull request helium#28 from NebraLtd/marvinmarnold/nebra-maker
feat: Added Nebra fixtures
2 parents c44149e + 819c2cc commit d97cbfd

File tree

8 files changed

+115
-26
lines changed

8 files changed

+115
-26
lines changed

src/locales/en.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
login_with_helium: 'Already have a Helium Wallet?\nTap to get started.',
5353
subtitle:
5454
'Use this app to onboard your miner for the first time and start earning HNT. <b>WARNING: You must also have the official Helium App installed in order to continue.</b>',
55-
title: 'Welcome\nto The Nebra Helium App',
55+
title: 'Welcome\nto the Nebra Helium App',
5656
},
5757
linkAccount: {
5858
stepOne: '1. Download a supported Wallet App',
@@ -152,24 +152,27 @@ export default {
152152
education: {
153153
cards: [
154154
{
155-
subtitle: '[Placeholder]',
156-
title: '[Placeholder]',
155+
subtitle:
156+
'Hotspots love places where they can see plenty of sky and spaced at least 300 meters away from other hotspots.',
157+
title: 'Give me a nice view',
157158
},
158159
{
159-
subtitle: '[Placeholder]',
160-
title: '[Placeholder]',
160+
subtitle:
161+
"Hotspots shouldn't hide in a nightstand or bookcase. Put it next to a window instead.",
162+
title: "Don't hide me",
161163
},
162164
{
163-
subtitle: '[Placeholder]',
164-
title: '[Placeholder]',
165+
subtitle: "Nearby buildings may decrease your hotspot's coverage.",
166+
title: 'Buildings may block my signals',
165167
},
166168
{
167-
subtitle: '[Placeholder]',
168-
title: '[Placeholder]',
169+
subtitle:
170+
'Try to keep your hotspot away from metal meshes, which can block radio signals dramatically.',
171+
title: 'Hotspots hate bug screens!',
169172
},
170173
],
171174
// TODO
172-
title: '[Your Hotspot\nSetup Instructions]',
175+
title: 'How to place your hotspot',
173176
},
174177
enable_location: {
175178
cancel: "No thanks, I'll set it up later",
@@ -301,7 +304,7 @@ export default {
301304
assertLocation: 'Assert Location',
302305
transfer: 'Transfer Hotspot',
303306
},
304-
title: 'Add a\nNebra Miner',
307+
title: 'Add a\nNebra Hotspot',
305308
},
306309
},
307310
learn: {

src/makers/custom/antennas.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { MakerAntenna } from '../antennaMakerTypes'
22

33
const CUSTOM = {
4-
name: 'Custom Antenna',
5-
gain: 1,
4+
name: 'Nebra Stock Antenna',
5+
gain: 3,
66
} as MakerAntenna
77

88
export default { CUSTOM }

src/makers/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import example from './example'
1+
import nebra from './nebra'
22
import customAntennas from './custom/antennas'
33
import { LangType, supportedLangs } from '../utils/i18n/i18nTypes'
44
import { HotspotMakerLangField } from './hotspotMakerTypes'
55

66
export const Makers: Record<string, { id: number; supportEmail: string }> = {
7-
example,
7+
nebra,
88
}
99

1010
export const AntennaModels = {
11-
...example.antennas,
11+
...nebra.antennas,
1212
...customAntennas,
1313
}
1414

1515
export const HotspotMakerModels = {
16-
...example.hotspots,
16+
...nebra.hotspots,
1717
}
1818

1919
export type HotspotType = keyof typeof HotspotMakerModels
@@ -53,5 +53,5 @@ export const AntennaTypeCount = AntennaModelKeys.length
5353

5454
export const getMakerSupportEmail = (makerId?: number): string => {
5555
const makerKey = Object.keys(Makers).find((m) => Makers[m].id === makerId)
56-
return makerKey ? Makers[makerKey].supportEmail : 'support@helium.com'
56+
return makerKey ? Makers[makerKey].supportEmail : 'support@nebra.com'
5757
}

src/makers/nebra/antennas.ts

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { MakerAntenna } from '../antennaMakerTypes'
2+
3+
const NEBRA_US_3 = {
4+
name: '(US) Nebra Glass Fiber LoRa Antenna',
5+
gain: 3,
6+
} as MakerAntenna
7+
8+
const NEBRA_US_5 = {
9+
name: '(US) Nebra Glass Fiber LoRa Antenna',
10+
gain: 5.8,
11+
} as MakerAntenna
12+
13+
const NEBRA_US_8 = {
14+
name: '(US) Nebra Glass Fiber LoRa Antenna',
15+
gain: 8,
16+
} as MakerAntenna
17+
18+
const NEBRA_EU_3 = {
19+
name: '(EU) Nebra Glass Fiber LoRa Antenna',
20+
gain: 3,
21+
} as MakerAntenna
22+
23+
const NEBRA_EU_5 = {
24+
name: '(EU) Nebra Glass Fiber LoRa Antenna',
25+
gain: 5,
26+
} as MakerAntenna
27+
28+
const NEBRA_EU_8 = {
29+
name: '(EU) Nebra Glass Fiber LoRa Antenna',
30+
gain: 8,
31+
} as MakerAntenna
32+
33+
export default {
34+
NEBRA_US_3,
35+
NEBRA_US_5,
36+
NEBRA_US_8,
37+
NEBRA_EU_3,
38+
NEBRA_EU_5,
39+
NEBRA_EU_8,
40+
}

src/makers/nebra/hotspots.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import HotspotIcon from './icon.svg'
2+
import { MakerHotspot } from '../hotspotMakerTypes'
3+
import ANTENNAS from './antennas'
4+
5+
const NebraHotspotBLE = {
6+
name: 'Nebra Hotspot',
7+
icon: HotspotIcon,
8+
onboardType: 'BLE',
9+
translations: {
10+
en: {
11+
internal: [
12+
{
13+
title: 'Pair with hotspot',
14+
body:
15+
'Press and hold the button on the side of your hotspot for 3 seconds to make it discoverable.',
16+
button: 'Continue',
17+
},
18+
],
19+
},
20+
ja: {},
21+
ko: {},
22+
zh: {},
23+
},
24+
antenna: {
25+
us: ANTENNAS.NEBRA_US_3,
26+
default: ANTENNAS.NEBRA_US_3,
27+
},
28+
} as MakerHotspot
29+
30+
export default { NebraHotspotBLE }

src/makers/nebra/icon.svg

+6
Loading

src/makers/nebra/index.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import antennas from './antennas'
2+
import hotspots from './hotspots'
3+
4+
export default {
5+
antennas,
6+
hotspots,
7+
id: 2, // TODO: Get maker id from onboarding server
8+
supportEmail: 'support@nebra.com',
9+
}

src/theme/theme.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const palette = {
7171
transparent: '#00000000',
7272
offWhite: '#F9FAFC',
7373
nebraBlue: '#727CF5',
74+
nebraDarkBlue: '#6169D0',
7475
nebraDarkGrey: '#5C636A',
7576
nebraGrey: '#6C757D',
7677
}
@@ -79,17 +80,17 @@ export const lightThemeColors = {
7980
...palette,
8081

8182
primary: palette.nebraBlue,
82-
primaryBackground: palette.white,
83-
primaryText: palette.black,
84-
secondaryBackground: palette.offWhite,
83+
primaryBackground: palette.nebraBlue,
84+
primaryText: palette.white,
85+
secondaryBackground: palette.nebraDarkBlue,
8586
secondary: palette.nebraGrey,
86-
secondaryText: palette.nebraDarkGrey,
87+
secondaryText: palette.white,
8788
error: palette.nebraBlue,
8889
surface: palette.offWhite,
89-
surfaceText: palette.nebraDarkGrey,
90+
surfaceText: palette.black,
9091
surfaceSecondary: palette.offWhite,
91-
surfaceSecondaryText: palette.nebraDarkGrey,
92-
surfaceContrast: palette.nebraDarkGrey,
92+
surfaceSecondaryText: palette.white,
93+
surfaceContrast: palette.nebraDarkBlue,
9394
surfaceContrastText: palette.white,
9495
}
9596
export const darkThemeColors = {
@@ -100,7 +101,7 @@ export const darkThemeColors = {
100101
primaryText: palette.white,
101102
secondaryBackground: palette.nebraDarkGrey,
102103
secondary: palette.nebraDarkGrey,
103-
secondaryText: palette.white,
104+
secondaryText: palette.black,
104105
error: palette.nebraBlue,
105106
surface: palette.nebraDarkGrey,
106107
surfaceText: palette.white,

0 commit comments

Comments
 (0)