mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 10:13:42 +00:00
first commit
This commit is contained in:
commit
3e7d8b4b70
43 changed files with 2681 additions and 0 deletions
27
src/qml/TaskItem.qml
Normal file
27
src/qml/TaskItem.qml
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Mirai. Copyright (C) 2024 Vyn
|
||||
* This file is licensed under version 3 of the GNU General Public License (GPL-3.0-only)
|
||||
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Mirai
|
||||
|
||||
RowLayout {
|
||||
property taskItem task
|
||||
|
||||
AppCheckbox {
|
||||
id: checkbox
|
||||
text: task.text
|
||||
checked: task.state === 'DONE'
|
||||
textComponent.color: task.date < internal.todayDate ? colorPalette.selected.palette.pink
|
||||
// : task.date === internal.todayDate ? colorPalette.selected.palette.sapphire
|
||||
: colorPalette.selected.text
|
||||
onClicked: {
|
||||
backend.updateTodo(index, modelData.state === 'DONE' ? "TODO" : "DONE", modelData.text, modelData.date)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue