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) {
new Popup().headLine(Res.get("popup.warning.noTradingAccountSetup.headline"))
.instruction(Res.get("popup.warning.noTradingAccountSetup.msg"))
.actionButtonTextWithGoTo("navigation.account")
.actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath());
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"))
.feedback(Res.get("createOffer.success.info"))
.dontShowAgainId(key)
.actionButtonTextWithGoTo("navigation.portfolio.myOpenOffers")
.actionButtonTextWithGoTo("portfolio.tab.openOffers")
.onAction(this::closeAndGoToOpenOffers)
.onClose(this::closeAndGoToOpenOffers)
.show(),

View file

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

View file

@ -754,8 +754,8 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
() -> {
log.debug(Res.get("offerbook.removeOffer.success"));
if (DontShowAgainLookup.showAgain(key))
new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("navigation.funds.availableForWithdrawal")))
.actionButtonTextWithGoTo("navigation.funds.availableForWithdrawal")
new Popup().instruction(Res.get("offerbook.withdrawFundsHint", Res.get("funds.tab.withdrawal")))
.actionButtonTextWithGoTo("funds.tab.withdrawal")
.onAction(() -> navigation.navigateTo(MainView.class, FundsView.class, WithdrawalView.class))
.dontShowAgainId(key)
.show();
@ -773,7 +773,7 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
new Popup().headLine(headline)
.instruction(Res.get("offerbook.warning.noMatchingAccount.msg"))
.actionButtonTextWithGoTo("navigation.account")
.actionButtonTextWithGoTo("mainView.menu.account")
.onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath());
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" +
Res.get("takeOffer.alreadyPaidInFunds"))
.actionButtonTextWithGoTo("navigation.funds.availableForWithdrawal")
.actionButtonTextWithGoTo("funds.tab.withdrawal")
.onAction(() -> {
errorPopupDisplayed.set(true);
model.resetOfferWarning();
@ -693,7 +693,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
if (DontShowAgainLookup.showAgain(key)) {
UserThread.runAfter(() -> new Popup().headLine(Res.get("takeOffer.success.headline"))
.feedback(Res.get("takeOffer.success.info"))
.actionButtonTextWithGoTo("navigation.portfolio.pending")
.actionButtonTextWithGoTo("portfolio.tab.pendingTrades")
.dontShowAgainId(key)
.onAction(() -> {
UserThread.runAfter(

View file

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

View file

@ -216,7 +216,7 @@ public class NotificationCenter {
if (DontShowAgainLookup.showAgain(key)) {
Notification notification = new Notification().tradeHeadLine(trade.getShortId()).message(message);
if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(PendingTradesView.class)) {
notification.actionButtonTextWithGoTo("navigation.portfolio.pending")
notification.actionButtonTextWithGoTo("portfolio.tab.pendingTrades")
.onAction(() -> {
DontShowAgainLookup.dontShowAgain(key, true);
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) {
Notification notification = new Notification().disputeHeadLine(trade.getShortId()).message(message);
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))
.show();
} else {

View file

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

View file

@ -142,7 +142,7 @@ public class BuyerStep4View extends TradeStepView {
if (!DevEnv.isDevMode()) {
UserThread.runAfter(() -> new Popup().headLine(Res.get("portfolio.pending.step5_buyer.tradeCompleted.headline"))
.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))
.dontShowAgainId("tradeCompleteWithdrawCompletedInfo")
.show(), 500, TimeUnit.MILLISECONDS);

View file

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