2024-04-10 16:53:18 +02:00
|
|
|
/*
|
|
|
|
* 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 Mirai
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
2024-04-14 14:11:41 +02:00
|
|
|
AppText {
|
|
|
|
text: "Files"
|
|
|
|
font.pixelSize: 32
|
|
|
|
}
|
|
|
|
|
|
|
|
Item { Layout.preferredHeight: 16 }
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: backend.files
|
|
|
|
Rectangle {
|
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
Layout.fillWidth: true
|
|
|
|
color: backend.activeFilesFilter.includes(modelData.name) ? MiraiColorPalette.filterSelected : mouse.hovered ? MiraiColorPalette.filterHovered : "transparent"
|
|
|
|
radius: 4
|
|
|
|
AppText {
|
|
|
|
text: modelData.name
|
|
|
|
padding: 4
|
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
if (backend.activeFilesFilter.includes(modelData.name)) {
|
|
|
|
backend.removeFileFilter(modelData.name)
|
|
|
|
} else {
|
|
|
|
backend.addFileFilter(modelData.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HoverHandler {
|
|
|
|
id: mouse
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item { Layout.preferredHeight: 16 }
|
|
|
|
|
2024-04-10 16:53:18 +02:00
|
|
|
AppText {
|
|
|
|
text: "Tags"
|
|
|
|
font.pixelSize: 32
|
|
|
|
}
|
|
|
|
|
|
|
|
Item { Layout.preferredHeight: 16 }
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: backend.tags
|
|
|
|
Rectangle {
|
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
Layout.fillWidth: true
|
|
|
|
color: backend.activeTagsFilter.includes(modelData) ? MiraiColorPalette.filterSelected : mouse.hovered ? MiraiColorPalette.filterHovered : "transparent"
|
|
|
|
radius: 4
|
|
|
|
AppText {
|
|
|
|
text: modelData
|
|
|
|
padding: 4
|
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
if (backend.activeTagsFilter.includes(modelData)) {
|
|
|
|
backend.removeTagFilter(modelData)
|
|
|
|
} else {
|
|
|
|
backend.addTagFilter(modelData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HoverHandler {
|
|
|
|
id: mouse
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
|
|
|
|
AppButton {
|
|
|
|
text: `Hide completed tasks: ${backend.shouldHideCompletedTasks ? "ON" : "OFF"}`
|
|
|
|
onClicked: {
|
|
|
|
backend.hideCompletedTasks(!backend.shouldHideCompletedTasks)
|
|
|
|
}
|
|
|
|
}
|
2024-04-14 14:11:41 +02:00
|
|
|
|
|
|
|
/*AppButton {
|
|
|
|
text: `Settings`
|
|
|
|
onClicked: {
|
|
|
|
root.openSettings()
|
|
|
|
}
|
|
|
|
}*/
|
2024-04-10 16:53:18 +02:00
|
|
|
}
|