fix: add ButtonLink component
Add ButtonLink component to fix occasions where the BaseButton needs to be styled in a link color.
This commit is contained in:
parent
02f985d8a3
commit
12544c52ca
4 changed files with 25 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
||||||
<p class="has-text-centered has-text-grey is-italic my-5" v-if="showPreviewText">
|
<p class="has-text-centered has-text-grey is-italic my-5" v-if="showPreviewText">
|
||||||
{{ emptyText }}
|
{{ emptyText }}
|
||||||
<template v-if="isEditEnabled">
|
<template v-if="isEditEnabled">
|
||||||
<BaseButton @click="toggleEdit" class="d-print-none">{{ $t('input.editor.edit') }}</BaseButton>.
|
<ButtonLink @click="toggleEdit" class="d-print-none">{{ $t('input.editor.edit') }}</ButtonLink>.
|
||||||
</template>
|
</template>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -63,12 +63,14 @@ import {findCheckboxesInText} from '../../helpers/checklistFromText'
|
||||||
import {createRandomID} from '@/helpers/randomId'
|
import {createRandomID} from '@/helpers/randomId'
|
||||||
|
|
||||||
import BaseButton from '@/components/base/BaseButton.vue'
|
import BaseButton from '@/components/base/BaseButton.vue'
|
||||||
|
import ButtonLink from '@/components/misc/ButtonLink.vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'editor',
|
name: 'editor',
|
||||||
components: {
|
components: {
|
||||||
VueEasymde,
|
VueEasymde,
|
||||||
BaseButton,
|
BaseButton,
|
||||||
|
ButtonLink,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|
17
src/components/misc/ButtonLink.vue
Normal file
17
src/components/misc/ButtonLink.vue
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<template>
|
||||||
|
<BaseButton class="button-link"><slot/></BaseButton>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import BaseButton from '@/components/base/BaseButton.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.button-link {
|
||||||
|
color: var(--link);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--link-hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -27,7 +27,7 @@
|
||||||
<span class="url" v-tooltip="apiUrl"> {{ apiDomain }} </span>
|
<span class="url" v-tooltip="apiUrl"> {{ apiDomain }} </span>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
<br/>
|
<br/>
|
||||||
<BaseButton class="api-config__change-button" @click="() => (configureApi = true)">{{ $t('apiConfig.change') }}</BaseButton>
|
<ButtonLink class="api-config__change-button" @click="() => (configureApi = true)">{{ $t('apiConfig.change') }}</ButtonLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<message variant="success" v-if="successMsg !== '' && errorMsg === ''" class="mt-2">
|
<message variant="success" v-if="successMsg !== '' && errorMsg === ''" class="mt-2">
|
||||||
|
@ -48,7 +48,7 @@ import {checkAndSetApiUrl} from '@/helpers/checkAndSetApiUrl'
|
||||||
import {success} from '@/message'
|
import {success} from '@/message'
|
||||||
|
|
||||||
import Message from '@/components/misc/message.vue'
|
import Message from '@/components/misc/message.vue'
|
||||||
import BaseButton from '@/components/base/BaseButton.vue'
|
import ButtonLink from '@/components/misc/ButtonLink.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
configureOpen: {
|
configureOpen: {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<message variant="danger">
|
<message variant="danger">
|
||||||
<i18n-t keypath="loadingError.failed">
|
<i18n-t keypath="loadingError.failed">
|
||||||
<BaseButton @click="reload">{{ $t('loadingError.tryAgain') }}</BaseButton>
|
<ButtonLink @click="reload">{{ $t('loadingError.tryAgain') }}</ButtonLink>
|
||||||
<BaseButton href="https://vikunja.io/contact/">{{ $t('loadingError.contact') }}</BaseButton>
|
<ButtonLink href="https://vikunja.io/contact/">{{ $t('loadingError.contact') }}</ButtonLink>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</message>
|
</message>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Message from '@/components/misc/message.vue'
|
import Message from '@/components/misc/message.vue'
|
||||||
import BaseButton from '@/components/base/BaseButton.vue'
|
import ButtonLink from '@/components/misc/ButtonLink.vue'
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
|
|
Loading…
Add table
Reference in a new issue