Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
6d8484c1
There was an error fetching the commit references. Please try again later.
Commit
6d8484c1
authored
6 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Adjust destination and add test template
parent
4328cc70
4 merge requests
!171
SWTP Comment Project
,
!170
Fix linter in pipe
,
!169
WebSocket Connector
,
!168
Filter comment list
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/components/shared/comment/comment.component.html
+7
-0
7 additions, 0 deletions
src/app/components/shared/comment/comment.component.html
src/app/services/websockets/ws-comment-service.service.ts
+2
-2
2 additions, 2 deletions
src/app/services/websockets/ws-comment-service.service.ts
with
9 additions
and
2 deletions
src/app/components/shared/comment/comment.component.html
+
7
−
0
View file @
6d8484c1
...
...
@@ -14,5 +14,12 @@
<button
mat-icon-button
[disabled]=
"isCreator"
(click)=
"setRead(comment)"
[matTooltip]=
"comment.read ? 'Mark as unread' : 'Mark as read'"
>
<mat-icon
[ngClass]=
"{'read-icon' : comment.read === true}"
>
visibility
</mat-icon>
</button>
<button
mat-icon-button
[disabled]=
"!isCreator"
(click)=
"voteUp(comment)"
>
<mat-icon>
keyboard_arrow_up
</mat-icon>
</button>
<h4>
{{comment.score}}
</h4>
<button
mat-icon-button
[disabled]=
"!isCreator"
(click)=
"voteDown(comment)"
>
<mat-icon>
keyboard_arrow_down
</mat-icon>
</button>
</div>
</mat-card>
This diff is collapsed.
Click to expand it.
src/app/services/websockets/ws-comment-service.service.ts
+
2
−
2
View file @
6d8484c1
...
...
@@ -54,7 +54,7 @@ export class WsCommentServiceService {
voteUp
(
comment
:
Comment
):
void
{
const
message
=
new
UpVote
(
comment
.
userId
,
comment
.
id
);
this
.
rxStompService
.
publish
({
destination
:
`/queue/
comment
.command.
patch
`
,
destination
:
`/queue/
vote
.command.
upvote
`
,
body
:
JSON
.
stringify
(
message
),
headers
:
{
'
content-type
'
:
'
application/json
'
...
...
@@ -65,7 +65,7 @@ export class WsCommentServiceService {
voteDown
(
comment
:
Comment
):
void
{
const
message
=
new
DownVote
(
comment
.
userId
,
comment
.
id
);
this
.
rxStompService
.
publish
({
destination
:
`/queue/
comment
.command.
patch
`
,
destination
:
`/queue/
vote
.command.
downvote
`
,
body
:
JSON
.
stringify
(
message
),
headers
:
{
'
content-type
'
:
'
application/json
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment