1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-03 01:08:07 +09:00
elk/components/publish/PublishButton.vue

18 lines
655 B
Vue
Raw Normal View History

<script setup>
const disabled = computed(() => !isMastoInitialised.value || !currentUser.value)
const disabledVisual = computed(() => isMastoInitialised.value && !currentUser.value)
</script>
2022-11-24 17:04:53 +09:00
<template>
<button
color-primary rounded-full ml-7 lg:ml-3 w-9 lg:w-auto font-bold py2 lg:py4 flex="~ gap2 center"
cursor-pointer disabled:pointer-events-none
text-primary border-1 border-primary
:disabled="disabled" :class="disabledVisual ? 'op25' : 'hover:bg-primary hover:text-inverted'"
@click="openPublishDialog()"
>
2022-11-24 17:04:53 +09:00
<div i-ri:quill-pen-line />
<span hidden lg:block>{{ $t('action.compose') }}</span>
2022-11-24 17:04:53 +09:00
</button>
</template>