Skip to content

Commit

Permalink
Add push warning on fixed contact (#982)
Browse files Browse the repository at this point in the history
Add push warning on fixed contact
  • Loading branch information
skjnldsv authored Sep 27, 2019
2 parents e303ca9 + a707326 commit 6d7b562
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions css/Properties/Properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ $property-value-max-width: 250px;
// External link (tel, mailto, http, ftp...)
&__ext {
position: absolute;
// 8px padding
right: 8px;
// 8px padding + actions
right: 44px + 8px;
opacity: 0;
&:hover,
&:focus,
Expand Down
10 changes: 10 additions & 0 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/components/Properties/PropertyText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
},

Expand Down

0 comments on commit 6d7b562

Please sign in to comment.