use tab names for 'go to' popups

This commit is contained in:
woodser 2025-05-02 10:19:41 -04:00
parent d913f553ba
commit 17cd0f95bb
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF
9 changed files with 17 additions and 17 deletions

View file

@ -308,7 +308,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
if (!result) { if (!result) {
new Popup().headLine(Res.get("popup.warning.noTradingAccountSetup.headline")) new Popup().headLine(Res.get("popup.warning.noTradingAccountSetup.headline"))
.instruction(Res.get("popup.warning.noTradingAccountSetup.msg")) .instruction(Res.get("popup.warning.noTradingAccountSetup.msg"))
.actionButtonTextWithGoTo("navigation.account") .actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> { .onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath()); navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class); navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class);
@ -749,7 +749,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
UserThread.runAfter(() -> new Popup().headLine(Res.get("createOffer.success.headline")) UserThread.runAfter(() -> new Popup().headLine(Res.get("createOffer.success.headline"))
.feedback(Res.get("createOffer.success.info")) .feedback(Res.get("createOffer.success.info"))
.dontShowAgainId(key) .dontShowAgainId(key)
.actionButtonTextWithGoTo("navigation.portfolio.myOpenOffers") .actionButtonTextWithGoTo("portfolio.tab.openOffers")
.onAction(this::closeAndGoToOpenOffers) .onAction(this::closeAndGoToOpenOffers)
.onClose(this::closeAndGoToOpenOffers) .onClose(this::closeAndGoToOpenOffers)
.show(), .show(),

View file

@ -727,7 +727,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
new Popup().warning(Res.get("shared.notEnoughFunds", new Popup().warning(Res.get("shared.notEnoughFunds",
HavenoUtils.formatXmr(dataModel.totalToPayAsProperty().get(), true), HavenoUtils.formatXmr(dataModel.totalToPayAsProperty().get(), true),
HavenoUtils.formatXmr(dataModel.getTotalBalance(), true))) HavenoUtils.formatXmr(dataModel.getTotalBalance(), true)))
.actionButtonTextWithGoTo("navigation.funds.depositFunds") .actionButtonTextWithGoTo("funds.tab.deposit")
.onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, DepositView.class)) .onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, DepositView.class))
.show(); .show();
} }
@ -1056,7 +1056,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
FormattingUtils.formatToPercentWithSymbol(preferences.getMaxPriceDistanceInPercent()))) FormattingUtils.formatToPercentWithSymbol(preferences.getMaxPriceDistanceInPercent())))
.actionButtonText(Res.get("createOffer.changePrice")) .actionButtonText(Res.get("createOffer.changePrice"))
.onAction(popup::hide) .onAction(popup::hide)
.closeButtonTextWithGoTo("navigation.settings.preferences") .closeButtonTextWithGoTo("settings.tab.preferences")
.onClose(() -> navigation.navigateTo(MainView.class, SettingsView.class, PreferencesView.class)) .onClose(() -> navigation.navigateTo(MainView.class, SettingsView.class, PreferencesView.class))
.show(); .show();
} }

View file

@ -754,8 +754,8 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
() -> { () -> {
log.debug(Res.get("offerbook.removeOffer.success")); log.debug(Res.get("offerbook.removeOffer.success"));
if (DontShowAgainLookup.showAgain(key)) if (DontShowAgainLookup.showAgain(key))
new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("navigation.funds.availableForWithdrawal"))) new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("funds.tab.withdrawal")))
.actionButtonTextWithGoTo("navigation.funds.availableForWithdrawal") .actionButtonTextWithGoTo("funds.tab.withdrawal")
.onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, WithdrawalView.class)) .onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, WithdrawalView.class))
.dontShowAgainId(key) .dontShowAgainId(key)
.show(); .show();
@ -773,7 +773,7 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
new Popup().headLine(headline) new Popup().headLine(headline)
.instruction(Res.get("offerbook.warning.noMatchingAccount.msg")) .instruction(Res.get("offerbook.warning.noMatchingAccount.msg"))
.actionButtonTextWithGoTo("navigation.account") .actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> { .onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath()); navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, accountViewClass); navigation.navigateTo(MainView.class, AccountView.class, accountViewClass);

View file

