Skip to content

Commit 500e8f2

Browse files
authored
Merge pull request #106 from bigknife/dev/90-refactor-scp-wallet
Dev/90 refactor scp wallet
2 parents eb2f700 + 8f5ac9a commit 500e8f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2136
-4
lines changed

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,11 @@
4747
/.ensime_cache/
4848
/crypto/target/
4949

50-
!/**/docs/
50+
!/**/docs/
51+
52+
!/**/main/**/*.fxml
53+
!/**/main/**/*.css
54+
!/**/main/**/*.otf
55+
!/**/main/**/*.png
56+
!/**/main/**/*.jpeg
57+
!/**/main/**/*.jpg

base/src/main/scala/fssi/base/BytesValue.scala

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ object BytesValue {
112112
acc ++ F(n)
113113
}
114114
}
115+
implicit def arryByteToArrayByte(a: Array[Byte]): Array[Byte] = a
115116

116117
implicit def optionToBytesValue[A](a: Option[A])(implicit F: A => Array[Byte]): Array[Byte] = {
117118
if (a.isEmpty) Array.emptyByteArray

build.sbt

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ lazy val pContractScaffold = contractScaffold().dependsOn(pTypes)
5252

5353
lazy val pTool = tool()
5454
.dependsOn(pInterperter)
55-
.dependsOn(pJsonRpc)
5655
.dependsOn(pSandBox)
5756
.settings(
5857
packMain := Map("tool" -> "fssi.tool.ToolMain")
5958
)
6059

6160
lazy val pWallet = wallet()
61+
.dependsOn(pBase)
62+
.dependsOn(pInterperter)
63+
.dependsOn(pSandBox)
64+
6265

6366
lazy val pCoreNode = coreNode()
6467
.dependsOn(pInterperter)

project/Common.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ object Common {
187187
def apply(): Project =
188188
prj("wallet", "wallet")
189189
.settings(
190-
libraryDependencies ++= (all.scalafx ++ all.jfoenix)
190+
libraryDependencies ++= (all.scalafx ++ all.jfoenix ++ all.controlfx ++ all.fontawesomefx)
191191
)
192192
}
193193

project/Dependencies.scala

+17-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,23 @@ object Dependencies {
6666

6767
val scalafx = "8.0.144-R12"
6868

69-
val jfoenix = "9.0.1"
69+
val jfoenix = "8.0.7"
70+
71+
val controlfx = "8.40.14"
72+
73+
val fontawesomefx = "8.9"
74+
}
75+
76+
lazy val fontawesomefx = {
77+
Seq(
78+
Dpd("de.jensd", "fontawesomefx", versions.fontawesomefx, autoScalaVersion = false)
79+
).map(_.libraryDependencies)
80+
}
81+
82+
lazy val controlfx = {
83+
Seq(
84+
Dpd("org.controlsfx", "controlsfx", versions.controlfx, autoScalaVersion = false)
85+
).map(_.libraryDependencies)
7086
}
7187

7288
lazy val jfoenix = {

wallet/src/main/resources/ui/MainFrame.fxml

+338
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
.root {
2+
-fx-background-color: #D8D8D8;
3+
-fx-font-family: Metropolis;
4+
}
5+
.title_bar {
6+
-fx-background-color: rgb(15,23,28);
7+
-fx-effect: dropshadow(gaussian, black,5, 0.3, 0, 1)
8+
}
9+
.app_bar {
10+
-fx-background-color: rgb(15,23,28,0.99);
11+
-fx-effect: dropshadow(gaussian, black,5, 0.3, 0, 1)
12+
}
13+
.system_button {
14+
-fx-background-color: null;
15+
}
16+
.system_title {
17+
-fx-text-fill: #4A4A4A;
18+
-fx-font-size: 18px;
19+
}
20+
.app_title {
21+
-fx-text-fill: #E9ECEF;
22+
-fx-font-size: 32px;
23+
}
24+
.search_bar_bg {
25+
-fx-background-color: #1B2A32;
26+
-fx-background-radius: 10px;
27+
}
28+
.search_text_field {
29+
-fx-background-color: null;
30+
-fx-border-width: 0;
31+
-fx-text-fill: #D8D8D8;
32+
}
33+
.left_side {
34+
-fx-background-color: rgb(15,23,28);
35+
-fx-effect: dropshadow(gaussian, black,5, 0.3, 0, 1)
36+
}
37+
38+
.system_close {
39+
-fx-background-size: 24px;
40+
-fx-background-repeat: no-repeat;
41+
/*-fx-background-position: 100%;*/
42+
-fx-background-radius: 0;
43+
-fx-background-image: url('../image/window-close-line.png');
44+
}
45+
.system_close:hover {
46+
-fx-background-color: #882D31;
47+
}
48+
.system_min {
49+
-fx-background-size: 24px;
50+
-fx-background-repeat: no-repeat;
51+
-fx-background-position: 100%;
52+
-fx-background-radius: 0;
53+
-fx-background-image: url('../image/window-min-line.png');
54+
}
55+
.system_min:hover {
56+
-fx-background-color: #882D31;
57+
}
58+
.system_max {
59+
-fx-background-size: 24px;
60+
-fx-background-repeat: no-repeat;
61+
/*-fx-background-position: 100%;*/
62+
-fx-background-radius: 0;
63+
-fx-background-image: url('../image/window-max-line.png');
64+
}
65+
.system_max:hover {
66+
-fx-background-color: #882D31;
67+
}
68+
69+
.menu_item_level1 {
70+
-fx-background-color: rgb(41,65,78,0.8);
71+
-fx-font-size: 14px;
72+
-fx-text-fill: #ADBBC4;
73+
-fx-alignment: CENTER_LEFT;
74+
-fx-background-radius: 0px;
75+
}
76+
.menu_item_level1:hover {
77+
-fx-background-color: rgb(41,65,78,0.9);
78+
-fx-text-fill: #FF9B1D;
79+
}
80+
81+
.menu_item_level2 {
82+
-fx-background-color: rgb(41,65,78,.5);
83+
-fx-font-size: 12px;
84+
-fx-text-fill: #ADBBC4;
85+
-fx-alignment: CENTER_LEFT;
86+
-fx-background-radius: 0px;
87+
}
88+
.menu_item_level2:hover {
89+
-fx-background-color: rgb(41,65,78,0.7);
90+
-fx-text-fill: #C27413;
91+
}
92+
.who_am_i {
93+
-fx-background-color: null;
94+
-fx-text-fill: #4A4A4A;
95+
-fx-font-size: 12px;
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.create_account_step {
2+
-fx-font-size: 14px;
3+
-fx-text-fill: #ADBBC4;
4+
-fx-border-color: #485764;
5+
-fx-border-width: 0px 0px 1px 0px;
6+
}
7+
8+
.create_account_mouse_track_pad {
9+
-fx-background-color: #0F171C;
10+
-fx-background-radius: 10px;
11+
-fx-border-width: 1px;
12+
-fx-border-color: #29414E;
13+
-fx-border-radius: 10px;
14+
}
15+
16+
.create_account_field_label {
17+
-fx-background-color: rgb(15, 96, 130, 0.3);
18+
-fx-background-radius: 11px;
19+
-fx-text-fill: #E9ECEF;
20+
-fx-font-size: 11px;
21+
}
22+
.create_account_random_text {
23+
-fx-background-color: transparent;
24+
-fx-text-fill: #9B9B9B;
25+
}
26+
.create_account_random_text .scroll-pane {
27+
-fx-background-color: transparent;
28+
}
29+
.create_account_random_text .viewport {
30+
-fx-background-color: transparent;
31+
}
32+
.create_account_random_text .content {
33+
-fx-background-color: transparent;
34+
}
35+
.create_account_random_text .scroll-bar:vertical {
36+
-fx-opacity: 0;
37+
}
38+
.create_account_password {
39+
-fx-background-color: transparent;
40+
-fx-border-color: #ADBBC4;
41+
-fx-border-width: 0 0 1px 0px;
42+
-fx-text-fill: #E9ECEF;
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.workspace-background-dark {
2+
-fx-background-color: #22343c;
3+
}
4+
.workspace-title-bar {
5+
-fx-background-color: #404e68;
6+
}
7+
.workspace-title-text {
8+
-fx-text-fill: #FFFFFF;
9+
-fx-font-size: 16px;
10+
}
11+
12+
.button_primary {
13+
-fx-background-color: #49AFD9;
14+
-fx-font-size: 12px;
15+
-fx-text-fill: #080d13;
16+
-fx-background-radius: 5px;
17+
-fx-font-weight: bold;
18+
}
19+
20+
.button_primary:hover {
21+
-fx-background-color: #0f151f;
22+
-fx-text-fill: #9bb7b7;
23+
}
24+
25+
.file_chooser {
26+
-fx-background-color: #275571;
27+
-fx-font-size: 12px;
28+
-fx-text-fill: #E9ECEF;
29+
-fx-background-radius: 5px 0px 0px 5px;
30+
}
31+
32+
.file_chooser_label {
33+
-fx-background-color: #1d3a4e;
34+
-fx-font-size: 12px;
35+
-fx-text-fill: #E9ECEF;
36+
-fx-background-radius: 0px 5px 5px 0px;
37+
}
38+
.file_chooser:hover {
39+
-fx-background-color: #0f151f;
40+
-fx-text-fill: #a2c2c2;
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import com.jfoenix.controls.*?>
4+
<?import java.lang.*?>
5+
<?import javafx.geometry.*?>
6+
<?import javafx.scene.control.*?>
7+
<?import javafx.scene.effect.*?>
8+
<?import javafx.scene.layout.*?>
9+
<?import javafx.scene.text.*?>
10+
11+
<StackPane prefHeight="600.0" prefWidth="800.0" stylesheets="@login.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fssi.wallet.controller.DashboardController">
12+
<children>
13+
<Region id="region" prefHeight="200.0" prefWidth="200.0">
14+
<effect>
15+
<DropShadow color="GREY" />
16+
</effect>
17+
</Region>
18+
<BorderPane prefHeight="200.0" prefWidth="200.0">
19+
<top>
20+
<StackPane prefHeight="60.0" prefWidth="780.0" style="-fx-background-color: #404040;" styleClass="title_bar" BorderPane.alignment="CENTER">
21+
<children>
22+
<StackPane onMouseDragged="#mouseDraggedHandler" onMousePressed="#mousePressedHandler" prefHeight="60.0" prefWidth="780.0" style="-fx-background-color: #404040;" styleClass="title_bar" />
23+
<Label onMouseDragged="#mouseDraggedHandler" onMousePressed="#mousePressedHandler" text="FSSI Wallet - Dashboard" textFill="WHITE" StackPane.alignment="CENTER_LEFT">
24+
<font>
25+
<Font size="24.0" />
26+
</font>
27+
<opaqueInsets>
28+
<Insets />
29+
</opaqueInsets>
30+
<StackPane.margin>
31+
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
32+
</StackPane.margin>
33+
</Label>
34+
</children>
35+
</StackPane>
36+
</top>
37+
<left>
38+
<VBox BorderPane.alignment="CENTER">
39+
<children>
40+
<JFXButton prefHeight="30.0" prefWidth="175.0" text="Dashboard" />
41+
<JFXButton prefHeight="30.0" prefWidth="175.0" text="Account" />
42+
<JFXButton prefHeight="30.0" prefWidth="175.0" text="Transaction" />
43+
</children>
44+
<padding>
45+
<Insets top="20.0" />
46+
</padding>
47+
</VBox>
48+
</left>
49+
</BorderPane>
50+
</children>
51+
<padding>
52+
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
53+
</padding>
54+
</StackPane>
Binary file not shown.
269 Bytes
Loading
1.27 KB
Loading
1.23 KB
Loading
Loading
1.23 KB
Loading
Loading
Loading
1.64 KB
Loading
Loading
Loading
Loading
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.root {
2+
-fx-background-color: null;
3+
}
4+
#region {
5+
//-fx-background-radius:20;
6+
-fx-background-color: white;
7+
}
8+
9+
.title_bar {
10+
-fx-background-color: #404040;
11+
12+
}

0 commit comments

Comments
 (0)