fix some svelte data warnings (#247)

This commit is contained in:
Nolan Lawson 2018-04-30 09:57:49 -07:00 committed by GitHub
parent f9792ae3d8
commit dbba271f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 50 additions and 18 deletions

View File

@ -1,7 +1,7 @@
<a rel="nofollow noopener"
target="_blank"
:href
aria-label={{ariaLabel || ''}}
aria-label={{ariaLabel}}
class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}">
<slot></slot>{{#if showIcon}}
<svg class="external-link-svg">
@ -26,7 +26,10 @@
<script>
export default {
data: () => ({
normalIconColor: false
className: void 0,
normalIconColor: false,
ariaLabel: '',
showIcon: false
})
}
</script>

View File

@ -23,4 +23,11 @@
border-radius: 100%;
background: var(--mask-opaque-bg);
}
</style>
</style>
<script>
export default {
data: () => ({
className: void 0
})
}
</script>

View File

@ -69,6 +69,9 @@
export default {
store: () => store,
data: () => ({
pinnable: false
}),
components: {
IconButton
},

View File

@ -141,7 +141,10 @@
},
data: () => ({
// don't animate if we're showing a modal dialog on top of another modal dialog. it looks ugly
shouldAnimate: !process.browser || document.getElementsByClassName('modal-dialog').length < 2
shouldAnimate: !process.browser || document.getElementsByClassName('modal-dialog').length < 2,
fadedIn: false,
muted: false,
className: void 0
}),
computed: {
backdropClass: (fadedIn, shouldAnimate) => {

View File

@ -53,6 +53,9 @@
}
},
store: () => store,
data: () => ({
overrideFollowing: void 0
}),
computed: {
accountId: (account) => account.id,
following: (relationship, overrideFollowing) => {

View File

@ -73,11 +73,9 @@
import IconButton from '../IconButton.html'
export default {
components: {
Avatar,
SearchResult,
IconButton
},
data: () => ({
actions: void 0
}),
methods: {
onButtonClick (event, action, accountId) {
event.preventDefault()
@ -87,6 +85,11 @@
accountId
})
}
},
components: {
Avatar,
SearchResult,
IconButton
}
}
</script>

View File

@ -25,4 +25,11 @@
margin: 20px 0;
}
}
</style>
</style>
<script>
export default {
data: () => ({
label: void 0
})
}
</script>

View File

@ -5,15 +5,9 @@
<use xlink:href={{icon}} />
</svg>
{{/if}}
{{#if ariaLabel}}
<span aria-label={{ariaLabel}} class={{offsetForIcon ? 'offset-for-icon' : ''}}>
<span aria-label={{ariaLabel || label}} class={{offsetForIcon ? 'offset-for-icon' : ''}}>
{{label}}
</span>
{{else}}
<span class={{offsetForIcon ? 'offset-for-icon' : ''}}>
{{label}}
</span>
{{/if}}
</a>
</li>
<style>
@ -67,4 +61,13 @@
}
}
</style>
</style>
<script>
export default {
data: () => ({
icon: void 0,
ariaLabel: void 0,
offsetForIcon: void 0
})
}
</script>