Merge pull request 'Extract vendored dioxus-primitives components into their own crate' (#10) from worktree-extract-dx-components into main
Reviewed-on: #10 Reviewed-by: Austin Schaefer <austin.schaefer@mailo.eu>
This commit is contained in:
commit
bc07a8808f
37 changed files with 40 additions and 11 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -1603,6 +1603,15 @@ dependencies = [
|
|||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "feedsignal-dioxus-components"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dioxus",
|
||||
"dioxus-icons",
|
||||
"dioxus-primitives",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "feedsignal-feeds"
|
||||
version = "0.1.0"
|
||||
|
|
@ -1633,10 +1642,10 @@ dependencies = [
|
|||
"anyhow",
|
||||
"chrono",
|
||||
"dioxus",
|
||||
"dioxus-icons",
|
||||
"dioxus-primitives",
|
||||
"feedsignal-core",
|
||||
"feedsignal-db",
|
||||
"feedsignal-dioxus-components",
|
||||
"feedsignal-feeds",
|
||||
"feedsignal-llm",
|
||||
"serde",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ resolver = "2"
|
|||
members = [
|
||||
"crates/core",
|
||||
"crates/db",
|
||||
"crates/dioxus-components",
|
||||
"crates/feeds",
|
||||
"crates/llm",
|
||||
"crates/web",
|
||||
|
|
@ -31,5 +32,6 @@ libsqlite3-sys = { version = "0.30", features = ["bundled"] }
|
|||
|
||||
feedsignal-core = { path = "crates/core" }
|
||||
feedsignal-db = { path = "crates/db" }
|
||||
feedsignal-dioxus-components = { path = "crates/dioxus-components" }
|
||||
feedsignal-feeds = { path = "crates/feeds" }
|
||||
feedsignal-llm = { path = "crates/llm" }
|
||||
|
|
|
|||
10
crates/dioxus-components/Cargo.toml
Normal file
10
crates/dioxus-components/Cargo.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "feedsignal-dioxus-components"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
dioxus = "0.7"
|
||||
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
||||
dioxus-icons = { version = "0.1.0", default-features = false }
|
||||
9
crates/dioxus-components/src/lib.rs
Normal file
9
crates/dioxus-components/src/lib.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Vendored copies of the dioxus-primitives component registry
|
||||
// (https://github.com/DioxusLabs/components, preview/src/components).
|
||||
// That registry is a "copy this source into your project" style
|
||||
// collection, not a published crate — so these files are pulled in
|
||||
// verbatim rather than depended on directly. Don't edit component
|
||||
// internals for app-specific needs; layer overrides on via the `class`/
|
||||
// `attributes` props each component already accepts.
|
||||
mod components;
|
||||
pub use components::*;
|
||||
|
|
@ -24,7 +24,7 @@ chrono = { workspace = true, optional = true }
|
|||
serde_json = { workspace = true, optional = true }
|
||||
tokio-cron-scheduler = { version = "0.13", optional = true }
|
||||
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
||||
dioxus-icons = { version = "0.1.0", default-features = false }
|
||||
feedsignal-dioxus-components.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["web"]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use super::handlers::score_percent;
|
||||
use crate::api;
|
||||
use crate::api::ArticleView;
|
||||
use crate::components::badge::{Badge, BadgeVariant};
|
||||
use crate::components::button::{Button, ButtonSize, ButtonVariant};
|
||||
use dioxus::prelude::*;
|
||||
use feedsignal_dioxus_components::badge::{Badge, BadgeVariant};
|
||||
use feedsignal_dioxus_components::button::{Button, ButtonSize, ButtonVariant};
|
||||
|
||||
#[component]
|
||||
pub fn ArticleRow(article: ArticleView) -> Element {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ mod handlers;
|
|||
mod subscribe_form;
|
||||
|
||||
use crate::api;
|
||||
use crate::components::scroll_area::ScrollArea;
|
||||
use crate::components::sidebar::{
|
||||
use article_row::ArticleRow;
|
||||
use dioxus::prelude::*;
|
||||
use feedsignal_dioxus_components::scroll_area::ScrollArea;
|
||||
use feedsignal_dioxus_components::sidebar::{
|
||||
Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader,
|
||||
SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger,
|
||||
};
|
||||
use article_row::ArticleRow;
|
||||
use dioxus::prelude::*;
|
||||
use subscribe_form::SubscribeForm;
|
||||
|
||||
#[component]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use super::handlers::{normalize_feed_url, resolve_submit_outcome, SubmitOutcome};
|
||||
use crate::api;
|
||||
use crate::components::button::{Button, ButtonVariant};
|
||||
use crate::components::input::Input;
|
||||
use dioxus::prelude::*;
|
||||
use feedsignal_dioxus_components::button::{Button, ButtonVariant};
|
||||
use feedsignal_dioxus_components::input::Input;
|
||||
|
||||
/// Form for manually subscribing to a feed by URL. Fetches the feed
|
||||
/// immediately on submit (rather than waiting for the next scheduled poll)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
mod api;
|
||||
mod app;
|
||||
mod components;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
mod server;
|
||||
|
|
|
|||
Loading…
Reference in a new issue