Merge pull request #7815 from okxlin/renovate/lovasoa-sqlpage-0.x

Update lovasoa/sqlpage Docker tag to v0.47.0
This commit is contained in:
okxlin
2026-10-19 12:53:40 +08:00
committed by GitHub
8 changed files with 83 additions and 1 deletions
@@ -0,0 +1,5 @@
create table todos(
id integer primary key,
title text not null,
created_at timestamp default current_timestamp
);
+3
View File
@@ -0,0 +1,3 @@
{
"database_url": "sqlite:///var/www/sqlpage.db?mode=rwc"
}
+1 -1
View File
@@ -1,6 +1,6 @@
services:
sqlpage:
image: "lovasoa/sqlpage:v0.46.3@sha256:354c683a50f541be01d427b3b664f1d5b36c28739f45bfb809be14b99b6ff649"
image: "lovasoa/sqlpage:v0.47.0@sha256:88a535d169d2cc5a12c17cff76992dd5c1b3c20864ce5a5e729b070990b37fe5"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
user: "1000:1000"
@@ -0,0 +1,16 @@
delete from todos
where id = $todo_id and $confirm = 'yes'
returning
'redirect' as component,
'/' as link;
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select
'alert' as component,
'red' as color,
'Confirm deletion' as title,
'Are you sure you want to delete the following todo item?\n\n> ' || title as description_md,
'?todo_id=' || $todo_id || '&confirm=yes' as link,
'Delete' as link_text
from todos where id = $todo_id;
@@ -0,0 +1,20 @@
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select 'list' as component,
'Todo' as title,
'No todo yet...' as empty_title;
select
title,
'todo_form.sql?todo_id=' || id as edit_link,
'delete.sql?todo_id=' || id as delete_link
from todos;
select
'button' as component,
'center' as justify;
select
'todo_form.sql' as link,
'green' as color,
'Add new todo' as title,
'circle-plus' as icon;
@@ -0,0 +1,4 @@
select 'shell' as component,
printf('Todo list (%d)', count(*)) as title,
'timeline' as menu_item
from todos;
@@ -0,0 +1,12 @@
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select 'timeline' as component;
select
title,
'todo_form.sql?todo_id=' || id as link,
created_at as date,
'calendar' as icon,
'green' as color,
printf('%d days ago', julianday('now') - julianday(created_at)) as description
from todos
order by created_at desc;
@@ -0,0 +1,22 @@
insert or replace into todos(id, title)
select $todo_id, :todo
where :todo is not null
returning
'redirect' as component,
'/' as link;
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select
'form' as component,
'Todo' as title,
case when $todo_id is null then
'Add new todo'
else
'Edit todo'
end as validate;
select
'Todo item' as label,
'todo' as name,
'What do you have to do?' as placeholder,
(select title from todos where id = $todo_id) as value;