1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00

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>
</CommonTooltip>
<CommonDropdown>
<button btn-action-icon w-12>
<div :class="currentVisibility.icon" />
<div i-ri:arrow-down-s-line text-sm text-secondary mr--1 />
</button>
<CommonTooltip placement="bottom" content="Change content visibility">
<CommonDropdown>
<button btn-action-icon w-12>
<div :class="currentVisibility.icon" />
<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
btn-solid rounded-full text-sm
:disabled="!isExistDraft || isUploading || (draft.attachments.length === 0 && !draft.params.status)"