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
8a33d1c5
Commit
8a33d1c5
authored
Mar 24, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-export missing base comment actions to simplify
parent
d02ddef8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
src/redux/project-comment-actions.js
src/redux/project-comment-actions.js
+8
-1
src/views/preview/preview.jsx
src/views/preview/preview.jsx
+2
-2
src/views/preview/project-view.jsx
src/views/preview/project-view.jsx
+3
-4
No files found.
src/redux/project-comment-actions.js
View file @
8a33d1c5
...
@@ -6,6 +6,8 @@ const log = require('../lib/log');
...
@@ -6,6 +6,8 @@ const log = require('../lib/log');
const
COMMENT_LIMIT
=
20
;
const
COMMENT_LIMIT
=
20
;
const
{
const
{
addNewComment
,
resetComments
,
Status
,
Status
,
setFetchStatus
,
setFetchStatus
,
setCommentDeleted
,
setCommentDeleted
,
...
@@ -169,5 +171,10 @@ module.exports = {
...
@@ -169,5 +171,10 @@ module.exports = {
getReplies
,
getReplies
,
deleteComment
,
deleteComment
,
reportComment
,
reportComment
,
restoreComment
restoreComment
,
// Re-export these specific action creators directly so the implementer
// does not need to go to two places for comment actions
addNewComment
,
resetComments
};
};
src/views/preview/preview.jsx
View file @
8a33d1c5
...
@@ -5,7 +5,7 @@ const Page = require('../../components/page/www/page.jsx');
...
@@ -5,7 +5,7 @@ const Page = require('../../components/page/www/page.jsx');
const
render
=
require
(
'
../../lib/render.jsx
'
);
const
render
=
require
(
'
../../lib/render.jsx
'
);
const
previewActions
=
require
(
'
../../redux/preview.js
'
);
const
previewActions
=
require
(
'
../../redux/preview.js
'
);
const
comment
s
Actions
=
require
(
'
../../redux/comments.js
'
);
const
commentActions
=
require
(
'
../../redux/comments.js
'
);
const
isSupportedBrowser
=
require
(
'
../../lib/supported-browser
'
).
default
;
const
isSupportedBrowser
=
require
(
'
../../lib/supported-browser
'
).
default
;
const
UnsupportedBrowser
=
require
(
'
./unsupported-browser.jsx
'
);
const
UnsupportedBrowser
=
require
(
'
./unsupported-browser.jsx
'
);
...
@@ -17,7 +17,7 @@ if (isSupportedBrowser()) {
...
@@ -17,7 +17,7 @@ if (isSupportedBrowser()) {
document
.
getElementById
(
'
app
'
),
document
.
getElementById
(
'
app
'
),
{
{
preview
:
previewActions
.
previewReducer
,
preview
:
previewActions
.
previewReducer
,
comments
:
comment
s
Actions
.
commentsReducer
,
comments
:
commentActions
.
commentsReducer
,
...
ProjectView
.
guiReducers
...
ProjectView
.
guiReducers
},
},
{
{
...
...
src/views/preview/project-view.jsx
View file @
8a33d1c5
...
@@ -29,7 +29,6 @@ const Meta = require('./meta.jsx');
...
@@ -29,7 +29,6 @@ const Meta = require('./meta.jsx');
const
sessionActions
=
require
(
'
../../redux/session.js
'
);
const
sessionActions
=
require
(
'
../../redux/session.js
'
);
const
navigationActions
=
require
(
'
../../redux/navigation.js
'
);
const
navigationActions
=
require
(
'
../../redux/navigation.js
'
);
const
previewActions
=
require
(
'
../../redux/preview.js
'
);
const
previewActions
=
require
(
'
../../redux/preview.js
'
);
const
commentsActions
=
require
(
'
../../redux/comments.js
'
);
const
projectCommentActions
=
require
(
'
../../redux/project-comment-actions.js
'
);
const
projectCommentActions
=
require
(
'
../../redux/project-comment-actions.js
'
);
const
frameless
=
require
(
'
../../lib/frameless
'
);
const
frameless
=
require
(
'
../../lib/frameless
'
);
...
@@ -1036,7 +1035,7 @@ const mapStateToProps = state => {
...
@@ -1036,7 +1035,7 @@ const mapStateToProps = state => {
const
mapDispatchToProps
=
dispatch
=>
({
const
mapDispatchToProps
=
dispatch
=>
({
handleAddComment
:
(
comment
,
topLevelCommentId
)
=>
{
handleAddComment
:
(
comment
,
topLevelCommentId
)
=>
{
dispatch
(
comments
Actions
.
addNewComment
(
comment
,
topLevelCommentId
));
dispatch
(
projectComment
Actions
.
addNewComment
(
comment
,
topLevelCommentId
));
},
},
handleDeleteComment
:
(
projectId
,
commentId
,
topLevelCommentId
,
token
)
=>
{
handleDeleteComment
:
(
projectId
,
commentId
,
topLevelCommentId
,
token
)
=>
{
dispatch
(
projectCommentActions
.
deleteComment
(
projectId
,
commentId
,
topLevelCommentId
,
token
));
dispatch
(
projectCommentActions
.
deleteComment
(
projectId
,
commentId
,
topLevelCommentId
,
token
));
...
@@ -1063,7 +1062,7 @@ const mapDispatchToProps = dispatch => ({
...
@@ -1063,7 +1062,7 @@ const mapDispatchToProps = dispatch => ({
dispatch
(
navigationActions
.
toggleLoginOpen
());
dispatch
(
navigationActions
.
toggleLoginOpen
());
},
},
handleSeeAllComments
:
(
id
,
ownerUsername
,
isAdmin
,
token
)
=>
{
handleSeeAllComments
:
(
id
,
ownerUsername
,
isAdmin
,
token
)
=>
{
dispatch
(
comments
Actions
.
resetComments
());
dispatch
(
projectComment
Actions
.
resetComments
());
dispatch
(
projectCommentActions
.
getTopLevelComments
(
id
,
0
,
ownerUsername
,
isAdmin
,
token
));
dispatch
(
projectCommentActions
.
getTopLevelComments
(
id
,
0
,
ownerUsername
,
isAdmin
,
token
));
},
},
handleUpdateProjectThumbnail
:
(
id
,
blob
)
=>
{
handleUpdateProjectThumbnail
:
(
id
,
blob
)
=>
{
...
@@ -1138,7 +1137,7 @@ const mapDispatchToProps = dispatch => ({
...
@@ -1138,7 +1137,7 @@ const mapDispatchToProps = dispatch => ({
},
},
remixProject
:
()
=>
{
remixProject
:
()
=>
{
dispatch
(
GUI
.
remixProject
());
dispatch
(
GUI
.
remixProject
());
dispatch
(
comments
Actions
.
resetComments
());
dispatch
(
projectComment
Actions
.
resetComments
());
},
},
setPlayer
:
player
=>
{
setPlayer
:
player
=>
{
dispatch
(
GUI
.
setPlayer
(
player
));
dispatch
(
GUI
.
setPlayer
(
player
));
...
...
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