summaryrefslogtreecommitdiff
path: root/src/view/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/main.rs')
-rw-r--r--src/view/main.rs61
1 files changed, 58 insertions, 3 deletions
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() }
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <h2 class="subtitle is-2">{ "Names" }</h2>
+ </div>
+ <div class="level-item">
+ <button onclick=self.link.callback(|_| Msg::AddName) class="button">{ "Add more" }</button>
+ </div>
+ </div>
+ </div>
+
{
for self.name_links.iter().map(|link|
html!{
@@ -503,6 +514,17 @@ impl Component for MainView {
)
}
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <h2 class="subtitle is-2">{ "Other Identification Properties" }</h2>
+ </div>
+ <div class="level-item">
+ <button onclick=self.link.callback(|_| Msg::AddOtherIdentification) class="button">{ "Add more" }</button>
+ </div>
+ </div>
+ </div>
+
{
for self.other_identifications_links.iter().map(|link|
html!{
@@ -516,6 +538,17 @@ impl Component for MainView {
)
}
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <h2 class="subtitle is-2">{ "Addresses" }</h2>
+ </div>
+ <div class="level-item">
+ <button onclick=self.link.callback(|_| Msg::AddAddress) class="button">{ "Add more" }</button>
+ </div>
+ </div>
+ </div>
+
{
for self.address_links.iter().map(|link|
html!{
@@ -529,6 +562,17 @@ impl Component for MainView {
)
}
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <h2 class="subtitle is-2">{ "Telephone Numbers" }</h2>
+ </div>
+ <div class="level-item">
+ <button onclick=self.link.callback(|_| Msg::AddTelephone) class="button">{ "Add more" }</button>
+ </div>
+ </div>
+ </div>
+
{
for self.telephone_links.iter().map(|link|
html!{
@@ -542,6 +586,17 @@ impl Component for MainView {
)
}
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <h2 class="subtitle is-2">{ "Organisations" }</h2>
+ </div>
+ <div class="level-item">
+ <button onclick=self.link.callback(|_| Msg::AddOrganizational) class="button">{ "Add more" }</button>
+ </div>
+ </div>
+ </div>
+
{
for self.organizational_links.iter().map(|link|
html!{