forked from unstructuredstudio/zubhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed failed to load api specification error (unstructuredstudio#363) fixed failed to load api specification error added style to fix text wrap (unstructuredstudio#373) Add hot reloading to media container (unstructuredstudio#382) Add new search features (unstructuredstudio#362) * Finish creators and projects search migration * Finish creators and projects search migration * Add tag search * Add search for projects with tags * Fix search bar on mobile * use 0 rather than 0 with units in css * Remove print * Default search type to projects * Disable scroll lock Revert package-lock (unstructuredstudio#383) improveConsistency: fixed title text small, extra vertical space ... (unstructuredstudio#369) * improveConsistency: fixed title text small, extra vertical space and inconsitent padding of buttons fix text overflow issue in signup page phone number field (unstructuredstudio#378) removed spacing between icons
- Loading branch information
Showing
21 changed files
with
395 additions
and
332 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
|
@@ -282,14 +282,15 @@ class API { | |
* | ||
* @todo - describe method's signature | ||
*/ | ||
searchProjects = ({ page, token, query_string }) => { | ||
let url; | ||
searchProjects = ({ page, token, query_string, criteria }) => { | ||
const params = { q: query_string, criteria }; | ||
if (page) { | ||
url = `projects/search/?q=${query_string}&page=${page}`; | ||
} else { | ||
url = `projects/search/?q=${query_string}`; | ||
params[page] = page; | ||
} | ||
|
||
const searchParams = new URLSearchParams(params); | ||
const url = `projects/search/?${searchParams.toString()}`; | ||
|
||
return this.request({ url, token }).then(res => res.json()); | ||
}; | ||
|
||
|
@@ -310,6 +311,17 @@ class API { | |
return this.request({ url, token }).then(res => res.json()); | ||
}; | ||
|
||
searchTags = ({ page, token, query_string }) => { | ||
let url; | ||
if (page) { | ||
url = `projects/tags/search/?q=${query_string}&page=${page}`; | ||
} else { | ||
url = `projects/tags/search/?q=${query_string}`; | ||
} | ||
|
||
return this.request({ url, token }).then(res => res.json()); | ||
}; | ||
|
||
/** | ||
* @method getFollowers - get a list of users that a username is following | ||
* @author Raymond Ndibe <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -595,3 +595,7 @@ html, | |
.display-none { | ||
display: none !important; | ||
} | ||
|
||
.MuiInputBase-root #phone{ | ||
width: 80%; | ||
} |
This file contains 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 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 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
64 changes: 64 additions & 0 deletions
64
zubhub_frontend/zubhub/src/components/input_select/InputSelect.jsx
This file contains 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,64 @@ | ||
import { InputBase, Select, withStyles } from '@material-ui/core'; | ||
import React from 'react'; | ||
|
||
const BootstrapInput = withStyles(theme => ({ | ||
input: { | ||
borderRadius: 0, | ||
borderTopLeftRadius: 250, | ||
borderBottomLeftRadius: 250, | ||
position: 'relative', | ||
fontSize: 16, | ||
padding: '10px 26px 10px 18px', | ||
backgroundColor: '#00B8C4', | ||
color: 'white', | ||
transition: 'background-color 250ms ease', | ||
textAlign: 'center', | ||
'& ~ svg': { | ||
color: 'white', | ||
}, | ||
'&:focus': { | ||
borderTopLeftRadius: 250, | ||
borderBottomLeftRadius: 250, | ||
backgroundColor: '#00B8C4', | ||
}, | ||
'&[aria-expanded]': { | ||
borderRadius: 0, | ||
borderTopLeftRadius: 250, | ||
borderBottomLeftRadius: 250, | ||
backgroundColor: 'white', | ||
color: '#00B8C4', | ||
'& ~ svg': { | ||
color: '#00B8C4', | ||
}, | ||
}, | ||
}, | ||
}))(InputBase); | ||
|
||
const InputSelect = ({ | ||
searchType, | ||
onSearchTypeChange, | ||
children, | ||
...selectProps | ||
}) => { | ||
return ( | ||
<Select | ||
labelId="demo-customized-select-label" | ||
id="demo-customized-select" | ||
value={searchType} | ||
onChange={({ target: { value } }) => onSearchTypeChange(value)} | ||
input={<BootstrapInput />} | ||
style={{ minWidth: '115px' }} | ||
MenuProps={{ | ||
getContentAnchorEl: null, | ||
anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, | ||
transformOrigin: { vertical: 'top', horizontal: 'center' }, | ||
disableScrollLock: true, | ||
}} | ||
{...selectProps} | ||
> | ||
{children} | ||
</Select> | ||
); | ||
}; | ||
|
||
export default InputSelect; |
Oops, something went wrong.