feat: avoid navigation sidebar layout shifts while loading
This commit is contained in:
parent
a2da1b2ee1
commit
9ccc24e845
4 changed files with 48 additions and 22 deletions
|
@ -1,5 +1,16 @@
|
|||
<script setup>
|
||||
const disabled = computed(() => !isMastoInitialised.value || !currentUser.value)
|
||||
const disabledVisual = computed(() => isMastoInitialised.value && !currentUser.value)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button color-primary btn-outline rounded-full ml-7 lg:ml-3 w-9 lg:w-auto font-bold py2 lg:py4 flex="~ gap2 center" @click="openPublishDialog()">
|
||||
<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()"
|
||||
>
|
||||
<div i-ri:quill-pen-line />
|
||||
<span hidden lg:block>{{ $t('action.compose') }}</span>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue