Skip to content

Commit 987e80e

Browse files
committed
console: Add correct messages
1 parent 4c541d0 commit 987e80e

4 files changed

Lines changed: 25 additions & 7 deletions

File tree

pkg/webui/components/qr-modal-button/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ import ErrorMessage from '@ttn-lw/lib/components/error-message'
2626

2727
import PropTypes from '@ttn-lw/lib/prop-types'
2828
import sharedMessages from '@ttn-lw/lib/shared-messages'
29+
import { selectPluginTTSCloud } from '@ttn-lw/lib/selectors/env'
2930

3031
import DataSheet from '../data-sheet'
3132
import QR from '../qr'
3233

34+
const smUrl = selectPluginTTSCloud().subscription_management_url
35+
3336
const QrScanDoc = (
3437
<Link.Anchor external secondary href="https://www.thethingsindustries.com/docs/">
3538
Having trouble?
@@ -100,7 +103,14 @@ const QRModalButton = props => {
100103
/>
101104
</div>
102105
<Message
103-
content={sharedMessages.fleetInfo}
106+
content={sharedMessages.fleetTokenInfo}
107+
values={{
108+
Link: val => (
109+
<Link.Anchor secondary href={`${smUrl}/dashboard`} external>
110+
{val}
111+
</Link.Anchor>
112+
),
113+
}}
104114
className="mb-cs-xs mt-cs-xxs c-text-neutral-light fs-s"
105115
component="div"
106116
/>
@@ -113,7 +123,7 @@ const QRModalButton = props => {
113123
onChange={handleFleetTokenChange}
114124
/>
115125
<Message
116-
content={sharedMessages.fleetTokenInfo}
126+
content={sharedMessages.fleetInfo}
117127
className="mt-cs-xs c-text-neutral-light fs-s"
118128
component="div"
119129
/>

pkg/webui/console/containers/gateway-onboarding-form/gateway-provisioning-form/gateway-claim-form-section/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ import Message from '@ttn-lw/lib/components/message'
3131

3232
import { GsFrequencyPlansSelect as FrequencyPlansSelect } from '@console/containers/freq-plans-select'
3333

34-
import { selectGsConfig } from '@ttn-lw/lib/selectors/env'
34+
import { selectGsConfig, selectPluginTTSCloud } from '@ttn-lw/lib/selectors/env'
3535
import sharedMessages from '@ttn-lw/lib/shared-messages'
3636
import tooltipIds from '@ttn-lw/lib/constants/tooltip-ids'
3737
import getHostFromUrl from '@ttn-lw/lib/host-from-url'
3838

3939
const { enabled: gsEnabled, base_url: gsBaseURL } = selectGsConfig()
40+
const smUrl = selectPluginTTSCloud().subscription_management_url
4041

4142
const m = defineMessages({
4243
claimWarning:
@@ -135,6 +136,13 @@ const GatewayClaimFormSection = () => {
135136
tooltipId={tooltipIds.CLAIM_AUTH_CODE}
136137
component={Input}
137138
description={activeOwnerTokenType === 'fleet' ? sharedMessages.fleetTokenInfo : undefined}
139+
descriptionValues={{
140+
Link: val => (
141+
<Link.Anchor secondary href={`${smUrl}/dashboard`} external>
142+
{val}
143+
</Link.Anchor>
144+
),
145+
}}
138146
encode={btoa}
139147
decode={atob}
140148
sensitive

pkg/webui/lib/shared-messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ export default defineMessages({
278278
fCnt: 'FCnt',
279279
fetching: 'Fetching data…',
280280
firmwareVersion: 'Firmware version',
281-
fleetInfo: 'Adding a gateway to a fleet will blablabla.',
282-
fleetTokenInfo: 'Your fleet token is available in your account.',
281+
fleetInfo: 'Adding a gateway to a Fleet will claim the gateway using an available Slot.',
282+
fleetTokenInfo: 'Your fleet token is available in <Link>your account.</Link>',
283283
format: 'Format',
284284
fpNotFoundError:
285285
'The LoRaWAN version <code>{lorawanVersion}</code> does not support the <code>{freqPlan}</code> frequency plan. Please choose a different MAC version or frequency plan.',

pkg/webui/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,8 @@
14461446
"lib.shared-messages.fCnt": "FCnt",
14471447
"lib.shared-messages.fetching": "Fetching data…",
14481448
"lib.shared-messages.firmwareVersion": "Firmware version",
1449-
"lib.shared-messages.fleetInfo": "Adding a gateway to a fleet will blablabla.",
1450-
"lib.shared-messages.fleetTokenInfo": "Your fleet token is available in your account.",
1449+
"lib.shared-messages.fleetInfo": "Adding a gateway to a Fleet will claim the gateway using an available Slot.",
1450+
"lib.shared-messages.fleetTokenInfo": "Your fleet token is available in <Link>your account.</Link>",
14511451
"lib.shared-messages.format": "Format",
14521452
"lib.shared-messages.fpNotFoundError": "The LoRaWAN version <code>{lorawanVersion}</code> does not support the <code>{freqPlan}</code> frequency plan. Please choose a different MAC version or frequency plan.",
14531453
"lib.shared-messages.fPort": "FPort",

0 commit comments

Comments
 (0)