mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-17 19:02:32 -04:00
Remove web view for help
This commit is contained in:
parent
59db93dbdc
commit
2d5f1fb0e6
2 changed files with 3 additions and 28 deletions
|
@ -19,7 +19,6 @@ package io.bitsquare.gui;
|
||||||
|
|
||||||
import io.bitsquare.BitsquareModule;
|
import io.bitsquare.BitsquareModule;
|
||||||
import io.bitsquare.gui.components.Popups;
|
import io.bitsquare.gui.components.Popups;
|
||||||
import io.bitsquare.gui.main.help.Help;
|
|
||||||
import io.bitsquare.gui.main.trade.offerbook.OfferBook;
|
import io.bitsquare.gui.main.trade.offerbook.OfferBook;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import io.bitsquare.gui.util.Transitions;
|
import io.bitsquare.gui.util.Transitions;
|
||||||
|
@ -60,7 +59,6 @@ public class GuiModule extends BitsquareModule {
|
||||||
|
|
||||||
bind(Stage.class).toInstance(primaryStage);
|
bind(Stage.class).toInstance(primaryStage);
|
||||||
Popups.primaryStage = primaryStage;
|
Popups.primaryStage = primaryStage;
|
||||||
Help.primaryStage = primaryStage;
|
|
||||||
|
|
||||||
bindConstant().annotatedWith(Names.named(ViewCB.TITLE_KEY)).to(env.getRequiredProperty(ViewCB.TITLE_KEY));
|
bindConstant().annotatedWith(Names.named(ViewCB.TITLE_KEY)).to(env.getRequiredProperty(ViewCB.TITLE_KEY));
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.help;
|
package io.bitsquare.gui.main.help;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
import io.bitsquare.util.Utilities;
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
import javafx.scene.*;
|
|
||||||
import javafx.scene.web.*;
|
|
||||||
import javafx.stage.Modality;
|
|
||||||
import javafx.stage.Stage;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -32,9 +26,6 @@ import org.slf4j.LoggerFactory;
|
||||||
public class Help {
|
public class Help {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Help.class);
|
private static final Logger log = LoggerFactory.getLogger(Help.class);
|
||||||
|
|
||||||
private static Stage helpWindow;
|
|
||||||
public static Stage primaryStage;
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Public methods
|
// Public methods
|
||||||
|
@ -42,23 +33,9 @@ public class Help {
|
||||||
|
|
||||||
public static void openWindow(HelpId id) {
|
public static void openWindow(HelpId id) {
|
||||||
try {
|
try {
|
||||||
URL url = new URL("https://docs.bitsquare.io/0.1.0-SNAPSHOT/userguide/index.html");
|
Utilities.openURL("https://docs.bitsquare.io/0.1.0-SNAPSHOT/userguide/index.html");
|
||||||
// URL url = new URL("https://docs.bitsquare.io/0.1.0-SNAPSHOT/userguide/index.html#" + id);
|
// URL url = new URL("https://docs.bitsquare.io/0.1.0-SNAPSHOT/userguide/index.html#" + id);
|
||||||
WebView webView;
|
} catch (Exception e) {
|
||||||
if (helpWindow == null) {
|
|
||||||
helpWindow = new Stage();
|
|
||||||
helpWindow.initModality(Modality.NONE);
|
|
||||||
helpWindow.initOwner(primaryStage);
|
|
||||||
webView = new WebView();
|
|
||||||
helpWindow.setScene(new Scene(webView, 800, 600));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
webView = (WebView) helpWindow.getScene().getRoot();
|
|
||||||
}
|
|
||||||
helpWindow.setTitle(url.toString());
|
|
||||||
webView.getEngine().load(url.toString());
|
|
||||||
helpWindow.show();
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue