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