feat: add titles to icon-only buttons
Docker Build / build (push) Has been cancelled
TS Lint / ESLint (push) Has been cancelled
TS Lint / Oxlint (push) Has been cancelled
TS Lint / TypeScript (push) Has been cancelled

This commit is contained in:
2026-07-15 16:08:52 +02:00
parent db9ecb4773
commit f811facff8
4 changed files with 44 additions and 13 deletions
+8 -7
View File
@@ -9,7 +9,7 @@ import {
CircleCheckBigIcon,
CheckCheckIcon,
SearchIcon,
Share2Icon
Share2Icon,
} from "@lucide/vue";
const TaskItem = defineAsyncComponent(
() => import("@/components/TaskItem.vue"),
@@ -131,9 +131,9 @@ function onChangeSortReverse() {
function onShare() {
shareLink(
`Tout Doux - ${list.value ?? ''}`,
i18n.t('share_text'),
`${document.location.href.split('?')[0] ?? ''}?lang=${i18n.locale.value}`
`Tout Doux - ${list.value ?? ""}`,
i18n.t("share_text"),
`${document.location.href.split("?")[0] ?? ""}?lang=${i18n.locale.value}`,
)
.then((viaShare) => {
if (!viaShare) {
@@ -141,13 +141,13 @@ function onShare() {
}
})
.catch(() => {
alertError(i18n.t("alerts.share_error"))
alertError(i18n.t("alerts.share_error"));
});
}
function updateTitle() {
if (list.value !== null) {
document.title = `Tout Doux - ${list.value} (${completedCount.value.toFixed(0)}/${taskCount.value.toFixed(0)})`
document.title = `Tout Doux - ${list.value} (${completedCount.value.toFixed(0)}/${taskCount.value.toFixed(0)})`;
}
}
@@ -238,6 +238,7 @@ onBeforeRouteUpdate((to) => {
<button
class="btn btn-square"
:disabled="loading || taskInput.trim().length === 0"
:title="$t('add_button')"
@click="onNewTask"
>
<circle-plus-icon />
@@ -245,7 +246,7 @@ onBeforeRouteUpdate((to) => {
</div>
<div>
<button class="btn btn-sm px-4" @click="onShare">
<share-2-icon class="inline" :size="16" /> {{ $t('share_button') }}
<share-2-icon class="inline" :size="16" /> {{ $t("share_button") }}
</button>
</div>
<div class="collapse collapse-arrow font-light text-sm">