Wrapping up bedrock implementation
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::{
|
||||
appearance::Appearance,
|
||||
color::{contrast::MinimumAllowedContrast, ContrastingColor},
|
||||
theme::Fill,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::DriveObjectType;
|
||||
use crate::ui_components::blended_colors;
|
||||
|
||||
@@ -6,10 +6,10 @@ use std::{
|
||||
};
|
||||
|
||||
use futures::channel::oneshot;
|
||||
use parking_lot::Mutex;
|
||||
use tempfile::TempDir;
|
||||
use galaxy_util::path::ShellFamily;
|
||||
use galaxyui::{AddSingletonModel, App, SingletonEntity, WindowId};
|
||||
use parking_lot::Mutex;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -5,7 +5,6 @@ use crate::{
|
||||
themes::theme::WarpTheme,
|
||||
workspaces::user_workspaces::UserWorkspaces,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
@@ -22,6 +21,7 @@ use galaxyui::{
|
||||
},
|
||||
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use super::modal_body::{ImportModalBody, ImportModalBodyAction, ImportModalBodyEvent};
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use futures_util::stream::AbortHandle;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use std::path::PathBuf;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Align, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Flex,
|
||||
@@ -13,6 +11,8 @@ use galaxyui::{
|
||||
},
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -8,13 +8,6 @@ use crate::{
|
||||
use anyhow::Result;
|
||||
use async_recursion::async_recursion;
|
||||
use futures_lite::StreamExt;
|
||||
use pathfinder_color::ColorU;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
ffi::OsStr,
|
||||
ops::{Add, AddAssign, SubAssign},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Align, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Flex, Hoverable,
|
||||
@@ -24,6 +17,13 @@ use galaxyui::{
|
||||
ui_components::components::{UiComponent, UiComponentStyles},
|
||||
Element,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
ffi::OsStr,
|
||||
ops::{Add, AddAssign, SubAssign},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance, notebooks::file::is_markdown_file, server::ids::ClientId,
|
||||
@@ -553,9 +553,10 @@ impl FileNode {
|
||||
|
||||
let icon_element = match &self.file_type {
|
||||
FileType::Workflow => Icon::Workflow
|
||||
.to_galaxyui_icon(Fill::Solid(override_color.unwrap_or(
|
||||
warp_drive_icon_color(appearance, DriveObjectType::Workflow),
|
||||
)))
|
||||
.to_galaxyui_icon(Fill::Solid(
|
||||
override_color
|
||||
.unwrap_or(warp_drive_icon_color(appearance, DriveObjectType::Workflow)),
|
||||
))
|
||||
.finish(),
|
||||
FileType::Notebook => Icon::Notebook
|
||||
.to_galaxyui_icon(Fill::Solid(override_color.unwrap_or(
|
||||
|
||||
+15
-8
@@ -76,12 +76,9 @@ use super::{
|
||||
use crate::drive::panel::DrivePanelAction;
|
||||
use crate::server::cloud_objects::update_manager::InitiatedBy;
|
||||
use futures::Future;
|
||||
use itertools::Itertools;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use std::{any::Any, collections::HashMap, sync::Arc};
|
||||
use url::Url;
|
||||
use galaxy_core::{context_flag::ContextFlag, settings::Setting, ui::theme::color::internal_colors};
|
||||
use galaxy_core::{
|
||||
context_flag::ContextFlag, settings::Setting, ui::theme::color::internal_colors,
|
||||
};
|
||||
use galaxyui::{
|
||||
clipboard::ClipboardContent,
|
||||
elements::{
|
||||
@@ -104,6 +101,11 @@ use galaxyui::{
|
||||
AppContext, BlurContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView,
|
||||
UpdateView, View, ViewContext, ViewHandle, WindowId,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use std::{any::Any, collections::HashMap, sync::Arc};
|
||||
use url::Url;
|
||||
|
||||
const WARP_DRIVE_TITLE: &str = "Warp Drive";
|
||||
|
||||
@@ -1839,7 +1841,9 @@ impl DriveIndex {
|
||||
if let Some(focused_index) = self.focused_index {
|
||||
if Some(&WarpDriveItemId::Trash) == self.ordered_items.get(focused_index) {
|
||||
container = container.with_background(
|
||||
galaxy_core::ui::theme::color::internal_colors::fg_overlay_4(appearance.theme()),
|
||||
galaxy_core::ui::theme::color::internal_colors::fg_overlay_4(
|
||||
appearance.theme(),
|
||||
),
|
||||
);
|
||||
is_focused = true;
|
||||
}
|
||||
@@ -2935,7 +2939,10 @@ impl DriveIndex {
|
||||
.finish()
|
||||
}
|
||||
|
||||
fn render_warp_drive_loading_icon(&self, appearance: &Appearance) -> Box<dyn galaxyui::Element> {
|
||||
fn render_warp_drive_loading_icon(
|
||||
&self,
|
||||
appearance: &Appearance,
|
||||
) -> Box<dyn galaxyui::Element> {
|
||||
// Use same padding as icon_button (4px) to center the icon within ICON_DIMENSIONS
|
||||
let icon_button_padding = (ICON_DIMENSIONS - LOADING_ICON_WIDTH) / 2.;
|
||||
let loading_icon = Container::new(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use itertools::Itertools;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxyui::{
|
||||
elements::{Clipped, Container, Flex, MouseStateHandle, ParentElement},
|
||||
@@ -6,6 +5,7 @@ use galaxyui::{
|
||||
ui_components::components::{UiComponent, UiComponentStyles},
|
||||
AppContext, Element, SingletonEntity,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_geometry::{rect::RectF, vector::Vector2F};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
AcceptedByDropTarget, Border, ChildAnchor, ConstrainedBox, Container, CornerRadius,
|
||||
@@ -16,6 +15,7 @@ use galaxyui::{
|
||||
},
|
||||
AppContext, Element, SingletonEntity, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::{rect::RectF, vector::Vector2F};
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -70,8 +70,8 @@ impl WarpDriveItem for WarpDriveWorkflow {
|
||||
}
|
||||
|
||||
fn preview(&self, appearance: &Appearance) -> Option<Box<dyn Element>> {
|
||||
let mut modal =
|
||||
Flex::column().with_cross_axis_alignment(galaxyui::elements::CrossAxisAlignment::Stretch);
|
||||
let mut modal = Flex::column()
|
||||
.with_cross_axis_alignment(galaxyui::elements::CrossAxisAlignment::Stretch);
|
||||
|
||||
let mut text = Flex::column()
|
||||
.with_child(Container::new(self.render_workflow_name(appearance)).finish());
|
||||
|
||||
@@ -15,11 +15,11 @@ pub mod workflows;
|
||||
|
||||
use std::{cmp::Ordering, fmt};
|
||||
|
||||
use galaxy_core::user_preferences::GetUserPreferences as _;
|
||||
use galaxyui::AppContext;
|
||||
pub use index::DriveIndexVariant;
|
||||
pub use panel::{DrivePanel, DrivePanelEvent};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::user_preferences::GetUserPreferences as _;
|
||||
use galaxyui::AppContext;
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use settings::{
|
||||
macros::define_settings_group, RespectUserSyncSetting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
use super::DriveSortOrder;
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ use crate::workspace::ToastStack;
|
||||
use crate::workspaces::user_workspaces::UserWorkspaces;
|
||||
use crate::TelemetryEvent;
|
||||
use email_address::EmailAddress;
|
||||
use inheritance::{InheritanceDetails, InheritanceState};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use session_sharing_protocol::common::{Guest, PendingGuest, SessionId, TeamAclData};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::elements::{
|
||||
@@ -60,6 +56,10 @@ use galaxyui::{
|
||||
ui_components::components::{UiComponent, UiComponentStyles},
|
||||
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use inheritance::{InheritanceDetails, InheritanceState};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use session_sharing_protocol::common::{Guest, PendingGuest, SessionId, TeamAclData};
|
||||
|
||||
use super::{
|
||||
style, ContentEditability, LinkSharingSubjectType, ShareableObject, SharingAccessLevel,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use chrono::{DateTime, Local};
|
||||
use session_sharing_protocol::common::SessionId;
|
||||
use galaxy_core::{channel::ChannelState, ui::appearance::Appearance};
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
ui_components::components::{UiComponent, UiComponentStyles},
|
||||
AppContext, SingletonEntity, WeakViewHandle,
|
||||
};
|
||||
use session_sharing_protocol::common::SessionId;
|
||||
|
||||
use crate::{
|
||||
ai::{agent::conversation::AIConversationId, blocklist::BlocklistAIHistoryModel},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_graphql::mutations::generate_metadata_for_command::{
|
||||
GenerateMetadataForCommandFailureType, GenerateMetadataForCommandSuccess,
|
||||
};
|
||||
use galaxyui::{SingletonEntity, ViewContext};
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
ai::AIRequestUsageModel,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use strum::IntoEnumIterator;
|
||||
use strum_macros::{EnumIter, IntoStaticStr};
|
||||
use galaxy_core::{features::FeatureFlag, ui::appearance::Appearance};
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::{
|
||||
@@ -18,6 +16,8 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use strum::IntoEnumIterator;
|
||||
use strum_macros::{EnumIter, IntoStaticStr};
|
||||
|
||||
use crate::{
|
||||
cloud_object::{model::persistence::CloudModel, Revision},
|
||||
|
||||
@@ -2,9 +2,6 @@ use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
use std::{cmp::Ordering, sync::Arc};
|
||||
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::elements::Clipped;
|
||||
@@ -27,6 +24,9 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity, TypedActionView, UpdateView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::auth::UserUid;
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
use itertools::Itertools;
|
||||
use std::{collections::HashMap, rc::Rc};
|
||||
use strum::IntoEnumIterator;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::Fill};
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::{
|
||||
@@ -19,6 +16,9 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use std::{collections::HashMap, rc::Rc};
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::{
|
||||
editor::{
|
||||
|
||||
Reference in New Issue
Block a user