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