mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-14 20:41:03 +00:00
Introduce ICON_DEFAULT_HOST (#207)
This commit is contained in:
@@ -8,7 +8,7 @@ import { IdentityProps as Props, Props as ComponentProps } from './types';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import settings, { ICON_DEFAULT } from '@polkadot/ui-settings';
|
import settings, { ICON_DEFAULT_HOST } from '@polkadot/ui-settings';
|
||||||
import { isHex, isU8a, u8aToHex } from '@polkadot/util';
|
import { isHex, isU8a, u8aToHex } from '@polkadot/util';
|
||||||
import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
|
import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ export default class IdentityIcon extends React.PureComponent<Props, State> {
|
|||||||
const { className, isHighlight = false, size = DEFAULT_SIZE, style, theme = settings.icon } = this.props;
|
const { className, isHighlight = false, size = DEFAULT_SIZE, style, theme = settings.icon } = this.props;
|
||||||
const Component = !address
|
const Component = !address
|
||||||
? Empty
|
? Empty
|
||||||
: Components[theme === 'default' ? ICON_DEFAULT : theme] || Fallback;
|
: Components[theme === 'default' ? ICON_DEFAULT_HOST : theme] || Fallback;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper
|
<Wrapper
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Option } from '../types';
|
|||||||
import { CRYPTOS } from './crypto';
|
import { CRYPTOS } from './crypto';
|
||||||
import { ENDPOINTS, ENDPOINT_DEFAULT } from './endpoints';
|
import { ENDPOINTS, ENDPOINT_DEFAULT } from './endpoints';
|
||||||
import { PREFIXES, PREFIX_DEFAULT } from './ss58';
|
import { PREFIXES, PREFIX_DEFAULT } from './ss58';
|
||||||
import { ICON_DEFAULT, ICONS, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
|
import { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
|
||||||
|
|
||||||
const LANGUAGE_DEFAULT = 'default';
|
const LANGUAGE_DEFAULT = 'default';
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ export {
|
|||||||
ENDPOINT_DEFAULT,
|
ENDPOINT_DEFAULT,
|
||||||
ENDPOINTS,
|
ENDPOINTS,
|
||||||
ICON_DEFAULT,
|
ICON_DEFAULT,
|
||||||
|
ICON_DEFAULT_HOST,
|
||||||
ICONS,
|
ICONS,
|
||||||
LANGUAGE_DEFAULT,
|
LANGUAGE_DEFAULT,
|
||||||
LANGUAGES,
|
LANGUAGES,
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ const UITHEMES: Option[] = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const ICON_DEFAULT = isPolkadot
|
const ICON_DEFAULT = 'default';
|
||||||
|
|
||||||
|
const ICON_DEFAULT_HOST = isPolkadot
|
||||||
? 'polkadot'
|
? 'polkadot'
|
||||||
: 'substrate';
|
: 'substrate';
|
||||||
|
|
||||||
@@ -50,7 +52,7 @@ const ICONS: Option[] = [
|
|||||||
{
|
{
|
||||||
info: 'default',
|
info: 'default',
|
||||||
text: 'Default for the connected node',
|
text: 'Default for the connected node',
|
||||||
value: -1
|
value: 'default'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
info: 'polkadot',
|
info: 'polkadot',
|
||||||
@@ -71,6 +73,7 @@ const ICONS: Option[] = [
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
ICON_DEFAULT,
|
ICON_DEFAULT,
|
||||||
|
ICON_DEFAULT_HOST,
|
||||||
ICONS,
|
ICONS,
|
||||||
LANGUAGE_DEFAULT,
|
LANGUAGE_DEFAULT,
|
||||||
UIMODE_DEFAULT,
|
UIMODE_DEFAULT,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||||
|
|
||||||
import settings, { Settings } from './Settings';
|
import settings, { Settings } from './Settings';
|
||||||
export { ENDPOINT_DEFAULT, ICON_DEFAULT, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults';
|
export { ENDPOINT_DEFAULT, ICON_DEFAULT, ICON_DEFAULT_HOST, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults';
|
||||||
|
|
||||||
export default settings;
|
export default settings;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user