Move shared components to components

This commit is contained in:
eraden 2021-01-16 17:50:00 +01:00
parent 87d2ea48a3
commit 1c8c78aadf
57 changed files with 195 additions and 187 deletions

View File

@ -1,9 +1,8 @@
use seed::prelude::WebSocketMessage; use {
crate::{components::styled_editor::Mode as TabMode, FieldId},
use jirs_data::{EpicId, IssueStatusId, WsMsg}; jirs_data::{EpicId, IssueStatusId, WsMsg},
seed::prelude::WebSocketMessage,
use crate::shared::styled_editor::Mode as TabMode; };
use crate::FieldId;
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub enum FieldChange { pub enum FieldChange {

View File

@ -0,0 +1,18 @@
pub mod styled_avatar;
pub mod styled_button;
pub mod styled_checkbox;
pub mod styled_confirm_modal;
pub mod styled_date_time_input;
pub mod styled_editor;
pub mod styled_field;
pub mod styled_form;
pub mod styled_icon;
pub mod styled_image_input;
pub mod styled_input;
pub mod styled_link;
pub mod styled_modal;
// pub mod styled_rte;
pub mod styled_select;
pub mod styled_select_child;
pub mod styled_textarea;
pub mod styled_tooltip;

View File

@ -1,10 +1,11 @@
use seed::EventHandler; use {
use seed::{prelude::*, *}; crate::{
components::{styled_button::StyledButton, styled_modal::StyledModal},
use crate::shared::styled_button::StyledButton; shared::ToNode,
use crate::shared::styled_modal::StyledModal; Msg,
use crate::shared::ToNode; },
use crate::Msg; seed::{prelude::*, EventHandler, *},
};
const TITLE: &str = "Warning"; const TITLE: &str = "Warning";
const MESSAGE: &str = "Are you sure you want to continue with this action?"; const MESSAGE: &str = "Are you sure you want to continue with this action?";

View File

@ -1,17 +1,17 @@
use std::ops::RangeInclusive;
use chrono::Duration;
use { use {
crate::{
components::{
styled_button::StyledButton, styled_icon::Icon, styled_tooltip::StyledTooltip,
},
shared::ToNode,
FieldId, Msg,
},
chrono::prelude::*, chrono::prelude::*,
chrono::Duration,
seed::{prelude::*, *}, seed::{prelude::*, *},
std::ops::RangeInclusive,
}; };
use crate::shared::styled_button::StyledButton;
use crate::shared::styled_icon::Icon;
use crate::shared::styled_tooltip::StyledTooltip;
use crate::{shared::ToNode, FieldId, Msg};
#[derive(Debug)] #[derive(Debug)]
pub enum StyledDateTimeChanged { pub enum StyledDateTimeChanged {
MonthChanged(Option<NaiveDateTime>), MonthChanged(Option<NaiveDateTime>),

View File

@ -1,7 +1,6 @@
use { use {
crate::{ crate::{
shared::{styled_textarea::StyledTextarea, ToNode}, components::styled_textarea::StyledTextarea, shared::ToNode, FieldChange, FieldId, Msg,
FieldChange, FieldId, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},
}; };

View File

@ -1,8 +1,11 @@
use seed::{prelude::*, *}; use {
crate::{
use crate::shared::styled_icon::{Icon, StyledIcon}; components::styled_icon::{Icon, StyledIcon},
use crate::shared::ToNode; shared::ToNode,
use crate::{FieldId, Msg}; FieldId, Msg,
},
seed::{prelude::*, *},
};
#[derive(Clone, Debug, PartialOrd, PartialEq)] #[derive(Clone, Debug, PartialOrd, PartialEq)]
pub enum Variant { pub enum Variant {

View File

@ -1,8 +1,11 @@
use seed::{prelude::*, *}; use {
crate::{
use crate::shared::styled_icon::{Icon, StyledIcon}; components::styled_icon::{Icon, StyledIcon},
use crate::shared::ToNode; shared::ToNode,
use crate::Msg; Msg,
},
seed::{prelude::*, *},
};
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]

View File

@ -1,11 +1,16 @@
use seed::{prelude::*, *}; use {
crate::{
use crate::shared::styled_button::StyledButton; components::{
use crate::shared::styled_icon::{Icon, StyledIcon}; styled_button::StyledButton,
use crate::shared::styled_select::{StyledSelect, StyledSelectState}; styled_icon::{Icon, StyledIcon},
use crate::shared::styled_tooltip::StyledTooltip; styled_select::{StyledSelect, StyledSelectState},
use crate::shared::{ToChild, ToNode}; styled_tooltip::StyledTooltip,
use crate::{ButtonId, FieldId, Msg, RteField}; },
shared::{ToChild, ToNode},
ButtonId, FieldId, Msg, RteField,
},
seed::{prelude::*, *},
};
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum HeadingSize { pub enum HeadingSize {

View File

@ -1,10 +1,10 @@
use { use {
crate::{ crate::{
shared::{ components::{
styled_icon::{Icon, StyledIcon}, styled_icon::{Icon, StyledIcon},
styled_select_child::*, styled_select_child::*,
ToNode,
}, },
shared::ToNode,
FieldId, Msg, FieldId, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},

View File

@ -1,6 +1,6 @@
use { use {
crate::{ crate::{
shared::styled_select::Variant, components::styled_select::Variant,
shared::{IntoChild, ToChild, ToNode}, shared::{IntoChild, ToChild, ToNode},
Msg, Msg,
}, },
@ -175,7 +175,7 @@ impl<'l> ToChild<'l> for jirs_data::User {
type Builder = StyledSelectChildBuilder<'l>; type Builder = StyledSelectChildBuilder<'l>;
fn to_child<'m: 'l>(&'m self) -> Self::Builder { fn to_child<'m: 'l>(&'m self) -> Self::Builder {
let avatar = crate::shared::styled_avatar::StyledAvatar::build() let avatar = crate::components::styled_avatar::StyledAvatar::build()
.avatar_url(self.avatar_url.as_deref().unwrap_or_default()) .avatar_url(self.avatar_url.as_deref().unwrap_or_default())
.size(20) .size(20)
.name(self.name.as_str()) .name(self.name.as_str())
@ -192,7 +192,7 @@ impl<'l> IntoChild<'l> for jirs_data::IssuePriority {
type Builder = StyledSelectChildBuilder<'l>; type Builder = StyledSelectChildBuilder<'l>;
fn into_child(self) -> Self::Builder { fn into_child(self) -> Self::Builder {
let icon = crate::shared::styled_icon::StyledIcon::build(self.clone().into()) let icon = crate::components::styled_icon::StyledIcon::build(self.clone().into())
.add_class(self.to_str()) .add_class(self.to_str())
.build() .build()
.into_node(); .into_node();
@ -223,7 +223,7 @@ impl<'l> IntoChild<'l> for jirs_data::IssueType {
fn into_child(self) -> Self::Builder { fn into_child(self) -> Self::Builder {
let name = self.to_label(); let name = self.to_label();
let type_icon = crate::shared::styled_icon::StyledIcon::build(self.clone().into()) let type_icon = crate::components::styled_icon::StyledIcon::build(self.clone().into())
.add_class(name) .add_class(name)
.build() .build()
.into_node(); .into_node();

View File

@ -2,25 +2,26 @@
use { use {
crate::{ crate::{
model::{ModalType, Model, Page}, components::{
shared::{
go_to_board, go_to_login,
styled_date_time_input::StyledDateTimeChanged, styled_date_time_input::StyledDateTimeChanged,
styled_select::StyledSelectChanged, styled_select::StyledSelectChanged,
styled_tooltip, styled_tooltip,
styled_tooltip::{Variant as StyledTooltip, Variant}, styled_tooltip::{Variant as StyledTooltip, Variant},
}, },
model::{ModalType, Model, Page},
shared::{go_to_board, go_to_login},
ws::{flush_queue, open_socket, read_incoming, send_ws_msg}, ws::{flush_queue, open_socket, read_incoming, send_ws_msg},
}, },
jirs_data::*, jirs_data::*,
seed::{prelude::*, *}, seed::{prelude::*, *},
web_sys::File, web_sys::File,
}; };
pub use {changes::*, fields::*, images::*}; pub use {changes::*, components::*, fields::*, images::*};
// use crate::shared::styled_rte::RteMsg; // use crate::shared::styled_rte::RteMsg;
mod changes; mod changes;
mod components;
mod fields; mod fields;
mod images; mod images;
mod modals; mod modals;

View File

@ -1,9 +1,5 @@
use { use {
crate::{ crate::{components::styled_modal::StyledModal, model::Model, shared::ToNode, Msg},
model::Model,
shared::{styled_modal::StyledModal, ToNode},
Msg,
},
seed::{prelude::*, *}, seed::{prelude::*, *},
}; };

View File

@ -1,8 +1,9 @@
use { use {
crate::{ crate::{
components::{styled_confirm_modal::*, styled_icon::*, styled_modal::*},
modals::epic_delete::Model, modals::epic_delete::Model,
model, model,
shared::{styled_confirm_modal::*, styled_icon::*, styled_modal::*, ToNode}, shared::ToNode,
Msg, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},

View File

@ -1,8 +1,7 @@
use { use {
crate::{ crate::{
components::{styled_field::StyledField, styled_select::StyledSelect},
model::{IssueModal, Model}, model::{IssueModal, Model},
shared::styled_field::StyledField,
shared::styled_select::StyledSelect,
shared::{ToChild, ToNode}, shared::{ToChild, ToNode},
FieldId, Msg, FieldId, Msg,
}, },

View File

@ -1,9 +1,5 @@
use { use {
crate::{ crate::{components::styled_confirm_modal::StyledConfirmModal, model, shared::ToNode, Msg},
model,
shared::{styled_confirm_modal::StyledConfirmModal, ToNode},
Msg,
},
jirs_data::IssueStatusId, jirs_data::IssueStatusId,
seed::prelude::*, seed::prelude::*,
}; };

View File

@ -1,13 +1,10 @@
use { use {
crate::{ crate::{
model::IssueModal, components::{
shared::{ styled_date_time_input::*, styled_input::*, styled_select::*, styled_select_child::*,
styled_date_time_input::StyledDateTimeInputState,
styled_input::StyledInputState,
styled_select::StyledSelectState,
styled_select_child::{StyledSelectChild, StyledSelectChildBuilder},
ToChild, ToNode,
}, },
model::IssueModal,
shared::{ToChild, ToNode},
FieldId, Msg, FieldId, Msg,
}, },
jirs_data::{IssueFieldId, IssuePriority}, jirs_data::{IssueFieldId, IssuePriority},
@ -81,17 +78,22 @@ impl<'l> ToChild<'l> for Type {
Type::Story => 2, Type::Story => 2,
Type::Epic => 3, Type::Epic => 3,
}; };
let icon = match self {
Type::Task => crate::shared::styled_icon::Icon::Task,
Type::Bug => crate::shared::styled_icon::Icon::Bug,
Type::Story => crate::shared::styled_icon::Icon::Story,
Type::Epic => crate::shared::styled_icon::Icon::Epic,
};
let type_icon = crate::shared::styled_icon::StyledIcon::build(icon) let type_icon = {
.add_class(name) use crate::components::styled_icon::*;
.build() let icon = {
.into_node(); match self {
Type::Task => Icon::Task,
Type::Bug => Icon::Bug,
Type::Story => Icon::Story,
Type::Epic => Icon::Epic,
}
};
crate::components::styled_icon::StyledIcon::build(icon)
.add_class(name)
.build()
.into_node()
};
StyledSelectChild::build() StyledSelectChild::build()
.add_class(name) .add_class(name)

View File

@ -1,7 +1,7 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
model::{IssueModal, ModalType}, model::{IssueModal, ModalType},
shared::styled_select::StyledSelectChanged,
ws::send_ws_msg, ws::send_ws_msg,
FieldId, Msg, OperationKind, ResourceKind, FieldId, Msg, OperationKind, ResourceKind,
}, },

View File

@ -1,16 +1,17 @@
use { use {
crate::{ crate::{
components::{
styled_button::StyledButton, styled_date_time_input::StyledDateTimeInput,
styled_field::StyledField, styled_form::StyledForm, styled_input::StyledInput,
styled_modal::StyledModal, styled_select::StyledSelect,
styled_textarea::StyledTextarea,
},
modals::{ modals::{
epic_field, epic_field,
issues_create::{Model as AddIssueModal, Type}, issues_create::{Model as AddIssueModal, Type},
}, },
model::Model, model::Model,
shared::{ shared::{IntoChild, ToChild, ToNode},
styled_button::StyledButton, styled_date_time_input::StyledDateTimeInput,
styled_field::StyledField, styled_form::StyledForm, styled_input::StyledInput,
styled_modal::StyledModal, styled_select::StyledSelect,
styled_textarea::StyledTextarea, IntoChild, ToChild, ToNode,
},
FieldId, Msg, FieldId, Msg,
}, },
jirs_data::{IssueFieldId, IssuePriority}, jirs_data::{IssueFieldId, IssuePriority},
@ -113,7 +114,7 @@ pub fn view(model: &Model, modal: &AddIssueModal) -> Node<Msg> {
StyledModal::build() StyledModal::build()
.add_class("addIssue") .add_class("addIssue")
.width(0) .width(0)
.variant(crate::shared::styled_modal::Variant::Center) .variant(crate::components::styled_modal::Variant::Center)
.child(form) .child(form)
.build() .build()
.into_node() .into_node()

View File

@ -1,7 +1,7 @@
use { use {
crate::{ crate::{
model, model::ModalType, shared::styled_confirm_modal::StyledConfirmModal, shared::ToNode, components::styled_confirm_modal::StyledConfirmModal, model, model::ModalType,
Msg, shared::ToNode, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},
}; };

View File

@ -1,12 +1,12 @@
use { use {
crate::{ crate::{
modals::time_tracking::value_for_time_tracking, components::{
model::{CommentForm, IssueModal},
shared::{
styled_date_time_input::StyledDateTimeInputState, styled_editor::Mode, styled_date_time_input::StyledDateTimeInputState, styled_editor::Mode,
styled_editor::StyledEditorState, styled_input::StyledInputState, styled_editor::StyledEditorState, styled_input::StyledInputState,
styled_select::StyledSelectState, styled_select::StyledSelectState,
}, },
modals::time_tracking::value_for_time_tracking,
model::{CommentForm, IssueModal},
EditIssueModalSection, FieldId, Msg, EditIssueModalSection, FieldId, Msg,
}, },
jirs_data::{EpicId, Issue, IssueFieldId, TimeTracking, UpdateIssuePayload}, jirs_data::{EpicId, Issue, IssueFieldId, TimeTracking, UpdateIssuePayload},

View File

@ -1,8 +1,8 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
modals::issues_edit::Model as EditIssueModal, modals::issues_edit::Model as EditIssueModal,
model::{IssueModal, ModalType, Model}, model::{IssueModal, ModalType, Model},
shared::styled_select::StyledSelectChanged,
ws::send_ws_msg, ws::send_ws_msg,
EditIssueModalSection, FieldChange, FieldId, Msg, OperationKind, ResourceKind, EditIssueModalSection, FieldChange, FieldId, Msg, OperationKind, ResourceKind,
}, },

View File

@ -1,15 +1,15 @@
use { use {
crate::{ crate::{
components::{
styled_avatar::StyledAvatar, styled_button::StyledButton, styled_editor::StyledEditor,
styled_field::StyledField, styled_icon::Icon, styled_input::StyledInput,
styled_select::StyledSelect,
},
modals::{ modals::{
epic_field, issues_edit::Model as EditIssueModal, time_tracking::time_tracking_field, epic_field, issues_edit::Model as EditIssueModal, time_tracking::time_tracking_field,
}, },
model::{ModalType, Model}, model::{ModalType, Model},
shared::{ shared::{tracking_widget::tracking_link, IntoChild, ToChild, ToNode},
styled_avatar::StyledAvatar, styled_button::StyledButton, styled_editor::StyledEditor,
styled_field::StyledField, styled_icon::Icon, styled_input::StyledInput,
styled_select::StyledSelect, tracking_widget::tracking_link, IntoChild, ToChild,
ToNode,
},
EditIssueModalSection, FieldChange, FieldId, Msg, EditIssueModalSection, FieldChange, FieldId, Msg,
}, },
comments::*, comments::*,

View File

@ -1,11 +1,12 @@
use { use {
crate::{ crate::{
components::{
styled_avatar::StyledAvatar, styled_button::StyledButton,
styled_textarea::StyledTextarea,
},
modals::issues_edit::Model as EditIssueModal, modals::issues_edit::Model as EditIssueModal,
model::{CommentForm, ModalType, Model}, model::{CommentForm, ModalType, Model},
shared::{ shared::ToNode,
styled_avatar::StyledAvatar, styled_button::StyledButton,
styled_textarea::StyledTextarea, ToNode,
},
EditIssueModalSection, FieldChange, FieldId, Msg, EditIssueModalSection, FieldChange, FieldId, Msg,
}, },
jirs_data::{Comment, CommentFieldId}, jirs_data::{Comment, CommentFieldId},

View File

@ -1,12 +1,14 @@
use { use {
crate::{ crate::{
model::{ModalType, Model}, components::{
shared::{
styled_button::StyledButton, styled_button::StyledButton,
styled_field::StyledField, styled_field::StyledField,
styled_input::{StyledInput, StyledInputState}, styled_input::{StyledInput, StyledInputState},
styled_modal::StyledModal, styled_modal::StyledModal,
styled_select::{StyledSelect, StyledSelectState}, styled_select::{StyledSelect, StyledSelectState},
},
model::{ModalType, Model},
shared::{
tracking_widget::{fibonacci_values, tracking_widget}, tracking_widget::{fibonacci_values, tracking_widget},
ToChild, ToNode, ToChild, ToNode,
}, },

View File

@ -1,7 +1,9 @@
use { use {
crate::{ crate::{
model::*, shared::styled_confirm_modal::StyledConfirmModal, components::{styled_confirm_modal::StyledConfirmModal, styled_modal::StyledModal},
shared::styled_modal::StyledModal, shared::ToNode, Msg, model::*,
shared::ToNode,
Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},
}; };
@ -16,7 +18,7 @@ pub fn view(model: &Model) -> Node<Msg> {
if let Some(_issue) = model.issues_by_id.get(issue_id) { if let Some(_issue) = model.issues_by_id.get(issue_id) {
let details = issues_edit::view(model, modal.as_ref()); let details = issues_edit::view(model, modal.as_ref());
StyledModal::build() StyledModal::build()
.variant(crate::shared::styled_modal::Variant::Center) .variant(crate::components::styled_modal::Variant::Center)
.width(1040) .width(1040)
.child(details) .child(details)
.build() .build()

View File

@ -1,12 +1,12 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectState,
pages::{ pages::{
invite_page::InvitePage, profile_page::model::ProfilePage, invite_page::InvitePage, profile_page::model::ProfilePage,
project_page::model::ProjectPage, project_settings_page::ProjectSettingsPage, project_page::model::ProjectPage, project_settings_page::ProjectSettingsPage,
reports_page::model::ReportsPage, sign_in_page::model::SignInPage, reports_page::model::ReportsPage, sign_in_page::model::SignInPage,
sign_up_page::model::SignUpPage, users_page::model::UsersPage, sign_up_page::model::SignUpPage, users_page::model::UsersPage,
}, },
shared::styled_select::StyledSelectState,
Msg, Msg,
}, },
jirs_data::*, jirs_data::*,

View File

@ -1,11 +1,12 @@
use { use {
crate::{ crate::{
components::{
styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
styled_input::StyledInput,
},
model::{Model, PageContent}, model::{Model, PageContent},
pages::invite_page::InvitePage, pages::invite_page::InvitePage,
shared::{ shared::{outer_layout, ToNode},
outer_layout, styled_button::StyledButton, styled_field::StyledField,
styled_form::StyledForm, styled_input::StyledInput, ToNode,
},
validations::is_token, validations::is_token,
FieldId, InvitationPageChange, Msg, PageChanged, FieldId, InvitationPageChange, Msg, PageChanged,
}, },

View File

@ -1,6 +1,6 @@
use { use {
crate::{ crate::{
shared::{ components::{
styled_image_input::StyledImageInputState, styled_input::StyledInputState, styled_image_input::StyledImageInputState, styled_input::StyledInputState,
styled_select::StyledSelectState, styled_select::StyledSelectState,
}, },

View File

@ -1,8 +1,8 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
model::{Model, Page, PageContent}, model::{Model, Page, PageContent},
pages::profile_page::model::ProfilePage, pages::profile_page::model::ProfilePage,
shared::styled_select::StyledSelectChanged,
ws::{board_load, send_ws_msg}, ws::{board_load, send_ws_msg},
FieldId, Msg, OperationKind, PageChanged, ProfilePageChange, ResourceKind, FieldId, Msg, OperationKind, PageChanged, ProfilePageChange, ResourceKind,
WebSocketChanged, WebSocketChanged,

View File

@ -1,12 +1,13 @@
use { use {
crate::{ crate::{
components::{
styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
styled_image_input::StyledImageInput, styled_input::StyledInput,
styled_select::StyledSelect,
},
model::{Model, PageContent}, model::{Model, PageContent},
pages::profile_page::model::ProfilePage, pages::profile_page::model::ProfilePage,
shared::{ shared::{inner_layout, ToChild, ToNode},
inner_layout, styled_button::StyledButton, styled_field::StyledField,
styled_form::StyledForm, styled_image_input::StyledImageInput,
styled_input::StyledInput, styled_select::StyledSelect, ToChild, ToNode,
},
FieldId, Msg, PageChanged, ProfilePageChange, FieldId, Msg, PageChanged, ProfilePageChange,
}, },
jirs_data::*, jirs_data::*,

View File

@ -1,8 +1,8 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
model::{ModalType, Model, Page, PageContent}, model::{ModalType, Model, Page, PageContent},
pages::project_page::model::ProjectPage, pages::project_page::model::ProjectPage,
shared::styled_select::StyledSelectChanged,
ws::{board_load, send_ws_msg}, ws::{board_load, send_ws_msg},
BoardPageChange, EditIssueModalSection, FieldId, Msg, OperationKind, PageChanged, BoardPageChange, EditIssueModalSection, FieldId, Msg, OperationKind, PageChanged,
ResourceKind, ResourceKind,

View File

@ -1,7 +1,8 @@
use { use {
crate::{ crate::{
components::{styled_button::StyledButton, styled_icon::Icon},
model::Model, model::Model,
shared::{inner_layout, styled_button::StyledButton, styled_icon::Icon, ToNode}, shared::{inner_layout, ToNode},
Msg, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},

View File

@ -1,15 +1,14 @@
use { use {
crate::{ crate::{
components::{styled_avatar::*, styled_button::StyledButton, styled_icon::*},
model::PageContent, model::PageContent,
shared::{styled_avatar::*, styled_icon::*, ToNode}, shared::ToNode,
BoardPageChange, Model, Msg, Page, PageChanged, BoardPageChange, Model, Msg, Page, PageChanged,
}, },
jirs_data::*, jirs_data::*,
seed::{prelude::*, *}, seed::{prelude::*, *},
}; };
use crate::shared::styled_button::StyledButton;
pub fn project_board_lists(model: &Model) -> Node<Msg> { pub fn project_board_lists(model: &Model) -> Node<Msg> {
let project_page = match &model.page_content { let project_page = match &model.page_content {
PageContent::Project(project_page) => project_page, PageContent::Project(project_page) => project_page,

View File

@ -1,7 +1,8 @@
use { use {
crate::{ crate::{
components::{styled_avatar::*, styled_button::*, styled_icon::*, styled_input::*},
model::PageContent, model::PageContent,
shared::{styled_avatar::*, styled_button::*, styled_icon::*, styled_input::*, ToNode}, shared::ToNode,
FieldId, Model, Msg, FieldId, Model, Msg,
}, },
seed::{prelude::*, *}, seed::{prelude::*, *},

View File

@ -1,9 +1,10 @@
use { use {
crate::{ crate::{
shared::{ components::{
drag::DragState, styled_checkbox::StyledCheckboxState, styled_input::StyledInputState, styled_checkbox::StyledCheckboxState, styled_input::StyledInputState,
styled_select::StyledSelectState, styled_select::StyledSelectState,
}, },
shared::drag::DragState,
FieldId, FieldId,
}, },
jirs_data::{IssueStatusId, Project, ProjectFieldId, UpdateProjectPayload}, jirs_data::{IssueStatusId, Project, ProjectFieldId, UpdateProjectPayload},
@ -13,7 +14,7 @@ use {
pub struct ProjectSettingsPage { pub struct ProjectSettingsPage {
pub payload: UpdateProjectPayload, pub payload: UpdateProjectPayload,
pub project_category_state: StyledSelectState, pub project_category_state: StyledSelectState,
pub description_mode: crate::shared::styled_editor::Mode, pub description_mode: crate::components::styled_editor::Mode,
pub time_tracking: StyledCheckboxState, pub time_tracking: StyledCheckboxState,
pub column_drag: DragState, pub column_drag: DragState,
pub edit_column_id: Option<IssueStatusId>, pub edit_column_id: Option<IssueStatusId>,
@ -23,7 +24,7 @@ pub struct ProjectSettingsPage {
impl ProjectSettingsPage { impl ProjectSettingsPage {
pub fn new(project: &Project) -> Self { pub fn new(project: &Project) -> Self {
use crate::shared::styled_editor::Mode as EditorMode; use crate::components::styled_editor::Mode as EditorMode;
let jirs_data::Project { let jirs_data::Project {
id, id,
name, name,

View File

@ -1,8 +1,8 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
model::{Model, Page, PageContent}, model::{Model, Page, PageContent},
pages::project_settings_page::ProjectSettingsPage, pages::project_settings_page::ProjectSettingsPage,
shared::styled_select::StyledSelectChanged,
ws::{board_load, send_ws_msg}, ws::{board_load, send_ws_msg},
FieldChange::TabChanged, FieldChange::TabChanged,
FieldId, Msg, PageChanged, ProjectPageChange, WebSocketChanged, FieldId, Msg, PageChanged, ProjectPageChange, WebSocketChanged,

View File

@ -1,10 +1,6 @@
use { use {
crate::{ crate::{
modals::issue_statuses_delete::Model as DeleteIssueStatusModal, components::{
model::{self, ModalType, Model, PageContent},
pages::project_settings_page::ProjectSettingsPage,
shared::{
inner_layout,
styled_button::StyledButton, styled_button::StyledButton,
styled_checkbox::StyledCheckbox, styled_checkbox::StyledCheckbox,
styled_editor::StyledEditor, styled_editor::StyledEditor,
@ -14,8 +10,11 @@ use {
styled_input::StyledInput, styled_input::StyledInput,
styled_select::StyledSelect, styled_select::StyledSelect,
styled_textarea::StyledTextarea, styled_textarea::StyledTextarea,
IntoChild, ToChild, ToNode,
}, },
modals::issue_statuses_delete::Model as DeleteIssueStatusModal,
model::{self, ModalType, Model, PageContent},
pages::project_settings_page::ProjectSettingsPage,
shared::{inner_layout, IntoChild, ToChild, ToNode},
FieldId, Msg, PageChanged, ProjectFieldId, ProjectPageChange, FieldId, Msg, PageChanged, ProjectFieldId, ProjectPageChange,
}, },
jirs_data::{IssueStatus, ProjectCategory, TimeTracking}, jirs_data::{IssueStatus, ProjectCategory, TimeTracking},

View File

@ -1,8 +1,9 @@
use { use {
crate::{ crate::{
components::styled_icon::StyledIcon,
model::{Model, PageContent}, model::{Model, PageContent},
pages::reports_page::model::ReportsPage, pages::reports_page::model::ReportsPage,
shared::{inner_layout, styled_icon::StyledIcon, ToNode}, shared::{inner_layout, ToNode},
Msg, PageChanged, ReportsPageChange, Msg, PageChanged, ReportsPageChange,
}, },
chrono::Datelike, chrono::Datelike,

View File

@ -1,16 +1,15 @@
use { use {
crate::{ crate::{
model::{self, PageContent}, components::{
shared::{
outer_layout,
styled_button::StyledButton, styled_button::StyledButton,
styled_field::StyledField, styled_field::StyledField,
styled_form::StyledForm, styled_form::StyledForm,
styled_icon::{Icon, StyledIcon}, styled_icon::{Icon, StyledIcon},
styled_input::StyledInput, styled_input::StyledInput,
styled_link::StyledLink, styled_link::StyledLink,
ToNode,
}, },
model::{self, PageContent},
shared::{outer_layout, ToNode},
validations::{is_email, is_token}, validations::{is_email, is_token},
FieldId, Msg, SignInFieldId, FieldId, Msg, SignInFieldId,
}, },

View File

@ -1,16 +1,15 @@
use { use {
crate::{ crate::{
model::{self, PageContent}, components::{
shared::{
outer_layout,
styled_button::StyledButton, styled_button::StyledButton,
styled_field::StyledField, styled_field::StyledField,
styled_form::StyledForm, styled_form::StyledForm,
styled_icon::{Icon, StyledIcon}, styled_icon::{Icon, StyledIcon},
styled_input::StyledInput, styled_input::StyledInput,
styled_link::StyledLink, styled_link::StyledLink,
ToNode,
}, },
model::{self, PageContent},
shared::{outer_layout, ToNode},
validations::is_email, validations::is_email,
FieldId, Msg, FieldId, Msg,
}, },

View File

@ -1,5 +1,5 @@
use { use {
crate::{model::InvitationFormState, shared::styled_select::StyledSelectState, FieldId}, crate::{components::styled_select::StyledSelectState, model::InvitationFormState, FieldId},
jirs_data::{Invitation, User, UserRole, UsersFieldId}, jirs_data::{Invitation, User, UserRole, UsersFieldId},
}; };

View File

@ -1,8 +1,8 @@
use { use {
crate::{ crate::{
components::styled_select::StyledSelectChanged,
model::{InvitationFormState, Model, Page, PageContent}, model::{InvitationFormState, Model, Page, PageContent},
pages::users_page::model::UsersPage, pages::users_page::model::UsersPage,
shared::styled_select::StyledSelectChanged,
ws::{invitation_load, send_ws_msg}, ws::{invitation_load, send_ws_msg},
FieldId, Msg, PageChanged, UsersPageChange, WebSocketChanged, FieldId, Msg, PageChanged, UsersPageChange, WebSocketChanged,
}, },

View File

@ -1,11 +1,11 @@
use { use {
crate::{ crate::{
model::{InvitationFormState, Model, PageContent}, components::{
shared::{ styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
inner_layout, styled_button::StyledButton, styled_field::StyledField, styled_input::StyledInput, styled_select::StyledSelect,
styled_form::StyledForm, styled_input::StyledInput, styled_select::StyledSelect,
IntoChild, ToNode,
}, },
model::{InvitationFormState, Model, PageContent},
shared::{inner_layout, IntoChild, ToNode},
validations::is_email, validations::is_email,
FieldId, Msg, PageChanged, UsersPageChange, FieldId, Msg, PageChanged, UsersPageChange,
}, },

View File

@ -1,11 +1,8 @@
use { use {
crate::{ crate::{
components::styled_icon::{Icon, StyledIcon},
model::{Model, Page}, model::{Model, Page},
shared::{ shared::{divider, ToNode},
divider,
styled_icon::{Icon, StyledIcon},
ToNode,
},
ws::enqueue_ws_msg, ws::enqueue_ws_msg,
Msg, OperationKind, ResourceKind, Msg, OperationKind, ResourceKind,
}, },

View File

@ -9,24 +9,6 @@ use {
pub mod aside; pub mod aside;
pub mod drag; pub mod drag;
pub mod navbar_left; pub mod navbar_left;
pub mod styled_avatar;
pub mod styled_button;
pub mod styled_checkbox;
pub mod styled_confirm_modal;
pub mod styled_date_time_input;
pub mod styled_editor;
pub mod styled_field;
pub mod styled_form;
pub mod styled_icon;
pub mod styled_image_input;
pub mod styled_input;
pub mod styled_link;
pub mod styled_modal;
// pub mod styled_rte;
pub mod styled_select;
pub mod styled_select_child;
pub mod styled_textarea;
pub mod styled_tooltip;
pub mod tracking_widget; pub mod tracking_widget;
pub trait ToChild<'l> { pub trait ToChild<'l> {

View File

@ -1,13 +1,13 @@
use { use {
crate::{ crate::{
model::Model, components::{
shared::{
divider,
styled_avatar::StyledAvatar, styled_avatar::StyledAvatar,
styled_button::StyledButton, styled_button::StyledButton,
styled_icon::{Icon, StyledIcon}, styled_icon::{Icon, StyledIcon},
styled_tooltip, ToNode, styled_tooltip,
}, },
model::Model,
shared::{divider, ToNode},
ws::send_ws_msg, ws::send_ws_msg,
Msg, Page, Msg, Page,
}, },

View File

@ -1,11 +1,9 @@
use { use {
crate::{ crate::{
components::styled_icon::{Icon, StyledIcon},
modals::{issues_edit::Model as EditIssueModal, time_tracking::value_for_time_tracking}, modals::{issues_edit::Model as EditIssueModal, time_tracking::value_for_time_tracking},
model::{ModalType, Model}, model::{ModalType, Model},
shared::{ shared::ToNode,
styled_icon::{Icon, StyledIcon},
ToNode,
},
Msg, Msg,
}, },
jirs_data::{TimeTracking, UpdateIssuePayload}, jirs_data::{TimeTracking, UpdateIssuePayload},