From cb86b7f9e4dcd1c1331025d70b272e4de33f164a Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 30 Aug 2023 10:45:52 +0530 Subject: added about page --- src/app/mod.rs | 21 +++++++++++++-------- src/components/navbar/nav.rs | 8 ++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/app/mod.rs b/src/app/mod.rs index 671aac6..1f37a9f 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -45,8 +45,11 @@ pub enum Route { ViewInvoices, #[at("/invoice/one")] ViewInvoice, + #[at("/settings")] Settings, + #[at("/about")] + About, #[not_found] #[at("/404")] @@ -58,15 +61,17 @@ pub fn switch(routes: Route) -> Html { Route::Home => html! {}, Route::ManageMenu => html! {}, - Route::ManageClients => html! {

{ "Edit Clients" }

}, - Route::ManageBrands => html! {

{ "Edit Brands" }

}, - Route::ManageItems => html! {

{ "Edit Items" }

}, - Route::ManageInvoices => html! {

{ "Edit Invoices" }

}, + Route::ManageClients => html! {

{ "Edit Clients (To Be Added)" }

}, + Route::ManageBrands => html! {

{ "Edit Brands (To Be Added)" }

}, + Route::ManageItems => html! {

{ "Edit Items (To Be Added)" }

}, + Route::ManageInvoices => html! {

{ "Edit Invoices (To Be Added)" }

}, + + Route::NewInvoice => html! {

{ "Create New Invoice (To Be Added)" }

}, + Route::ViewInvoices => html! {

{ "View All Invoices (To Be Added)" }

}, + Route::ViewInvoice => html! {

{ "View a Single Invoice (To Be Added)" }

}, - Route::NewInvoice => html! {

{ "Create New Invoice" }

}, - Route::ViewInvoices => html! {

{ "View All Invoices" }

}, - Route::ViewInvoice => html! {

{ "View a Single Invoice" }

}, - Route::Settings => html! {

{ "Settings Page" }

}, + Route::Settings => html! {

{ "Settings Page (To Be Added)" }

}, + Route::About => html! {

{ "About Page (To Be Added)" }

}, Route::NotFound => html! {

{"404 Page Not Found"}

}, } diff --git a/src/components/navbar/nav.rs b/src/components/navbar/nav.rs index 0cdc029..dd215a0 100644 --- a/src/components/navbar/nav.rs +++ b/src/components/navbar/nav.rs @@ -42,6 +42,14 @@ pub fn nav() -> Html { label: String::from("Manage"), to: Route::ManageMenu, }, + Link { + label: String::from("Settings"), + to: Route::Settings, + }, + Link { + label: String::from("About"), + to: Route::About, + }, ]); let manage_links = Vec::from([ -- cgit v1.2.3