Skip to content

Commit

Permalink
Add ui: { color, logo } struct to endpoints (polkadot-js#8963)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored Feb 6, 2023
1 parent 7d15444 commit f5115fc
Show file tree
Hide file tree
Showing 37 changed files with 1,209 additions and 594 deletions.
2 changes: 1 addition & 1 deletion packages/apps-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The actual type definitions you should be familiar with, it is exactly the same
1. Add your chain logo (if available) to either `ui/logos/chains` or `ui/logos/nodes` (the second is generally used)
2. Run the image build command to generate an inline version via `yarn build:images`
3. Add your chain to `endpoints/{production, productionRelay, testing, testingRelay*}` as applicable for your deployment
3. The `uiColor` specifies the chain color, the `uiLogo` (importted from generated), specifies the specific logo
3. The `ui.color` specifies the chain color, the `ui.logo` (importted from generated), specifies the specific logo
4 changes: 4 additions & 0 deletions packages/apps-config/src/endpoints/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ export function createCustom (t: TFunction): LinkOption[] {
isHeader: true,
text: t('rpc.dev.custom', 'Custom environment', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
{
info: 'WS_URL',
text: t('rpc.dev.custom.entry', 'Custom {{WS_URL}}', { ns: 'apps-config', replace: { WS_URL } }),
textBy: WS_URL,
ui: {},
value: WS_URL
}
]
Expand All @@ -51,6 +53,7 @@ export function createOwn (t: TFunction): LinkOption[] {
info: 'local',
text: t('rpc.dev.custom.own', 'Custom', { ns: 'apps-config' }),
textBy,
ui: {},
value: textBy
}));
}
Expand All @@ -68,6 +71,7 @@ export function createDev (t: TFunction): LinkOption[] {
info: 'local',
text: t('rpc.dev.local', 'Local Node', { ns: 'apps-config' }),
textBy: '127.0.0.1:9944',
ui: {},
value: 'ws://127.0.0.1:9944'
}
];
Expand Down
7 changes: 7 additions & 0 deletions packages/apps-config/src/endpoints/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isSpaced: true,
text: t('rpc.header.polkadot.relay', 'Polkadot & parachains', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, [prodRelayPolkadot], firstOnly, withSort),
Expand All @@ -31,6 +32,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isHeader: true,
text: t('rpc.header.kusama.relay', 'Kusama & parachains', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, [prodRelayKusama], firstOnly, withSort),
Expand All @@ -40,6 +42,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isSpaced: true,
text: t('rpc.header.westend.relay', 'Test Westend & parachains', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, [testRelayWestend], firstOnly, withSort),
Expand All @@ -48,6 +51,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isHeader: true,
text: t('rpc.header.rococo.relay', 'Test Rococo & parachains', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, [testRelayRococo], firstOnly, withSort),
Expand All @@ -57,6 +61,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isSpaced: true,
text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, prodChains, firstOnly, withSort),
Expand All @@ -65,6 +70,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isHeader: true,
text: t('rpc.header.test', 'Test networks', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, testChains, firstOnly, withSort),
Expand All @@ -75,6 +81,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
isSpaced: true,
text: t('rpc.header.dev', 'Development', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...createDev(t),
Expand Down
Loading

0 comments on commit f5115fc

Please sign in to comment.