1
0

feat: emoji reactions for tasks and comments (#2196)

This PR adds reactions for tasks and comments, similar to what you can do on Gitea, GitHub, Slack and plenty of other tools.

Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2196
Co-authored-by: kolaente <k@knt.li>
Co-committed-by: kolaente <k@knt.li>
This commit is contained in:
kolaente
2024-03-12 19:25:58 +00:00
committed by konrad
parent b9c513f681
commit a5c51d4b1e
43 changed files with 1653 additions and 37 deletions

View File

@ -0,0 +1,14 @@
import type {IAbstract} from '@/modelTypes/IAbstract'
import type {IUser} from '@/modelTypes/IUser'
export type ReactionKind = 'tasks' | 'comments'
export interface IReaction extends IAbstract {
id: number
kind: ReactionKind
value: string
}
export interface IReactionPerEntity {
[reaction: string]: IUser[]
}

View File

@ -14,6 +14,7 @@ import type {IRepeatMode} from '@/types/IRepeatMode'
import type {PartialWithId} from '@/types/PartialWithId'
import type {ITaskReminder} from '@/modelTypes/ITaskReminder'
import type {IReactionPerEntity} from '@/modelTypes/IReaction'
export interface ITask extends IAbstract {
id: number
@ -45,6 +46,8 @@ export interface ITask extends IAbstract {
position: number
kanbanPosition: number
reactions: IReactionPerEntity
createdBy: IUser
created: Date

View File

@ -1,12 +1,15 @@
import type {IAbstract} from './IAbstract'
import type {IUser} from './IUser'
import type {ITask} from './ITask'
import type {IReactionPerEntity} from '@/modelTypes/IReaction'
export interface ITaskComment extends IAbstract {
id: number
taskId: ITask['id']
comment: string
author: IUser
reactions: IReactionPerEntity
created: Date
updated: Date