Author SHA1 Message Date
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
9 changed files with 81 additions and 34 deletions
-1
View File
@@ -25,7 +25,6 @@ RUN uv pip install . --system
ENV APP_ENV=production
ENV PORT=5000
EXPOSE ${PORT}
ENV BIND=0.0.0.0
COPY --from=front-end /app/dist ./dist
+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):
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)
reset_cron = tortoise.fields.CharField(
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"])
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"])
async def post_task(list_name: str) -> typing.Any:
data = flask.request.get_json()
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)
if parsed_data is None:
flask.abort(400)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "tout-doux",
"version": "1.0.1",
"version": "1.0.4",
"private": true,
"type": "module",
"engines": {
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "tout-doux"
version = "1.0.1"
version = "1.0.4"
description = ""
requires-python = ">=3.14"
dependencies = [
+32 -7
View File
@@ -1,5 +1,5 @@
<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 { CopyIcon, TrashIcon, SaveIcon, XIcon } from "@lucide/vue";
import { updateTask } from "@/api/tasks";
@@ -11,7 +11,8 @@ import { relativeTime } from "@/lib/dates";
import { useAlertStore } from "@/stores/alerts";
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 });
defineProps<{ showLastChecked: boolean; showNextReset: boolean }>();
@@ -20,6 +21,7 @@ const editMode = ref<boolean>(false);
const editName = ref<string>("");
const editCron = ref<string | null>(null);
const refreshKey = ref<number>(0);
const editNameInput = ref<HTMLInputElement | null>(null);
const checked = computed<boolean>(() => taskCompleted(task.value));
const nextReset = computed<Date | null>(() => taskNextReset(task.value));
@@ -28,13 +30,22 @@ const i18n = useI18n();
const { alertSuccess, alertError } = useAlertStore();
async function onOpen() {
editMode.value = true;
await nextTick();
editNameInput.value?.focus();
}
function onClose() {
editName.value = task.value.name;
editCron.value = task.value.reset_cron;
editMode.value = false;
}
function onSave() {
if (editName.value.trim()) {
updateTask(task.value.id, {
name: editName.value,
name: editName.value.trim(),
reset_cron: editCron.value,
})
.then((newTask) => {
@@ -49,6 +60,7 @@ function onSave() {
task.value.reset_cron = editCron.value;
editMode.value = false;
}
}
function onCheck() {
if (!checked.value) {
@@ -117,7 +129,7 @@ watch(task, () => {
</div>
<div
class="cursor-pointer text-lg select-none"
@click.prevent="editMode = true"
@click.prevent="onOpen"
>
<div>{{ task.name }}</div>
<div
@@ -131,7 +143,8 @@ watch(task, () => {
v-if="showNextReset && checked && nextReset"
class="font-light text-xs italic"
>
{{ $t("resets") }} {{ relativeTime(nextReset, $i18n.locale) }}
{{ $t("resets") }}
{{ relativeTime(nextReset, $i18n.locale) }}
</div>
</div>
</template>
@@ -141,7 +154,13 @@ watch(task, () => {
<button class="btn btn-square me-1" @click="onClose">
<x-icon />
</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 />
</button>
<button class="btn btn-square me-1" @click="onClone">
@@ -151,7 +170,13 @@ watch(task, () => {
<trash-icon />
</button>
</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" />
</div>
</template>
+8 -6
View File
@@ -25,6 +25,7 @@ import { shareLink } from "@/lib/share";
const route = useRoute();
const list = ref<string | null>(null);
const loading = ref<boolean>(true);
const taskInput = ref<string>("");
const tasks = ref<Task[]>([]);
@@ -54,6 +55,7 @@ function fetchTasks() {
.then((data: Task[]) => {
tasks.value = data;
reSortTasks();
loading.value = false;
setTimeout(fetchTasks, 10000);
})
.catch(() => {
@@ -72,7 +74,7 @@ function reSortTasks() {
}
function onNewTask() {
if (taskInput.value.trim() && list.value) {
if (taskInput.value.trim() && list.value && !loading.value) {
createTask(list.value, {
name: taskInput.value.trim(),
reset_cron: null,
@@ -150,12 +152,12 @@ function updateTitle() {
}
onBeforeMount(() => {
list.value = route.params.list as string;
list.value = (route.params.list as string).slice(0, 128);
fetchTasks();
});
onBeforeRouteUpdate((to) => {
list.value = to.params.list as string;
list.value = (to.params.list as string).slice(0, 128);
fetchTasks();
});
</script>
@@ -179,7 +181,7 @@ onBeforeRouteUpdate((to) => {
</li>
</template>
<li
v-if="empty"
v-if="!loading && empty"
class="list-row italic text-xl font-extralight self-center"
>
<span
@@ -188,7 +190,7 @@ onBeforeRouteUpdate((to) => {
></span>
</li>
<li
v-else-if="allCompleted && separateCompleted"
v-else-if="!loading && allCompleted && separateCompleted"
class="list-row italic text-xl font-extralight self-center"
>
<span
@@ -209,7 +211,7 @@ onBeforeRouteUpdate((to) => {
<div>
<button
class="btn btn-square"
:disabled="taskInput.trim().length === 0"
:disabled="loading || taskInput.trim().length === 0"
@click="onNewTask"
>
<circle-plus-icon />
Generated
+1 -1
View File
@@ -323,7 +323,7 @@ asyncpg = [
[[package]]
name = "tout-doux"
version = "1.0.1"
version = "1.0.4"
source = { editable = "." }
dependencies = [
{ name = "flask", extra = ["async"] },