This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a last-minute (somewhat ugly) instruction window for the default …
…vinumeris.com server, to try and smooth the "hmm let's create a project" path for newbies a little bit. It's not ideal but would require issue #31 to be resolved for a more excellent user experience. But this will suffice for beta.
- Loading branch information
Showing
3 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
client/src/main/java/lighthouse/subwindows/ProjectSubmitInstructionsWindow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package lighthouse.subwindows; | ||
|
||
import javafx.event.*; | ||
import javafx.fxml.*; | ||
import javafx.scene.control.*; | ||
import lighthouse.*; | ||
import org.slf4j.*; | ||
|
||
/** | ||
* Quick usability hint for people who don't RTFM and get confused what they do after creating a project :-) | ||
* This will go away at some point once issue 31 (smoother upload/review queue path) is implemented. | ||
*/ | ||
public class ProjectSubmitInstructionsWindow { | ||
private static final Logger log = LoggerFactory.getLogger(ProjectSubmitInstructionsWindow.class); | ||
|
||
@FXML Label submitEmailAddr; | ||
public Main.OverlayUI<InnerWindow> overlayUI; | ||
|
||
public static void open(String submitEmail) { | ||
log.info("Showing project submit instructions: {}", submitEmail); | ||
ProjectSubmitInstructionsWindow window = Main.instance.<ProjectSubmitInstructionsWindow>overlayUI( | ||
"subwindows/project_submit_instructions.fxml", "Information").controller; | ||
window.submitEmailAddr.setText(submitEmail); | ||
window.submitEmailAddr.setOnMouseClicked(ev -> { | ||
Main.instance.getHostServices().showDocument(String.format("mailto:%s", submitEmail)); | ||
}); | ||
} | ||
|
||
@FXML | ||
public void closeClicked(ActionEvent event) { | ||
overlayUI.done(); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
client/src/main/resources/lighthouse/subwindows/project_submit_instructions.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
|
||
<?import javafx.geometry.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.*?> | ||
<?import javafx.scene.layout.*?> | ||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="221.0" prefWidth="562.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lighthouse.subwindows.ProjectSubmitInstructionsWindow"> | ||
<bottom> | ||
<HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER"> | ||
<children> | ||
<Button defaultButton="true" mnemonicParsing="false" onAction="#closeClicked" text="Close" /> | ||
</children> | ||
<padding> | ||
<Insets bottom="30.0" left="30.0" right="30.0" top="30.0" /> | ||
</padding> | ||
</HBox> | ||
</bottom> | ||
<center> | ||
<VBox prefHeight="200.0" prefWidth="100.0" spacing="10.0" BorderPane.alignment="CENTER"> | ||
<children> | ||
<Label style="-fx-font-size: 20;" text="To submit your project for hosting, email it to:" /> | ||
<Label fx:id="submitEmailAddr" style="-fx-font-size: 30; -fx-text-fill: blue; -fx-underline: true;" text="project-hosting@vinumeris.com"> | ||
<cursor> | ||
<Cursor fx:constant="HAND" /> | ||
</cursor> | ||
</Label> | ||
</children> | ||
<padding> | ||
<Insets bottom="30.0" left="30.0" right="30.0" top="30.0" /> | ||
</padding> | ||
</VBox> | ||
</center> | ||
</BorderPane> |