Skip to content

Commit

Permalink
smaller line spacing in channel details
Browse files Browse the repository at this point in the history
  • Loading branch information
myxmaster committed Dec 17, 2024
1 parent 49d09c3 commit aece70c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 8 deletions.
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

0 comments on commit aece70c

Please sign in to comment.