Skip to content

Commit

Permalink
Merge pull request #6 from ArqTras/view
Browse files Browse the repository at this point in the history
View
  • Loading branch information
ArqTras authored Jul 15, 2019
2 parents 5aa776f + a5eb2e6 commit fc288dc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arqma-electron-wallet",
"version": "1.0.3",
"version": "1.0.4",
"daemonVersion": "4.0.0",
"description": "Modern GUI interface for Arqma Currency",
"productName": "Arqma Electron Wallet",
Expand Down
66 changes: 29 additions & 37 deletions src/components/address_header.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<template>
<q-item class="address-header">
<q-item-side>
<div class="wallet-icon">
<svg width="48" viewBox="0 0 17 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="si-glyph si-glyph-wallet"><defs class="si-glyph-fill"></defs><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(1.000000, 0.000000)" fill="#434343"><path d="M7.988,10.635 L7.988,8.327 C7.988,7.578 8.561,6.969 9.267,6.969 L13.964,6.969 L13.964,5.531 C13.964,4.849 13.56,4.279 13.007,4.093 L13.007,4.094 L11.356,4.08 L11.336,4.022 L3.925,4.022 L3.784,4.07 L1.17,4.068 L1.165,4.047 C0.529,4.167 0.017,4.743 0.017,5.484 L0.017,13.437 C0.017,14.269 0.665,14.992 1.408,14.992 L12.622,14.992 C13.365,14.992 13.965,14.316 13.965,13.484 L13.965,12.031 L9.268,12.031 C8.562,12.031 7.988,11.384 7.988,10.635 L7.988,10.635 Z" class="si-glyph-fill"></path><path d="M14.996,8.061 L14.947,8.061 L9.989,8.061 C9.46,8.061 9.031,8.529 9.031,9.106 L9.031,9.922 C9.031,10.498 9.46,10.966 9.989,10.966 L14.947,10.966 L14.996,10.966 C15.525,10.966 15.955,10.498 15.955,9.922 L15.955,9.106 C15.955,8.528 15.525,8.061 14.996,8.061 L14.996,8.061 Z M12.031,10.016 L9.969,10.016 L9.969,9 L12.031,9 L12.031,10.016 L12.031,10.016 Z" class="si-glyph-fill"></path><path d="M3.926,4.022 L10.557,1.753 L11.337,4.022 L12.622,4.022 C12.757,4.022 12.885,4.051 13.008,4.092 L11.619,0.051 L1.049,3.572 L1.166,4.048 C1.245,4.033 1.326,4.023 1.408,4.023 L3.926,4.023 L3.926,4.022 Z" class="si-glyph-fill"></path></g></g></svg>
</div>
</q-item-side>
<q-item-main class="self-start">
<q-item-tile sublabel class="title non-selectable">{{ title }}</q-item-tile>
<q-item-tile class="break-all" label>{{ address }}</q-item-tile>
<q-item-tile v-if="payment_id" sublabel>{{ $t("fieldLabels.paymentId") }}: {{ payment_id }}</q-item-tile>
<q-item-tile v-if="extra" sublabel class="extra non-selectable">{{ extra }}</q-item-tile>
<q-item-tile label>{{ title }}</q-item-tile>
<q-item-tile class="monospace break-all" sublabel>{{ address }}</q-item-tile>
<q-item-tile v-if="payment_id" sublabel>Payment id: {{ payment_id }}</q-item-tile>
<q-item-tile v-if="extra" sublabel>{{ extra }}</q-item-tile>
</q-item-main>
<q-item-side v-if="showCopy">
<q-item-side>
<q-btn
color="primary"
style="width:25px;"
color="primary" style="width:25px;"
size="sm" icon="file_copy"
ref="copy"
@click="copyAddress">
Expand All @@ -23,9 +27,14 @@
<q-context-menu>
<q-list link separator style="min-width: 150px; max-height: 300px;">
<q-item v-close-overlay
@click.native="copyAddress($event)">
@click.native="copyAddress(address, $event)">
<q-item-main :label="$t('menuItems.copyAddress')" />
</q-item>

<q-item v-close-overlay
@click.native="$refs.identicon.saveIdenticon()">
<q-item-main label="Save identicon to file" />
</q-item>
</q-list>
</q-context-menu>

Expand Down Expand Up @@ -53,33 +62,29 @@ export default {
extra: {
type: String,
required: false
},
showCopy: {
type: Boolean,
required: false,
default: true
}
},
data () {
return {}
},
methods: {
copyAddress (event) {
if (event) {
event.stopPropagation()
}
if (this.$refs.copy) {
this.$refs.copy.$el.blur()
}
copyAddress () {
this.$refs.copy.$el.blur()
clipboard.writeText(this.address)
if(this.payment_id) {
this.$q.dialog({
title: this.$t("dialog.copyAddress.title"),
message: this.$t("dialog.copyAddress.message"),
title: this.$t("dialog.copyAddress.title"),
message: this.$t("dialog.copyAddress.message"),
ok: {
label: this.$t(`dialog.${key}.ok`)
},
}).catch(() => null).then(() => {
}).then(() => {
this.$q.notify({
type: "positive",
timeout: 1000,
message: this.$t("notification.positive.addressCopied")
})
}).catch(() => {
this.$q.notify({
type: "positive",
timeout: 1000,
Expand Down Expand Up @@ -122,20 +127,7 @@ export default {
.q-item-main {
.q-item-label {
font-weight: 400;
}
.q-item-sublabel, .q-list-header {
font-size: 13px;
}
.title {
font-size: 14px;
margin-bottom: 2px;
}
.extra {
margin-top: 8px;
font-size:2em;
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/pages/wallet-select/create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
<script>
import { required } from "vuelidate/lib/validators"
import { mapState } from "vuex"
import WalletLoading from "components/wallet_loading"
import ArqmaField from "components/arqma_field"
import ArqmaField from "components/Arqma_field"
export default {
data () {
return {
Expand Down Expand Up @@ -95,11 +94,11 @@ export default {
case 1:
break;
case 0:
this.$refs.loading.hide()
this.$q.loading.hide()
this.$router.replace({ path: "/wallet-select/created" });
break;
default:
this.$refs.loading.hide()
this.$q.loading.hide()
this.$q.notify({
type: "negative",
timeout: 1000,
Expand Down Expand Up @@ -156,7 +155,7 @@ export default {
passwordPromise
.then(() => {
this.$refs.loading.show({
this.$q.loading.show({
delay: 0
})
this.$gateway.send("wallet", "create_wallet", this.wallet)
Expand Down

0 comments on commit fc288dc

Please sign in to comment.