Compare commits

..

6 Commits

Author SHA1 Message Date
c902b03f1c maint: cleanup gitignore 2024-07-10 11:51:43 -04:00
17b46c6e4d dev: Handle serving counts in the api 2024-07-10 11:49:39 -04:00
9d167fba63 upgrade: Schema version and sqlx version
It's complicated but I while debugging I upgraded sqlx. Shouldn't
have mixed up changes like that but I'm lazy and don't want to redo
it so it'll all have to just be here.
2024-07-10 10:05:09 -05:00
bbacaabc51 fix: wrong type hint for sqlite column 2024-07-09 18:56:57 -05:00
a913c3a809 fix: sqlx-prepare really only depends on wasm 2024-07-09 18:56:38 -05:00
9ef73d05b6 dev: Add indexeddb and a helper method for it 2024-07-03 19:13:10 -05:00
6 changed files with 22 additions and 8 deletions

View File

@ -22,7 +22,6 @@ use tracing::{debug, instrument};
use super::RecipeEntry;
#[allow(dead_code)]
#[derive(Debug)]
pub struct Error(String);

View File

@ -30,7 +30,6 @@ use crate::{
js_lib,
};
#[allow(dead_code)]
#[derive(Debug)]
pub struct Error(String);

View File

@ -25,6 +25,16 @@ pub mod shopping_list;
pub mod staples;
pub mod tabs;
pub use add_recipe::*;
pub use categories::*;
pub use footer::*;
pub use header::*;
pub use number_field::*;
pub use plan_list::*;
pub use recipe::*;
pub use recipe_list::*;
pub use recipe_plan::*;
pub use recipe_selection::*;
pub use shopping_list::*;
pub use staples::*;
pub use tabs::*;

View File

@ -16,7 +16,9 @@ use sycamore::prelude::*;
use tracing::{debug, error};
use wasm_bindgen::{JsCast, JsValue};
use wasm_web_component::{web_component, WebComponentBinding};
use web_sys::{CustomEvent, CustomEventInit, Event, HtmlElement, InputEvent, ShadowRoot};
use web_sys::{window, CustomEvent, CustomEventInit, Event, HtmlElement, InputEvent, ShadowRoot};
use crate::js_lib::LogFailures;
#[web_component(
observed_attrs = "['val', 'min', 'max', 'step']",
@ -133,10 +135,10 @@ impl WebComponentBinding for NumberSpinner {
return;
}
};
let mut event_dict = CustomEventInit::new();
event_dict.detail(&JsValue::from_f64(self.value as f64));
let mut eventDict = CustomEventInit::new();
eventDict.detail(&JsValue::from_f64(self.value as f64));
element
.dispatch_event(&CustomEvent::new_with_event_init_dict("updated", &event_dict).unwrap())
.dispatch_event(&CustomEvent::new_with_event_init_dict("updated", &eventDict).unwrap())
.unwrap();
debug!("Dispatched updated event");
}

View File

@ -38,7 +38,7 @@ pub fn SelectPage<'ctx, G: Html>(cx: Scope<'ctx>, sh: StateHandler<'ctx>) -> Vie
view! {cx,
PlanningPage(
selected=Some("Select".to_owned()),
plan_date = current_plan,
plan_date = current_plan.clone(),
) {
PlanList(sh=sh, list=plan_dates)
button(on:click=move |_| {

View File

@ -12,7 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::{app_state::StateHandler, components::Header, pages::*};
use crate::{
app_state::StateHandler,
components::{Footer, Header},
pages::*,
};
use sycamore::prelude::*;
use sycamore_router::{HistoryIntegration, Route, Router};
use tracing::{debug, instrument};