elk/components/publish/PublishButton.vue

23 lines
649 B
Vue
Raw Normal View History

<script setup>
2023-01-03 04:23:16 +03:00
const disabled = computed(() => !isMastoInitialised.value || isGuest.value)
const disabledVisual = computed(() => isMastoInitialised.value && isGuest.value)
</script>
2022-11-24 11:04:53 +03:00
<template>
<button
flex="~ gap2 center"
w-9 h-9 py2
xl="w-auto h-auto py-4"
rounded-full
cursor-pointer disabled:pointer-events-none
text-primary font-bold
border-1 border-primary
:class="disabledVisual ? 'op25' : 'hover:bg-primary hover:text-inverted'"
:disabled="disabled"
@click="openPublishDialog()"
>
2022-11-24 11:04:53 +03:00
<div i-ri:quill-pen-line />
<span hidden xl:block>{{ $t('action.compose') }}</span>
2022-11-24 11:04:53 +03:00
</button>
</template>