@ -631,7 +631,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
UserThread.runAfter(() -> new Popup().warning(newValue + "\n\n" + UserThread.runAfter(() -> new Popup().warning(newValue + "\n\n" +
Res.get("takeOffer.alreadyPaidInFunds")) Res.get("takeOffer.alreadyPaidInFunds"))
.actionButtonTextWithGoTo("navigation.funds.availableForWithdrawal") .actionButtonTextWithGoTo("funds.tab.withdrawal")
.onAction(() -> { .onAction(() -> {
errorPopupDisplayed.set(true); errorPopupDisplayed.set(true);
model.resetOfferWarning(); model.resetOfferWarning();
@ -693,7 +693,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
if (DontShowAgainLookup.showAgain(key)) { if (DontShowAgainLookup.showAgain(key)) {
UserThread.runAfter(() -> new Popup().headLine(Res.get("takeOffer.success.headline")) UserThread.runAfter(() -> new Popup().headLine(Res.get("takeOffer.success.headline"))
.feedback(Res.get("takeOffer.success.info")) .feedback(Res.get("takeOffer.success.info"))
.actionButtonTextWithGoTo("navigation.portfolio.pending") .actionButtonTextWithGoTo("portfolio.tab.pendingTrades")
.dontShowAgainId(key) .dontShowAgainId(key)
.onAction(() -> { .onAction(() -> {
UserThread.runAfter( UserThread.runAfter(

View file

@ -256,7 +256,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
new Popup().warning(Res.get("shared.notEnoughFunds", new Popup().warning(Res.get("shared.notEnoughFunds",
HavenoUtils.formatXmr(dataModel.getTotalToPay().get(), true), HavenoUtils.formatXmr(dataModel.getTotalToPay().get(), true),
HavenoUtils.formatXmr(dataModel.getTotalAvailableBalance(), true))) HavenoUtils.formatXmr(dataModel.getTotalAvailableBalance(), true)))
.actionButtonTextWithGoTo("navigation.funds.depositFunds") .actionButtonTextWithGoTo("funds.tab.deposit")
.onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, DepositView.class)) .onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, DepositView.class))
.show(); .show();
return false; return false;

View file

@ -216,7 +216,7 @@ public class NotificationCenter {
if (DontShowAgainLookup.showAgain(key)) { if (DontShowAgainLookup.showAgain(key)) {
Notification notification = new Notification().tradeHeadLine(trade.getShortId()).message(message); Notification notification = new Notification().tradeHeadLine(trade.getShortId()).message(message);
if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(PendingTradesView.class)) { if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(PendingTradesView.class)) {
notification.actionButtonTextWithGoTo("navigation.portfolio.pending") notification.actionButtonTextWithGoTo("portfolio.tab.pendingTrades")
.onAction(() -> { .onAction(() -> {
DontShowAgainLookup.dontShowAgain(key, true); DontShowAgainLookup.dontShowAgain(key, true);
navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class); navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class);
@ -318,7 +318,7 @@ public class NotificationCenter {
private void goToSupport(Trade trade, String message, Class<? extends DisputeView> viewClass) { private void goToSupport(Trade trade, String message, Class<? extends DisputeView> viewClass) {
Notification notification = new Notification().disputeHeadLine(trade.getShortId()).message(message); Notification notification = new Notification().disputeHeadLine(trade.getShortId()).message(message);
if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(viewClass)) { if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(viewClass)) {
notification.actionButtonTextWithGoTo("navigation.support") notification.actionButtonTextWithGoTo("mainView.menu.support")
.onAction(() -> navigation.navigateTo(MainView.class, SupportView.class, viewClass)) .onAction(() -> navigation.navigateTo(MainView.class, SupportView.class, viewClass))
.show(); .show();
} else { } else {

View file

@ -472,8 +472,8 @@ public class OpenOffersView extends ActivatableViewAndModel<VBox, OpenOffersView
String key = "WithdrawFundsAfterRemoveOfferInfo"; String key = "WithdrawFundsAfterRemoveOfferInfo";
if (DontShowAgainLookup.showAgain(key)) { if (DontShowAgainLookup.showAgain(key)) {
new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("navigation.funds.availableForWithdrawal"))) new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("funds.tab.withdrawal")))
.actionButtonTextWithGoTo("navigation.funds.availableForWithdrawal") .actionButtonTextWithGoTo("funds.tab.withdrawal")
.onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, WithdrawalView.class)) .onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, WithdrawalView.class))
.dontShowAgainId(key) .dontShowAgainId(key)
.show(); .show();

View file

@ -142,7 +142,7 @@ public class BuyerStep4View extends TradeStepView {
if (!DevEnv.isDevMode()) { if (!DevEnv.isDevMode()) {
UserThread.runAfter(() -> new Popup().headLine(Res.get("portfolio.pending.step5_buyer.tradeCompleted.headline")) UserThread.runAfter(() -> new Popup().headLine(Res.get("portfolio.pending.step5_buyer.tradeCompleted.headline"))
.feedback(Res.get("portfolio.pending.step5_buyer.tradeCompleted.msg")) .feedback(Res.get("portfolio.pending.step5_buyer.tradeCompleted.msg"))
.actionButtonTextWithGoTo("navigation.portfolio.closedTrades") .actionButtonTextWithGoTo("portfolio.tab.history")
.onAction(() -> model.dataModel.navigation.navigateTo(MainView.class, PortfolioView.class, ClosedTradesView.class)) .onAction(() -> model.dataModel.navigation.navigateTo(MainView.class, PortfolioView.class, ClosedTradesView.class))
.dontShowAgainId("tradeCompleteWithdrawCompletedInfo") .dontShowAgainId("tradeCompleteWithdrawCompletedInfo")
.show(), 500, TimeUnit.MILLISECONDS); .show(), 500, TimeUnit.MILLISECONDS);

View file

@ -674,7 +674,7 @@ public class GUIUtil {
String currencyName = Config.baseCurrencyNetwork().getCurrencyName(); String currencyName = Config.baseCurrencyNetwork().getCurrencyName();
new Popup().information(Res.get("payment.fasterPayments.newRequirements.info", currencyName)) new Popup().information(Res.get("payment.fasterPayments.newRequirements.info", currencyName))
.width(900) .width(900)
.actionButtonTextWithGoTo("navigation.account") .actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> { .onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath()); navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class); navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class);
@ -743,7 +743,7 @@ public class GUIUtil {
if (user.currentPaymentAccountProperty().get() == null) { if (user.currentPaymentAccountProperty().get() == null) {
new Popup().headLine(Res.get("popup.warning.noTradingAccountSetup.headline")) new Popup().headLine(Res.get("popup.warning.noTradingAccountSetup.headline"))
.instruction(Res.get("popup.warning.noTradingAccountSetup.msg")) .instruction(Res.get("popup.warning.noTradingAccountSetup.msg"))
.actionButtonTextWithGoTo("navigation.account") .actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> { .onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath()); navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class); navigation.navigateTo(MainView.class, AccountView.class, TraditionalAccountsView.class);