1
0

Favorite tasks (#236)

Add loading spinner when updating a task

Show favorites namespace if the favorited task is the first favorite

Show the list favorited tasks belong to

Fix task width

Add method to mark a function as favorite

Make favorite clickable

Format

Hide favorite button when not hovered

Add button to mark a task as favorite

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/236
This commit is contained in:
konrad
2020-09-05 20:16:17 +00:00
parent cac8b09263
commit 4a8b15e7be
6 changed files with 138 additions and 62 deletions

View File

@ -1,4 +1,4 @@
import AbstractModel from './abstractModel';
import AbstractModel from './abstractModel'
import UserModel from './user'
import LabelModel from './label'
import AttachmentModel from './attachment'
@ -95,6 +95,7 @@ export default class TaskModel extends AbstractModel {
attachments: [],
identifier: '',
index: 0,
isFavorite: false,
createdBy: UserModel,
created: null,
@ -167,7 +168,7 @@ export default class TaskModel extends AbstractModel {
return
}
const {state} = await navigator.permissions.request({name: 'notifications'});
const {state} = await navigator.permissions.request({name: 'notifications'})
if (state !== 'granted') {
console.debug('Notification permission not granted, not showing notifications')
return
@ -191,11 +192,11 @@ export default class TaskModel extends AbstractModel {
actions: [
{
action: 'mark-as-done',
title: 'Done'
title: 'Done',
},
{
action: 'show-task',
title: 'Show task'
title: 'Show task',
},
],
})