1
0
elk/components/publish/PublishButton.vue

23 lines
625 B
Vue
Raw Normal View History

<script setup>
2023-01-15 17:38:02 +09:00
const disabled = computed(() => !isHydrated.value || !currentUser.value)
const disabledVisual = computed(() => isHydrated.value && !currentUser.value)
</script>
2022-11-24 17:04:53 +09:00
<template>
<button
flex="~ gap2 center"
w-9 h-9 py2
2023-01-05 08:17:30 +09:00
xl="w-auto h-auto"
rounded-3
cursor-pointer disabled:pointer-events-none
2023-01-05 20:33:00 +09:00
text-primary
border-1 border-primary
:class="disabledVisual ? 'op25' : 'hover:bg-primary hover:text-inverted'"
:disabled="disabled"
@click="openPublishDialog()"
>
2022-11-24 17:04:53 +09:00
<div i-ri:quill-pen-line />
<span hidden xl:block>{{ $t('action.compose') }}</span>
2022-11-24 17:04:53 +09:00
</button>
</template>