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
4f6a5832
Commit
4f6a5832
authored
May 13, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add placeholders for project and curator inputs
parent
3a59ea07
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
src/views/studio/l10n.json
src/views/studio/l10n.json
+2
-0
src/views/studio/studio-curator-inviter.jsx
src/views/studio/studio-curator-inviter.jsx
+6
-5
src/views/studio/studio-project-adder.jsx
src/views/studio/studio-project-adder.jsx
+6
-5
No files found.
src/views/studio/l10n.json
View file @
4f6a5832
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
"studio.projectsHeader"
:
"Projects"
,
"studio.projectsHeader"
:
"Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProject"
:
"Add"
,
"studio.addProject"
:
"Add"
,
"studio.addProjectPlaceholder"
:
"Project URL"
,
"studio.projectsEmptyCanAdd1"
:
"Your studio is looking a little empty."
,
"studio.projectsEmptyCanAdd1"
:
"Your studio is looking a little empty."
,
"studio.projectsEmptyCanAdd2"
:
"Add your first project!"
,
"studio.projectsEmptyCanAdd2"
:
"Add your first project!"
,
...
@@ -28,6 +29,7 @@
...
@@ -28,6 +29,7 @@
"studio.curatorsHeader"
:
"Curators"
,
"studio.curatorsHeader"
:
"Curators"
,
"studio.inviteCuratorsHeader"
:
"Invite Curators"
,
"studio.inviteCuratorsHeader"
:
"Invite Curators"
,
"studio.inviteCurator"
:
"Invite"
,
"studio.inviteCurator"
:
"Invite"
,
"studio.inviteCuratorPlaceholder"
:
"Scratch Username"
,
"studio.curatorAcceptInvite"
:
"Accept Invite"
,
"studio.curatorAcceptInvite"
:
"Accept Invite"
,
"studio.curatorsEmptyCanAdd1"
:
"You don’t have curators right now."
,
"studio.curatorsEmptyCanAdd1"
:
"You don’t have curators right now."
,
"studio.curatorsEmptyCanAdd2"
:
"Add some curators to collaborate with!"
,
"studio.curatorsEmptyCanAdd2"
:
"Add some curators to collaborate with!"
,
...
...
src/views/studio/studio-curator-inviter.jsx
View file @
4f6a5832
...
@@ -3,12 +3,12 @@ import React, {useState} from 'react';
...
@@ -3,12 +3,12 @@ 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
}
from
'
react-intl
'
;
import
{
FormattedMessage
,
intlShape
,
injectIntl
}
from
'
react-intl
'
;
import
{
inviteCurator
}
from
'
./lib/studio-member-actions
'
;
import
{
inviteCurator
}
from
'
./lib/studio-member-actions
'
;
import
FlexRow
from
'
../../components/flex-row/flex-row.jsx
'
;
import
FlexRow
from
'
../../components/flex-row/flex-row.jsx
'
;
const
StudioCuratorInviter
=
({
onSubmit
})
=>
{
const
StudioCuratorInviter
=
({
intl
,
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
);
...
@@ -27,7 +27,7 @@ const StudioCuratorInviter = ({onSubmit}) => {
...
@@ -27,7 +27,7 @@ const StudioCuratorInviter = ({onSubmit}) => {
<
input
<
input
disabled=
{
submitting
}
disabled=
{
submitting
}
type=
"text"
type=
"text"
placeholder=
"<username>"
placeholder=
{
intl
.
formatMessage
({
id
:
'
studio.inviteCuratorPlaceholder
'
})
}
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
)
}
...
@@ -46,7 +46,8 @@ const StudioCuratorInviter = ({onSubmit}) => {
...
@@ -46,7 +46,8 @@ const StudioCuratorInviter = ({onSubmit}) => {
};
};
StudioCuratorInviter
.
propTypes
=
{
StudioCuratorInviter
.
propTypes
=
{
onSubmit
:
PropTypes
.
func
onSubmit
:
PropTypes
.
func
,
intl
:
intlShape
};
};
const
mapStateToProps
=
()
=>
({});
const
mapStateToProps
=
()
=>
({});
...
@@ -55,4 +56,4 @@ const mapDispatchToProps = ({
...
@@ -55,4 +56,4 @@ const mapDispatchToProps = ({
onSubmit
:
inviteCurator
onSubmit
:
inviteCurator
});
});
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
StudioCuratorInviter
);
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
injectIntl
(
StudioCuratorInviter
)
);
src/views/studio/studio-project-adder.jsx
View file @
4f6a5832
...
@@ -3,13 +3,13 @@ import React, {useState} from 'react';
...
@@ -3,13 +3,13 @@ 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
}
from
'
react-intl
'
;
import
{
FormattedMessage
,
intlShape
,
injectIntl
}
from
'
react-intl
'
;
import
{
addProject
}
from
'
./lib/studio-project-actions
'
;
import
{
addProject
}
from
'
./lib/studio-project-actions
'
;
import
UserProjectsModal
from
'
./modals/user-projects-modal.jsx
'
;
import
UserProjectsModal
from
'
./modals/user-projects-modal.jsx
'
;
import
FlexRow
from
'
../../components/flex-row/flex-row.jsx
'
;
import
FlexRow
from
'
../../components/flex-row/flex-row.jsx
'
;
const
StudioProjectAdder
=
({
onSubmit
})
=>
{
const
StudioProjectAdder
=
({
intl
,
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
);
...
@@ -29,7 +29,7 @@ const StudioProjectAdder = ({onSubmit}) => {
...
@@ -29,7 +29,7 @@ const StudioProjectAdder = ({onSubmit}) => {
<
input
<
input
disabled=
{
submitting
}
disabled=
{
submitting
}
type=
"text"
type=
"text"
placeholder=
"<project id>"
placeholder=
{
intl
.
formatMessage
({
id
:
'
studio.addProjectPlaceholder
'
})
}
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
)
}
...
@@ -56,7 +56,8 @@ const StudioProjectAdder = ({onSubmit}) => {
...
@@ -56,7 +56,8 @@ const StudioProjectAdder = ({onSubmit}) => {
};
};
StudioProjectAdder
.
propTypes
=
{
StudioProjectAdder
.
propTypes
=
{
onSubmit
:
PropTypes
.
func
onSubmit
:
PropTypes
.
func
,
intl
:
intlShape
};
};
const
mapStateToProps
=
()
=>
({});
const
mapStateToProps
=
()
=>
({});
...
@@ -65,4 +66,4 @@ const mapDispatchToProps = ({
...
@@ -65,4 +66,4 @@ const mapDispatchToProps = ({
onSubmit
:
addProject
onSubmit
:
addProject
});
});
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
StudioProjectAdder
);
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
injectIntl
(
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