mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Minor UI improvements.
This commit is contained in:
parent
d00bb0f68b
commit
b63c3b615d
@ -18,7 +18,7 @@ use sycamore::prelude::*;
|
||||
pub fn header() -> View<G> {
|
||||
view! {
|
||||
div(class="menu") {
|
||||
span { a(href="/ui/") { "Meal Plan" }}
|
||||
h1 { "Meal Plan" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,15 +25,15 @@ pub struct TabState<G: GenericNode> {
|
||||
pub fn tabbed_view(state: TabState<G>) -> View<G> {
|
||||
cloned!((state) => view! {
|
||||
div(class="nav-header no-print") {
|
||||
a(class="no-print", on:click=cloned!((state) => move |_| {
|
||||
a(href="#", class="no-print", on:click=cloned!((state) => move |_| {
|
||||
state.route.set(AppRoutes::Plan);
|
||||
})) { "Plan" }
|
||||
" | "
|
||||
a(class="no-print", on:click=cloned!((state) => move |_| {
|
||||
a(href="#", class="no-print", on:click=cloned!((state) => move |_| {
|
||||
state.route.set(AppRoutes::Inventory);
|
||||
})) { "Inventory" }
|
||||
" | "
|
||||
a(on:click=cloned!((state) => move |_| {
|
||||
a(href="#", class="no-print", on:click=cloned!((state) => move |_| {
|
||||
state.route.set(AppRoutes::Cook);
|
||||
})) { "Cook" }
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
use crate::app_state::AppRoutes;
|
||||
use crate::components::{shopping_list::*, tabs::*};
|
||||
use crate::pages::PageState;
|
||||
|
||||
@ -23,11 +24,17 @@ pub struct InventoryPageProps {
|
||||
|
||||
#[component(InventoryPage<G>)]
|
||||
pub fn inventory_page(props: InventoryPageProps) -> View<G> {
|
||||
let route_signal = props.page_state.route.clone();
|
||||
view! {
|
||||
TabbedView(TabState {
|
||||
route: props.page_state.route.clone(),
|
||||
inner: view! {
|
||||
ShoppingList()
|
||||
div {
|
||||
a(href="#", on:click=move |_| {
|
||||
route_signal.set(AppRoutes::Cook);
|
||||
}) { "Next" }
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
use crate::app_state::AppRoutes;
|
||||
use crate::components::{recipe_selector::*, tabs::*};
|
||||
use crate::pages::PageState;
|
||||
|
||||
@ -23,11 +24,17 @@ pub struct PlanPageProps {
|
||||
|
||||
#[component(PlanPage<G>)]
|
||||
pub fn plan_page(props: PlanPageProps) -> View<G> {
|
||||
let route_signal = props.page_state.route.clone();
|
||||
view! {
|
||||
TabbedView(TabState {
|
||||
route: props.page_state.route.clone(),
|
||||
inner: view! {
|
||||
RecipeSelector()
|
||||
div {
|
||||
a(href="#", on:click=move |_| {
|
||||
route_signal.set(AppRoutes::Inventory);
|
||||
}) { "Next" }
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user