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');
const
COMMENT_LIMIT
=
20
;
const
{
addNewComment
,
resetComments
,
Status
,
setFetchStatus
,
setCommentDeleted
,
...
...
@@ -169,5 +171,10 @@ module.exports = {
getReplies
,
deleteComment
,
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');
const
render
=
require
(
'
../../lib/render.jsx
'
);
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
UnsupportedBrowser
=
require
(
'
./unsupported-browser.jsx
'
);
...
...
@@ -17,7 +17,7 @@ if (isSupportedBrowser()) {
document
.
getElementById
(
'
app
'
),
{
preview
:
previewActions
.
previewReducer
,
comments
:
comment
s
Actions
.
commentsReducer
,
comments
:
commentActions
.
commentsReducer
,
...
ProjectView
.
guiReducers
},
{
...
...
src/views/preview/project-view.jsx
View file @
8a33d1c5
...
...
@@ -29,7 +29,6 @@ const Meta = require('./meta.jsx');
const
sessionActions
=
require
(
'
../../redux/session.js
'
);
const
navigationActions
=
require
(
'
../../redux/navigation.js
'
);
const
previewActions
=
require
(
'
../../redux/preview.js
'
);
const
commentsActions
=
require
(
'
../../redux/comments.js
'
);
const
projectCommentActions
=
require
(
'
../../redux/project-comment-actions.js
'
);
const
frameless
=
require
(
'
../../lib/frameless
'
);
...
...
@@ -1036,7 +1035,7 @@ const mapStateToProps = state => {
const
mapDispatchToProps
=
dispatch
=>
({
handleAddComment
:
(
comment
,
topLevelCommentId
)
=>
{
dispatch
(
comments
Actions
.
addNewComment
(
comment
,
topLevelCommentId
));
dispatch
(
projectComment
Actions
.
addNewComment
(
comment
,
topLevelCommentId
));
},
handleDeleteComment
:
(
projectId
,
commentId
,
topLevelCommentId
,
token
)
=>
{
dispatch
(
projectCommentActions
.
deleteComment
(
projectId
,
commentId
,
topLevelCommentId
,
token
));
...
...
@@ -1063,7 +1062,7 @@ const mapDispatchToProps = dispatch => ({
dispatch
(
navigationActions
.
toggleLoginOpen
());
},
handleSeeAllComments
:
(
id
,
ownerUsername
,
isAdmin
,
token
)
=>
{
dispatch
(
comments
Actions
.
resetComments
());
dispatch
(
projectComment
Actions
.
resetComments
());
dispatch
(
projectCommentActions
.
getTopLevelComments
(
id
,
0
,
ownerUsername
,
isAdmin
,
token
));
},
handleUpdateProjectThumbnail
:
(
id
,
blob
)
=>
{
...
...
@@ -1138,7 +1137,7 @@ const mapDispatchToProps = dispatch => ({
},
remixProject
:
()
=>
{
dispatch
(
GUI
.
remixProject
());
dispatch
(
comments
Actions
.
resetComments
());
dispatch
(
projectComment
Actions
.
resetComments
());
},
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