Skip to content

Commit

Permalink
Add crude Address field
Browse files Browse the repository at this point in the history
  • Loading branch information
arran-nz committed Aug 2, 2020
1 parent d050f49 commit aff9d76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ article {
phone: "",
website: "",
comment: "",
address: "",
};
let loadedExternalVCard = false;
Expand Down Expand Up @@ -85,6 +86,7 @@ article {
phone: getVCardProperty(VCardObj, "tel"),
website: getVCardProperty(VCardObj, "url"),
comment: getVCardProperty(VCardObj, "note"),
address: getVCardProperty(VCardObj, "adr")
}
loadedExternalVCard = true;
Expand Down Expand Up @@ -152,6 +154,7 @@ article {
phone = {contactDetails.phone}
website = {contactDetails.website}
comment = {contactDetails.comment}
address = {contactDetails.address}

loadedExternalVCard = {loadedExternalVCard}
/>
Expand Down
9 changes: 8 additions & 1 deletion src/ContactCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
export let phone;
export let website;
export let comment;
export let address;
export let loadedExternalVCard;
Expand All @@ -230,6 +231,7 @@
setVCardProperty("tel", phone);
setVCardProperty("url", website);
setVCardProperty("note", comment);
setVCardProperty("adr", address);
vCardString = generateVCardString(
vCardObj,
Expand Down Expand Up @@ -365,7 +367,12 @@
<h2>{title}</h2>
{/if}
</header>


{#if address}
<div id="address">
<p>{address}</p>
</div>
{/if}

{#if comment}
<div id="comment">
Expand Down

0 comments on commit aff9d76

Please sign in to comment.