mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
Color the main-path wizard choices in the accent color
This commit is contained in:
parent
863dcbb488
commit
9f5c852903
@ -5,7 +5,7 @@ use crate::people::Person;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
use gossip_relay_picker::Direction;
|
||||
use nostr_types::{Profile, PublicKey};
|
||||
|
||||
@ -113,7 +113,10 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
}
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Publish and Finish").clicked() {
|
||||
if ui
|
||||
.button(RichText::new(" > Publish and Finish").color(app.settings.theme.accent_color()))
|
||||
.clicked()
|
||||
{
|
||||
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::PushFollow);
|
||||
|
||||
let _ = GLOBALS.storage.write_wizard_complete(true, None);
|
||||
|
@ -3,7 +3,7 @@ use crate::globals::GLOBALS;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
use zeroize::Zeroize;
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
@ -31,7 +31,10 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
});
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Import").clicked() {
|
||||
if ui
|
||||
.button(RichText::new(" > Import").color(app.settings.theme.accent_color()))
|
||||
.clicked()
|
||||
{
|
||||
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::ImportPriv(
|
||||
app.import_priv.clone(),
|
||||
app.password.clone(),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
if app.wizard_state.pubkey.is_some() {
|
||||
@ -10,17 +10,34 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
};
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Import an Encrypted Private Key").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Import an Encrypted Private Key")
|
||||
.color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
app.page = Page::Wizard(WizardPage::ImportEncryptedPrivateKey);
|
||||
}
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Import a Naked Private Key").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Import a Naked Private Key")
|
||||
.color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
app.page = Page::Wizard(WizardPage::ImportPrivateKey);
|
||||
}
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Import a Public Key only").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Import a Public Key only").color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
app.page = Page::Wizard(WizardPage::ImportPublicKey);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ use crate::globals::GLOBALS;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
use zeroize::Zeroize;
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
@ -37,7 +37,10 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
});
|
||||
|
||||
ui.add_space(10.0);
|
||||
if ui.button(" > Import").clicked() {
|
||||
if ui
|
||||
.button(RichText::new(" > Import").color(app.settings.theme.accent_color()))
|
||||
.clicked()
|
||||
{
|
||||
if app.password != app.password2 {
|
||||
GLOBALS
|
||||
.status_queue
|
||||
|
@ -3,7 +3,7 @@ use crate::globals::GLOBALS;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
// If already imported, advance
|
||||
@ -25,7 +25,10 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
});
|
||||
|
||||
ui.add_space(10.0);
|
||||
if ui.button(" > Import").clicked() {
|
||||
if ui
|
||||
.button(RichText::new(" > Import").color(app.settings.theme.accent_color()))
|
||||
.clicked()
|
||||
{
|
||||
let _ = GLOBALS
|
||||
.to_overlord
|
||||
.send(ToOverlordMessage::ImportPub(app.import_pub.clone()));
|
||||
|
@ -237,7 +237,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
|
||||
|
||||
ui.add_space(20.0);
|
||||
if wp != WizardPage::FollowPeople {
|
||||
if ui.button(" > Exit this Wizard").clicked() {
|
||||
if ui.button(" X Exit this Wizard").clicked() {
|
||||
let _ = GLOBALS.storage.write_wizard_complete(true, None);
|
||||
app.page = Page::Feed(FeedKind::Followed(false));
|
||||
}
|
||||
@ -278,7 +278,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
|
||||
|
||||
ui.add_space(10.0);
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.label("Adjust Zoom");
|
||||
ui.label("Adjust DPI");
|
||||
ui.add(Slider::new(&mut app.override_dpi_value, 72..=200));
|
||||
if ui.button("Apply").clicked() {
|
||||
// Make it happen
|
||||
|
@ -2,7 +2,7 @@ use crate::comms::ToOverlordMessage;
|
||||
use crate::globals::GLOBALS;
|
||||
use crate::people::Person;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use crate::ui::{GossipUi, Page, RichText};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use nostr_types::Metadata;
|
||||
@ -70,7 +70,13 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
|
||||
ui.add_space(15.0);
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Save, Publish and Continue").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Save, Publish and Continue")
|
||||
.color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
// Copy from form and save
|
||||
save_metadata(app, you.clone(), metadata.clone());
|
||||
|
||||
|
@ -221,7 +221,12 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
|
||||
if !need_more {
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Publish and Continue").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Publish and Continue").color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
let _ = GLOBALS
|
||||
.to_overlord
|
||||
.send(ToOverlordMessage::AdvertiseRelayList);
|
||||
|
@ -2,7 +2,7 @@ use crate::globals::GLOBALS;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
if app.wizard_state.pubkey.is_some() {
|
||||
@ -17,13 +17,25 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
ui.label("Please select from the following choices:");
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > Create a New Nostr Account").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > Create a New Nostr Account")
|
||||
.color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
app.wizard_state.new_user = true;
|
||||
app.page = Page::Wizard(WizardPage::WelcomeNostr);
|
||||
}
|
||||
|
||||
ui.add_space(20.0);
|
||||
if ui.button(" > I Already have a Nostr Account").clicked() {
|
||||
if ui
|
||||
.button(
|
||||
RichText::new(" > I Already have a Nostr Account")
|
||||
.color(app.settings.theme.accent_color()),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
app.wizard_state.new_user = false;
|
||||
app.page = Page::Wizard(WizardPage::ImportKeys);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use crate::globals::GLOBALS;
|
||||
use crate::ui::wizard::WizardPage;
|
||||
use crate::ui::{GossipUi, Page};
|
||||
use eframe::egui;
|
||||
use egui::{Context, Ui};
|
||||
use egui::{Context, RichText, Ui};
|
||||
use zeroize::Zeroize;
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
@ -37,7 +37,10 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
});
|
||||
|
||||
ui.add_space(10.0);
|
||||
if ui.button(" > Generate Now").clicked() {
|
||||
if ui
|
||||
.button(RichText::new(" > Generate Now").color(app.settings.theme.accent_color()))
|
||||
.clicked()
|
||||
{
|
||||
if app.password != app.password2 {
|
||||
GLOBALS
|
||||
.status_queue
|
||||
|
Loading…
Reference in New Issue
Block a user