Skip to content

Commit

Permalink
Improve UI and add search functionality
Browse files Browse the repository at this point in the history
- Refactor App.qml to use a Loader for screens
- Update HomeScreen.ui.qml with improved layout and search functionality
- Rename and update Profile components for better reusability
- Add search functionality in Futr.hs
- Implement Bech32 encoding/decoding in new Nostr.Bech32 module
- Update AppState to Types and add currentProfile
- Enhance UI.hs with new profile properties and search method
  • Loading branch information
prolic committed Oct 11, 2024
1 parent de6c42b commit d619283
Show file tree
Hide file tree
Showing 18 changed files with 1,075 additions and 636 deletions.
3 changes: 2 additions & 1 deletion futr.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ executable futr
hs-source-dirs: src

other-modules:
AppState
EffectfulQML
Futr
Nostr.Bech32
Nostr.Effects.CurrentTime
Nostr.Effects.IDGen
Nostr.Effects.Logging
Expand All @@ -44,6 +44,7 @@ executable futr
Nostr.Profile
Nostr.Types
Presentation.KeyMgmt
Types
TimeFormatter
UI

Expand Down
51 changes: 11 additions & 40 deletions resources/qml/content/App.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,19 @@ ApplicationWindow {
id: clipboard
}

Rectangle {
width: 900
height: parent.height
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: 10

Rectangle {
width: 1
height: parent.height
color: Material.dividerColor
anchors.left: parent.left
}

Rectangle {
width: 1
height: parent.height
color: Material.dividerColor
anchors.right: parent.right
}

Rectangle {
anchors.fill: parent
anchors.leftMargin: 1
anchors.rightMargin: 1
color: Material.backgroundColor

KeyMgmtScreen {
anchors.margins: 10
anchors.fill: parent
visible: currentScreen == "KeyMgmt"
}

Loader {
id: myHomeScreenLoader
active: currentScreen == "Home"
anchors.fill: parent
sourceComponent: HomeScreen {
anchors.margins: 10
anchors.fill: parent
}
Loader {
id: screenLoader
anchors.fill: parent
source: {
if (currentScreen === "Home") {
return "HomeScreen.ui.qml";
} else if (currentScreen === "KeyMgmt") {
return "KeyMgmtScreen.ui.qml";
} else {
return "";
}
}
active: currentScreen === "Home" || currentScreen === "KeyMgmt"
}

Button {
Expand Down
Loading

0 comments on commit d619283

Please sign in to comment.