From e85c3283d4ea5d5d2f0bb7e6cdd6c48ddb9a786b Mon Sep 17 00:00:00 2001 From: jelemux Date: Thu, 18 Feb 2021 18:10:55 +0100 Subject: add option for more properties and groups --- src/view/main.rs | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) (limited to 'src/view/main.rs') diff --git a/src/view/main.rs b/src/view/main.rs index 360a527..d2d313a 100644 --- a/src/view/main.rs +++ b/src/view/main.rs @@ -1,4 +1,3 @@ -use uuid::Uuid; use crate::model::property_groups::address::*; use crate::model::property_groups::name::*; use crate::model::property_groups::organizational::*; @@ -16,6 +15,7 @@ use genpdf::Element as _; use genpdf::{elements, fonts, style}; use qrcodegen::QrCode; use qrcodegen::QrCodeEcc; +use uuid::Uuid; use vobject::parameters; use vobject::vcard::VcardBuilder; use yew::prelude::*; @@ -49,7 +49,7 @@ pub enum Msg { AddName, AddAddress, AddTelephone, - AddDates, + AddOtherIdentification, AddOrganizational, ChangeDownloadOption(DownloadOption), @@ -103,7 +103,7 @@ impl Component for MainView { self.telephone_links.push(WeakComponentLink::default()); shouldrender = true; } - Msg::AddDates => { + Msg::AddOtherIdentification => { self.other_identifications_links .push(WeakComponentLink::default()); shouldrender = true; @@ -490,6 +490,17 @@ impl Component for MainView { { self.render_error() } +
+
+
+

{ "Names" }

+
+
+ +
+
+
+ { for self.name_links.iter().map(|link| html!{ @@ -503,6 +514,17 @@ impl Component for MainView { ) } +
+
+
+

{ "Other Identification Properties" }

+
+
+ +
+
+
+ { for self.other_identifications_links.iter().map(|link| html!{ @@ -516,6 +538,17 @@ impl Component for MainView { ) } +
+
+
+

{ "Addresses" }

+
+
+ +
+
+
+ { for self.address_links.iter().map(|link| html!{ @@ -529,6 +562,17 @@ impl Component for MainView { ) } +
+
+
+

{ "Telephone Numbers" }

+
+
+ +
+
+
+ { for self.telephone_links.iter().map(|link| html!{ @@ -542,6 +586,17 @@ impl Component for MainView { ) } +
+
+
+

{ "Organisations" }

+
+
+ +
+
+
+ { for self.organizational_links.iter().map(|link| html!{ -- cgit v1.2.3