mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-28 10:40:39 +00:00
* Initial work on refactoring node definitions to reduce number of places theyre defined, amount of copy pasting. * Use makeAutoNodeNAme instead of manually appending _auto * Add getNetVersion to list of unsupported methods * PR feedback * Rework web template node selector to be a network selector. Refactor some types to help with that. Better handle removing custom nodes. * Remove color dropdown. * Fix selecting custom networks. Show notification if change network intent fails. * Use selectors for current node / network instead of intuiting from nodeSelection * Add id key to all networks, simplify add and remove custom node and network functions. * Fix a lot of uses of network.name to use network.id instead. * Dont allow network chainid conflicts * Fix web3 network by chainid * Add testnet badge to network selector * Change nomenclature from change(Node|Network)(Intent)? to change(Node|Network)(Requested|Succeeded) * tscheck * Better code for chainid collision * Remove console logs * Fix tests * Network selector becomes self contained component used both by web header and electron nav. * Dont select node again * Additional title text * tscheck * Custom node behavior in Electron * Close panel too * Convert node label data into selector function * tscheck * Parens & space
107 lines
2.1 KiB
SCSS
107 lines
2.1 KiB
SCSS
@import 'common/sass/variables';
|
|
@import 'common/sass/mixins';
|
|
|
|
$radio-size: 12px;
|
|
$label-padding: 0.3rem 0.4rem;
|
|
$left-border-size: 2px;
|
|
|
|
@if ($is-electron) {
|
|
$radio-size: 14px;
|
|
$label-padding: 12px 8px;
|
|
$left-border-size: 4px;
|
|
}
|
|
|
|
.NetworkOption {
|
|
border-left: $left-border-size solid;
|
|
border-bottom: 1px solid $gray-lighter;
|
|
|
|
&-label {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: $label-padding;
|
|
cursor: pointer;
|
|
|
|
&-name {
|
|
flex: 1;
|
|
@include ellipsis;
|
|
|
|
@if ($is-electron) {
|
|
&.is-long-name {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
&:before {
|
|
content: "";
|
|
position: relative;
|
|
top: 1px;
|
|
display: inline-block;
|
|
border: 1px solid rgba($gray-light, 0.4);
|
|
border-radius: 100%;
|
|
height: $radio-size;
|
|
width: $radio-size;
|
|
margin-right: $space-xs;
|
|
box-shadow: 0 0 0 1px #FFF inset;
|
|
}
|
|
|
|
&:hover {
|
|
&:before {
|
|
border-color: rgba($gray-light, 0.7);
|
|
}
|
|
}
|
|
|
|
&.is-selected {
|
|
&:before {
|
|
background: $brand-primary;
|
|
border-color: $brand-primary;
|
|
}
|
|
}
|
|
|
|
&.is-specific-node {
|
|
&:before {
|
|
background: linear-gradient(135deg, #FFF, #FFF 45%, $brand-primary 45%, $brand-primary 100%);
|
|
}
|
|
|
|
&:hover:before {
|
|
background: rgba($brand-primary, 0.6);
|
|
}
|
|
}
|
|
|
|
&-badge {
|
|
display: inline-block;
|
|
opacity: 0.5;
|
|
margin-left: 0.2rem;
|
|
font-size: 11px;
|
|
}
|
|
}
|
|
|
|
&-expand {
|
|
@include reset-button;
|
|
width: 20px;
|
|
height: 20px;
|
|
font-size: 10px;
|
|
color: $gray-light;
|
|
border-radius: 100%;
|
|
transition-property: color, background-color, transform;
|
|
transition-duration: 75ms;
|
|
transition-timing-function: ease;
|
|
|
|
&:hover {
|
|
color: $gray-dark;
|
|
background: rgba(#000, 0.1);
|
|
}
|
|
|
|
&.is-expanded {
|
|
color: $gray-dark;
|
|
transform: rotate(180deg);
|
|
}
|
|
}
|
|
}
|
|
|
|
&-nodes {
|
|
padding: 0.2rem 0.5rem;
|
|
background: $gray-lightest;
|
|
border-top: 1px solid $gray-lighter;
|
|
}
|
|
}
|