-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0c360e
commit 54db013
Showing
5 changed files
with
98 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use iced::widget::{column, text}; | ||
use iced::Element; | ||
|
||
use crate::components::{basic_layout, h_button, h_header, SvgIcon}; | ||
use crate::{HarborWallet, Message}; | ||
|
||
pub fn settings(harbor: &HarborWallet) -> Element<Message> { | ||
let header = h_header("Settings", "The fun stuff."); | ||
|
||
let column = match (harbor.settings_show_seed_words, &harbor.seed_words) { | ||
(true, Some(s)) => { | ||
let button = h_button("Hide Seed Words", SvgIcon::Squirrel, false) | ||
.on_press(Message::ShowSeedWords(false)); | ||
|
||
let words = text(s).size(24); | ||
|
||
let copy_button = h_button("Copy Seed Words", SvgIcon::Copy, false) | ||
.on_press(Message::CopyToClipboard(s.clone())); | ||
|
||
column![header, button, words, copy_button] | ||
} | ||
_ => { | ||
let button = h_button("Show Seed Words", SvgIcon::Squirrel, false) | ||
.on_press(Message::ShowSeedWords(true)); | ||
|
||
column![header, button] | ||
} | ||
}; | ||
|
||
basic_layout(column.spacing(48)) | ||
} |