David Thornley преди 6 години
родител
ревизия
73f7317332

+ 16
- 3
zlg/package-lock.json Целия файл

@@ -163,6 +163,11 @@
163 163
       "resolved": "https://registry.npmjs.org/@types/localforage/-/localforage-0.0.30.tgz",
164 164
       "integrity": "sha1-PWCmv23aOOP4pGlhFZg3nx9klQk="
165 165
     },
166
+    "@types/node": {
167
+      "version": "10.5.5",
168
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.5.tgz",
169
+      "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w=="
170
+    },
166 171
     "@types/socket.io-client": {
167 172
       "version": "1.4.32",
168 173
       "resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.32.tgz",
@@ -173,6 +178,14 @@
173 178
       "resolved": "https://registry.npmjs.org/@types/sockjs-client/-/sockjs-client-1.1.0.tgz",
174 179
       "integrity": "sha512-F3gD7AakaPGzzdTmvN8HYxlNL+vTnMykYSUoukRTRGUntH4lwjxG5wx3ZwdYBTA3sTo4duxHY+rRZMbIEBxhRQ=="
175 180
     },
181
+    "@types/stompjs": {
182
+      "version": "2.3.3",
183
+      "resolved": "https://registry.npmjs.org/@types/stompjs/-/stompjs-2.3.3.tgz",
184
+      "integrity": "sha512-p6+AQ+YS9P0bIYgfyDxKBIoDTFnFPpARSyDdHX+bbpNnBsgg3/fKwK6jwROur4CHiyjgAvl5wcIxz2rOvOl7rQ==",
185
+      "requires": {
186
+        "@types/node": "*"
187
+      }
188
+    },
176 189
     "abbrev": {
177 190
       "version": "1.1.1",
178 191
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -5955,9 +5968,9 @@
5955 5968
       }
5956 5969
     },
5957 5970
     "url-parse": {
5958
-      "version": "1.4.1",
5959
-      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.1.tgz",
5960
-      "integrity": "sha512-x95Td74QcvICAA0+qERaVkRpTGKyBHHYdwL2LXZm5t/gBtCB9KQSO/0zQgSTYEV1p0WcvSg79TLNPSvd5IDJMQ==",
5971
+      "version": "1.4.3",
5972
+      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz",
5973
+      "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==",
5961 5974
       "requires": {
5962 5975
         "querystringify": "^2.0.0",
5963 5976
         "requires-port": "^1.0.0"

+ 1
- 0
zlg/package.json Целия файл

@@ -25,6 +25,7 @@
25 25
     "@ionic-native/status-bar": "~4.10.0",
26 26
     "@ionic/storage": "2.1.3",
27 27
     "@types/sockjs-client": "^1.1.0",
28
+    "@types/stompjs": "^2.3.3",
28 29
     "ionic-angular": "3.9.2",
29 30
     "ionicons": "3.0.0",
30 31
     "ng-socket-io": "^0.2.4",

+ 34
- 12
zlg/src/pages/login/login.html Целия файл

@@ -1,17 +1,39 @@
1
-<ion-content padding>
2
-  <ion-list>
1
+
2
+<ion-header>
3
+    <ion-navbar>
4
+      <ion-title color="white">Login to the Vault</ion-title>
5
+    </ion-navbar>
6
+  </ion-header>
3 7
   
4
-    <ion-item>
5
-      <ion-label fixed>Username</ion-label>
6
-      <ion-input type="text" value=""></ion-input>
7
-    </ion-item>
8 8
   
9
-    <ion-item>
10
-      <ion-label fixed>Password</ion-label>
11
-      <ion-input type="password"></ion-input>
12
-    </ion-item>
9
+  <ion-content class="login-content" padding style="background: url(../assets/img/welcome.png) no-repeat center;background-size:cover">
10
+    <div class="login-box">
13 11
   
14
-    <button ion-button block color="primary" (click)="login()">Login</button>
12
+      <form (ngSubmit)="login()" #loginForm="ngForm">
13
+        <ion-row>
14
+          <ion-col>
15
+            <ion-list inset>
15 16
   
16
-  </ion-list>
17
+              <ion-item>
18
+                <ion-input type="text" placeholder="Username" name="username" [(ngModel)]="loginCredentials.username" required></ion-input>
19
+              </ion-item>
20
+  
21
+              <ion-item>
22
+                <ion-input type="password" placeholder="Password" name="password" [(ngModel)]="loginCredentials.password" required></ion-input>
23
+              </ion-item>
24
+  
25
+            </ion-list>
26
+          </ion-col>
27
+        </ion-row>
28
+  
29
+        <ion-row>
30
+          <ion-col class="signup-col">
31
+            <button ion-button class="submit-btn" style="background-color: #7D5FE7; color: white" full type="submit" [disabled]="!loginForm.form.valid">Login</button>
32
+          </ion-col>
33
+        </ion-row>
34
+        
35
+      </form>
36
+      <button ion-button class="signup-btn" block clear (click)="signup()">Register New Account</button>
37
+
38
+    </div>
17 39
   </ion-content>

+ 2
- 0
zlg/src/pages/login/login.ts Целия файл

@@ -14,6 +14,8 @@ import { HomePage } from '../home/home';
14 14
 })
15 15
 export class Login {
16 16
 
17
+  loginCredentials = {username: '', password: ''};
18
+
17 19
   constructor(public navCtrl: NavController, public navParams: NavParams) {
18 20
   }
19 21
 

+ 1
- 1
zlg/src/pages/signup/signup.html Целия файл

@@ -1,4 +1,4 @@
1
-<ion-content padding>
1
+<ion-content padding-vertical style="background: url(../assets/img/welcome.png) no-repeat center;background-size:cover">
2 2
   <ion-list>
3 3
    <br />
4 4
     <ion-item>

+ 7
- 5
zlg/src/pages/welcome/welcome.html Целия файл

@@ -1,9 +1,11 @@
1 1
 
2 2
 
3
-<ion-content padding="true" style="background: url(../assets/img/welcome.png) no-repeat center;background-size:cover;vertical-align: middle;" id="welcome">
3
+<ion-content padding-vertical style="background: url(../assets/img/welcome.png) no-repeat center;background-size:cover">
4
+  <div style="align-items: center">
5
+  <h1 style="color: black; text-align: center;"> Welcome to the Vault </h1>
4 6
 
5
-  <h1> Welcome to the Vault </h1>
6
-  
7
-  <button ion-button block class="marginTop" (click)="signup()">Signup</button>
8
-  <button ion-button block color="lightprimary" (click)="login()">Login</button>
7
+  <button ion-button block style="background-color: #7D5FE7; color: white" (click)="login()">Login</button>
8
+  <button ion-button block style="background-color: #7D5FE7; color: white" (click)="signup()">Signup</button>
9
+
10
+  </div>  
9 11
   </ion-content>

+ 1
- 2
zlg/src/pages/welcome/welcome.scss Целия файл

@@ -1,4 +1,3 @@
1 1
 page-welcome {
2
-   text-align: center;
3
-   color: red;
2
+  color: color($colors, primary);
4 3
 }

+ 2
- 3
zlg/src/theme/variables.scss Целия файл

@@ -34,9 +34,8 @@ $app-direction: ltr;
34 34
 // The "primary" color is the only required color in the map.
35 35
 
36 36
 $colors: (
37
-  primary:    #488aff,
38
-  secondary:  #32db64,
39
-  danger:     #f53d3d,
37
+  primary:    #7D5FE7,
38
+  secondary:  #8f7ece,
40 39
   light:      #f4f4f4,
41 40
   dark:       #222
42 41
 );