mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Merge branch 'ripcurlx-edit-offer'
This commit is contained in:
parent
e2bf052621
commit
439ccac11e
8 changed files with 40 additions and 29 deletions
|
@ -19,8 +19,6 @@ package bisq.desktop.components;
|
|||
|
||||
import bisq.common.UserThread;
|
||||
|
||||
import de.jensd.fx.glyphs.GlyphIcons;
|
||||
|
||||
import org.controlsfx.control.PopOver;
|
||||
|
||||
import javafx.scene.Node;
|
||||
|
@ -34,6 +32,10 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import static bisq.desktop.util.FormBuilder.getIcon;
|
||||
|
||||
|
||||
|
||||
import de.jensd.fx.glyphs.GlyphIcons;
|
||||
|
||||
public class InfoAutoTooltipLabel extends AutoTooltipLabel {
|
||||
|
||||
private Text textIcon;
|
||||
|
|
|
@ -141,10 +141,10 @@ public abstract class EditableOfferDataModel extends OfferDataModel implements B
|
|||
|
||||
@Inject
|
||||
public EditableOfferDataModel(OpenOfferManager openOfferManager, BtcWalletService btcWalletService, BsqWalletService bsqWalletService,
|
||||
Preferences preferences, User user, KeyRing keyRing, P2PService p2PService,
|
||||
PriceFeedService priceFeedService, FilterManager filterManager,
|
||||
AccountAgeWitnessService accountAgeWitnessService, TradeWalletService tradeWalletService,
|
||||
FeeService feeService, BSFormatter formatter) {
|
||||
Preferences preferences, User user, KeyRing keyRing, P2PService p2PService,
|
||||
PriceFeedService priceFeedService, FilterManager filterManager,
|
||||
AccountAgeWitnessService accountAgeWitnessService, TradeWalletService tradeWalletService,
|
||||
FeeService feeService, BSFormatter formatter) {
|
||||
super(btcWalletService);
|
||||
|
||||
this.openOfferManager = openOfferManager;
|
||||
|
|
|
@ -71,8 +71,6 @@ import org.bitcoinj.core.Coin;
|
|||
import net.glxn.qrgen.QRCode;
|
||||
import net.glxn.qrgen.image.ImageType;
|
||||
|
||||
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
|
||||
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ComboBox;
|
||||
|
@ -122,6 +120,10 @@ import org.jetbrains.annotations.NotNull;
|
|||
import static bisq.desktop.util.FormBuilder.*;
|
||||
import static javafx.beans.binding.Bindings.createStringBinding;
|
||||
|
||||
|
||||
|
||||
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
|
||||
|
||||
public abstract class EditableOfferView<M extends EditableOfferViewModel> extends ActivatableViewAndModel<AnchorPane, M> {
|
||||
protected final Navigation navigation;
|
||||
private final Preferences preferences;
|
||||
|
@ -172,7 +174,7 @@ public abstract class EditableOfferView<M extends EditableOfferViewModel> extend
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public EditableOfferView(M model, Navigation navigation, Preferences preferences, Transitions transitions,
|
||||
OfferDetailsWindow offerDetailsWindow, BSFormatter btcFormatter, BsqFormatter bsqFormatter) {
|
||||
OfferDetailsWindow offerDetailsWindow, BSFormatter btcFormatter, BsqFormatter bsqFormatter) {
|
||||
super(model);
|
||||
|
||||
this.navigation = navigation;
|
||||
|
|
|
@ -175,19 +175,19 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
|
||||
@Inject
|
||||
public EditableOfferViewModel(M dataModel,
|
||||
FiatVolumeValidator fiatVolumeValidator,
|
||||
FiatPriceValidator fiatPriceValidator,
|
||||
AltcoinValidator altcoinValidator,
|
||||
BtcValidator btcValidator,
|
||||
BsqValidator bsqValidator,
|
||||
SecurityDepositValidator securityDepositValidator,
|
||||
P2PService p2PService,
|
||||
WalletsSetup walletsSetup,
|
||||
PriceFeedService priceFeedService,
|
||||
Navigation navigation,
|
||||
Preferences preferences,
|
||||
BSFormatter btcFormatter,
|
||||
BsqFormatter bsqFormatter) {
|
||||
FiatVolumeValidator fiatVolumeValidator,
|
||||
FiatPriceValidator fiatPriceValidator,
|
||||
AltcoinValidator altcoinValidator,
|
||||
BtcValidator btcValidator,
|
||||
BsqValidator bsqValidator,
|
||||
SecurityDepositValidator securityDepositValidator,
|
||||
P2PService p2PService,
|
||||
WalletsSetup walletsSetup,
|
||||
PriceFeedService priceFeedService,
|
||||
Navigation navigation,
|
||||
Preferences preferences,
|
||||
BSFormatter btcFormatter,
|
||||
BsqFormatter bsqFormatter) {
|
||||
super(dataModel);
|
||||
|
||||
this.fiatVolumeValidator = fiatVolumeValidator;
|
||||
|
|
|
@ -64,8 +64,6 @@ import com.google.inject.name.Named;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
|
||||
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.canvas.Canvas;
|
||||
import javafx.scene.control.Button;
|
||||
|
@ -108,6 +106,10 @@ import static bisq.desktop.util.FormBuilder.addButton;
|
|||
import static bisq.desktop.util.FormBuilder.addHBoxLabelComboBox;
|
||||
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
|
||||
|
||||
|
||||
|
||||
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
|
||||
|
||||
@FxmlView
|
||||
public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookViewModel> {
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ class EditOpenOfferDataModel extends EditableOfferDataModel {
|
|||
}
|
||||
|
||||
public void onStartEditOffer(ErrorMessageHandler errorMessageHandler) {
|
||||
openOfferManager.editOpenOfferStart(openOffer, () -> {}, errorMessageHandler);
|
||||
openOfferManager.editOpenOfferStart(openOffer, () -> {
|
||||
}, errorMessageHandler);
|
||||
}
|
||||
|
||||
public void onPublishOffer(ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
||||
|
@ -127,6 +128,7 @@ class EditOpenOfferDataModel extends EditableOfferDataModel {
|
|||
|
||||
public void onCancelEditOffer(ErrorMessageHandler errorMessageHandler) {
|
||||
if (openOffer != null)
|
||||
openOfferManager.editOpenOfferCancel(openOffer, initialState, () -> {}, errorMessageHandler);
|
||||
openOfferManager.editOpenOfferCancel(openOffer, initialState, () -> {
|
||||
}, errorMessageHandler);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ public class OpenOffersView extends ActivatableViewAndModel<VBox, OpenOffersView
|
|||
|
||||
private void onActivateOpenOffer(OpenOffer openOffer) {
|
||||
if (model.isBootstrapped()) {
|
||||
model.onActivateOpenOffer(openOffer,
|
||||
model.onActivateOpenOffer(openOffer,
|
||||
() -> {
|
||||
log.debug("Activate offer was successful");
|
||||
},
|
||||
|
|
|
@ -44,8 +44,6 @@ import bisq.common.util.Tuple4;
|
|||
|
||||
import de.jensd.fx.fontawesome.AwesomeDude;
|
||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||
import de.jensd.fx.glyphs.GlyphIcons;
|
||||
import de.jensd.fx.glyphs.materialdesignicons.utils.MaterialDesignIconFactory;
|
||||
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Button;
|
||||
|
@ -79,6 +77,11 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
|
||||
import de.jensd.fx.glyphs.GlyphIcons;
|
||||
import de.jensd.fx.glyphs.materialdesignicons.utils.MaterialDesignIconFactory;
|
||||
|
||||
public class FormBuilder {
|
||||
private static final Logger log = LoggerFactory.getLogger(FormBuilder.class);
|
||||
public static final String MATERIAL_DESIGN_ICONS = "'Material Design Icons'";
|
||||
|
|
Loading…
Add table
Reference in a new issue