mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-04 18:53:19 +00:00
[WIP] Fix everything
This commit is contained in:
parent
15bd0f58a7
commit
686d86df6f
10 changed files with 212 additions and 125 deletions
|
@ -4,6 +4,8 @@ import { VButton, VText, VDatePicker } from "../../external/selenite/components/
|
|||
import { AppActions } from "../shared/Actions.slint";
|
||||
import { Modal } from "../../external/selenite/components/Modal.slint";
|
||||
import { VTimePicker } from "../../external/selenite/components/TimePicker.slint";
|
||||
import { ComboBox } from "std-widgets.slint";
|
||||
import { AppModels } from "../shared/Models.slint";
|
||||
|
||||
export component AddEventModal inherits Modal {
|
||||
public function open() {
|
||||
|
@ -13,6 +15,9 @@ export component AddEventModal inherits Modal {
|
|||
VerticalLayout {
|
||||
padding: 16px;
|
||||
spacing: 8px;
|
||||
sourceInput := ComboBox {
|
||||
model: AppModels.available-sources-strings;
|
||||
}
|
||||
titleInput := VTextInput {
|
||||
label: "title";
|
||||
}
|
||||
|
@ -31,10 +36,11 @@ export component AddEventModal inherits Modal {
|
|||
text: "Create";
|
||||
clicked => {
|
||||
AppActions.create-event({
|
||||
source-id: AppModels.get-source-id-from-name(sourceInput.current-value),
|
||||
title: titleInput.text,
|
||||
date: dateInput.date,
|
||||
startsAt: startTimeInput.time,
|
||||
endsAt: endTimeInput.time
|
||||
starts-at: startTimeInput.time,
|
||||
ends-at: endTimeInput.time
|
||||
});
|
||||
root.close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue