Author SHA1 Message Date
klemek e87068e379 chore: 1.0.5
Python Lint CI / ruff (push) Successful in 13m5s
Python Lint CI / ruff-format-check (push) Successful in 12m36s
Python Lint CI / ty (push) Successful in 8m48s
Docker Build / build (push) Successful in 18m24s
TS Lint / Oxlint (push) Successful in 6m1s
TS Lint / ESLint (push) Successful in 6m22s
TS Lint / TypeScript (push) Successful in 3m26s
2026-07-15 15:12:32 +02:00
klemek cc856c3402 fix: better preview shot
Docker Build / build (push) Has been cancelled
TS Lint / TypeScript (push) Has been cancelled
TS Lint / ESLint (push) Has been cancelled
TS Lint / Oxlint (push) Has been cancelled
2026-07-15 15:12:13 +02:00
klemek b24f3bb656 fix: animated background compatibility 2026-07-15 15:11:28 +02:00
klemek cf2f48c84c feat: move new task bar below completed 2026-07-15 15:04:32 +02:00
klemek 0f5f3b2fc5 feat: animated background
TS Lint / Oxlint (push) Successful in 54s
TS Lint / TypeScript (push) Successful in 1m3s
TS Lint / ESLint (push) Successful in 1m4s
Docker Build / build (push) Successful in 9m19s
2026-07-15 15:00:15 +02:00
klemek 3a40b06354 chore: 1.0.4
Python Lint CI / ruff (push) Failing after 1m45s
Python Lint CI / ruff-format-check (push) Successful in 4m11s
Python Lint CI / ty (push) Successful in 6m6s
TS Lint / ESLint (push) Successful in 4m53s
Docker Build / build (push) Successful in 10m12s
TS Lint / Oxlint (push) Successful in 6m46s
TS Lint / TypeScript (push) Successful in 5m59s
2026-07-14 19:17:43 +02:00
klemek 117d3a2029 fix: initial loading of list
Docker Build / build (push) Has been cancelled
TS Lint / Oxlint (push) Has been cancelled
TS Lint / ESLint (push) Has been cancelled
TS Lint / TypeScript (push) Has been cancelled
2026-07-14 19:17:38 +02:00
klemek 478091b0ba chore: 1.0.3
Python Lint CI / ruff (push) Successful in 3m12s
Python Lint CI / ty (push) Successful in 8m28s
Python Lint CI / ruff-format-check (push) Successful in 8m46s
TS Lint / ESLint (push) Successful in 7m22s
TS Lint / Oxlint (push) Failing after 2m3s
TS Lint / TypeScript (push) Successful in 2m8s
Docker Build / build (push) Successful in 11m59s
2026-07-14 18:17:58 +02:00
klemek 08b3b06089 feat: better task item name input
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
2026-07-14 18:17:50 +02:00
klemek 1c7d38fc15 chore: 1.0.2
Python Lint CI / ruff-format-check (push) Successful in 5m3s
Python Lint CI / ruff (push) Successful in 5m4s
Python Lint CI / ty (push) Successful in 4m29s
Docker Build / build (push) Successful in 9m50s
TS Lint / ESLint (push) Successful in 6m54s
TS Lint / Oxlint (push) Successful in 6m57s
TS Lint / TypeScript (push) Successful in 6m43s
2026-07-14 17:44:58 +02:00
klemek 350da88802 fix: max limit on list name
Docker Build / build (push) Has been cancelled
Python Lint CI / ruff (push) Has been cancelled
Python Lint CI / ruff-format-check (push) Has been cancelled
Python Lint CI / ty (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
2026-07-14 17:44:52 +02:00
klemek 29cdf7bb7e fix: remove uselesse EXPOSE 2026-07-14 17:37:22 +02:00
14 changed files with 126 additions and 55 deletions
-1
View File
@@ -25,7 +25,6 @@ RUN uv pip install . --system
ENV APP_ENV=production ENV APP_ENV=production
ENV PORT=5000 ENV PORT=5000
EXPOSE ${PORT}
ENV BIND=0.0.0.0 ENV BIND=0.0.0.0
COPY --from=front-end /app/dist ./dist COPY --from=front-end /app/dist ./dist
+2
View File
@@ -4,6 +4,8 @@
> A shareable task list with auto resetting items. > A shareable task list with auto resetting items.
![](./public/assets/preview.jpg)
**[todo.klemek.fr](https://todo.klemek.fr)** **[todo.klemek.fr](https://todo.klemek.fr)**
## Running your own ## Running your own
+21
View File
@@ -0,0 +1,21 @@
from tortoise import migrations
from tortoise.migrations import operations as ops
from tortoise import fields
class Migration(migrations.Migration):
dependencies = [('models', '0001_initial')]
initial = False
operations = [
ops.AlterField(
model_name='Task',
name='list_name',
field=fields.CharField(db_index=True, max_length=128),
),
ops.AlterField(
model_name='Task',
name='reset_cron',
field=fields.CharField(null=True, max_length=64),
),
]
+1 -1
View File
@@ -10,7 +10,7 @@ CRONTAB_REGEX = r"^(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@eve
class Task(AbstractModel): class Task(AbstractModel):
list_name = tortoise.fields.CharField(max_length=32, db_index=True, null=False) list_name = tortoise.fields.CharField(max_length=128, db_index=True, null=False)
name = tortoise.fields.TextField(null=False) name = tortoise.fields.TextField(null=False)
reset_cron = tortoise.fields.CharField( reset_cron = tortoise.fields.CharField(
max_length=64, max_length=64,
+2 -2
View File
@@ -58,13 +58,13 @@ class Server(gunicorn.app.base.BaseApplication):
@self.app.route("/api/lists/<list_name>/tasks", methods=["GET"]) @self.app.route("/api/lists/<list_name>/tasks", methods=["GET"])
async def get_tasks(list_name: str) -> list: async def get_tasks(list_name: str) -> list:
return await Task.filter(list_name=list_name).values() return await Task.filter(list_name=list_name[:128]).values()
@self.app.route("/api/lists/<list_name>/tasks", methods=["POST"]) @self.app.route("/api/lists/<list_name>/tasks", methods=["POST"])
async def post_task(list_name: str) -> typing.Any: async def post_task(list_name: str) -> typing.Any:
data = flask.request.get_json() data = flask.request.get_json()
logging.getLogger(self.__class__.__name__).info("%s", data) logging.getLogger(self.__class__.__name__).info("%s", data)
data["list_name"] = list_name data["list_name"] = list_name[:128]
parsed_data = Task.validate_create(data) parsed_data = Task.validate_create(data)
if parsed_data is None: if parsed_data is None:
flask.abort(400) flask.abort(400)
+1 -1
View File
@@ -16,7 +16,7 @@
<!-- card related --> <!-- card related -->
<meta property="og:title" content="{{ title }}"> <meta property="og:title" content="{{ title }}">
<meta property="og:description" content="{{ lang('home') }}"> <meta property="og:description" content="{{ lang('home') }}">
<meta property="og:image" content="{{ app_url }}/assets/favicon-96x96.jpg"> <meta property="og:image" content="{{ app_url }}/assets/preview.jpg">
<meta property="og:url" content="{{ app_url }}/{{ path }}"> <meta property="og:url" content="{{ app_url }}/{{ path }}">
<script <script
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "tout-doux", "name": "tout-doux",
"version": "1.0.1", "version": "1.0.5",
"private": true, "private": true,
"type": "module", "type": "module",
"engines": { "engines": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "tout-doux" name = "tout-doux"
version = "1.0.1" version = "1.0.5"
description = "" description = ""
requires-python = ">=3.14" requires-python = ">=3.14"
dependencies = [ dependencies = [
+26
View File
@@ -10,3 +10,29 @@ body {
font-style: normal; font-style: normal;
font-variation-settings: "wdth" 100; font-variation-settings: "wdth" 100;
} }
.bg-hero {
--size: 5vh;
--angle: 45deg;
background: repeating-linear-gradient(
var(--angle),
var(--color-base-200) calc(0 * var(--size)),
var(--color-base-200) calc(1 * var(--size)),
var(--color-secondary) calc(1 * var(--size)),
var(--color-secondary) calc(2 * var(--size)),
var(--color-base-200) calc(2 * var(--size)),
var(--color-base-200) calc(3 * var(--size)),
var(--color-accent) calc(3 * var(--size)),
var(--color-accent) calc(4 * var(--size)),
var(--color-base-200) calc(4 * var(--size))
);
background-size: calc(4 * var(--size) / sin(var(--angle)))
calc(4 * var(--size) / sin(var(--angle)));
animation: BackgroundAnimate 10s linear infinite reverse;
}
@keyframes BackgroundAnimate {
0% {
background-position: calc(4 * var(--size) / sin(var(--angle))) 0;
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ onMounted(() => {
:style="{ display: visible ? 'flex' : 'none' }" :style="{ display: visible ? 'flex' : 'none' }"
class="min-h-screen flex-col w-screen" class="min-h-screen flex-col w-screen"
> >
<div class="hero bg-base-200 grow"> <div class="hero bg-hero grow">
<div class="hero-content text-center p-0"> <div class="hero-content text-center p-0">
<div <div
class="max-w-md min-w-96 bg-base-100 rounded-box shadow-md" class="max-w-md min-w-96 bg-base-100 rounded-box shadow-md"
+46 -21
View File
@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount, ref, watch, computed, defineAsyncComponent } from "vue"; import { onBeforeMount, ref, watch, computed, defineAsyncComponent, nextTick } from "vue";
import type { Task } from "@/types"; import type { Task } from "@/types";
import { CopyIcon, TrashIcon, SaveIcon, XIcon } from "@lucide/vue"; import { CopyIcon, TrashIcon, SaveIcon, XIcon } from "@lucide/vue";
import { updateTask } from "@/api/tasks"; import { updateTask } from "@/api/tasks";
@@ -11,7 +11,8 @@ import { relativeTime } from "@/lib/dates";
import { useAlertStore } from "@/stores/alerts"; import { useAlertStore } from "@/stores/alerts";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
const emit = defineEmits<(e: "clone" | "delete" | "updated", task: Task) => void>(); const emit =
defineEmits<(e: "clone" | "delete" | "updated", task: Task) => void>();
const task = defineModel<Task>({ required: true }); const task = defineModel<Task>({ required: true });
defineProps<{ showLastChecked: boolean; showNextReset: boolean }>(); defineProps<{ showLastChecked: boolean; showNextReset: boolean }>();
@@ -20,6 +21,7 @@ const editMode = ref<boolean>(false);
const editName = ref<string>(""); const editName = ref<string>("");
const editCron = ref<string | null>(null); const editCron = ref<string | null>(null);
const refreshKey = ref<number>(0); const refreshKey = ref<number>(0);
const editNameInput = ref<HTMLInputElement | null>(null);
const checked = computed<boolean>(() => taskCompleted(task.value)); const checked = computed<boolean>(() => taskCompleted(task.value));
const nextReset = computed<Date | null>(() => taskNextReset(task.value)); const nextReset = computed<Date | null>(() => taskNextReset(task.value));
@@ -28,26 +30,36 @@ const i18n = useI18n();
const { alertSuccess, alertError } = useAlertStore(); const { alertSuccess, alertError } = useAlertStore();
async function onOpen() {
editMode.value = true;
await nextTick();
editNameInput.value?.focus();
}
function onClose() { function onClose() {
editName.value = task.value.name;
editCron.value = task.value.reset_cron;
editMode.value = false; editMode.value = false;
} }
function onSave() { function onSave() {
updateTask(task.value.id, { if (editName.value.trim()) {
name: editName.value, updateTask(task.value.id, {
reset_cron: editCron.value, name: editName.value.trim(),
}) reset_cron: editCron.value,
.then((newTask) => {
task.value = newTask;
emit("updated", newTask);
alertSuccess(i18n.t("alerts.task_updated"));
}) })
.catch(() => { .then((newTask) => {
alertError(i18n.t("alerts.task_update_error")); task.value = newTask;
}); emit("updated", newTask);
task.value.name = editName.value; alertSuccess(i18n.t("alerts.task_updated"));
task.value.reset_cron = editCron.value; })
editMode.value = false; .catch(() => {
alertError(i18n.t("alerts.task_update_error"));
});
task.value.name = editName.value;
task.value.reset_cron = editCron.value;
editMode.value = false;
}
} }
function onCheck() { function onCheck() {
@@ -105,7 +117,7 @@ watch(task, () => {
<template> <template>
<div class="list-row text-left"> <div class="list-row text-left">
<template v-if="!editMode"> <template v-if="!editMode">
<div class="content-center"> <div class="content-center">
<input <input
:id="refreshKey.toFixed(0)" :id="refreshKey.toFixed(0)"
@@ -117,7 +129,7 @@ watch(task, () => {
</div> </div>
<div <div
class="cursor-pointer text-lg select-none" class="cursor-pointer text-lg select-none"
@click.prevent="editMode = true" @click.prevent="onOpen"
> >
<div>{{ task.name }}</div> <div>{{ task.name }}</div>
<div <div
@@ -131,7 +143,8 @@ watch(task, () => {
v-if="showNextReset && checked && nextReset" v-if="showNextReset && checked && nextReset"
class="font-light text-xs italic" class="font-light text-xs italic"
> >
{{ $t("resets") }} {{ relativeTime(nextReset, $i18n.locale) }} {{ $t("resets") }}
{{ relativeTime(nextReset, $i18n.locale) }}
</div> </div>
</div> </div>
</template> </template>
@@ -141,7 +154,13 @@ watch(task, () => {
<button class="btn btn-square me-1" @click="onClose"> <button class="btn btn-square me-1" @click="onClose">
<x-icon /> <x-icon />
</button> </button>
<button class="btn btn-square me-1" @click="onSave"> <button
class="btn btn-square me-1"
:class="
editName.trim().length === 0 ? 'btn-disabled' : ''
"
@click="onSave"
>
<save-icon /> <save-icon />
</button> </button>
<button class="btn btn-square me-1" @click="onClone"> <button class="btn btn-square me-1" @click="onClone">
@@ -151,7 +170,13 @@ watch(task, () => {
<trash-icon /> <trash-icon />
</button> </button>
</div> </div>
<input v-model="editName" type="text" class="input w-full" /> <input
ref="editNameInput"
v-model="editName"
type="text"
class="input w-full"
@keyup.enter="onSave"
/>
<cron-input v-model="editCron" :edit-mode="editMode" /> <cron-input v-model="editCron" :edit-mode="editMode" />
</div> </div>
</template> </template>
+23 -25
View File
@@ -25,6 +25,7 @@ import { shareLink } from "@/lib/share";
const route = useRoute(); const route = useRoute();
const list = ref<string | null>(null); const list = ref<string | null>(null);
const loading = ref<boolean>(true);
const taskInput = ref<string>(""); const taskInput = ref<string>("");
const tasks = ref<Task[]>([]); const tasks = ref<Task[]>([]);
@@ -54,6 +55,7 @@ function fetchTasks() {
.then((data: Task[]) => { .then((data: Task[]) => {
tasks.value = data; tasks.value = data;
reSortTasks(); reSortTasks();
loading.value = false;
setTimeout(fetchTasks, 10000); setTimeout(fetchTasks, 10000);
}) })
.catch(() => { .catch(() => {
@@ -72,7 +74,7 @@ function reSortTasks() {
} }
function onNewTask() { function onNewTask() {
if (taskInput.value.trim() && list.value) { if (taskInput.value.trim() && list.value && !loading.value) {
createTask(list.value, { createTask(list.value, {
name: taskInput.value.trim(), name: taskInput.value.trim(),
reset_cron: null, reset_cron: null,
@@ -150,12 +152,12 @@ function updateTitle() {
} }
onBeforeMount(() => { onBeforeMount(() => {
list.value = route.params.list as string; list.value = (route.params.list as string).slice(0, 128);
fetchTasks(); fetchTasks();
}); });
onBeforeRouteUpdate((to) => { onBeforeRouteUpdate((to) => {
list.value = to.params.list as string; list.value = (to.params.list as string).slice(0, 128);
fetchTasks(); fetchTasks();
}); });
</script> </script>
@@ -179,7 +181,7 @@ onBeforeRouteUpdate((to) => {
</li> </li>
</template> </template>
<li <li
v-if="empty" v-if="!loading && empty"
class="list-row italic text-xl font-extralight self-center" class="list-row italic text-xl font-extralight self-center"
> >
<span <span
@@ -188,7 +190,7 @@ onBeforeRouteUpdate((to) => {
></span> ></span>
</li> </li>
<li <li
v-else-if="allCompleted && separateCompleted" v-else-if="!loading && allCompleted && separateCompleted"
class="list-row italic text-xl font-extralight self-center" class="list-row italic text-xl font-extralight self-center"
> >
<span <span
@@ -196,26 +198,6 @@ onBeforeRouteUpdate((to) => {
<span v-html="$t('all_completed_hint')"></span <span v-html="$t('all_completed_hint')"></span
></span> ></span>
</li> </li>
<li class="list-row">
<div class="list-col-grow">
<input
v-model="taskInput"
type="text"
:placeholder="$t('new_task_hint')"
class="input w-full"
@keyup.enter="onNewTask"
/>
</div>
<div>
<button
class="btn btn-square"
:disabled="taskInput.trim().length === 0"
@click="onNewTask"
>
<circle-plus-icon />
</button>
</div>
</li>
</ul> </ul>
<div <div
v-if="separateCompleted && hasCompleted" v-if="separateCompleted && hasCompleted"
@@ -245,6 +227,22 @@ onBeforeRouteUpdate((to) => {
</ul> </ul>
</div> </div>
</div> </div>
<div class="flex gap-2 p-4">
<input
v-model="taskInput"
type="text"
:placeholder="$t('new_task_hint')"
class="input grow"
@keyup.enter="onNewTask"
/>
<button
class="btn btn-square"
:disabled="loading || taskInput.trim().length === 0"
@click="onNewTask"
>
<circle-plus-icon />
</button>
</div>
<div> <div>
<button class="btn btn-sm px-4" @click="onShare"> <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') }}
Generated
+1 -1
View File
@@ -323,7 +323,7 @@ asyncpg = [
[[package]] [[package]]
name = "tout-doux" name = "tout-doux"
version = "1.0.1" version = "1.0.5"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "flask", extra = ["async"] }, { name = "flask", extra = ["async"] },