Add button component globally
This commit is contained in:
parent
31aa78b4bd
commit
5ae4a10ade
|
@ -14,12 +14,12 @@
|
|||
</h1>
|
||||
<div class="box has-text-left view">
|
||||
<div class="logout">
|
||||
<a @click="logout()" class="button">
|
||||
<x-button @click="logout()" type="secondary">
|
||||
<span>Logout</span>
|
||||
<span class="icon is-small">
|
||||
<icon icon="sign-out-alt"/>
|
||||
</span>
|
||||
</a>
|
||||
<icon icon="sign-out-alt"/>
|
||||
</span>
|
||||
</x-button>
|
||||
</div>
|
||||
<router-view/>
|
||||
<a class="menu-bottom-link" href="https://vikunja.io" target="_blank">
|
||||
|
@ -49,7 +49,3 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -17,13 +17,13 @@
|
|||
ref="backgroundUploadInput"
|
||||
type="file"
|
||||
/>
|
||||
<a
|
||||
:class="{'is-loading': backgroundUploadService.loading}"
|
||||
<x-button
|
||||
:loading="backgroundUploadService.loading"
|
||||
@click="$refs.backgroundUploadInput.click()"
|
||||
class="button is-primary"
|
||||
type="primary"
|
||||
>
|
||||
Choose a background from your pc
|
||||
</a>
|
||||
</x-button>
|
||||
</div>
|
||||
<div class="content" v-if="unsplashBackgroundEnabled">
|
||||
<input
|
||||
|
|
|
@ -162,6 +162,9 @@ const formatDate = (date, f) => {
|
|||
return date ? format(date, f) : ''
|
||||
}
|
||||
|
||||
import Button from '@/components/input/button'
|
||||
Vue.component('x-button', Button)
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
formatDateSince: date => {
|
||||
|
|
Reference in New Issue