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

ZEUS-2189: Node Configuration: some buttons should be labels #2366

Merged
merged 1 commit into from
Sep 15, 2024
Merged
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
1 change: 0 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@
"views.Settings.AddEditNode.certificateVerification": "Certificate Verification",
"views.Settings.AddEditNode.createLndhub": "Create LNDHub account",
"views.Settings.AddEditNode.saveNode": "Save Node Config",
"views.Settings.AddEditNode.nodeSaved": "Node Config Saved",
"views.Settings.AddEditNode.setNodeActive": "Set Node Config as Active",
"views.Settings.AddEditNode.nodeActive": "Node Active",
"views.Settings.AddEditNode.scanLndconnect": "Scan lndconnect config",
Expand Down
41 changes: 21 additions & 20 deletions views/Settings/NodeConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import DropdownSetting from '../../components/DropdownSetting';
import Header from '../../components/Header';
import KeyValue from '../../components/KeyValue';
import LoadingIndicator from '../../components/LoadingIndicator';
import Pill from '../../components/Pill';
import Screen from '../../components/Screen';
import {
SuccessMessage,
Expand Down Expand Up @@ -1695,6 +1696,17 @@ export default class NodeConfiguration extends React.Component<
/>
)}

{active && (
<View style={{ alignItems: 'center' }}>
<Pill
title={localeString(
'views.Settings.AddEditNode.nodeActive'
)}
backgroundColor="transparent"
/>
</View>
)}

{implementation === 'embedded-lnd' && (
<View style={{ ...styles.button, marginTop: 20 }}>
{!adminMacaroon && !creatingWallet && (
Expand Down Expand Up @@ -1761,18 +1773,13 @@ export default class NodeConfiguration extends React.Component<
{!creatingWallet &&
!(
implementation === 'embedded-lnd' && !adminMacaroon
) && (
) &&
!saved && (
<View style={{ ...styles.button }}>
<Button
title={
saved
? localeString(
'views.Settings.AddEditNode.nodeSaved'
)
: localeString(
'views.Settings.AddEditNode.saveNode'
)
}
title={localeString(
'views.Settings.AddEditNode.saveNode'
)}
onPress={() => {
if (
!saved &&
Expand Down Expand Up @@ -1812,18 +1819,12 @@ export default class NodeConfiguration extends React.Component<
<CertInstallInstructions />
)}

{saved && !newEntry && (
{saved && !active && !newEntry && (
<View style={styles.button}>
<Button
title={
active
? localeString(
'views.Settings.AddEditNode.nodeActive'
)
: localeString(
'views.Settings.AddEditNode.setNodeActive'
)
}
title={localeString(
'views.Settings.AddEditNode.setNodeActive'
)}
onPress={() =>
this.setNodeConfigurationAsActive()
}
Expand Down
Loading