-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #251: Introduce and Use NetworkIndicator component
01b3909 qml: use NetworkIndicator, change layout of NodeRunner to accommodate (jarolrod) 0e01340 qml: introduce NetworkIndicator component (jarolrod) b48f4f2 qml: introduce amber color to our Theme file (jarolrod) 7b8d134 qml: set and expose the current network name from the ChainModel (jarolrod) Pull request description: Signals to the user when they are running on a network other than main. Closes #233 #### Light | testnet | signet | regtest | | ------- | ------ | ------- | | <img width="752" alt="Screen Shot 2023-02-08 at 6 48 47 PM" src="https://user-images.githubusercontent.com/23396902/217695964-9ceaea19-461c-485a-b41e-b3d0d3ff4211.png"> | <img width="752" alt="Screen Shot 2023-02-08 at 6 39 00 PM" src="https://user-images.githubusercontent.com/23396902/217695987-07455475-ede9-4394-bdb5-14e0a8246123.png"> | <img width="752" alt="Screen Shot 2023-02-08 at 6 39 21 PM" src="https://user-images.githubusercontent.com/23396902/217696012-a2dda1e0-e7a1-4ecc-9655-2a7ea55c9f75.png"> | #### Dark | testnet | signet | regtest | | ------- | ------ | ------- | | <img width="752" alt="Screen Shot 2023-02-07 at 5 24 23 PM" src="https://user-images.githubusercontent.com/23396902/217380996-91c16d78-fc49-49b5-9e33-73708dce3c15.png"> | <img width="752" alt="Screen Shot 2023-02-07 at 5 24 50 PM" src="https://user-images.githubusercontent.com/23396902/217381059-3147923e-b73f-4e2f-935d-77ce74554b71.png"> | <img width="752" alt="Screen Shot 2023-02-07 at 5 25 34 PM" src="https://user-images.githubusercontent.com/23396902/217381100-9f1c67e8-70e5-4658-ac73-7a78d6d26339.png"> | [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/<PR>) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/<PR>) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/<PR>) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/<PR>) ACKs for top commit: johnny9: ACK 01b3909 Tree-SHA512: 0e166aca51930b70108d17d094d753d0933183112db7658b4a207f1e8d254a4dfda7b33c6a14470c8e0b8e3e18d3428f079b66c28b8e4a8b63f52f5d6fc1ea16
- Loading branch information
Showing
9 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import "../controls" | ||
import "../components" | ||
|
||
import org.bitcoincore.qt 1.0 | ||
|
||
Button { | ||
id: root | ||
property color bgColor | ||
property int textSize: 18 | ||
font.family: "Inter" | ||
font.styleName: "Regular" | ||
font.pixelSize: root.textSize | ||
padding: 7 | ||
state: chainModel.currentNetworkName | ||
contentItem: Text { | ||
text: root.text | ||
font: root.font | ||
color: Theme.color.white | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
} | ||
background: Rectangle { | ||
id: bg | ||
color: root.bgColor | ||
radius: 2 | ||
} | ||
states: [ | ||
State { | ||
name: "MAIN" | ||
PropertyChanges { | ||
target: root | ||
visible: false | ||
} | ||
}, | ||
State { | ||
name: "TEST" | ||
PropertyChanges { | ||
target: root | ||
visible: true | ||
text: qsTr("Test Network") | ||
bgColor: Theme.color.green | ||
} | ||
}, | ||
State { | ||
name: "SIGNET" | ||
PropertyChanges { | ||
target: root | ||
visible: true | ||
text: qsTr("Signet Network") | ||
bgColor: Theme.color.amber | ||
} | ||
}, | ||
State { | ||
name: "REGTEST" | ||
PropertyChanges { | ||
target: root | ||
visible: true | ||
text: qsTr("Regtest Mode") | ||
bgColor: Theme.color.blue | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters