Skip to content

Commit f514aac

Browse files
committed
Added password forget, reset password, email action, double opt in
1 parent 909a7b8 commit f514aac

Some content is hidden

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

51 files changed

+1279
-203
lines changed

.DS_Store

2 KB
Binary file not shown.

.env.production

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ST_SERVICE_API_ENDPOINT=https://service-api.colivery.app
2-
ST_MATCHING_API_ENDPOINT=https://matching-api.colivery.app
1+
ST_SERVICE_API_ENDPOINT=https://service-api.nightly.staging.colivery.app
2+
ST_MATCHING_API_ENDPOINT=https://matching-api.nightly.staging.colivery.app

.firebase/hosting.cHVibGlj.cache

+72-30
Large diffs are not rendered by default.

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
public/*
2+
public/*
3+
.DS_Store

assets/components/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $primary-color-dark: darken($primary-color, 15%) !default;
4242
// custom SpringType light-blue
4343
$secondary-color: $colivery-orange !default;
4444
$success-color: $colivery-green !default;
45-
$error-color: color("red", "base") !default;
45+
$error-color: color("red", "darken-2") !default;
4646
$link-color: $colivery-blue !default;
4747

4848

assets/global-styles.scss

+52-15
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,25 @@
44
@import "./mat-modal";
55
@import "./mat-button";
66

7-
html, body {
7+
html,
8+
body {
89
height: 100%;
9-
font-family: 'Montserrat', sans-serif;
10+
font-family: "Montserrat", sans-serif;
1011
background-color: $colivery-background;
1112
}
1213

13-
.info-button, .info-button:hover {
14+
.info-button,
15+
.info-button:hover {
1416
background-color: $colivery-blue;
1517
}
1618

17-
.cancel-button, .cancel-button:hover {
19+
.cancel-button,
20+
.cancel-button:hover {
1821
background-color: #cc0000;
1922
}
2023

21-
.success-button, .success-button:hover {
24+
.success-button,
25+
.success-button:hover {
2226
background-color: $colivery-green;
2327
}
2428

@@ -66,12 +70,47 @@ h3.slogan {
6670
.horizontal-scroll {
6771
width: 100%;
6872
display: block;
69-
height: 100%;
73+
height: 100%;
7074
overflow-x: scroll;
7175
overflow-y: hidden;
7276
white-space: nowrap;
7377
}
7478

79+
input.invalid:not(.browser-default),
80+
input.invalid:not(.browser-default):focus,
81+
textarea.materialize-textarea.invalid,
82+
textarea.materialize-textarea.invalid:focus,
83+
.select-wrapper.invalid > input.select-dropdown,
84+
.select-wrapper.invalid > input.select-dropdown:focus {
85+
border: 2px solid $error-color !important;
86+
}
87+
88+
input:not(.browser-default),
89+
input:not(.browser-default):focus,
90+
textarea.materialize-textarea,
91+
textarea.materialize-textarea:focus,
92+
.select-wrapper > input.select-dropdown,
93+
.select-wrapper > input.select-dropdown:focus {
94+
border: 2px solid $colivery-orange !important;
95+
}
96+
97+
input:not(.browser-default),
98+
textarea.materialize-textarea {
99+
background-color: #fff !important;
100+
box-shadow: none !important;
101+
border: 2px solid $input-border-color !important;
102+
border-radius: 5px !important;
103+
padding-left: 10px !important;
104+
padding-right: 10px !important;
105+
width: calc(100% - 20px) !important;
106+
}
107+
108+
.input-field > label:not(.label-icon) {
109+
transform: translateY(12px) translateX(10px);
110+
}
111+
.input-field > label:not(.label-icon).active {
112+
transform: translateY(-20px) scale(0.8);
113+
}
75114

76115
/* Mobile */
77116
@media screen and (max-width: 768px) {
@@ -159,9 +198,9 @@ h5 .order-card-icon {
159198

160199
.order-line {
161200
padding-left: 10px;
162-
padding-top: 4px;
201+
padding-top: 4px;
163202
padding-bottom: 4px;
164-
line-height: 1.3rem;
203+
line-height: 1.3rem;
165204
}
166205

167206
.material-align-middle {
@@ -194,15 +233,13 @@ h5 .order-card-icon {
194233
}
195234
color: $colivery-orange;
196235
text-decoration: underline;
197-
198236
}
199237

200238
.action-button {
201239
bottom: 14px !important;
202240
right: 14px !important;
203241
}
204242

205-
206243
/* webkit scrollbar */
207244

208245
/* Let's get this party started */
@@ -212,7 +249,7 @@ h5 .order-card-icon {
212249

213250
/* Track */
214251
::-webkit-scrollbar-track {
215-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
252+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
216253
-webkit-border-radius: 10px;
217254
border-radius: 10px;
218255
}
@@ -221,9 +258,9 @@ h5 .order-card-icon {
221258
::-webkit-scrollbar-thumb {
222259
-webkit-border-radius: 10px;
223260
border-radius: 10px;
224-
background: $colivery-orange;
225-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
261+
background: $colivery-orange;
262+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
226263
}
227264
::-webkit-scrollbar-thumb:window-inactive {
228-
background: $colivery-orange;
229-
}
265+
background: $colivery-orange;
266+
}

assets/mat-modal.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
z-index: 1000000 !important;
2525
}
2626

27-
.modal-footer {
28-
height: 65px !important;
27+
.modal .modal-footer {
28+
height: 65px;
2929
border-top: 0 !important;
3030
background-color: $colivery-orange !important;
3131
padding: 20px !important;
@@ -35,6 +35,7 @@
3535
.modal.modal-fixed-footer .modal-content {
3636
height: calc(100% - 95px) !important;
3737
}
38+
3839
/* Mobile */
3940
@media screen and (max-width: 768px) {
4041
.modal.open {

firebase.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"headers": [
1919
{
2020
"key": "Cache-Control",
21-
"value": "max-age=0"
21+
"value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
2222
}
2323
]
2424
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"latlon-geohash": "^2.0.0",
4242
"libsodium-wrappers": "^0.7.6",
4343
"materialize-css": "^1.0.0",
44-
"springtype": "[email protected].65",
45-
"st-materialize": "^1.0.0-beta.10"
44+
"springtype": "[email protected].72",
45+
"st-materialize": "1.0.0-beta.19"
4646
}
4747
}

src/.DS_Store

0 Bytes
Binary file not shown.

src/component/error-message/error-message.tss.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.errorMessage {
1+
errormessage {
22
margin: 1em;
33
text-align: center;
44
font-weight: bold;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
// This file is generated automatically
2-
export const errorMessage: string;

src/component/error-message/error-message.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { st } from "springtype/core";
22
import { component, attr } from "springtype/web/component";
33
import { tsx } from "springtype/web/vdom";
4-
import * as errorMessageStyles from "./error-message.tss.scss";
4+
import { ref } from "springtype/core/ref";
5+
import "./error-message.tss.scss";
56

67
interface ErrorMessageAttrs {
78
message?: string;
@@ -13,9 +14,16 @@ export class ErrorMessage extends st.component<ErrorMessageAttrs> {
1314
@attr
1415
message: string;
1516

17+
@ref
18+
messageRef: HTMLElement;
19+
20+
setMessage(message: string) {
21+
this.renderPartial(message, this.messageRef);
22+
}
23+
1624
render() {
1725
return this.message ? (
18-
<p class={errorMessageStyles.errorMessage}>{this.message}</p>
26+
<p ref={{ messageRef: this }}>{this.message}</p>
1927
) : (
2028
<fragment />
2129
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.modal-middle-content {
2+
width: 100%;
3+
height: 100%;
4+
display: flex;
5+
align-items: center;
6+
}

src/component/modal-middle-content/modal-middle-content.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
import "./modal-middle-content.scss";
12
import { st } from "springtype/core";
23
import { component } from "springtype/web/component";
34

45
@component({ tag: 'div' })
56
export class ModalMiddleContent extends st.component {
67

7-
style = {
8-
width: '100%',
9-
height: '100%'
10-
};
8+
class = "modal-middle-content";
119

1210
render() {
1311
return this.renderChildren();

src/guard/login-guard.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {LoginPage} from "../page/login/login";
1010
import {PreferenceService} from "../service/preference";
1111
import {RegisterChooseProfile} from "../page/register/register-choose-profile/register-choose-profile";
1212
import {UserService} from "../service/user";
13+
import { NotConfirmedPage } from "../page/not-confirmed/not-confirmed";
1314

1415
@injectable
1516
export class LoginGuard {
@@ -37,6 +38,10 @@ export class LoginGuard {
3738
return LoginPage.ROUTE;
3839
}
3940

41+
if (!this.authService.isVerified()) {
42+
return NotConfirmedPage.ROUTE;
43+
}
44+
4045
const userProfile = await this.userService.getUserProfile();
4146

4247
if (!userProfile) {

src/index.tsx

+36
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import { UserProfilePage } from "./page/user-profile/user-profile";
2323
import { DriverOrderList } from "./page/driver-order-list/driver-order-list";
2424
import { GeoService } from "./service/geo";
2525
import { I18nService } from "./service/i18n";
26+
import { ForgotPasswordPage } from "./page/forgot-password/forgot-password";
27+
import { NotConfirmedPage } from "./page/not-confirmed/not-confirmed";
28+
import { EmailActionPage } from "./page/email-action/email-action";
29+
import { ResetPasswordPage } from "./page/reset-password/reset-password";
2630

2731
@component
2832
export class App extends st.component implements ILifecycle {
@@ -43,6 +47,7 @@ export class App extends st.component implements ILifecycle {
4347
super();
4448

4549
this.i18nService.init();
50+
4651
/*
4752
console.log('geoService', this.geoService.haversine({
4853
latitude: 48.330713,
@@ -67,6 +72,7 @@ export class App extends st.component implements ILifecycle {
6772
</template>
6873
<SplashscreenPage />
6974
</Route>
75+
7076
<Route cacheGroup="login" path={[LoginPage.ROUTE]} displayStyle={'inline'}
7177
guard={this.loginGuard.autoLogin}>
7278
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
@@ -75,6 +81,20 @@ export class App extends st.component implements ILifecycle {
7581
<LoginPage />
7682
</Route>
7783

84+
<Route cacheGroup="login" path={[ForgotPasswordPage.ROUTE]} displayStyle={'inline'}>
85+
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
86+
<MatLoadingIndicator />
87+
</template>
88+
<ForgotPasswordPage />
89+
</Route>
90+
91+
<Route cacheGroup="login" path={[ResetPasswordPage.ROUTE]} displayStyle={'inline'}>
92+
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
93+
<MatLoadingIndicator />
94+
</template>
95+
<ResetPasswordPage />
96+
</Route>
97+
7898
<Route path={[ConsumerOrderListPage.ROUTE]} displayStyle={'inline'}
7999
guard={this.loginGuard.loggedIn}>
80100
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
@@ -89,6 +109,7 @@ export class App extends st.component implements ILifecycle {
89109
</template>
90110
<ConsumerOrderAddPage />
91111
</Route>
112+
92113
<Route path={[UserProfilePage.ROUTE]} displayStyle={'inline'} guard={this.loginGuard.loggedIn}>
93114
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
94115
<MatLoadingIndicator />
@@ -103,6 +124,21 @@ export class App extends st.component implements ILifecycle {
103124
<DriverOrderList />
104125
</Route>
105126

127+
<Route path={[NotConfirmedPage.ROUTE]} displayStyle={'inline'}>
128+
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
129+
<MatLoadingIndicator />
130+
</template>
131+
<NotConfirmedPage />
132+
</Route>
133+
134+
<Route path={[EmailActionPage.ROUTE]} displayStyle={'inline'}>
135+
<template slot={Route.SLOT_NAME_LOADING_COMPONENT}>
136+
<MatLoadingIndicator />
137+
</template>
138+
<EmailActionPage />
139+
</Route>
140+
141+
106142
</RouteList>
107143

108144
<RegisterRoute />

src/page/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)