feat: update views path

This commit is contained in:
Khushboo Mehta 2026-02-19 13:31:33 +01:00
parent b113f9ca68
commit 0e29dd413a
9 changed files with 86 additions and 19 deletions

View File

@ -62,7 +62,7 @@ After building the app with `nix build '.#app'`, you can run it:
./result/bin/logos-blockchain-ui-app
```
The app will automatically load the required modules (capability_module, liblogos-blockchain-module) and the blockchain_ui Qt plugin. All dependencies are bundled in the Nix store layout.
The app will automatically load the required modules (capability_module, liblogos_blockchain_module) and the blockchain_ui Qt plugin. All dependencies are bundled in the Nix store layout.
#### Nix Organization
@ -95,7 +95,7 @@ result/
│ └── Logos/DesignSystem/ # QML design system
├── modules/
│ ├── capability_module_plugin.dylib
│ ├── liblogos-blockchain-module.dylib
│ ├── liblogos_blockchain_module.dylib
│ └── liblogos_blockchain.dylib
└── blockchain_ui.dylib # Qt plugin (loaded by app)
```

View File

@ -28,7 +28,7 @@ int main(int argc, char *argv[])
qWarning() << "Failed to load capability_module plugin";
}
if (!logos_core_load_plugin("liblogos-blockchain-module")) {
if (!logos_core_load_plugin("liblogos_blockchain_module")) {
qWarning() << "Failed to load blockchain module plugin";
}

13
flake.lock generated
View File

@ -23,11 +23,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1771418281,
"narHash": "sha256-9nATUijKs7OCEcepHKghuWdgHu+hq11JbJz2Lv4uyDU=",
"lastModified": 1771509425,
"narHash": "sha256-hTmDLC+RcfPyuEbE8xnhL4qAN4U5M2RojWk0YonsSFY=",
"owner": "logos-blockchain",
"repo": "logos-blockchain",
"rev": "b862e6f640a79097b8a42c072e1f78bc430fa222",
"rev": "9ae525d6d16c0431b61d4e4c44f29dd0397f4fd4",
"type": "github"
},
"original": {
@ -67,17 +67,16 @@
]
},
"locked": {
"lastModified": 1771423304,
"narHash": "sha256-ONurMDUbFhdNzdbQ5r1jPPzFm2bHJBRElwcRNPPFmpM=",
"lastModified": 1771511900,
"narHash": "sha256-/5YkCwwEmfDhF0rAmp1u813kzooH93X0uzAjizxVUPM=",
"owner": "logos-blockchain",
"repo": "logos-blockchain-module",
"rev": "214a87885115296bf4e56fd820f5fbfdf4ee4453",
"rev": "7522b80cf7f71df90220f52d8274ea72ec6ea8f0",
"type": "github"
},
"original": {
"owner": "logos-blockchain",
"repo": "logos-blockchain-module",
"rev": "214a87885115296bf4e56fd820f5fbfdf4ee4453",
"type": "github"
}
},

View File

