From a7933ce8498046253e49e1459dc8a2c66cbe4f26 Mon Sep 17 00:00:00 2001 From: Dwayne Harris Date: Sat, 21 Sep 2019 13:03:58 -0400 Subject: [PATCH] WIP --- src/actions/forms.ts | 18 +++++++++++------ src/components/app/app.scss | 9 ++++++++- src/components/app/app.tsx | 8 ++++---- .../create-group-form/create-group-form.tsx | 2 +- .../create-group-step/create-group-step.tsx | 8 +++++++- .../create-user-step/create-user-step.tsx | 8 +++++++- .../forms/select-field/select-field.tsx | 10 ++++------ .../notification-container.scss | 2 +- src/components/pages/login/login.tsx | 11 ++++++++-- src/components/pages/register/index.ts | 14 +++++++------ src/components/pages/self/index.ts | 10 ++++------ src/components/pages/self/self.tsx | 10 ++++++++-- src/components/user-info/user-info.tsx | 4 ++-- src/reducers/forms.ts | 20 +++++++++++++++---- src/types/store.ts | 1 + src/utils/index.ts | 2 +- 16 files changed, 93 insertions(+), 44 deletions(-) diff --git a/src/actions/forms.ts b/src/actions/forms.ts index 075874d..fcfbc05 100644 --- a/src/actions/forms.ts +++ b/src/actions/forms.ts @@ -1,5 +1,5 @@ import { Action } from 'redux' -import { NotificationType } from '../types' +import { NotificationType, FormValue } from '../types' export interface InitFormAction extends Action { type: 'FORMS_INIT' @@ -7,14 +7,17 @@ export interface InitFormAction extends Action { export interface InitFieldAction extends Action { type: 'FORMS_INIT_FIELD' - payload: string + payload: { + name: string + apiName?: string + } } export interface SetFieldValueAction extends Action { type: 'FORMS_SET_FIELD_VALUE' payload: { name: string - value: any + value: FormValue } } @@ -41,12 +44,15 @@ export const initForm = (): InitFormAction => ({ type: 'FORMS_INIT', }) -export const initField = (name: string): InitFieldAction => ({ +export const initField = (name: string, apiName?: string): InitFieldAction => ({ type: 'FORMS_INIT_FIELD', - payload: name, + payload: { + name, + apiName, + }, }) -export const setFieldValue = (name: string, value: any): SetFieldValueAction => ({ +export const setFieldValue = (name: string, value: FormValue): SetFieldValueAction => ({ type: 'FORMS_SET_FIELD_VALUE', payload: { name, diff --git a/src/components/app/app.scss b/src/components/app/app.scss index 7e638a8..6bcfaf8 100644 --- a/src/components/app/app.scss +++ b/src/components/app/app.scss @@ -17,6 +17,7 @@ $family-sans-serif: "Open Sans", sans-serif; $primary: $blue; $title-weight: 400; $body-background-color: $white-ter; +$body-size: 14px; @import "../../../node_modules/bulma/sass/utilities/_all.sass"; @import "../../../node_modules/bulma/sass/base/_all.sass"; @@ -33,11 +34,12 @@ $body-background-color: $white-ter; div#main-menu { background-color: $primary; + border-left: 2px solid $purple; bottom: 0; display: flex; flex-direction: column; - left: 0; position: absolute; + right: 0; top: 0; } @@ -55,6 +57,11 @@ div.centered-content { margin: 1rem auto; padding: 2rem; width: 80%; + + div.centered-content-icon { + margin-top: -20px; + text-align: center; + } } div#navigation { diff --git a/src/components/app/app.tsx b/src/components/app/app.tsx index 92ca44b..6b83ae3 100644 --- a/src/components/app/app.tsx +++ b/src/components/app/app.tsx @@ -28,8 +28,8 @@ interface Props { } const App: FC = ({ collapsed, fetching, fetchSelf }) => { - const mainMenuWidth = 250 - const mainColumnLeftMargin = collapsed ? 0 : mainMenuWidth + const mainMenuWidth = 275 + const mainColumnMargin = collapsed ? 0 : mainMenuWidth useEffect(() => { if (localStorage.getItem(LOCAL_STORAGE_ACCESS_TOKEN_KEY)) { @@ -42,7 +42,7 @@ const App: FC = ({ collapsed, fetching, fetchSelf }) => {
-
+
diff --git a/src/components/create-group-form/create-group-form.tsx b/src/components/create-group-form/create-group-form.tsx index 9103564..4543aa3 100644 --- a/src/components/create-group-form/create-group-form.tsx +++ b/src/components/create-group-form/create-group-form.tsx @@ -28,7 +28,7 @@ const CreateGroupForm: FC = ({ checkAvailability }) => {
-
+