Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
73e44f8
add my .env file to .gitignore. Change port to 8081 from 8080 to run …
TonyBoy56 Sep 4, 2023
011c4ca
add a new router-link as a copy of /settings/user route as a placehol…
TonyBoy56 Sep 4, 2023
955b870
add a comment on line 24 to delinate purpose of most recent change to…
TonyBoy56 Sep 4, 2023
91f5701
import ContactIcon from /icons, utilize the icon to replace the place…
TonyBoy56 Sep 4, 2023
ec3bce4
add a new route for a /contacts page, import newly created /views/Con…
TonyBoy56 Sep 4, 2023
eff64a6
create a new view for the Contacts page.
TonyBoy56 Sep 4, 2023
b6c1982
add /contacts route to contacts router-link, change pathcolor to ('co…
TonyBoy56 Sep 4, 2023
f79ebfc
add a table to the /views/Contacts.vue to show a list of contacts.
TonyBoy56 Sep 4, 2023
6744df4
experimenting with adding a modal to the /view/Contact.vue.
TonyBoy56 Sep 4, 2023
a76385d
refactor list of contacts as an iterable object to populate the conta…
TonyBoy56 Sep 4, 2023
30d305a
fixed an issue in which the modal would not appear upon clicking a co…
TonyBoy56 Sep 4, 2023
1069213
comment out styling for the modal-container and modal-content.
TonyBoy56 Sep 4, 2023
22f84c7
add comments at the top of /views/Contact.vue to showcase understandi…
TonyBoy56 Sep 5, 2023
80d1ea7
change comment on line 34 to deliniate the below modal for the purpos…
TonyBoy56 Sep 5, 2023
1d7d3d9
add a modal service to handle importing vcf files to convey them as Q…
TonyBoy56 Sep 5, 2023
f5dca0d
add code to handle a fileUpload for the vcfImportModal.
TonyBoy56 Sep 5, 2023
f5402cb
update the vue-qrcode dependency.
TonyBoy56 Sep 5, 2023
d9bba34
remove /service/VcfImportModal.vue, refactor its code within /views/C…
TonyBoy56 Sep 5, 2023
7ed7f8c
make a change to the VCF File Upload modal to become toggleable on th…
TonyBoy56 Sep 5, 2023
b6d217d
clean up code of uneeded comments, add a few other properties for eac…
TonyBoy56 Sep 5, 2023
44eada1
remove commented styling.
TonyBoy56 Sep 5, 2023
14a9a11
change email addresses for contacts slightly.
TonyBoy56 Sep 5, 2023
1539e1e
remove the input field on the left of the humanreadable entry field f…
TonyBoy56 Sep 5, 2023
f071a65
add a comment at the top of the file to describe the purpose of the f…
TonyBoy56 Sep 5, 2023
897ad04
change the 'VITE_DEV_SERVER_URL' back to port 8080. Conclude assessment.
TonyBoy56 Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# .env
.env

# Logs
logs
*.log
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@tezos-domains/core": "~1.26.0",
"@tezos-domains/taquito-client": "~1.26.0",
"@unstoppabledomains/resolution": "^7.1.4",
"@walletconnect/auth-client": "^2.1.1",
"@walletconnect/client": "^1.8.0",
"@walletconnect/core": "^2.5.2",
"@walletconnect/utils": "^2.6.2",
Expand Down Expand Up @@ -111,7 +112,7 @@
"vue-js-modal": "^2.0.0-rc.6",
"vue-js-toggle-button": "^1.3.3",
"vue-loading-overlay": "^3.4.2",
"vue-qrcode": "^0.3.3",
"vue-qrcode": "^0.3.6",
"vue-qrcode-reader": "^2.3.13",
"vue-ripple-directive": "^2.0.1",
"vue-router": "^3.4.6",
Expand Down
11 changes: 10 additions & 1 deletion src/components/partials/SideNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
</span>
<span class="link-text">Settings</span>
</router-link>
<!-- Add a new route and button for the Contact page -->
<router-link v-ripple to="/contacts">
<span class="icon">
<contact-icon :color="pathColor('contacts')" />
</span>
<span class="link-text">Contacts</span>
</router-link>
</aside>
</template>

Expand All @@ -30,13 +37,15 @@ import { mapGetters } from 'vuex'
import FilesIcon from '../icons/Files.vue'
import SettingsIcon from '../icons/Settings.vue'
import WalletIcon from '../icons/Wallet.vue'
import ContactIcon from '../icons/Contact.vue'

export default {
name: 'SideNav',
components: {
FilesIcon,
SettingsIcon,
WalletIcon
WalletIcon,
ContactIcon
},
computed: {
...mapGetters(['menuType'])
Expand Down
6 changes: 6 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Home from '../views/Home.vue'
import Directories from '../views/Directories.vue'
import Test from '../views/Test.vue'
import Settings from '../views/Settings.vue'
import Contacts from '../views/Contacts.vue'

Vue.use(VueRouter)

Expand All @@ -27,6 +28,11 @@ const routes = [
path: '/settings/:activeTab',
name: 'Settings',
component: Settings
},
{
path: '/contacts',
name: 'Contacts',
component: Contacts
}
]

Expand Down
152 changes: 152 additions & 0 deletions src/views/Contacts.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<!-- Notes about this component:
Contributors: Antonio Cruz (TonyBoy56)

Description:
* My intention was to create a table that would show a possible list of contacts a signed in user may already have.
* Upon clicking a Contact Name, a modal will appear near the bottom of the page displaying their Name, and Email as contact info.
- Changes: Plans to have this modal as a popup at the top of the page rather than the bottom.

Changes to the component for better UI/UX:
* Leverage ContactService.js
* Add the ability to add/edit/remove contacts
-->

<template>
<div class="view">
<h1 class="view-name">Contacts</h1>
<div class="bg-white shadow py-5 px-4 mt-4">
<button @click="toggleVcfModal">VCF File Upload</button>
<div class="modal-background" v-if="isModalVisible">
<div class="modal-content">
<h2>Import VCF File</h2>
<input type="file" @change="handleFileUpload" accept=".vcf" />
<div v-if="vcfData">
<h3>Contact Information</h3>
<pre>{{ vcfData }}</pre>
<qrcode-vue :value="vcfData"></qrcode-vue>
</div>
<button class="close" @click="toggleVcfModal">&times;</button>
</div>
</div>
<table class="table">
<thead class="container">
<tr class="row">
<th class="col">Name</th>
<th class="col">Email</th>
</tr>
</thead>
<tbody class="container">
<!-- Loop through contacts to display on the table -->
<tr class="row" v-for="(contact, index) in contacts" :key="index">
<td class="col">
<button @click="openContactModal(contact)">
{{ contact.name }}
</button>
</td>
<td class="col">{{ contact.email }}</td>
</tr>
</tbody>
</table>
<!-- Contacts Modal -->
<div class="modal-background" v-if="selectedContact">
<div class="modal-content">
<button class="close" @click="closeContactModal">&times;</button>
<h2>Contact Information</h2>
<div><strong>Name:</strong> {{ selectedContact.name }}</div>
<div><strong>Email:</strong> {{ selectedContact.email }}</div>
<div><strong>Address:</strong> {{ selectedContact.address }}</div>
<div><strong>Company:</strong> {{ selectedContact.company }}</div>
</div>
</div>
</div>
</div>
</template>

<script>
import QrcodeVue from 'vue-qrcode'

export default {
name: 'ContactsPage',
components: {
QrcodeVue
},
data() {
return {
isModalVisible: false,
vcfData: null,
selectedContact: null,
contacts: [
{
name: 'John Doe',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
},
{
name: 'Jack Ryan',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
},
{
name: 'Lara Croft',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
},
{
name: 'Soap MacTavish',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
},
{
name: 'John Price',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
},
{
name: 'Handler Walter',
email: '[email protected]',
address: 'example address',
company: 'Example Company, Inc'
}
]
}
},
methods: {
handleFileUpload(event) {
const file = event.target.files[0]
if (file) {
const reader = new FileReader()

reader.onload = (e) => {
this.vcfData = e.target.result
}
reader.readAsText(file)
}
},
toggleVcfModal() {
this.isModalVisible = !this.isModalVisible
},
openContactModal(contact) {
this.selectedContact = contact
},
closeContactModal() {
this.selectedContact = null
}
}
}
</script>

<style scoped>
/* Style for the close button */
.close {
position: absolute;
top: 0;
right: 0;
padding: 10px;
cursor: pointer;
}
</style>
15 changes: 8 additions & 7 deletions src/views/Test.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<!-- Notes about this component:
Contributors: Antonio Cruz (TonyBoy56)

Description:
* Page should server the purpose of allowing a user to run a human-readable domain search, and produce a result of the associated crypto-currency along with its long-form domain address.
* Removed the left input field from the page
-->

<template>
<div class="view">
<h1 class="view-name">Test</h1>
Expand All @@ -12,13 +20,6 @@
class="form-control"
required
/>
<input
v-model="coinTicker"
type="text"
placeholder="Coin Ticker (e.g., BTC, ETH, XTZ)"
class="form-control"
required
/>
</div>
<button
class="py-1 px-5 mt-4 rounded text-white hover:shadow"
Expand Down