oxen-electron-gui-wallet/src/components/address_header.vue

142 lines
3.1 KiB
Vue
Raw Normal View History

2018-09-08 23:44:19 +02:00
<template>
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
<div>
<q-item-section class="self-start">
<q-item-label class="title non-selectable">{{ title }}</q-item-label>
<q-item-label class="row">
<q-item-section class="break-all" style="font-size: 18px">
{{ address }}
</q-item-section>
<q-item-section v-if="showCopy" side>
<q-btn ref="copy" color="primary" padding="xs" size="sm" icon="file_copy" @click="copyAddress">
<q-tooltip anchor="center left" self="center right" :offset="[5, 10]">
{{ $t("menuItems.copyAddress") }}
</q-tooltip>
</q-btn>
</q-item-section>
</q-item-label>
<q-item-label v-if="paymentId" header>{{ $t("fieldLabels.paymentId") }}: {{ paymentId }}</q-item-label>
<q-item-label v-if="extra" header class="extra non-selectable">{{ extra }}</q-item-label>
</q-item-section>
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
<q-menu context-menu>
<q-list separator class="context-menu">
<q-item v-close-popup clickable @click.native="copyAddress($event)">
<q-item-section>
{{ $t("menuItems.copyAddress") }}
</q-item-section>
2020-03-03 04:16:23 +01:00
</q-item>
</q-list>
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
</q-menu>
</div>
2018-09-08 23:44:19 +02:00
</template>
<script>
2020-03-03 04:16:23 +01:00
const { clipboard } = require("electron");
2018-09-08 23:44:19 +02:00
export default {
2020-03-03 04:16:23 +01:00
name: "AddressHeader",
props: {
title: {
type: String,
required: true
2018-09-08 23:44:19 +02:00
},
2020-03-03 04:16:23 +01:00
address: {
type: String,
required: true
2018-09-08 23:44:19 +02:00
},
2020-03-03 04:16:23 +01:00
paymentId: {
type: String,
required: false,
default: undefined
},
extra: {
type: String,
required: false,
default: undefined
},
2020-03-03 04:16:23 +01:00
showCopy: {
type: Boolean,
required: false,
default: true
2018-09-08 23:44:19 +02:00
}
2020-03-03 04:16:23 +01:00
},
data() {
return {};
},
methods: {
copyAddress(event) {
if (event) {
event.stopPropagation();
}
if (this.$refs.copy) {
this.$refs.copy.$el.blur();
}
clipboard.writeText(this.address);
if (this.paymentId) {
2020-03-03 04:16:23 +01:00
this.$q
.dialog({
title: this.$t("dialog.copyAddress.title"),
message: this.$t("dialog.copyAddress.message"),
ok: {
label: this.$t(`dialog.copyAddress.ok`)
}
})
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
.onDismiss(() => null)
.onCancel(() => null)
.onOk(() => {
2020-03-03 04:16:23 +01:00
this.$q.notify({
type: "positive",
timeout: 1000,
message: this.$t("notification.positive.addressCopied")
});
});
} else {
this.$q.notify({
type: "positive",
timeout: 1000,
message: this.$t("notification.positive.addressCopied")
});
}
}
}
};
2018-09-08 23:44:19 +02:00
</script>
<style lang="scss">
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
.title {
font-size: 18px;
margin-bottom: 4px;
color: white;
}
.extra {
margin-top: 8px;
color: white;
}
2018-09-08 23:44:19 +02:00
.address-header {
2020-03-03 04:16:23 +01:00
padding: 0;
img {
float: left;
margin-right: 15px;
}
h3 {
margin: 15px 0 0;
}
p {
word-break: break-all;
}
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
2020-03-03 04:16:23 +01:00
&::after {
content: "";
clear: both;
display: table;
}
2018-09-08 23:44:19 +02:00
UI upgrade (#155) * followed upgrade instructions on quasar site * followed upgrade instructions on quasar site * debug messages now show * Fix template error mode undefined * building and working, UI broken, need to move to new quasar components * move collapsible to expansion-item * moving over components to quasar v1+ * items to labels * items and item side to quasar v1 * fix label typo * item main to item label * q-section to q-item-section * popover to menu * modals to v1 quasar * Remove debug lines, use new dialog methods * move static folder up a dir and rename to public. Change paths accordingly * Exit modal fixed with v1 quasar * UI fixes for v1 quasar * remove link styles * some field updates * Fix more fields and modals for v1 * more fields updated * more fields changed over * wallet settings modals * Fix password confirm dialog issue w/ refactor * begin generalising a copy component * Receive item looking better * Index view vixed for v1 quasar * fix export/import keys modal * tx styles and some others * bunch of small style changes * Fix date display on restore page * completed upgrade to v1 quasar (I think) * lns list fixed, stake buttons fixed * fix favourite checkbox with v1 quasar * Address book fixes * Fix the context menus * clean up * remove mixin from copyicon * Fix webpack * fix QR code view on address detail page * Fix welcome stepper and default to blink * Fix some style issues * radio buttons w/ white circles * clean up * sn style fixes, and other fixes * style fixes and unlock bug fixed * fix daemon typo * Fix some style things * fix button colour Co-authored-by: Kyle Zsembery <zsembery.kyle@gmail.com>
2020-08-31 07:26:06 +02:00
.q-item-label {
2020-03-03 04:16:23 +01:00
.q-item-label {
font-weight: 400;
}
}
2018-09-08 23:44:19 +02:00
}
</style>