@ -6,7 +6,7 @@
"type": "ui",
"main": "blockchain_ui",
"icon": ":/icons/blockchain.png",
"dependencies": ["liblogos-blockchain-module"],
"dependencies": ["liblogos_blockchain_module"],
"category": "blockchain",
"build": {
"type": "cmake",

View File

@ -164,8 +164,8 @@ pkgs.stdenv.mkDerivation rec {
if [ -f "${logosCapabilityModule}/lib/capability_module_plugin.$OS_EXT" ]; then
cp -L "${logosCapabilityModule}/lib/capability_module_plugin.$OS_EXT" "$out/modules/"
fi
if [ -f "${logosBlockchainModule}/lib/liblogos-blockchain-module.$OS_EXT" ]; then
cp -L "${logosBlockchainModule}/lib/liblogos-blockchain-module.$OS_EXT" "$out/modules/"
if [ -f "${logosBlockchainModule}/lib/liblogos_blockchain_module.$OS_EXT" ]; then
cp -L "${logosBlockchainModule}/lib/liblogos_blockchain_module.$OS_EXT" "$out/modules/"
fi
# Copy liblogos_blockchain library to modules directory (needed by blockchain module)

View File

@ -10,7 +10,7 @@ namespace {
const char SETTINGS_ORG[] = "Logos";
const char SETTINGS_APP[] = "BlockchainUI";
const char CONFIG_PATH_KEY[] = "configPath";
const QString BLOCKCHAIN_MODULE_NAME = QStringLiteral("liblogos-blockchain-module");
const QString BLOCKCHAIN_MODULE_NAME = QStringLiteral("liblogos_blockchain_module");
}
BlockchainBackend::BlockchainBackend(LogosAPI* logosAPI, QObject* parent)

View File

@ -7,7 +7,7 @@ import QtCore
import BlockchainBackend
import Logos.Theme
import views
import "views"
Rectangle {
id: root

View File

@ -61,7 +61,7 @@ Control {
spacing: 2
delegate: LogosText {
width: logsListView.width
width: ListView.view.width
text: model.text
font.pixelSize: Theme.typography.secondaryText
wrapMode: Text.Wrap

View File

@ -52,10 +52,78 @@ ColumnLayout {
// Dropdown of known addresses, or type a custom address
ComboBox {
id: balanceAddressCombo
Layout.fillWidth: true
padding: Theme.spacing.large
editable: true
model: knownAddresses
font.pixelSize: Theme.typography.secondaryText
background: Rectangle {
color: Theme.palette.backgroundTertiary
radius: Theme.spacing.radiusLarge
border.color: Theme.palette.border
border.width: 1
}
indicator: LogosText {
id: indicatorText
text: "▼"
font.pixelSize: Theme.typography.secondaryText
color: Theme.palette.textSecondary
x: balanceAddressCombo.width - width - Theme.spacing.small
y: (balanceAddressCombo.height - height) / 2
visible: balanceAddressCombo.count > 0
}
contentItem: LogosText {
width: parent.width - indicatorText.width - Theme.spacing.large
font.pixelSize: Theme.typography.secondaryText
font.bold: true
text: balanceAddressCombo.displayText
elide: Text.ElideRight
}
delegate: ItemDelegate {
id: delegate
width: balanceAddressCombo.width
contentItem: LogosText {
width: parent.width
height: contentHeight + Theme.spacing.large
font.pixelSize: Theme.typography.secondaryText
font.bold: true
text: modelData
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
color: delegate.highlighted ?
Theme.palette.backgroundTertiary:
Theme.palette.backgroundSecondary
}
highlighted: balanceAddressCombo.highlightedIndex === index
}
popup: Popup {
y: balanceAddressCombo.height - 1
width: balanceAddressCombo.width
height: contentItem.implicitHeight + 100
padding: 1
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: balanceAddressCombo.popup.visible ? balanceAddressCombo.delegateModel : null
ScrollIndicator.vertical: ScrollIndicator { }
highlightFollowsCurrentItem: false
}
background: Rectangle {
color: Theme.palette.backgroundSecondary
border.color: Theme.palette.border
border.width: 1
radius: Theme.spacing.radiusLarge
}
}
}
RowLayout {
@ -71,8 +139,8 @@ ColumnLayout {
LogosButton {
Layout.fillWidth: true
enabled: false
padding: Theme.spacing.medium
enabled: false
padding: Theme.spacing.medium
contentItem: Text {
id: balanceResultText
width: parent.width
@ -161,7 +229,7 @@ ColumnLayout {
component CustomTextFeild: TextField {
id: textField
Layout.fillWidth: true
placeholderText: qsTr("From key (64 hex chars)")
placeholderTextColor: Theme.palette.textMuted
font.pixelSize: Theme.typography.secondaryText
background: Rectangle {