mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-01 17:03:19 +00:00
49 lines
1.6 KiB
Text
49 lines
1.6 KiB
Text
import { AppWindowModels, TaskData } from "../Models.slint";
|
|
import { AppWindowActions, NewTaskData, SaveTaskData } from "../Actions.slint";
|
|
import { Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
|
import { TaskLine } from "../../../components/TaskLine.slint";
|
|
import { EventGroup } from "../../../components/EventGroup.slint";
|
|
import { Calendar } from "../../../components/Calendar.slint";
|
|
import { VDatePicker, VTimePicker, VCheckBox, VButton, VTag, VText, VTextInput, Svg, Palette } from "@selenite";
|
|
import { CreateTaskOrEvent } from "../../../components/CreateTaskOrEvent.slint";
|
|
import { Utils } from "../../../shared/Utils.slint";
|
|
import { VActionButton } from "../../../../external/selenite/components/index.slint";
|
|
import { AddEventModal } from "../../../modals/AddEventModal.slint";
|
|
|
|
export component CalendarView inherits Rectangle {
|
|
|
|
private property<string> icon-visible: Svg.visible;
|
|
private property<string> icon-not-visible: Svg.not-visible;
|
|
private property<bool> completed-tasks-visible: false;
|
|
|
|
createEventPopup := AddEventModal {}
|
|
|
|
VerticalLayout {
|
|
padding: 16px;
|
|
spacing: 16px;
|
|
HorizontalLayout {
|
|
alignment: start;
|
|
VButton {
|
|
text: "New event";
|
|
icon-svg: Svg.plus;
|
|
icon-colorize: greenyellow;
|
|
clicked => {
|
|
createEventPopup.show();
|
|
}
|
|
}
|
|
}
|
|
Rectangle {
|
|
horizontal-stretch: 1;
|
|
background: Palette.background.brighter(0.2);
|
|
height: 1px;
|
|
}
|
|
Calendar {
|
|
delete-event-request(source-id, event-id) => {
|
|
AppWindowActions.delete-event(source-id, event-id)
|
|
}
|
|
days: AppWindowModels.calendar;
|
|
current-date: Utils.current-date;
|
|
current-time: Utils.current-time;
|
|
}
|
|
}
|
|
}
|