First view draft and create user connected
This commit is contained in:
parent
4ce4445d50
commit
057c4504d4
2
.gitignore
vendored
2
.gitignore
vendored
@ -72,3 +72,5 @@ crashlytics-build.properties
|
||||
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
/client/config.json
|
@ -120,7 +120,21 @@ public class MainController {
|
||||
}
|
||||
|
||||
protected void onSettingBtnClick(){
|
||||
|
||||
try{
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(
|
||||
MainApplication.class.getResource("option-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 650, 650);
|
||||
scene.getStylesheets().add(Objects.requireNonNull(
|
||||
MainApplication.class.getResource("option-view.css")).toExternalForm());
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle("Einstellungen");
|
||||
stage.setScene(scene);
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.setResizable(false);
|
||||
stage.showAndWait();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected void onLogoutBtnClick(){
|
||||
|
62
client/app/src/main/java/main/OptionController.java
Normal file
62
client/app/src/main/java/main/OptionController.java
Normal file
@ -0,0 +1,62 @@
|
||||
package main;
|
||||
|
||||
import com.jfoenix.controls.*;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class OptionController {
|
||||
|
||||
@FXML
|
||||
public JFXButton updateUserBtn;
|
||||
@FXML
|
||||
public JFXButton deleteUserBtn;
|
||||
@FXML
|
||||
public JFXButton createUserBtn;
|
||||
@FXML
|
||||
public JFXToggleButton saveLoginTBtn;
|
||||
@FXML
|
||||
public Label labelError;
|
||||
@FXML
|
||||
public JFXComboBox<String> userCmb;
|
||||
|
||||
public void onBackBtnClick(ActionEvent actionEvent) {
|
||||
Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();
|
||||
stage.close();
|
||||
}
|
||||
|
||||
public void onCreateBtnClick(ActionEvent actionEvent) {
|
||||
try{
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(
|
||||
MainApplication.class.getResource("../users/create-user.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 800, 650);
|
||||
scene.getStylesheets().add(Objects.requireNonNull(
|
||||
MainApplication.class.getResource("../users/create-user.css")).toExternalForm());
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle("User erstellen");
|
||||
stage.setScene(scene);
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.setResizable(false);
|
||||
stage.showAndWait();
|
||||
Stage stageOld = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();
|
||||
stageOld.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdateBtnClick(ActionEvent actionEvent) {
|
||||
}
|
||||
|
||||
public void onDeleteBtnClick(ActionEvent actionEvent) {
|
||||
}
|
||||
}
|
64
client/app/src/main/resources/main/option-view.css
Normal file
64
client/app/src/main/resources/main/option-view.css
Normal file
@ -0,0 +1,64 @@
|
||||
GridPane{
|
||||
-fx-background-color: #3E415F;
|
||||
-fx-padding: 20px;
|
||||
-fx-font-size: 20px;
|
||||
-fx-font-family: Segoe UI;
|
||||
|
||||
-fx-border-insets: 1;
|
||||
-fx-border-color: #B0B0B0;
|
||||
-fx-border-style: solid;
|
||||
-fx-border-width: 2;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(100, 100, 100, 1), 24, 0.5, 0, 0);
|
||||
}
|
||||
|
||||
Label{
|
||||
-fx-text-fill: white;
|
||||
-fx-max-width: 150px;
|
||||
-fx-min-width: 150px;
|
||||
}
|
||||
|
||||
.mainLabel{
|
||||
-fx-background-color: #8D99AE;
|
||||
-fx-padding: 10px;
|
||||
-fx-max-width: 200px;
|
||||
-fx-min-width: 200px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-alignment: center;
|
||||
}
|
||||
|
||||
.inputField{
|
||||
-fx-padding: 10px;
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.mainButton{
|
||||
-fx-font-weight: bold;
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
JFXButton{
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
#labelError{
|
||||
-fx-font-weight: bold;
|
||||
-fx-max-width: 1000px;
|
||||
-fx-text-fill: #ff5555;
|
||||
-fx-padding: 16px;
|
||||
-fx-min-height: 140px;
|
||||
-fx-max-height: 400px;
|
||||
-fx-wrap-text: true;
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
|
||||
.inputDate{
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.comboBox{
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.timePicker{
|
||||
-fx-background-color: white;
|
||||
}
|
54
client/app/src/main/resources/main/option-view.fxml
Normal file
54
client/app/src/main/resources/main/option-view.fxml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import com.jfoenix.controls.*?>
|
||||
|
||||
<?import javafx.collections.FXCollections?>
|
||||
<?import java.lang.String?>
|
||||
<GridPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="main.OptionController"
|
||||
prefHeight="400.0" prefWidth="600.0">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints minWidth="100"/>
|
||||
<ColumnConstraints minWidth="100"/>
|
||||
<ColumnConstraints minWidth="100"/>
|
||||
<ColumnConstraints minWidth="100"/>
|
||||
<ColumnConstraints minWidth="100"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
</rowConstraints>
|
||||
|
||||
<Label styleClass="mainLabel" GridPane.columnIndex="2" GridPane.halignment="CENTER" >Einstellungen</Label>
|
||||
|
||||
<Label GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.halignment="CENTER">User:</Label>
|
||||
<JFXComboBox fx:id="userCmb" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="marc"/>
|
||||
<String fx:value="marco"/>
|
||||
</FXCollections>
|
||||
</items>
|
||||
</JFXComboBox>
|
||||
|
||||
<JFXButton fx:id="updateUserBtn" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="2" GridPane.halignment="CENTER" onAction="#onUpdateBtnClick">User bearbeiten</JFXButton>
|
||||
<JFXButton fx:id="deleteUserBtn" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="3" GridPane.halignment="CENTER" onAction="#onDeleteBtnClick">User löschen</JFXButton>
|
||||
<JFXButton fx:id="createUserBtn" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="4" GridPane.halignment="CENTER" onAction="#onCreateBtnClick">User anlegen</JFXButton>
|
||||
|
||||
<Label GridPane.columnIndex="1" GridPane.rowIndex="5" GridPane.halignment="CENTER">Angemeldet bleiben:</Label>
|
||||
<JFXToggleButton fx:id="saveLoginTBtn" GridPane.columnIndex="3" GridPane.rowIndex="5"/>
|
||||
|
||||
<Label fx:id="labelError" styleClass="errorMessage" GridPane.columnIndex="1" GridPane.rowIndex="6"/>
|
||||
<JFXButton GridPane.columnIndex="4" GridPane.rowIndex="7" onAction="#onBackBtnClick">Zurück</JFXButton>
|
||||
|
||||
</GridPane>
|
@ -1 +0,0 @@
|
||||
{"saveLogin":true,"id":1,"token":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJtYXJjIn0.NdOMxKKgH4ZNZ84uA81L57vJtR9OhTVyKwtNsOuZhFQ"}
|
Loading…
Reference in New Issue
Block a user