fix: paddings and margins
This commit is contained in:
@@ -134,19 +134,21 @@ function onChangeSortReverse() {
|
||||
}
|
||||
|
||||
function onShare() {
|
||||
shareLink(
|
||||
`Tout Doux - ${list.value ?? ""}`,
|
||||
i18n.t("share_text"),
|
||||
`${document.location.href.split("?")[0] ?? ""}?lang=${i18n.locale.value}`,
|
||||
)
|
||||
.then((viaShare) => {
|
||||
if (!viaShare) {
|
||||
alertSuccess(i18n.t("alerts.share_clipboard"));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
alertError(i18n.t("alerts.share_error"));
|
||||
});
|
||||
if (!empty.value) {
|
||||
shareLink(
|
||||
`Tout Doux - ${list.value ?? ""}`,
|
||||
i18n.t("share_text"),
|
||||
`${document.location.href.split("?")[0] ?? ""}?lang=${i18n.locale.value}`,
|
||||
)
|
||||
.then((viaShare) => {
|
||||
if (!viaShare) {
|
||||
alertSuccess(i18n.t("alerts.share_clipboard"));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
alertError(i18n.t("alerts.share_error"));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateTitle() {
|
||||
@@ -167,11 +169,32 @@ onBeforeRouteUpdate((to) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="list-row italic text-sm font-extralight self-center">
|
||||
<div
|
||||
class="list-row italic text-sm font-extralight self-center"
|
||||
:class="!empty ? 'cursor-pointer hover:underline' : ''"
|
||||
:title="!empty ? $t('share_button') : ''"
|
||||
@click="onShare"
|
||||
>
|
||||
{{ list }}
|
||||
<span v-if="taskCount">({{ completedCount }} / {{ taskCount }})</span>
|
||||
<span v-if="!empty"
|
||||
>({{ completedCount }} / {{ taskCount }}) <share-2-icon
|
||||
class="inline"
|
||||
:size="16"
|
||||
:stroke-width="1"
|
||||
/></span>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<div v-if="!loading && empty" class="mt-4 mb-4 italic text-xl font-extralight">
|
||||
<search-icon class="inline" />
|
||||
<span v-html="$t('empty_hint')"></span>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="!loading && allCompleted && separateCompleted"
|
||||
class="mt-4 mb-4 italic text-xl font-extralight"
|
||||
>
|
||||
<check-check-icon class="inline" />
|
||||
<span v-html="$t('all_completed_hint')"></span>
|
||||
</div>
|
||||
<ul v-else class="list">
|
||||
<template v-for="(task, i) in tasks" :key="task.id">
|
||||
<li v-if="tasks[i] && (!separateCompleted || !taskCompleted(task))">
|
||||
<task-item
|
||||
@@ -184,35 +207,17 @@ onBeforeRouteUpdate((to) => {
|
||||
/>
|
||||
</li>
|
||||
</template>
|
||||
<li
|
||||
v-if="!loading && empty"
|
||||
class="list-row italic text-xl font-extralight self-center"
|
||||
>
|
||||
<span
|
||||
><search-icon class="inline" />
|
||||
<span v-html="$t('empty_hint')"></span
|
||||
></span>
|
||||
</li>
|
||||
<li
|
||||
v-else-if="!loading && allCompleted && separateCompleted"
|
||||
class="list-row italic text-xl font-extralight self-center"
|
||||
>
|
||||
<span
|
||||
><check-check-icon class="inline" />
|
||||
<span v-html="$t('all_completed_hint')"></span
|
||||
></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
v-if="separateCompleted && hasCompleted"
|
||||
class="collapse collapse-arrow"
|
||||
class="collapse collapse-arrow mb-4"
|
||||
>
|
||||
<input id="completed-dropdown" type="checkbox" />
|
||||
<div class="collapse-title mb-0">
|
||||
<input id="completed-dropdown p-0" type="checkbox" />
|
||||
<div class="collapse-title p-0 content-center">
|
||||
<circle-check-big-icon class="inline" :size="24" />
|
||||
{{ $t("completed") }} ({{ completedCount }})
|
||||
</div>
|
||||
<div class="collapse-content p-0">
|
||||
<div class="collapse-content p-0 -mb-4">
|
||||
<ul class="list">
|
||||
<template
|
||||
v-for="(task, i) in tasks"
|
||||
@@ -231,7 +236,7 @@ onBeforeRouteUpdate((to) => {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-2 p-4">
|
||||
<div class="flex gap-2">
|
||||
<input
|
||||
v-model="taskInput"
|
||||
type="text"
|
||||
@@ -248,14 +253,12 @@ onBeforeRouteUpdate((to) => {
|
||||
<circle-plus-icon />
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="!empty">
|
||||
<button class="btn btn-sm px-4" @click="onShare">
|
||||
<share-2-icon class="inline" :size="16" /> {{ $t("share_button") }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="!empty" class="collapse collapse-arrow font-light text-sm">
|
||||
<input id="options-dropdown" type="checkbox" />
|
||||
<div class="collapse-title">
|
||||
<div
|
||||
v-if="!empty"
|
||||
class="mt-4 -mb-4 collapse collapse-arrow font-light text-sm"
|
||||
>
|
||||
<input id="options-dropdown p-0" type="checkbox" />
|
||||
<div class="collapse-title p-0 content-center">
|
||||
<settings-2-icon class="inline" :size="16" />
|
||||
{{ $t("options.title") }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user