-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Nostr Zap functionality, BitAxe integration bugfix
- Loading branch information
Showing
9 changed files
with
431 additions
and
117 deletions.
There are no files selected for viewing
Submodule data
updated
7 files
+6 −0 | src/icons/ZapIcon.svelte | |
+3 −2 | src/lib/style/app.scss | |
+5 −1 | src/routes/Rendered.svelte | |
+33 −30 | src/routes/Status.svelte | |
+1 −0 | static/icons/flash.svg | |
+1 −0 | static/icons/lightning-bolt.svg | |
+157 −153 | yarn.lock |
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,24 @@ | ||
#include "nostrdisplay_handler.hpp" | ||
|
||
std::array<std::string, NUM_SCREENS> parseZapNotify(std::uint16_t amount, bool withSatsSymbol) | ||
{ | ||
std::string text = std::to_string(amount); | ||
std::size_t textLength = text.length(); | ||
std::size_t startIndex = NUM_SCREENS - textLength; | ||
|
||
std::array<std::string, NUM_SCREENS> textEpdContent = {"ZAP", "mdi-lnbolt", "", "", "", "", ""}; | ||
|
||
// Insert the sats symbol just before the digits | ||
if (startIndex > 0 && withSatsSymbol) | ||
{ | ||
textEpdContent[startIndex - 1] = "STS"; | ||
} | ||
|
||
// Place the digits | ||
for (std::size_t i = 0; i < textLength; i++) | ||
{ | ||
textEpdContent[startIndex + i] = text.substr(i, 1); | ||
} | ||
|
||
return textEpdContent; | ||
} |
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,5 @@ | ||
#include <array> | ||
#include <string> | ||
#include "utils.hpp" | ||
|
||
std::array<std::string, NUM_SCREENS> parseZapNotify(std::uint16_t amount, bool withSatsSymbol); |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.