Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel details: smaller line spacing #2580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions components/FeeBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
<KeyValue
keyValue={localeString(
Expand All @@ -122,6 +123,7 @@ export default class FeeBreakdown extends React.Component<
Number(localPolicy.fee_rate_milli_msat) / 10000
}%`}
sensitive
compact
/>
<KeyValue
keyValue={localeString(
Expand All @@ -137,6 +139,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
<KeyValue
keyValue={localeString(
Expand All @@ -146,6 +149,7 @@ export default class FeeBreakdown extends React.Component<
Number(remotePolicy.fee_rate_milli_msat) / 10000
}%`}
sensitive
compact
/>
{BackendUtils.supportInboundFees() && (
<>
Expand All @@ -165,6 +169,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
)}
{!!localPolicy.inbound_fee_rate_milli_msat && (
Expand All @@ -178,6 +183,7 @@ export default class FeeBreakdown extends React.Component<
) / 10000
}%`}
sensitive
compact
/>
)}
{!!remotePolicy.inbound_fee_base_msat && (
Expand All @@ -196,6 +202,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
)}
{!!remotePolicy.inbound_fee_rate_milli_msat && (
Expand All @@ -209,6 +216,7 @@ export default class FeeBreakdown extends React.Component<
) / 10000
}%`}
sensitive
compact
/>
)}
</>
Expand Down Expand Up @@ -264,6 +272,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
<KeyValue
keyValue={localeString('views.Channel.remoteMin')}
Expand All @@ -274,6 +283,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
<KeyValue
keyValue={localeString('views.Channel.localMax')}
Expand All @@ -286,6 +296,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>
<KeyValue
keyValue={localeString('views.Channel.remoteMax')}
Expand All @@ -299,6 +310,7 @@ export default class FeeBreakdown extends React.Component<
sensitive
/>
}
compact
/>

<KeyValue
Expand All @@ -308,6 +320,7 @@ export default class FeeBreakdown extends React.Component<
value={`${
localPolicy.time_lock_delta
} ${localeString('general.blocks')}`}
compact
/>
<KeyValue
keyValue={localeString(
Expand All @@ -316,6 +329,7 @@ export default class FeeBreakdown extends React.Component<
value={`${
remotePolicy.time_lock_delta
} ${localeString('general.blocks')}`}
compact
/>
<Divider
orientation="horizontal"
Expand All @@ -333,6 +347,7 @@ export default class FeeBreakdown extends React.Component<
value={DateTimeUtils.listFormattedDate(
localPolicy.last_update
)}
compact
/>
<KeyValue
keyValue={localeString(
Expand All @@ -341,6 +356,7 @@ export default class FeeBreakdown extends React.Component<
value={DateTimeUtils.listFormattedDate(
remotePolicy.last_update
)}
compact
/>
<KeyValue
keyValue={localeString('views.Channel.peerStatus')}
Expand All @@ -349,6 +365,7 @@ export default class FeeBreakdown extends React.Component<
? localeString('views.Channel.active')
: localeString('views.Channel.inactive')
}
compact
/>
{total_satoshis_received && (
<KeyValue
Expand All @@ -362,6 +379,7 @@ export default class FeeBreakdown extends React.Component<
toggleable
/>
}
compact
/>
)}

Expand All @@ -377,6 +395,7 @@ export default class FeeBreakdown extends React.Component<
toggleable
/>
}
compact
/>
)}
<Divider
Expand All @@ -396,6 +415,7 @@ export default class FeeBreakdown extends React.Component<
? localeString('views.Channel.yourNode')
: peerDisplay
}
compact
/>

{commit_fee && (
Expand All @@ -411,6 +431,7 @@ export default class FeeBreakdown extends React.Component<
/>
}
sensitive
compact
/>
)}

Expand All @@ -420,6 +441,7 @@ export default class FeeBreakdown extends React.Component<
'views.Channel.commitWeight'
)}
value={commit_weight}
compact
/>
)}

Expand All @@ -437,6 +459,7 @@ export default class FeeBreakdown extends React.Component<
),
localeString('views.Channel.csvDelay.info2')
]}
compact
/>
)}

Expand All @@ -454,6 +477,7 @@ export default class FeeBreakdown extends React.Component<
testnet
)
}
compact
/>
)}
{channelPoint && (
Expand All @@ -470,6 +494,7 @@ export default class FeeBreakdown extends React.Component<
testnet
)
}
compact
/>
)}
</React.Fragment>
Expand Down
11 changes: 9 additions & 2 deletions components/KeyValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ interface KeyValueProps {
disableCopy?: boolean;
ModalStore?: ModalStore;
SettingsStore?: SettingsStore;
compact?: boolean;
}

@inject('ModalStore', 'SettingsStore')
Expand All @@ -52,7 +53,8 @@ export default class KeyValue extends React.Component<KeyValueProps, {}> {
mempoolLink,
disableCopy,
ModalStore,
SettingsStore
SettingsStore,
compact
} = this.props;
const { toggleInfoModal } = ModalStore!;

Expand Down Expand Up @@ -167,7 +169,12 @@ export default class KeyValue extends React.Component<KeyValueProps, {}> {
);

return (
<View style={{ paddingTop: 10, paddingBottom: 10 }}>
<View
style={{
paddingTop: compact ? 5 : 10,
paddingBottom: compact ? 5 : 10
}}
>
<KeyValueRow />
</View>
);
Expand Down
Loading
Loading