Move shared components to components
This commit is contained in:
parent
87d2ea48a3
commit
1c8c78aadf
@ -1,9 +1,8 @@
|
||||
use seed::prelude::WebSocketMessage;
|
||||
|
||||
use jirs_data::{EpicId, IssueStatusId, WsMsg};
|
||||
|
||||
use crate::shared::styled_editor::Mode as TabMode;
|
||||
use crate::FieldId;
|
||||
use {
|
||||
crate::{components::styled_editor::Mode as TabMode, FieldId},
|
||||
jirs_data::{EpicId, IssueStatusId, WsMsg},
|
||||
seed::prelude::WebSocketMessage,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum FieldChange {
|
||||
|
18
jirs-client/src/components/mod.rs
Normal file
18
jirs-client/src/components/mod.rs
Normal 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;
|
@ -1,10 +1,11 @@
|
||||
use seed::EventHandler;
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::styled_button::StyledButton;
|
||||
use crate::shared::styled_modal::StyledModal;
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_button::StyledButton, styled_modal::StyledModal},
|
||||
shared::ToNode,
|
||||
Msg,
|
||||
},
|
||||
seed::{prelude::*, EventHandler, *},
|
||||
};
|
||||
|
||||
const TITLE: &str = "Warning";
|
||||
const MESSAGE: &str = "Are you sure you want to continue with this action?";
|
@ -1,17 +1,17 @@
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use chrono::Duration;
|
||||
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_button::StyledButton, styled_icon::Icon, styled_tooltip::StyledTooltip,
|
||||
},
|
||||
shared::ToNode,
|
||||
FieldId, Msg,
|
||||
},
|
||||
chrono::prelude::*,
|
||||
chrono::Duration,
|
||||
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)]
|
||||
pub enum StyledDateTimeChanged {
|
||||
MonthChanged(Option<NaiveDateTime>),
|
@ -1,7 +1,6 @@
|
||||
use {
|
||||
crate::{
|
||||
shared::{styled_textarea::StyledTextarea, ToNode},
|
||||
FieldChange, FieldId, Msg,
|
||||
components::styled_textarea::StyledTextarea, shared::ToNode, FieldChange, FieldId, Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
@ -1,8 +1,11 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::styled_icon::{Icon, StyledIcon};
|
||||
use crate::shared::ToNode;
|
||||
use crate::{FieldId, Msg};
|
||||
use {
|
||||
crate::{
|
||||
components::styled_icon::{Icon, StyledIcon},
|
||||
shared::ToNode,
|
||||
FieldId, Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, PartialOrd, PartialEq)]
|
||||
pub enum Variant {
|
@ -1,8 +1,11 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::styled_icon::{Icon, StyledIcon};
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{
|
||||
components::styled_icon::{Icon, StyledIcon},
|
||||
shared::ToNode,
|
||||
Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
|
@ -1,11 +1,16 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::styled_button::StyledButton;
|
||||
use crate::shared::styled_icon::{Icon, StyledIcon};
|
||||
use crate::shared::styled_select::{StyledSelect, StyledSelectState};
|
||||
use crate::shared::styled_tooltip::StyledTooltip;
|
||||
use crate::shared::{ToChild, ToNode};
|
||||
use crate::{ButtonId, FieldId, Msg, RteField};
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_button::StyledButton,
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
styled_select::{StyledSelect, StyledSelectState},
|
||||
styled_tooltip::StyledTooltip,
|
||||
},
|
||||
shared::{ToChild, ToNode},
|
||||
ButtonId, FieldId, Msg, RteField,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum HeadingSize {
|
@ -1,10 +1,10 @@
|
||||
use {
|
||||
crate::{
|
||||
shared::{
|
||||
components::{
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
styled_select_child::*,
|
||||
ToNode,
|
||||
},
|
||||
shared::ToNode,
|
||||
FieldId, Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
@ -1,6 +1,6 @@
|
||||
use {
|
||||
crate::{
|
||||
shared::styled_select::Variant,
|
||||
components::styled_select::Variant,
|
||||
shared::{IntoChild, ToChild, ToNode},
|
||||
Msg,
|
||||
},
|
||||
@ -175,7 +175,7 @@ impl<'l> ToChild<'l> for jirs_data::User {
|
||||
type Builder = StyledSelectChildBuilder<'l>;
|
||||
|
||||
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())
|
||||
.size(20)
|
||||
.name(self.name.as_str())
|
||||
@ -192,7 +192,7 @@ impl<'l> IntoChild<'l> for jirs_data::IssuePriority {
|
||||
type Builder = StyledSelectChildBuilder<'l>;
|
||||
|
||||
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())
|
||||
.build()
|
||||
.into_node();
|
||||
@ -223,7 +223,7 @@ impl<'l> IntoChild<'l> for jirs_data::IssueType {
|
||||
fn into_child(self) -> Self::Builder {
|
||||
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)
|
||||
.build()
|
||||
.into_node();
|
@ -2,25 +2,26 @@
|
||||
|
||||
use {
|
||||
crate::{
|
||||
model::{ModalType, Model, Page},
|
||||
shared::{
|
||||
go_to_board, go_to_login,
|
||||
components::{
|
||||
styled_date_time_input::StyledDateTimeChanged,
|
||||
styled_select::StyledSelectChanged,
|
||||
styled_tooltip,
|
||||
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},
|
||||
},
|
||||
jirs_data::*,
|
||||
seed::{prelude::*, *},
|
||||
web_sys::File,
|
||||
};
|
||||
pub use {changes::*, fields::*, images::*};
|
||||
pub use {changes::*, components::*, fields::*, images::*};
|
||||
|
||||
// use crate::shared::styled_rte::RteMsg;
|
||||
|
||||
mod changes;
|
||||
mod components;
|
||||
mod fields;
|
||||
mod images;
|
||||
mod modals;
|
||||
|
@ -1,9 +1,5 @@
|
||||
use {
|
||||
crate::{
|
||||
model::Model,
|
||||
shared::{styled_modal::StyledModal, ToNode},
|
||||
Msg,
|
||||
},
|
||||
crate::{components::styled_modal::StyledModal, model::Model, shared::ToNode, Msg},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_confirm_modal::*, styled_icon::*, styled_modal::*},
|
||||
modals::epic_delete::Model,
|
||||
model,
|
||||
shared::{styled_confirm_modal::*, styled_icon::*, styled_modal::*, ToNode},
|
||||
shared::ToNode,
|
||||
Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
|
@ -1,8 +1,7 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_field::StyledField, styled_select::StyledSelect},
|
||||
model::{IssueModal, Model},
|
||||
shared::styled_field::StyledField,
|
||||
shared::styled_select::StyledSelect,
|
||||
shared::{ToChild, ToNode},
|
||||
FieldId, Msg,
|
||||
},
|
||||
|
@ -1,9 +1,5 @@
|
||||
use {
|
||||
crate::{
|
||||
model,
|
||||
shared::{styled_confirm_modal::StyledConfirmModal, ToNode},
|
||||
Msg,
|
||||
},
|
||||
crate::{components::styled_confirm_modal::StyledConfirmModal, model, shared::ToNode, Msg},
|
||||
jirs_data::IssueStatusId,
|
||||
seed::prelude::*,
|
||||
};
|
||||
|
@ -1,13 +1,10 @@
|
||||
use {
|
||||
crate::{
|
||||
model::IssueModal,
|
||||
shared::{
|
||||
styled_date_time_input::StyledDateTimeInputState,
|
||||
styled_input::StyledInputState,
|
||||
styled_select::StyledSelectState,
|
||||
styled_select_child::{StyledSelectChild, StyledSelectChildBuilder},
|
||||
ToChild, ToNode,
|
||||
components::{
|
||||
styled_date_time_input::*, styled_input::*, styled_select::*, styled_select_child::*,
|
||||
},
|
||||
model::IssueModal,
|
||||
shared::{ToChild, ToNode},
|
||||
FieldId, Msg,
|
||||
},
|
||||
jirs_data::{IssueFieldId, IssuePriority},
|
||||
@ -81,17 +78,22 @@ impl<'l> ToChild<'l> for Type {
|
||||
Type::Story => 2,
|
||||
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 = {
|
||||
use crate::components::styled_icon::*;
|
||||
let icon = {
|
||||
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();
|
||||
.into_node()
|
||||
};
|
||||
|
||||
StyledSelectChild::build()
|
||||
.add_class(name)
|
||||
|
@ -1,7 +1,7 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
model::{IssueModal, ModalType},
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::send_ws_msg,
|
||||
FieldId, Msg, OperationKind, ResourceKind,
|
||||
},
|
||||
|
@ -1,16 +1,17 @@
|
||||
use {
|
||||
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::{
|
||||
epic_field,
|
||||
issues_create::{Model as AddIssueModal, Type},
|
||||
},
|
||||
model::Model,
|
||||
shared::{
|
||||
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,
|
||||
},
|
||||
shared::{IntoChild, ToChild, ToNode},
|
||||
FieldId, Msg,
|
||||
},
|
||||
jirs_data::{IssueFieldId, IssuePriority},
|
||||
@ -113,7 +114,7 @@ pub fn view(model: &Model, modal: &AddIssueModal) -> Node<Msg> {
|
||||
StyledModal::build()
|
||||
.add_class("addIssue")
|
||||
.width(0)
|
||||
.variant(crate::shared::styled_modal::Variant::Center)
|
||||
.variant(crate::components::styled_modal::Variant::Center)
|
||||
.child(form)
|
||||
.build()
|
||||
.into_node()
|
||||
|
@ -1,7 +1,7 @@
|
||||
use {
|
||||
crate::{
|
||||
model, model::ModalType, shared::styled_confirm_modal::StyledConfirmModal, shared::ToNode,
|
||||
Msg,
|
||||
components::styled_confirm_modal::StyledConfirmModal, model, model::ModalType,
|
||||
shared::ToNode, Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
@ -1,12 +1,12 @@
|
||||
use {
|
||||
crate::{
|
||||
modals::time_tracking::value_for_time_tracking,
|
||||
model::{CommentForm, IssueModal},
|
||||
shared::{
|
||||
components::{
|
||||
styled_date_time_input::StyledDateTimeInputState, styled_editor::Mode,
|
||||
styled_editor::StyledEditorState, styled_input::StyledInputState,
|
||||
styled_select::StyledSelectState,
|
||||
},
|
||||
modals::time_tracking::value_for_time_tracking,
|
||||
model::{CommentForm, IssueModal},
|
||||
EditIssueModalSection, FieldId, Msg,
|
||||
},
|
||||
jirs_data::{EpicId, Issue, IssueFieldId, TimeTracking, UpdateIssuePayload},
|
||||
|
@ -1,8 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
modals::issues_edit::Model as EditIssueModal,
|
||||
model::{IssueModal, ModalType, Model},
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::send_ws_msg,
|
||||
EditIssueModalSection, FieldChange, FieldId, Msg, OperationKind, ResourceKind,
|
||||
},
|
||||
|
@ -1,15 +1,15 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_avatar::StyledAvatar, styled_button::StyledButton, styled_editor::StyledEditor,
|
||||
styled_field::StyledField, styled_icon::Icon, styled_input::StyledInput,
|
||||
styled_select::StyledSelect,
|
||||
},
|
||||
modals::{
|
||||
epic_field, issues_edit::Model as EditIssueModal, time_tracking::time_tracking_field,
|
||||
},
|
||||
model::{ModalType, Model},
|
||||
shared::{
|
||||
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,
|
||||
},
|
||||
shared::{tracking_widget::tracking_link, IntoChild, ToChild, ToNode},
|
||||
EditIssueModalSection, FieldChange, FieldId, Msg,
|
||||
},
|
||||
comments::*,
|
||||
|
@ -1,11 +1,12 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_avatar::StyledAvatar, styled_button::StyledButton,
|
||||
styled_textarea::StyledTextarea,
|
||||
},
|
||||
modals::issues_edit::Model as EditIssueModal,
|
||||
model::{CommentForm, ModalType, Model},
|
||||
shared::{
|
||||
styled_avatar::StyledAvatar, styled_button::StyledButton,
|
||||
styled_textarea::StyledTextarea, ToNode,
|
||||
},
|
||||
shared::ToNode,
|
||||
EditIssueModalSection, FieldChange, FieldId, Msg,
|
||||
},
|
||||
jirs_data::{Comment, CommentFieldId},
|
||||
|
@ -1,12 +1,14 @@
|
||||
use {
|
||||
crate::{
|
||||
model::{ModalType, Model},
|
||||
shared::{
|
||||
components::{
|
||||
styled_button::StyledButton,
|
||||
styled_field::StyledField,
|
||||
styled_input::{StyledInput, StyledInputState},
|
||||
styled_modal::StyledModal,
|
||||
styled_select::{StyledSelect, StyledSelectState},
|
||||
},
|
||||
model::{ModalType, Model},
|
||||
shared::{
|
||||
tracking_widget::{fibonacci_values, tracking_widget},
|
||||
ToChild, ToNode,
|
||||
},
|
||||
|
@ -1,7 +1,9 @@
|
||||
use {
|
||||
crate::{
|
||||
model::*, shared::styled_confirm_modal::StyledConfirmModal,
|
||||
shared::styled_modal::StyledModal, shared::ToNode, Msg,
|
||||
components::{styled_confirm_modal::StyledConfirmModal, styled_modal::StyledModal},
|
||||
model::*,
|
||||
shared::ToNode,
|
||||
Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
@ -16,7 +18,7 @@ pub fn view(model: &Model) -> Node<Msg> {
|
||||
if let Some(_issue) = model.issues_by_id.get(issue_id) {
|
||||
let details = issues_edit::view(model, modal.as_ref());
|
||||
StyledModal::build()
|
||||
.variant(crate::shared::styled_modal::Variant::Center)
|
||||
.variant(crate::components::styled_modal::Variant::Center)
|
||||
.width(1040)
|
||||
.child(details)
|
||||
.build()
|
||||
|
@ -1,12 +1,12 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectState,
|
||||
pages::{
|
||||
invite_page::InvitePage, profile_page::model::ProfilePage,
|
||||
project_page::model::ProjectPage, project_settings_page::ProjectSettingsPage,
|
||||
reports_page::model::ReportsPage, sign_in_page::model::SignInPage,
|
||||
sign_up_page::model::SignUpPage, users_page::model::UsersPage,
|
||||
},
|
||||
shared::styled_select::StyledSelectState,
|
||||
Msg,
|
||||
},
|
||||
jirs_data::*,
|
||||
|
@ -1,11 +1,12 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
|
||||
styled_input::StyledInput,
|
||||
},
|
||||
model::{Model, PageContent},
|
||||
pages::invite_page::InvitePage,
|
||||
shared::{
|
||||
outer_layout, styled_button::StyledButton, styled_field::StyledField,
|
||||
styled_form::StyledForm, styled_input::StyledInput, ToNode,
|
||||
},
|
||||
shared::{outer_layout, ToNode},
|
||||
validations::is_token,
|
||||
FieldId, InvitationPageChange, Msg, PageChanged,
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
use {
|
||||
crate::{
|
||||
shared::{
|
||||
components::{
|
||||
styled_image_input::StyledImageInputState, styled_input::StyledInputState,
|
||||
styled_select::StyledSelectState,
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
model::{Model, Page, PageContent},
|
||||
pages::profile_page::model::ProfilePage,
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::{board_load, send_ws_msg},
|
||||
FieldId, Msg, OperationKind, PageChanged, ProfilePageChange, ResourceKind,
|
||||
WebSocketChanged,
|
||||
|
@ -1,12 +1,13 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{
|
||||
styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
|
||||
styled_image_input::StyledImageInput, styled_input::StyledInput,
|
||||
styled_select::StyledSelect,
|
||||
},
|
||||
model::{Model, PageContent},
|
||||
pages::profile_page::model::ProfilePage,
|
||||
shared::{
|
||||
inner_layout, styled_button::StyledButton, styled_field::StyledField,
|
||||
styled_form::StyledForm, styled_image_input::StyledImageInput,
|
||||
styled_input::StyledInput, styled_select::StyledSelect, ToChild, ToNode,
|
||||
},
|
||||
shared::{inner_layout, ToChild, ToNode},
|
||||
FieldId, Msg, PageChanged, ProfilePageChange,
|
||||
},
|
||||
jirs_data::*,
|
||||
|
@ -1,8 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
model::{ModalType, Model, Page, PageContent},
|
||||
pages::project_page::model::ProjectPage,
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::{board_load, send_ws_msg},
|
||||
BoardPageChange, EditIssueModalSection, FieldId, Msg, OperationKind, PageChanged,
|
||||
ResourceKind,
|
||||
|
@ -1,7 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_button::StyledButton, styled_icon::Icon},
|
||||
model::Model,
|
||||
shared::{inner_layout, styled_button::StyledButton, styled_icon::Icon, ToNode},
|
||||
shared::{inner_layout, ToNode},
|
||||
Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
|
@ -1,15 +1,14 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_avatar::*, styled_button::StyledButton, styled_icon::*},
|
||||
model::PageContent,
|
||||
shared::{styled_avatar::*, styled_icon::*, ToNode},
|
||||
shared::ToNode,
|
||||
BoardPageChange, Model, Msg, Page, PageChanged,
|
||||
},
|
||||
jirs_data::*,
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
use crate::shared::styled_button::StyledButton;
|
||||
|
||||
pub fn project_board_lists(model: &Model) -> Node<Msg> {
|
||||
let project_page = match &model.page_content {
|
||||
PageContent::Project(project_page) => project_page,
|
||||
|
@ -1,7 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_avatar::*, styled_button::*, styled_icon::*, styled_input::*},
|
||||
model::PageContent,
|
||||
shared::{styled_avatar::*, styled_button::*, styled_icon::*, styled_input::*, ToNode},
|
||||
shared::ToNode,
|
||||
FieldId, Model, Msg,
|
||||
},
|
||||
seed::{prelude::*, *},
|
||||
|
@ -1,9 +1,10 @@
|
||||
use {
|
||||
crate::{
|
||||
shared::{
|
||||
drag::DragState, styled_checkbox::StyledCheckboxState, styled_input::StyledInputState,
|
||||
components::{
|
||||
styled_checkbox::StyledCheckboxState, styled_input::StyledInputState,
|
||||
styled_select::StyledSelectState,
|
||||
},
|
||||
shared::drag::DragState,
|
||||
FieldId,
|
||||
},
|
||||
jirs_data::{IssueStatusId, Project, ProjectFieldId, UpdateProjectPayload},
|
||||
@ -13,7 +14,7 @@ use {
|
||||
pub struct ProjectSettingsPage {
|
||||
pub payload: UpdateProjectPayload,
|
||||
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 column_drag: DragState,
|
||||
pub edit_column_id: Option<IssueStatusId>,
|
||||
@ -23,7 +24,7 @@ pub struct ProjectSettingsPage {
|
||||
|
||||
impl ProjectSettingsPage {
|
||||
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 {
|
||||
id,
|
||||
name,
|
||||
|
@ -1,8 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
model::{Model, Page, PageContent},
|
||||
pages::project_settings_page::ProjectSettingsPage,
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::{board_load, send_ws_msg},
|
||||
FieldChange::TabChanged,
|
||||
FieldId, Msg, PageChanged, ProjectPageChange, WebSocketChanged,
|
||||
|
@ -1,10 +1,6 @@
|
||||
use {
|
||||
crate::{
|
||||
modals::issue_statuses_delete::Model as DeleteIssueStatusModal,
|
||||
model::{self, ModalType, Model, PageContent},
|
||||
pages::project_settings_page::ProjectSettingsPage,
|
||||
shared::{
|
||||
inner_layout,
|
||||
components::{
|
||||
styled_button::StyledButton,
|
||||
styled_checkbox::StyledCheckbox,
|
||||
styled_editor::StyledEditor,
|
||||
@ -14,8 +10,11 @@ use {
|
||||
styled_input::StyledInput,
|
||||
styled_select::StyledSelect,
|
||||
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,
|
||||
},
|
||||
jirs_data::{IssueStatus, ProjectCategory, TimeTracking},
|
||||
|
@ -1,8 +1,9 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_icon::StyledIcon,
|
||||
model::{Model, PageContent},
|
||||
pages::reports_page::model::ReportsPage,
|
||||
shared::{inner_layout, styled_icon::StyledIcon, ToNode},
|
||||
shared::{inner_layout, ToNode},
|
||||
Msg, PageChanged, ReportsPageChange,
|
||||
},
|
||||
chrono::Datelike,
|
||||
|
@ -1,16 +1,15 @@
|
||||
use {
|
||||
crate::{
|
||||
model::{self, PageContent},
|
||||
shared::{
|
||||
outer_layout,
|
||||
components::{
|
||||
styled_button::StyledButton,
|
||||
styled_field::StyledField,
|
||||
styled_form::StyledForm,
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
styled_input::StyledInput,
|
||||
styled_link::StyledLink,
|
||||
ToNode,
|
||||
},
|
||||
model::{self, PageContent},
|
||||
shared::{outer_layout, ToNode},
|
||||
validations::{is_email, is_token},
|
||||
FieldId, Msg, SignInFieldId,
|
||||
},
|
||||
|
@ -1,16 +1,15 @@
|
||||
use {
|
||||
crate::{
|
||||
model::{self, PageContent},
|
||||
shared::{
|
||||
outer_layout,
|
||||
components::{
|
||||
styled_button::StyledButton,
|
||||
styled_field::StyledField,
|
||||
styled_form::StyledForm,
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
styled_input::StyledInput,
|
||||
styled_link::StyledLink,
|
||||
ToNode,
|
||||
},
|
||||
model::{self, PageContent},
|
||||
shared::{outer_layout, ToNode},
|
||||
validations::is_email,
|
||||
FieldId, Msg,
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
use {
|
||||
crate::{model::InvitationFormState, shared::styled_select::StyledSelectState, FieldId},
|
||||
crate::{components::styled_select::StyledSelectState, model::InvitationFormState, FieldId},
|
||||
jirs_data::{Invitation, User, UserRole, UsersFieldId},
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_select::StyledSelectChanged,
|
||||
model::{InvitationFormState, Model, Page, PageContent},
|
||||
pages::users_page::model::UsersPage,
|
||||
shared::styled_select::StyledSelectChanged,
|
||||
ws::{invitation_load, send_ws_msg},
|
||||
FieldId, Msg, PageChanged, UsersPageChange, WebSocketChanged,
|
||||
},
|
||||
|
@ -1,11 +1,11 @@
|
||||
use {
|
||||
crate::{
|
||||
model::{InvitationFormState, Model, PageContent},
|
||||
shared::{
|
||||
inner_layout, styled_button::StyledButton, styled_field::StyledField,
|
||||
styled_form::StyledForm, styled_input::StyledInput, styled_select::StyledSelect,
|
||||
IntoChild, ToNode,
|
||||
components::{
|
||||
styled_button::StyledButton, styled_field::StyledField, styled_form::StyledForm,
|
||||
styled_input::StyledInput, styled_select::StyledSelect,
|
||||
},
|
||||
model::{InvitationFormState, Model, PageContent},
|
||||
shared::{inner_layout, IntoChild, ToNode},
|
||||
validations::is_email,
|
||||
FieldId, Msg, PageChanged, UsersPageChange,
|
||||
},
|
||||
|
@ -1,11 +1,8 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_icon::{Icon, StyledIcon},
|
||||
model::{Model, Page},
|
||||
shared::{
|
||||
divider,
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
ToNode,
|
||||
},
|
||||
shared::{divider, ToNode},
|
||||
ws::enqueue_ws_msg,
|
||||
Msg, OperationKind, ResourceKind,
|
||||
},
|
||||
|
@ -9,24 +9,6 @@ use {
|
||||
pub mod aside;
|
||||
pub mod drag;
|
||||
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 trait ToChild<'l> {
|
||||
|
@ -1,13 +1,13 @@
|
||||
use {
|
||||
crate::{
|
||||
model::Model,
|
||||
shared::{
|
||||
divider,
|
||||
components::{
|
||||
styled_avatar::StyledAvatar,
|
||||
styled_button::StyledButton,
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
styled_tooltip, ToNode,
|
||||
styled_tooltip,
|
||||
},
|
||||
model::Model,
|
||||
shared::{divider, ToNode},
|
||||
ws::send_ws_msg,
|
||||
Msg, Page,
|
||||
},
|
||||
|
@ -1,11 +1,9 @@
|
||||
use {
|
||||
crate::{
|
||||
components::styled_icon::{Icon, StyledIcon},
|
||||
modals::{issues_edit::Model as EditIssueModal, time_tracking::value_for_time_tracking},
|
||||
model::{ModalType, Model},
|
||||
shared::{
|
||||
styled_icon::{Icon, StyledIcon},
|
||||
ToNode,
|
||||
},
|
||||
shared::ToNode,
|
||||
Msg,
|
||||
},
|
||||
jirs_data::{TimeTracking, UpdateIssuePayload},
|
||||
|
Loading…
Reference in New Issue
Block a user