mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-04 02:33:19 +00:00
Move all UI code into new 'ui' directory
This commit is contained in:
parent
00d9cbe7ef
commit
0046cb9bbb
21 changed files with 94 additions and 93 deletions
|
@ -9,7 +9,7 @@ set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
|
||||||
add_executable(mirai
|
add_executable(mirai
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/app_logic.cpp
|
src/app_logic.cpp
|
||||||
src/shared/Utils.cpp
|
src/ui/utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure dependency: evalyte-cpp-common
|
# configure dependency: evalyte-cpp-common
|
||||||
|
@ -38,7 +38,7 @@ add_subdirectory(external/slint)
|
||||||
set_property(TARGET mirai PROPERTY SLINT_EMBED_RESOURCES embed-files)
|
set_property(TARGET mirai PROPERTY SLINT_EMBED_RESOURCES embed-files)
|
||||||
target_link_libraries(mirai PRIVATE Slint::Slint)
|
target_link_libraries(mirai PRIVATE Slint::Slint)
|
||||||
slint_target_sources(
|
slint_target_sources(
|
||||||
mirai src/ui.slint
|
mirai src/ui/ui.slint
|
||||||
NAMESPACE ui
|
NAMESPACE ui
|
||||||
LIBRARY_PATHS selenite=${CMAKE_CURRENT_SOURCE_DIR}/external/selenite/components/index.slint
|
LIBRARY_PATHS selenite=${CMAKE_CURRENT_SOURCE_DIR}/external/selenite/components/index.slint
|
||||||
)
|
)
|
||||||
|
|
2
external/selenite
vendored
2
external/selenite
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 75b7d7cce4a61ff93e7369ab32ac988ac16f69b0
|
Subproject commit 099b5edb0fa7c2fb016a348af448ff6b715844c3
|
|
@ -12,11 +12,11 @@
|
||||||
#include "mirai-core/source.h"
|
#include "mirai-core/source.h"
|
||||||
#include "selenite/palette.h"
|
#include "selenite/palette.h"
|
||||||
#include "selenite/selenite.h"
|
#include "selenite/selenite.h"
|
||||||
#include "shared/Utils.h"
|
|
||||||
#include "slint_color.h"
|
#include "slint_color.h"
|
||||||
#include "slint_models.h"
|
#include "slint_models.h"
|
||||||
#include "slint_string.h"
|
#include "slint_string.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
|
#include "ui/utils.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <bits/chrono.h>
|
#include <bits/chrono.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -52,7 +52,7 @@ app_logic::app_logic(mirai::core *miraiInstance) : _mirai_core(miraiInstance)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bindSlintUtils(_main_window->global<ui::Utils>());
|
bind_slint_utils(_main_window->global<ui::Utils>());
|
||||||
|
|
||||||
models().set_sidebar_view(_sidebar_view);
|
models().set_sidebar_view(_sidebar_view);
|
||||||
models().set_calendar_view(_calendar_view);
|
models().set_calendar_view(_calendar_view);
|
||||||
|
@ -193,7 +193,7 @@ void app_logic::setupCallbacks()
|
||||||
assert(source);
|
assert(source);
|
||||||
auto task = source->get_task_by_id(newTaskData.id);
|
auto task = source->get_task_by_id(newTaskData.id);
|
||||||
assert(task.has_value());
|
assert(task.has_value());
|
||||||
const mirai::date &date = SlintDateToMiraiDate(newTaskData.date);
|
const mirai::date &date = slint_date_to_mirai_date(newTaskData.date);
|
||||||
// const auto dayOpt = source->get_day_by_date(date);
|
// const auto dayOpt = source->get_day_by_date(date);
|
||||||
task->set_title(std::string(newTaskData.title));
|
task->set_title(std::string(newTaskData.title));
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ void app_logic::setupCallbacks()
|
||||||
actions().on_create_task([&](ui::NewTaskData newTaskData) {
|
actions().on_create_task([&](ui::NewTaskData newTaskData) {
|
||||||
std::optional<mirai::date> date = std::nullopt;
|
std::optional<mirai::date> date = std::nullopt;
|
||||||
if (newTaskData.date.year != 0) {
|
if (newTaskData.date.year != 0) {
|
||||||
date = SlintDateToMiraiDate(newTaskData.date);
|
date = slint_date_to_mirai_date(newTaskData.date);
|
||||||
}
|
}
|
||||||
auto source = _mirai_core->getSourceById(newTaskData.sourceId);
|
auto source = _mirai_core->getSourceById(newTaskData.sourceId);
|
||||||
|
|
||||||
|
@ -240,14 +240,14 @@ void app_logic::setupCallbacks()
|
||||||
|
|
||||||
actions().on_create_event([&](ui::CreateEventParams newEventParams) {
|
actions().on_create_event([&](ui::CreateEventParams newEventParams) {
|
||||||
const ui::Date &date = newEventParams.date;
|
const ui::Date &date = newEventParams.date;
|
||||||
const std::string dateStr = SlintDateToStdString(date);
|
const std::string dateStr = slint_date_to_std_string(date);
|
||||||
auto source = _mirai_core->getSourceById(newEventParams.source_id);
|
auto source = _mirai_core->getSourceById(newEventParams.source_id);
|
||||||
|
|
||||||
source->create_event({
|
source->create_event({
|
||||||
.title = std::string(newEventParams.title),
|
.title = std::string(newEventParams.title),
|
||||||
.date = SlintDateToMiraiDate(newEventParams.date),
|
.date = slint_date_to_mirai_date(newEventParams.date),
|
||||||
.starts_at = SlintTimeToMiraiTime(newEventParams.starts_at),
|
.starts_at = slint_time_to_mirai_time(newEventParams.starts_at),
|
||||||
.ends_at = SlintTimeToMiraiTime(newEventParams.ends_at),
|
.ends_at = slint_time_to_mirai_time(newEventParams.ends_at),
|
||||||
});
|
});
|
||||||
_mirai_core->save();
|
_mirai_core->save();
|
||||||
update_views();
|
update_views();
|
||||||
|
@ -527,17 +527,17 @@ void app_logic::update_calendar_view()
|
||||||
.source_id = current_event.source_id(),
|
.source_id = current_event.source_id(),
|
||||||
.id = current_event.id(),
|
.id = current_event.id(),
|
||||||
.title = slint::SharedString(current_event.title()),
|
.title = slint::SharedString(current_event.title()),
|
||||||
.starts_at = MiraiTimeToSlintTime(current_event.starts_at()),
|
.starts_at = mirai_time_to_slint_time(current_event.starts_at()),
|
||||||
.ends_at = MiraiTimeToSlintTime(current_event.ends_at()),
|
.ends_at = mirai_time_to_slint_time(current_event.ends_at()),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto new_slint_date = ui::CalendarViewDate{
|
auto new_slint_date = ui::CalendarViewDate{
|
||||||
.events = new_slint_events,
|
.events = new_slint_events,
|
||||||
.date = MiraiDateToSlintDate(current_date),
|
.date = mirai_date_to_slint_date(current_date),
|
||||||
.header = slint::SharedString(
|
.header = slint::SharedString(
|
||||||
capitalize(formatDateRelative(MiraiDateToSlintDate(current_date)))
|
capitalize(format_date_relative(mirai_date_to_slint_date(current_date)))
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
new_slint_dates->push_back(new_slint_date);
|
new_slint_dates->push_back(new_slint_date);
|
||||||
|
@ -667,7 +667,7 @@ void app_logic::update_tasks_view()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (current_date.has_value()) {
|
if (current_date.has_value()) {
|
||||||
new_slint_date.due_date = MiraiDateToSlintDate(current_date.value());
|
new_slint_date.due_date = mirai_date_to_slint_date(current_date.value());
|
||||||
new_slint_date.is_late = current_date.value() < today;
|
new_slint_date.is_late = current_date.value() < today;
|
||||||
} else {
|
} else {
|
||||||
new_slint_date.no_date = true;
|
new_slint_date.no_date = true;
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
/*
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "mirai-core/date.h"
|
|
||||||
#include "ui.h"
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
void bindSlintUtils(const ui::Utils &utils);
|
|
||||||
|
|
||||||
std::string formatZeroPadding(const int number);
|
|
||||||
std::string formatDateRelative(const ui::Date &date);
|
|
||||||
std::string capitalize(std::string str);
|
|
||||||
std::string SlintDateToStdString(const ui::Date &date);
|
|
||||||
mirai::date SlintDateToMiraiDate(const ui::Date &date);
|
|
||||||
ui::Date MiraiDateToSlintDate(const mirai::date &date);
|
|
||||||
ui::Time MiraiTimeToSlintTime(const mirai::time &time);
|
|
||||||
mirai::time SlintTimeToMiraiTime(const ui::Time &time);
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ScrollView, Date, Time } from "std-widgets.slint";
|
import { ScrollView, Date, Time } from "std-widgets.slint";
|
||||||
import { VCheckBox, VButton, VActionButton, Svg, VTag, VPopupIconMenu, VText, Palette } from "@selenite";
|
import { VCheckBox, VButton, VActionButton, Svg, VTag, VPopupIconMenu, VText, Palette } from "@selenite";
|
||||||
import { Utils } from "../shared/Utils.slint";
|
import { Utils } from "../Utils.slint";
|
||||||
import { AppModels, CalendarViewDate, CalendarDateDisplayFormat } from "../shared/Models.slint";
|
import { AppModels, CalendarViewDate, CalendarDateDisplayFormat } from "../Models.slint";
|
||||||
|
|
||||||
export component Calendar inherits Rectangle {
|
export component Calendar inherits Rectangle {
|
||||||
in property<[CalendarViewDate]> days;
|
in property<[CalendarViewDate]> days;
|
|
@ -1,4 +1,4 @@
|
||||||
import { AppModels } from "../shared/Models.slint";
|
import { AppModels } from "../Models.slint";
|
||||||
import { Date, Time, Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
import { Date, Time, Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
||||||
import { VPopupIconMenu, VDatePicker, VTimePicker, VCheckBox, VButton, VActionButton, VTag, VText, Svg, VTextInput, Palette } from "@selenite";
|
import { VPopupIconMenu, VDatePicker, VTimePicker, VCheckBox, VButton, VActionButton, VTag, VText, Svg, VTextInput, Palette } from "@selenite";
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { ToggleButton } from "@selenite";
|
||||||
import { VPopupIconMenu, VTag, VText, VButton, VActionButton, VCheckBox, Svg, Palette } from "@selenite";
|
import { VPopupIconMenu, VTag, VText, VButton, VActionButton, VCheckBox, Svg, Palette } from "@selenite";
|
||||||
import { TaskEdit } from "./TaskEdit.slint";
|
import { TaskEdit } from "./TaskEdit.slint";
|
||||||
import { Date } from "std-widgets.slint";
|
import { Date } from "std-widgets.slint";
|
||||||
import { AppModels } from "../shared/Models.slint";
|
import { AppModels } from "../Models.slint";
|
||||||
|
|
||||||
export struct TaskLineEditData {
|
export struct TaskLineEditData {
|
||||||
title: string,
|
title: string,
|
|
@ -1,11 +1,11 @@
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
import { VTextInput } from "../../external/selenite/components/TextInput.slint";
|
import { VTextInput } from "@selenite";
|
||||||
import { VButton, VText, VDatePicker } from "../../external/selenite/components/index.slint";
|
import { VButton, VText, VDatePicker } from "@selenite";
|
||||||
import { AppActions } from "../shared/Actions.slint";
|
import { AppActions } from "../Actions.slint";
|
||||||
import { Modal } from "../../external/selenite/components/Modal.slint";
|
import { Modal } from "@selenite";
|
||||||
import { VTimePicker } from "../../external/selenite/components/TimePicker.slint";
|
import { VTimePicker } from "@selenite";
|
||||||
import { ComboBox } from "std-widgets.slint";
|
import { ComboBox } from "std-widgets.slint";
|
||||||
import { AppModels } from "../shared/Models.slint";
|
import { AppModels } from "../Models.slint";
|
||||||
|
|
||||||
export component AddEventModal inherits Modal {
|
export component AddEventModal inherits Modal {
|
||||||
public function open() {
|
public function open() {
|
|
@ -1,9 +1,9 @@
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
import { VTextInput } from "../../external/selenite/components/TextInput.slint";
|
import { VTextInput } from "@selenite";
|
||||||
import { VButton } from "../../external/selenite/components/index.slint";
|
import { VButton } from "@selenite";
|
||||||
import { AppModels } from "../shared/Models.slint";
|
import { Modal } from "@selenite";
|
||||||
import { AppActions } from "../shared/Actions.slint";
|
import { AppModels } from "../Models.slint";
|
||||||
import { Modal } from "../../external/selenite/components/Modal.slint";
|
import { AppActions } from "../Actions.slint";
|
||||||
|
|
||||||
export component AddSourceModal inherits Modal {
|
export component AddSourceModal inherits Modal {
|
||||||
private property <int> source-id-to-edit: -1;
|
private property <int> source-id-to-edit: -1;
|
|
@ -1,9 +1,9 @@
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
import { VTextInput } from "../../external/selenite/components/TextInput.slint";
|
import { VTextInput } from "@selenite";
|
||||||
import { VButton } from "../../external/selenite/components/index.slint";
|
import { VButton } from "@selenite";
|
||||||
import { AppModels } from "../shared/Models.slint";
|
import { AppModels } from "../Models.slint";
|
||||||
import { AppActions } from "../shared/Actions.slint";
|
import { AppActions } from "../Actions.slint";
|
||||||
import { Modal } from "../../external/selenite/components/Modal.slint";
|
import { Modal } from "@selenite";
|
||||||
|
|
||||||
export component EditSourceModal inherits Modal {
|
export component EditSourceModal inherits Modal {
|
||||||
private property <int> source-id-to-edit: -1;
|
private property <int> source-id-to-edit: -1;
|
|
@ -1,7 +1,7 @@
|
||||||
import { AppModels } from "shared/Models.slint";
|
import { AppModels } from "Models.slint";
|
||||||
import { AppActions } from "shared/Actions.slint";
|
import { AppActions } from "Actions.slint";
|
||||||
import { AppWindow } from "windows/AppWindow/AppWindow.slint";
|
import { AppWindow } from "windows/AppWindow/AppWindow.slint";
|
||||||
import { Utils } from "shared/Utils.slint";
|
import { Utils } from "Utils.slint";
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
|
|
||||||
export { Utils, Palette, AppWindow, AppModels, AppActions }
|
export { Utils, Palette, AppWindow, AppModels, AppActions }
|
|
@ -4,13 +4,13 @@
|
||||||
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Utils.h"
|
#include "utils.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <format>
|
#include <format>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
void bindSlintUtils(const ui::Utils &utils)
|
void bind_slint_utils(const ui::Utils &utils)
|
||||||
{
|
{
|
||||||
utils.on_format_date([&](const ui::Date &date) {
|
utils.on_format_date([&](const ui::Date &date) {
|
||||||
std::chrono::year_month_day chronoDate{
|
std::chrono::year_month_day chronoDate{
|
||||||
|
@ -21,14 +21,14 @@ void bindSlintUtils(const ui::Utils &utils)
|
||||||
return std::format("{:%B %d}", chronoDate);
|
return std::format("{:%B %d}", chronoDate);
|
||||||
});
|
});
|
||||||
|
|
||||||
auto currentDate = MiraiDateToSlintDate(mirai::date(std::chrono::system_clock::now()));
|
auto currentDate = mirai_date_to_slint_date(mirai::date(std::chrono::system_clock::now()));
|
||||||
utils.set_current_date(currentDate);
|
utils.set_current_date(currentDate);
|
||||||
|
|
||||||
auto currentTime = MiraiTimeToSlintTime(mirai::time(std::chrono::system_clock::now()));
|
auto currentTime = mirai_time_to_slint_time(mirai::time(std::chrono::system_clock::now()));
|
||||||
utils.set_current_time(currentTime);
|
utils.set_current_time(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string formatZeroPadding(const int number)
|
std::string format_zero_padding(const int number)
|
||||||
{
|
{
|
||||||
if (number < 10) {
|
if (number < 10) {
|
||||||
return "0" + std::to_string(number);
|
return "0" + std::to_string(number);
|
||||||
|
@ -36,14 +36,15 @@ std::string formatZeroPadding(const int number)
|
||||||
return std::to_string(number);
|
return std::to_string(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string formatDateRelative(const ui::Date &date)
|
std::string format_date_relative(const ui::Date &date)
|
||||||
{
|
{
|
||||||
auto todayDate = mirai::date(std::chrono::system_clock::now());
|
auto todayDate = mirai::date(std::chrono::system_clock::now());
|
||||||
auto relativeDaysDiff = std::chrono::duration_cast<std::chrono::days>(
|
auto relativeDaysDiff =
|
||||||
std::chrono::sys_days(SlintDateToMiraiDate(date).to_std_chrono())
|
std::chrono::duration_cast<std::chrono::days>(
|
||||||
- std::chrono::sys_days(todayDate.to_std_chrono())
|
std::chrono::sys_days(slint_date_to_mirai_date(date).to_std_chrono())
|
||||||
)
|
- std::chrono::sys_days(todayDate.to_std_chrono())
|
||||||
.count();
|
)
|
||||||
|
.count();
|
||||||
|
|
||||||
if (relativeDaysDiff == 0) {
|
if (relativeDaysDiff == 0) {
|
||||||
return std::string("today");
|
return std::string("today");
|
||||||
|
@ -59,20 +60,20 @@ std::string capitalize(std::string str)
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string SlintDateToStdString(const ui::Date &date)
|
std::string slint_date_to_std_string(const ui::Date &date)
|
||||||
{
|
{
|
||||||
return std::to_string(date.year) + "-" + formatZeroPadding(date.month) + "-"
|
return std::to_string(date.year) + "-" + format_zero_padding(date.month) + "-"
|
||||||
+ formatZeroPadding(date.day);
|
+ format_zero_padding(date.day);
|
||||||
}
|
}
|
||||||
|
|
||||||
mirai::date SlintDateToMiraiDate(const ui::Date &date)
|
mirai::date slint_date_to_mirai_date(const ui::Date &date)
|
||||||
{
|
{
|
||||||
return mirai::date(
|
return mirai::date(
|
||||||
date.year, static_cast<unsigned>(date.month), static_cast<unsigned>(date.day)
|
date.year, static_cast<unsigned>(date.month), static_cast<unsigned>(date.day)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::Date MiraiDateToSlintDate(const mirai::date &date)
|
ui::Date mirai_date_to_slint_date(const mirai::date &date)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
.year = date.year,
|
.year = date.year,
|
||||||
|
@ -81,12 +82,12 @@ ui::Date MiraiDateToSlintDate(const mirai::date &date)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::Time MiraiTimeToSlintTime(const mirai::time &time)
|
ui::Time mirai_time_to_slint_time(const mirai::time &time)
|
||||||
{
|
{
|
||||||
return {.hour = time.hour, .minute = time.minute, .second = 0};
|
return {.hour = time.hour, .minute = time.minute, .second = 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
mirai::time SlintTimeToMiraiTime(const ui::Time &time)
|
mirai::time slint_time_to_mirai_time(const ui::Time &time)
|
||||||
{
|
{
|
||||||
return mirai::time{time.hour, time.minute};
|
return mirai::time{time.hour, time.minute};
|
||||||
}
|
}
|
22
src/ui/utils.h
Normal file
22
src/ui/utils.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "mirai-core/date.h"
|
||||||
|
#include "ui.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
void bind_slint_utils(const ui::Utils &utils);
|
||||||
|
|
||||||
|
std::string format_zero_padding(const int number);
|
||||||
|
std::string format_date_relative(const ui::Date &date);
|
||||||
|
std::string capitalize(std::string str);
|
||||||
|
std::string slint_date_to_std_string(const ui::Date &date);
|
||||||
|
mirai::date slint_date_to_mirai_date(const ui::Date &date);
|
||||||
|
ui::Date mirai_date_to_slint_date(const mirai::date &date);
|
||||||
|
ui::Time mirai_time_to_slint_time(const mirai::time &time);
|
||||||
|
mirai::time slint_time_to_mirai_time(const ui::Time &time);
|
|
@ -1,12 +1,12 @@
|
||||||
import { AppModels } from "../../shared/Models.slint";
|
import { AppModels } from "../../Models.slint";
|
||||||
import { Button, VerticalBox, CheckBox } from "std-widgets.slint";
|
import { Button, VerticalBox, CheckBox } from "std-widgets.slint";
|
||||||
import { MainView } from "views/TasksView.slint";
|
import { MainView } from "views/TasksView.slint";
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
import { CalendarView } from "views/CalendarView.slint";
|
import { CalendarView } from "views/CalendarView.slint";
|
||||||
import { VButton } from "../../../external/selenite/components/Button.slint";
|
import { VButton } from "@selenite";
|
||||||
import { ToggleButton, Svg } from "../../../external/selenite/components/index.slint";
|
import { ToggleButton, Svg } from "@selenite";
|
||||||
import { VTextInput } from "../../../external/selenite/components/TextInput.slint";
|
import { VTextInput } from "@selenite";
|
||||||
import { AppActions } from "../../shared/Actions.slint";
|
import { AppActions } from "../../Actions.slint";
|
||||||
import { SideBar } from "views/SideBar.slint";
|
import { SideBar } from "views/SideBar.slint";
|
||||||
|
|
||||||
export component AppWindow inherits Window {
|
export component AppWindow inherits Window {
|
|
@ -1,12 +1,12 @@
|
||||||
import { AppModels } from "../../../shared/Models.slint";
|
import { AppModels } from "../../../Models.slint";
|
||||||
import { AppActions, NewTaskData, SaveTaskData } from "../../../shared/Actions.slint";
|
import { AppActions, NewTaskData, SaveTaskData } from "../../../Actions.slint";
|
||||||
import { Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
import { Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
||||||
import { TaskLine } from "../../../components/TaskLine.slint";
|
import { TaskLine } from "../../../components/TaskLine.slint";
|
||||||
import { Calendar } from "../../../components/Calendar.slint";
|
import { Calendar } from "../../../components/Calendar.slint";
|
||||||
import { VDatePicker, VTimePicker, VCheckBox, VButton, VTag, VText, VTextInput, Svg, Palette } from "@selenite";
|
import { VDatePicker, VTimePicker, VCheckBox, VButton, VTag, VText, VTextInput, Svg, Palette } from "@selenite";
|
||||||
import { CreateTaskOrEvent } from "../../../components/CreateTaskOrEvent.slint";
|
import { CreateTaskOrEvent } from "../../../components/CreateTaskOrEvent.slint";
|
||||||
import { Utils } from "../../../shared/Utils.slint";
|
import { Utils } from "../../../Utils.slint";
|
||||||
import { VActionButton } from "../../../../external/selenite/components/index.slint";
|
import { VActionButton } from "@selenite";
|
||||||
import { AddEventModal } from "../../../modals/AddEventModal.slint";
|
import { AddEventModal } from "../../../modals/AddEventModal.slint";
|
||||||
|
|
||||||
export component CalendarView inherits Rectangle {
|
export component CalendarView inherits Rectangle {
|
|
@ -1,5 +1,5 @@
|
||||||
import { AppModels } from "../../../shared/Models.slint";
|
import { AppModels } from "../../../Models.slint";
|
||||||
import { AppActions } from "../../../shared/Actions.slint";
|
import { AppActions } from "../../../Actions.slint";
|
||||||
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
||||||
import { EditSourceModal } from "../../../modals/EditSourceModal.slint";
|
import { EditSourceModal } from "../../../modals/EditSourceModal.slint";
|
||||||
import { AddSourceModal } from "../../../modals/AddSourceModal.slint";
|
import { AddSourceModal } from "../../../modals/AddSourceModal.slint";
|
|
@ -1,11 +1,11 @@
|
||||||
import { AppModels } from "../../../shared/Models.slint";
|
import { AppModels } from "../../../Models.slint";
|
||||||
import { AppActions, NewTaskData, SaveTaskData } from "../../../shared/Actions.slint";
|
import { AppActions, NewTaskData, SaveTaskData } from "../../../Actions.slint";
|
||||||
import { Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
import { Button, VerticalBox, CheckBox, ScrollView, ComboBox } from "std-widgets.slint";
|
||||||
import { TaskLine } from "../../../components/TaskLine.slint";
|
import { TaskLine } from "../../../components/TaskLine.slint";
|
||||||
import { Calendar } from "../../../components/Calendar.slint";
|
import { Calendar } from "../../../components/Calendar.slint";
|
||||||
import { VPopupIconMenu, VDatePicker, VTimePicker, VCheckBox, VButton, VTag, VText, VTextInput, Svg, Palette } from "@selenite";
|
import { VPopupIconMenu, VDatePicker, VTimePicker, VCheckBox, VButton, VTag, VText, VTextInput, Svg, Palette } from "@selenite";
|
||||||
import { CreateTaskOrEvent } from "../../../components/CreateTaskOrEvent.slint";
|
import { CreateTaskOrEvent } from "../../../components/CreateTaskOrEvent.slint";
|
||||||
import { Utils } from "../../../shared/Utils.slint";
|
import { Utils } from "../../../Utils.slint";
|
||||||
|
|
||||||
export component MainView inherits Rectangle {
|
export component MainView inherits Rectangle {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue