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
d5a94ae5
Unverified
Commit
d5a94ae5
authored
Jun 24, 2021
by
Sarah Otts
Committed by
GitHub
Jun 24, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5658 from seotts/add-by-url-text
Match Add Project placeholder & button text to old studios
parents
70ae24fc
29a818a5
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 @
d5a94ae5
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
"studio.projectsHeader"
:
"Projects"
,
"studio.projectsHeader"
:
"Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProject"
:
"Add"
,
"studio.addProject"
:
"Add by URL"
,
"studio.addProjectPlaceholder"
:
"Project URL"
,
"studio.openToAll"
:
"Anyone can add projects"
,
"studio.openToAll"
:
"Anyone can add projects"
,
...
...
src/views/studio/studio-project-adder.jsx
View file @
d5a94ae5
...
@@ -3,7 +3,7 @@ import React, {useState} from 'react';
...
@@ -3,7 +3,7 @@ import React, {useState} from 'react';
import
PropTypes
from
'
prop-types
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
connect
}
from
'
react-redux
'
;
import
classNames
from
'
classnames
'
;
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
{
Errors
,
addProject
}
from
'
./lib/studio-project-actions
'
;
import
UserProjectsModal
from
'
./modals/user-projects-modal.jsx
'
;
import
UserProjectsModal
from
'
./modals/user-projects-modal.jsx
'
;
...
@@ -23,7 +23,7 @@ const errorToMessageId = error => {
...
@@ -23,7 +23,7 @@ const errorToMessageId = error => {
}
}
};
};
const
StudioProjectAdder
=
({
intl
,
onSubmit
})
=>
{
const
StudioProjectAdder
=
({
onSubmit
})
=>
{
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
error
,
setError
]
=
useState
(
null
);
const
[
error
,
setError
]
=
useState
(
null
);
...
@@ -67,7 +67,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
...
@@ -67,7 +67,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
className=
{
classNames
({
'
mod-form-error
'
:
error
})
}
className=
{
classNames
({
'
mod-form-error
'
:
error
})
}
disabled=
{
submitting
}
disabled=
{
submitting
}
type=
"text"
type=
"text"
placeholder=
{
intl
.
formatMessage
({
id
:
'
studio.addProjectPlaceholder
'
})
}
placeholder=
"https://scratch.mit.edu/projects/xxxx"
value=
{
value
}
value=
{
value
}
onKeyDown=
{
e
=>
e
.
key
===
'
Enter
'
&&
submit
()
}
onKeyDown=
{
e
=>
e
.
key
===
'
Enter
'
&&
submit
()
}
onChange=
{
e
=>
setValue
(
e
.
target
.
value
)
}
onChange=
{
e
=>
setValue
(
e
.
target
.
value
)
}
...
@@ -93,8 +93,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
...
@@ -93,8 +93,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
};
};
StudioProjectAdder
.
propTypes
=
{
StudioProjectAdder
.
propTypes
=
{
onSubmit
:
PropTypes
.
func
,
onSubmit
:
PropTypes
.
func
intl
:
intlShape
};
};
const
mapStateToProps
=
()
=>
({});
const
mapStateToProps
=
()
=>
({});
...
@@ -103,4 +102,4 @@ const mapDispatchToProps = ({
...
@@ -103,4 +102,4 @@ const mapDispatchToProps = ({
onSubmit
:
addProject
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