feat: add tooltip to change content visibility dropdown (#170)

This commit is contained in:
Guillaume Chau 2022-11-27 13:43:04 +01:00 committed by GitHub
parent 62221e6e54
commit 6acc838850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,27 +232,30 @@ onUnmounted(() => {
</button> </button>
</CommonTooltip> </CommonTooltip>
<CommonDropdown> <CommonTooltip placement="bottom" content="Change content visibility">
<button btn-action-icon w-12> <CommonDropdown>
<div :class="currentVisibility.icon" /> <button btn-action-icon w-12>
<div i-ri:arrow-down-s-line text-sm text-secondary mr--1 /> <div :class="currentVisibility.icon" />
</button> <div i-ri:arrow-down-s-line text-sm text-secondary mr--1 />
</button>
<template #popper>
<CommonDropdownItem
v-for="visibility in STATUS_VISIBILITIES"
:key="visibility.value"
:icon="visibility.icon"
:checked="visibility.value === draft.params.visibility"
@click="chooseVisibility(visibility.value)"
>
{{ visibility.label }}
<template #description>
{{ visibility.description }}
</template>
</CommonDropdownItem>
</template>
</CommonDropdown>
</CommonTooltip>
<template #popper>
<CommonDropdownItem
v-for="visibility in STATUS_VISIBILITIES"
:key="visibility.value"
:icon="visibility.icon"
:checked="visibility.value === draft.params.visibility"
@click="chooseVisibility(visibility.value)"
>
{{ visibility.label }}
<template #description>
{{ visibility.description }}
</template>
</CommonDropdownItem>
</template>
</CommonDropdown>
<button <button
btn-solid rounded-full text-sm btn-solid rounded-full text-sm
:disabled="!isExistDraft || isUploading || (draft.attachments.length === 0 && !draft.params.status)" :disabled="!isExistDraft || isUploading || (draft.attachments.length === 0 && !draft.params.status)"