-
-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Project Invite Flow (Screens Only) and Practice Mode #695
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
ErikSin
wants to merge
17
commits into
master
Choose a base branch
from
ProjectJoin
base: master
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
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
274b46b
feat: Added settings tab
ErikSin 1788230
chore: Added Translations
ErikSin 4564577
chore: updated jsdoc types
ErikSin 66c8186
chore: updated translations
ErikSin a5f9d7f
chore: translations
ErikSin 9fee234
chore: updated Types
ErikSin 171877c
feat: add project invite flow
ErikSin 76185b3
chore: translations
ErikSin 6b69487
chore: ui updates
ErikSin 23ca707
chore: translations
ErikSin e38ae27
feat: added settings context
ErikSin 490de4c
chore: translations
ErikSin d0d00f4
feat: useProjectInviteListener and invite dialog
ErikSin c2b92f4
chore: translations
ErikSin 1219a9c
chore: linting
ErikSin d061a18
chore: pr clean up
ErikSin 1db2bce
chore: linting
ErikSin 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 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,82 @@ | ||
| // @ts-check | ||
| import * as React from 'react' | ||
| import TextField from '@material-ui/core/TextField' | ||
| import Button from '@material-ui/core/Button' | ||
| import Typography from '@material-ui/core/Typography' | ||
| import FileCopy from '@material-ui/icons/FileCopy' | ||
| import Snackbar from '@material-ui/core/Snackbar' | ||
| import { defineMessages, useIntl } from 'react-intl' | ||
| import { makeStyles } from '@material-ui/core/styles' | ||
| import Tooltip from '@material-ui/core/Tooltip' | ||
| import MuiAlert from '@material-ui/lab/Alert' | ||
|
|
||
| const m = defineMessages({ | ||
| // message indicated that text has been copied to clipboard | ||
| copied: 'Copied to clipboard', | ||
| // message to user indicating that clicking the button will copy text | ||
| copyText: 'Copy text' | ||
| }) | ||
|
|
||
| /** | ||
| * @typedef CopyToClipboardProps | ||
| * @prop {string} textToCopy | ||
| * @prop {function} [onCopy] | ||
| */ | ||
|
|
||
| /** @param {CopyToClipboardProps} props */ | ||
| export const CopyToClipboard = ({ textToCopy, onCopy }) => { | ||
| const { formatMessage: t } = useIntl() | ||
|
|
||
| const [open, setOpen] = React.useState(false) | ||
|
|
||
| const cx = useStyles() | ||
|
|
||
| function handleClick () { | ||
| if (onCopy) { | ||
| onCopy() | ||
| } | ||
| navigator.clipboard.writeText(textToCopy).then(() => { | ||
| setOpen(true) | ||
| }) | ||
| } | ||
|
|
||
| return ( | ||
| <React.Fragment> | ||
| <div className={cx.textField}> | ||
| <TextField | ||
| style={{ minWidth: '90%' }} | ||
| value={textToCopy} | ||
| variant='outlined' | ||
| /> | ||
| <Tooltip title={t(m.copyText)} placement='top'> | ||
| <Button variant='contained' color='primary' onClick={handleClick}> | ||
| <FileCopy /> | ||
| </Button> | ||
| </Tooltip> | ||
| </div> | ||
| <Snackbar | ||
| open={open} | ||
| autoHideDuration={3000} | ||
| onClose={() => { | ||
| setOpen(false) | ||
| }} | ||
| > | ||
| <Alert severity='success'> | ||
| <Typography>{t(m.copied)}</Typography> | ||
| </Alert> | ||
| </Snackbar> | ||
| </React.Fragment> | ||
| ) | ||
| } | ||
|
|
||
| const Alert = props => { | ||
| return <MuiAlert elevation={6} variant='filled' {...props} /> | ||
| } | ||
|
|
||
| const useStyles = makeStyles({ | ||
| textField: { | ||
| display: 'flex', | ||
| justifyContent: 'space-between', | ||
| width: '100%' | ||
| } | ||
| }) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirm that
Ais capitalized in the copy deck?