Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
a3b3a66f
Commit
a3b3a66f
authored
Jun 23, 2021
by
seotts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename button; change placeholder text
lint fix lint
parent
b3795c94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
src/views/studio/l10n.json
src/views/studio/l10n.json
+1
-2
src/views/studio/studio-project-adder.jsx
src/views/studio/studio-project-adder.jsx
+5
-6
No files found.
src/views/studio/l10n.json
View file @
a3b3a66f
...
...
@@ -29,8 +29,7 @@
"studio.projectsHeader"
:
"Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProject"
:
"Add"
,
"studio.addProjectPlaceholder"
:
"Project URL"
,
"studio.addProject"
:
"Add by URL"
,
"studio.openToAll"
:
"Anyone can add projects"
,
...
...
src/views/studio/studio-project-adder.jsx
View file @
a3b3a66f
...
...
@@ -3,7 +3,7 @@ import React, {useState} from 'react';
import
PropTypes
from
'
prop-types
'
;
import
{
connect
}
from
'
react-redux
'
;
import
classNames
from
'
classnames
'
;
import
{
FormattedMessage
,
intlShape
,
injectIntl
}
from
'
react-intl
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
import
{
Errors
,
addProject
}
from
'
./lib/studio-project-actions
'
;
import
UserProjectsModal
from
'
./modals/user-projects-modal.jsx
'
;
...
...
@@ -23,7 +23,7 @@ const errorToMessageId = error => {
}
};
const
StudioProjectAdder
=
({
intl
,
onSubmit
})
=>
{
const
StudioProjectAdder
=
({
onSubmit
})
=>
{
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
error
,
setError
]
=
useState
(
null
);
...
...
@@ -67,7 +67,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
className=
{
classNames
({
'
mod-form-error
'
:
error
})
}
disabled=
{
submitting
}
type=
"text"
placeholder=
{
intl
.
formatMessage
({
id
:
'
studio.addProjectPlaceholder
'
})
}
placeholder=
"http://scratch.mit.edu/projects/xxxx"
value=
{
value
}
onKeyDown=
{
e
=>
e
.
key
===
'
Enter
'
&&
submit
()
}
onChange=
{
e
=>
setValue
(
e
.
target
.
value
)
}
...
...
@@ -93,8 +93,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
};
StudioProjectAdder
.
propTypes
=
{
onSubmit
:
PropTypes
.
func
,
intl
:
intlShape
onSubmit
:
PropTypes
.
func
};
const
mapStateToProps
=
()
=>
({});
...
...
@@ -103,4 +102,4 @@ const mapDispatchToProps = ({
onSubmit
:
addProject
});
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
injectIntl
(
StudioProjectAdder
)
);
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
StudioProjectAdder
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment