CLI self-updater, warn on version mismatch, direct install.sh option, androidmanifest and info.plist customization, bump to 0.7-alpha.0 (#4095)

* wip.... bun installer

* - warn on incompatible versions
- clean up some logs
- add coloring to log levels

* add toasts to desktop/mobile

* Auto open simulators

* auto boot android

* preserve url

* pull out some of the warnings

* add self-updater

* wip: mcp

* add install.sh and adjust binstall path

* add some cuter styling to logs!

* update "input.css"

* update other input.css

* style a bit more

* change getting started

* add windows installer

* move dioxus-mobile into dioxus-desktop
add sentry wip to cli

* shorten timeout of toast

* fix cli display

* wire up customization of android manifest

* udid is a real word

* add 429 to lychee cache

* accept all 200-204 and 429
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-05-14 08:43:11 +02:00
1 parent 53ef78823d
commit 4d3d55a7a3
56 files changed
+1560 -548

No files matched your search

-2
View File
@@ -33,8 +33,6 @@ mod hotreload_utils;
/// Items exported from this module are used in macros and should not be used directly.
#[doc(hidden)]
pub mod internal {
pub use crate::properties::verify_component_called_as_component;
#[doc(hidden)]
pub use crate::hotreload_utils::{
DynamicLiteralPool, DynamicValuePool, FmtSegment, FmtedSegments, HotReloadAttributeValue,
-29
View File
@@ -114,35 +114,6 @@ where
P::builder()
}
/// A warning that will trigger if a component is called as a function
#[warnings::warning]
pub(crate) fn component_called_as_function<C: ComponentFunction<P, M>, P, M>(_: C) {
// We trim WithOwner from the end of the type name for component with a builder that include a special owner which may not match the function name directly
let type_name = std::any::type_name::<C>();
let component_name = Runtime::with(|rt| {
current_scope_id()
.ok()
.and_then(|id| rt.get_state(id).map(|scope| scope.name))
})
.ok()
.flatten();
// If we are in a component, and the type name is the same as the active component name, then we can just return
if component_name == Some(type_name) {
return;
}
// Otherwise the component was called like a function, so we should log an error
tracing::error!("It looks like you called the component {type_name} like a function instead of a component. Components should be called with braces like `{type_name} {{ prop: value }}` instead of as a function");
}
/// Make sure that this component is currently running as a component, not a function call
#[doc(hidden)]
#[allow(clippy::no_effect)]
pub fn verify_component_called_as_component<C: ComponentFunction<P, M>, P, M>(component: C) {
component_called_as_function(component);
}
/// Any component that implements the `ComponentFn` trait can be used as a component.
///
/// This trait is automatically implemented for functions that are in one of the following forms:
+1 -8
View File
@@ -239,14 +239,7 @@ impl VirtualDom {
///
/// Note: the VirtualDom is not progressed, you must either "run_with_deadline" or use "rebuild" to progress it.
pub fn new(app: fn() -> Element) -> Self {
Self::new_with_props(
move || {
use warnings::Warning;
// The root props don't come from a vcomponent so we need to manually rerun them sometimes
crate::properties::component_called_as_function::allow(app)
},
(),
)
Self::new_with_props(app, ())
}
/// Create a new VirtualDom with the given properties for the root component.