-
Notifications
You must be signed in to change notification settings - Fork 0
Topic/web #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jkvaternik
wants to merge
12
commits into
development
Choose a base branch
from
topic/web
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Topic/web #24
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4f6324d
feat: Add Web Files
27f20f0
Feat: Kript homepage interface
8edbefe
Topic/web - Feat: Add Home html/css/js
cb39d5e
Fixing commit
f421804
Feat: Kript homepage interface
2d65676
Topic/web - Feat: Add Home html/css/js
8002200
Fix merge conflict
ed1d102
edit .gitignore for esLint file
413fbe3
fix App.test.js
8af2135
edit NPM test
83134c8
Delete .eslintcache
c02b594
fix: Increate cloudbuild timeout
liam923 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .App { | ||
| margin: auto 15%; | ||
| box-sizing: border-box; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| import React from 'react'; | ||
|
|
||
| import Aux from '../../hoc/Aux/Aux'; | ||
|
|
||
| import styles from './Datum.module.css'; | ||
|
|
||
| const datum = (props) => { | ||
| let datum = null; | ||
|
|
||
| switch (props.type) { | ||
| case ('passwords'): | ||
| datum = ( | ||
| <Aux> | ||
| <h4>{props.datum.url}</h4> | ||
| <p>{props.datum.username}</p> | ||
| </Aux> | ||
| ); | ||
| break; | ||
| case ('creditcards'): | ||
| datum = ( | ||
| <Aux> | ||
| <h4>{props.datum.desc}</h4> | ||
| <p>Ending with {props.datum.number.slice(props.datum.number.length - 4)}</p> | ||
| </Aux> | ||
| ); | ||
| break; | ||
| case ('notes'): | ||
| datum = ( | ||
| <Aux> | ||
| <h4>{props.datum.title}</h4> | ||
| </Aux> | ||
| ); | ||
| break; | ||
| case ('codes'): | ||
| datum = ( | ||
| <Aux> | ||
| <h4>{props.datum.desc}</h4> | ||
| <p>{props.datum.type}</p> | ||
| </Aux> | ||
| ); | ||
| break; | ||
| default: | ||
| datum = null; | ||
| break; | ||
|
Comment on lines
+11
to
+44
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code ends up switching over the types of datums in a lot of places. Maybe an enum or some sort of inheritance would be better? |
||
| } | ||
|
|
||
| return ( | ||
| // revise onClick method; should it be ID based or not? | ||
| <div className={styles.Datum} onClick={() => props.clicked(props.datum)}> | ||
| <div style={{ backgroundColor: 'beige', height: '100px', borderRadius: '15px 15px 0 0' }}></div> | ||
| <div style={{ padding: '20px' }}> | ||
| {datum} | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default datum; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .Datum { | ||
| background-color: white; | ||
| border-radius: 15px; | ||
| box-sizing: border-box; | ||
| box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16); | ||
| display: inline-block; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| h4 { | ||
| margin: 0; | ||
| } | ||
|
|
||
| p { | ||
| margin: 0; | ||
| font-size: 1em; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import React from 'react'; | ||
|
|
||
| import Button from '../common/Button/Button'; | ||
| import NavigationItem from './NavigationItem/NavigationItem'; | ||
|
|
||
| import styles from './NavigationBar.module.css'; | ||
|
|
||
| const navigationBar = (props) => ( | ||
| <div className={styles.NavigationBar}> | ||
| <div> | ||
| <NavigationItem navType='all' clicked={() => props.itemClicked('')} active={props.filter === ''}/> | ||
| <NavigationItem navType='passwords' clicked={() => props.itemClicked('passwords')} active={props.filter === 'passwords'}/> | ||
| <NavigationItem navType='creditcards' clicked={() => props.itemClicked('creditcards')} active={props.filter === 'creditcards'}/> | ||
| <NavigationItem navType='notes' clicked={() => props.itemClicked('notes')} active={props.filter === 'notes'}/> | ||
| <NavigationItem navType='codes' clicked={() => props.itemClicked('codes')} active={props.filter === 'codes'}/> | ||
| </div> | ||
| <Button clicked={props.addDataClicked}>Add Data</Button> | ||
| <Button clicked={props.logOutClicked}>Log Out</Button> | ||
| </div> | ||
| ); | ||
|
|
||
| export default navigationBar; |
15 changes: 15 additions & 0 deletions
15
client/web/src/components/NavigationBar/NavigationBar.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| .NavigationBar { | ||
| display: inline-flex; | ||
| flex-direction: column; | ||
| width: inherit; | ||
| } | ||
|
|
||
| .NavigationBar div { | ||
| display: inline-flex; | ||
| flex-direction: column; | ||
| flex-wrap: nowrap; | ||
| padding: 20px; | ||
| border-radius: 15px; | ||
| box-sizing: border-box; | ||
| box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16); | ||
| } |
40 changes: 40 additions & 0 deletions
40
client/web/src/components/NavigationBar/NavigationItem/NavigationItem.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import React from 'react'; | ||
|
|
||
| import AllInclusiveIcon from '@material-ui/icons/AllInclusive'; | ||
| import VpnKeyIcon from '@material-ui/icons/VpnKey'; | ||
| import CreditCardIcon from '@material-ui/icons/CreditCard'; | ||
| import NoteIcon from '@material-ui/icons/Note'; | ||
| import FiberPinIcon from '@material-ui/icons/FiberPin'; | ||
|
|
||
| import styles from './NavigationItem.module.css'; | ||
|
|
||
| const navigationItem = (props) => { | ||
| let output = null; | ||
|
|
||
| switch (props.navType) { | ||
| case ('all'): | ||
| output = <span onClick={props.clicked} className={props.active ? styles.active : null}><AllInclusiveIcon className={styles.icon}/><span className={styles.NavText}>All</span></span> | ||
| break; | ||
| case ('passwords'): | ||
| output = <span onClick={props.clicked} className={props.active ? styles.active : null}><VpnKeyIcon className={styles.icon}/><span>Passwords</span></span> | ||
| break; | ||
| case ('creditcards'): | ||
| output = <span onClick={props.clicked} className={props.active ? styles.active : null}><CreditCardIcon className={styles.icon}/><span>Credit Cards</span></span> | ||
| break; | ||
| case ('notes'): | ||
| output = <span onClick={props.clicked} className={props.active ? styles.active : null}><NoteIcon className={styles.icon}/><span>Notes</span></span> | ||
| break; | ||
| case ('codes'): | ||
| output = <span onClick={props.clicked} className={props.active ? styles.active : null}><FiberPinIcon className={styles.icon}/><span>Codes</span></span> | ||
| break; | ||
| default: | ||
| output = null; | ||
| break; | ||
| } | ||
|
|
||
| return ( | ||
| output | ||
| ) | ||
| }; | ||
|
|
||
| export default navigationItem; |
20 changes: 20 additions & 0 deletions
20
client/web/src/components/NavigationBar/NavigationItem/NavigationItem.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| .icon { | ||
| position: relative; | ||
| top: 5px; | ||
| } | ||
| span > span { | ||
| margin-left: 10px; | ||
| } | ||
|
|
||
| span:hover { | ||
| text-decoration: none; | ||
| color: #537BFF; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| span:active, | ||
| span.active { | ||
| text-decoration: none; | ||
| color: #537BFF; | ||
| font-weight: bold; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import React from 'react'; | ||
|
|
||
| import styles from './Button.module.css'; | ||
|
|
||
| const button = (props) => ( | ||
| <button | ||
| className={styles.Button} | ||
| onClick={props.clicked}> | ||
| {props.children} | ||
| </button> | ||
| ); | ||
|
|
||
| export default button; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| .Button { | ||
| background-color: #FF8E8E; | ||
| color: white; | ||
| border-radius: 15px; | ||
| border: none; | ||
| box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16); | ||
| font-weight: bold; | ||
| padding-top: 12px; | ||
| padding-bottom: 12px; | ||
| margin-top: 16px; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import React from 'react'; | ||
|
|
||
| const modal = (props) => { | ||
| return ( | ||
| <div> | ||
| {this.props.children} | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| export default modal; |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.