Replace more buttons with the component

This commit is contained in:
kolaente 2021-01-17 15:14:31 +01:00
parent eff83506cd
commit 8b6d5d5e4c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
7 changed files with 34 additions and 16 deletions

View File

@ -44,12 +44,15 @@
<img :src="userAvatar" alt="" class="avatar"/> <img :src="userAvatar" alt="" class="avatar"/>
<div class="dropdown is-right is-active"> <div class="dropdown is-right is-active">
<div class="dropdown-trigger"> <div class="dropdown-trigger">
<button @click.stop="userMenuActive = !userMenuActive" class="button has-no-shadow"> <x-button
@click.stop="userMenuActive = !userMenuActive"
type="secondary"
:shadow="false">
<span class="username">{{ userInfo.name !== '' ? userInfo.name : userInfo.username }}</span> <span class="username">{{ userInfo.name !== '' ? userInfo.name : userInfo.username }}</span>
<span class="icon is-small"> <span class="icon is-small">
<icon icon="chevron-down"/> <icon icon="chevron-down"/>
</span> </span>
</button> </x-button>
</div> </div>
<transition name="fade"> <transition name="fade">
<div class="dropdown-menu" v-if="userMenuActive"> <div class="dropdown-menu" v-if="userMenuActive">

View File

@ -1,7 +1,9 @@
<template> <template>
<div class="update-notification" v-if="updateAvailable"> <div class="update-notification" v-if="updateAvailable">
<p>There is an update for Vikunja available!</p> <p>There is an update for Vikunja available!</p>
<a @click="refreshApp()" class="button is-primary has-no-shadow">Update Now</a> <x-button @click="refreshApp()" :shadow="false">
Update Now
</x-button>
</div> </div>
</template> </template>

View File

@ -16,9 +16,9 @@
model="hex" model="hex"
picker="square" picker="square"
v-model="color"/> v-model="color"/>
<a @click="reset" class="button has-no-shadow is-small ml-2"> <x-button @click="reset" class="is-small ml-2" :shadow="false" type="secondary">
Reset Color Reset Color
</a> </x-button>
</div> </div>
</template> </template>

View File

@ -97,12 +97,13 @@
v-model="flatPickrDate" v-model="flatPickrDate"
/> />
<a <x-button
class="button is-primary has-no-shadow is-fullwidth" class="is-fullwidth"
:shadow="false"
@click="close" @click="close"
> >
Confirm Confirm
</a> </x-button>
</div> </div>
</transition> </transition>
</div> </div>

View File

@ -1,12 +1,22 @@
<template> <template>
<div :class="{'is-pulled-up': isEditEnabled}" class="editor"> <div :class="{'is-pulled-up': isEditEnabled}" class="editor">
<div class="is-pulled-right mb-4" v-if="hasPreview && isEditEnabled && !hasEditBottom"> <div class="is-pulled-right mb-4" v-if="hasPreview && isEditEnabled && !hasEditBottom">
<a v-if="!isEditActive" @click="toggleEdit" class="button has-no-shadow"> <x-button
v-if="!isEditActive"
@click="toggleEdit"
:shadow="false"
type="secondary"
>
<icon icon="pen"/> <icon icon="pen"/>
</a> </x-button>
<a v-else @click="toggleEdit" class="button has-no-shadow"> <x-button
v-else
@click="toggleEdit"
:shadow="false"
type="secondary"
>
Done Done
</a> </x-button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

View File

@ -35,7 +35,7 @@
<div class="search-results" v-if="searchResultsVisible"> <div class="search-results" v-if="searchResultsVisible">
<button <button
v-if="creatableAvailable" v-if="creatableAvailable"
class="button is-ghost is-fullwidth" class="is-fullwidth"
ref="result--1" ref="result--1"
@keydown.up.prevent="() => preSelect(-2)" @keydown.up.prevent="() => preSelect(-2)"
@keydown.down.prevent="() => preSelect(0)" @keydown.down.prevent="() => preSelect(0)"
@ -55,7 +55,7 @@
</button> </button>
<button <button
class="button is-ghost is-fullwidth" class="is-fullwidth"
v-for="(data, key) in filteredSearchResults" v-for="(data, key) in filteredSearchResults"
:key="key" :key="key"
:ref="`result-${key}`" :ref="`result-${key}`"

View File

@ -82,6 +82,8 @@
font-family: $family-sans-serif; font-family: $family-sans-serif;
font-weight: normal; font-weight: normal;
padding: 0; padding: 0;
border: none;
cursor: pointer;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;