summaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-10 20:10:18 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-27 11:21:35 +0200
commita70732601c81b320ce0ee49333fb153325c63a25 (patch)
tree3dbb4e345a252d8992207d81b65bcd1eab40ad5e /src/components
parente303ca93b4a8f60cd517e77e43ed9a7056349ba3 (diff)
Add push warning on fixed contact
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ContactDetails.vue10
-rw-r--r--src/components/Properties/PropertyText.vue6
2 files changed, 13 insertions, 3 deletions
diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue
index 0dd8ead8..364d6316 100644
--- a/src/components/ContactDetails.vue
+++ b/src/components/ContactDetails.vue
@@ -106,6 +106,16 @@
class="header-icon header-icon--pulse icon-history-force-white"
@click="refreshContact" />
+ <!-- repaired contact message -->
+ <div v-if="fixed"
+ v-tooltip="{
+ content: t('contacts', 'This contact was broken and received a fix. Please review the content and click here to save it.'),
+ show: true,
+ trigger: 'manual',
+ }"
+ class="header-icon header-icon--pulse icon-up-force-white"
+ @click="updateContact" />
+
<!-- menu actions -->
<Actions class="header-menu" menu-align="right">
<ActionLink :href="contact.url"
diff --git a/src/components/Properties/PropertyText.vue b/src/components/Properties/PropertyText.vue
index 3089da96..2d300b6f 100644
--- a/src/components/Properties/PropertyText.vue
+++ b/src/components/Properties/PropertyText.vue
@@ -149,7 +149,7 @@ export default {
} else if (this.propName === 'email') {
return 'mailto:'
// if no scheme (roughly checking for the colon char)
- } else if (this.propType === 'uri' && this.value.indexOf(':') === -1) {
+ } else if (this.propType === 'uri' && this.localValue && this.localValue.indexOf(':') === -1) {
return 'https://'
} else if (this.propType === 'uri') {
return '' // return empty, we already have a scheme in the value
@@ -160,13 +160,13 @@ export default {
// format external link
externalHandler() {
if (this.URLScheme !== false) {
- return `${this.URLScheme}${this.value}`
+ return `${this.URLScheme}${this.localValue}`
}
return ''
},
haveExtHandler() {
- return this.externalHandler.trim() !== '' && this.value && this.value.length > 0
+ return this.externalHandler.trim() !== '' && this.localValue && this.localValue.length > 0
}
},