Commit Graph

498 Commits

Author SHA1 Message Date
Ophir LOJKINE ac4a3ec183 Make JSON Schema the configuration source of truth 2026-06-12 23:44:32 +02:00
Ophir LOJKINE d92a7399e2 fix: enforce unprivileged path guard on fresh cache hits (#1307)
Reserved/private SQL files (sqlpage/ prefix, dotfiles, .. traversal,
absolute paths) became directly routable over HTTP while their parsed
form was fresh in sql_file_cache. A trusted page loading such a file via
sqlpage.run_sql(...) loads it with privilege and caches it; a later
direct unprivileged request hit the fresh cache entry before the path
guard ran, returning 200 and executing the private SQL instead of 403.

The unprivileged path validation is extracted into
filesystem::validate_unprivileged_path and now enforced before
consulting the cache in both HTTP routing (AppFileStore::contains) and
the unprivileged FileCache::get_with_privilege path.
2026-06-10 16:37:20 +02:00
Ophir LOJKINE 2c89bd04f7 Update remaining dependency pins 2026-05-29 22:24:53 +02:00
Ophir LOJKINE 5dfed603b0 Update v0.44.0 changelog 2026-05-17 01:52:28 +02:00
setop 966b955f36 card: add top image attributes for lazy loading (#1283)
* card: add top image attributes for lazy loading

This will be useful for long image gallery.

Developped according to [HTML specs of img tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#lazy)

* docs: move card image parameters into existing migration

---------

Co-authored-by: Ophir LOJKINE <ophir.lojkine@datadoghq.com>
2026-05-12 22:27:41 +02:00
Ophir LOJKINE b68a93e64f fix format 2026-04-07 17:51:59 +02:00
Ophir LOJKINE 409962047c Merge branch 'main' of github.com:sqlpage/SQLPage 2026-04-07 17:44:29 +02:00
Ophir LOJKINE bf9d5fe212 fixed chart menu readability on dark theme 2026-04-07 17:44:14 +02:00
Ophir LOJKINE 72fb37810a update apex charts 2026-04-07 17:27:12 +02:00
Ophir LOJKINE d11390ac10 Chart: add show_legend toggle, document it, and add e2e test (#1270)
* Add show_legend option to chart component

* Fix show_legend for SQLite boolean values

* remove ai cruft
2026-04-07 17:18:13 +02:00
Ophir LOJKINE 81da9b3aa6 Add item-level id support for datagrid rows (#1246) 2026-03-15 14:17:44 +01:00
wissyfaty 74ff8c843d Add margin bottom (#1229)
Co-authored-by: Wissal <wissal.faty@univ-lille.fr>
2026-03-06 18:20:51 +01:00
Ophir LOJKINE cc8848f614 Adjust form spacing without submit buttons (#1215) 2026-02-28 22:03:56 +01:00
setop 2840e1ab7c add form buttons icons, closes #821 (#1210) 2026-02-04 09:23:29 +01:00
lovasoa 3b2a99232f re-enable text drop shadow in chart data labels 2025-12-28 01:00:08 +01:00
lovasoa dc8e861893 update default chart color palette 2025-12-28 00:21:17 +01:00
lovasoa 5d74fa98e1 re-add the lime color to charts
fixes https://github.com/sqlpage/SQLPage/issues/1162
2025-12-28 00:01:09 +01:00
lovasoa baf3454086 update apexcharts 2025-12-27 23:52:40 +01:00
DofSekai 24d6057649 add delay property (#1126) 2025-11-24 12:56:06 +01:00
olivierauverlot 8289bc69ba Pagination (#1093)
* Pagination component

* New pagination component

* Some changes

* Adding a warning about the use of LIMIT and OFFSET in the blog post

* Use icon_img for icons

* Correction of the icons size

* enhance pagination docs examples

* update pagination docs

---------

Co-authored-by: Olivier Auverlot <olivier.auverlot@icloud.com>
Co-authored-by: lovasoa <contact@ophir.dev>
2025-11-23 00:40:37 +01:00
olivierauverlot 17d892584f Adding an alias named contents to the html property of the shell-empty component (#1122)
* Adding an alias named contents to the html property of the shell-empty component

* Changes for the shell-empty documentation

* improve shell comoonent description

* shell-empty docs clarification

---------

Co-authored-by: Olivier Auverlot <olivier.auverlot@icloud.com>
Co-authored-by: lovasoa <contact@ophir.dev>
2025-11-22 23:46:52 +01:00
Zoé Cappe c7a5c76e0c fix text-center for the edit_url action in table component (#1113) 2025-11-19 16:06:43 +01:00
lovasoa cec270e1ee In the table component, allow simple objects in custom_actions instead of requiring arrays of objects.
fix https://github.com/sqlpage/SQLPage/issues/1079
2025-11-04 10:32:50 +01:00
lovasoa abe136d095 fix labels semantics in login component 2025-10-28 00:06:04 +01:00
lovasoa 5ee781cf40 use the login component in the user auth example 2025-10-27 23:36:29 +01:00
lovasoa 5a6192fcfa Merge olivierauverlot/login: combine local defaults with error_message and improved docs 2025-10-27 23:19:21 +01:00
lovasoa cc95ae25de Improve login component documentation and usability
Add complete example with database schema, credential processing, and page protection. Update authentication migration to reference new login component. Enhance login template with default icons and autocomplete attributes. Make validate parameter optional with sensible default.
2025-10-27 23:13:38 +01:00
Olivier Auverlot 36ab34f827 Fixing a regression with the class attribute. 2025-10-27 23:13:38 +01:00
Olivier Auverlot eb1f43c6e1 username_icon and password_icon attributes 2025-10-27 23:13:38 +01:00
Olivier Auverlot cfea904e5d The login component is an authentication form for users of an application. 2025-10-27 23:13:38 +01:00
lovasoa 722dc740fa add an error_message property to the login component
- Updated SQL queries in `create_session_token.sql` and `login.sql` to use consistent parameter naming conventions.
- Enhanced the login form in `login.sql` to include an error message for failed login attempts.
- Added a new parameter `error_message` in the migration file for better user feedback.
- Modified the Handlebars template to display the error message when applicable, improving user experience during authentication.
2025-10-27 23:07:57 +01:00
lovasoa c28cf2a46d Merge branch 'main' into login 2025-10-27 22:50:56 +01:00
Olivier Auverlot cb8fa2dc16 Fixing a regression with the class attribute. 2025-10-24 08:09:32 +02:00
Olivier Auverlot b356cc8904 username_icon and password_icon attributes 2025-10-24 08:04:39 +02:00
lovasoa d9d2832402 Merge branch 'main' into feature/table-action-buttons 2025-10-21 11:35:51 +02:00
Spencer Hansen 32d6863982 Added checks for active status to dropdown items in shell.handlebars. 2025-10-20 15:48:07 -07:00
Olivier Auverlot 5d5d1f94d7 The login component is an authentication form for users of an application. 2025-10-18 12:19:15 +02:00
Spencer Hansen 3654d4272b Updated class settings in table.handlebars so that action buttons are centered, and _col_{name} is included in new rows. 2025-10-14 19:43:02 -07:00
Spencer Hansen ac4126b2af #Added support for action buttons in the table component template.
* A default edit and delete button can be included by specifying an "edit_url" or "delete_url"
* Custom Column based action buttons can be added in the table header using json object array in the custom_actions column.
* Custom action buttons can be defined on the row level by specifying _sqlpage_actions.
2025-10-14 17:59:56 -07:00
lovasoa 189ac240d1 fix slight spacing issue in list's empty value 2025-10-08 15:38:17 +02:00
lovasoa 86f2722bdf fix https://github.com/sqlpage/SQLPage/issues/1048 2025-10-08 15:26:04 +02:00
lovasoa 298923efb9 Update generator meta tag to include version
The generator meta tag now includes the SQLPage version. This is fetched
from the CARGO_PKG_VERSION environment variable during the build
process.
2025-09-20 20:47:29 +02:00
lovasoa 709ffb60ab Fix submenu scroll issue by enabling autoclose
This is a workaround for https://github.com/sqlpage/SQLPage/issues/1011
until tabler releases the proper fix.
2025-09-09 22:17:15 +02:00
lovasoa 2018478d7a Remove custom scrollbar styling from CSS
fixed upstream
2025-09-09 18:05:00 +02:00
lovasoa c685bb6b46 Simplify modal class check condition 2025-09-09 14:33:16 +02:00
lovasoa c5fbb4be54 form select: loose equality testing for option values
the form component now considers numbers and their string representation as equal when comparing the `value` parameter and the values from the `options` parameter in dropdowns

see https://github.com/sqlpage/SQLPage/discussions/1002
2025-08-30 18:16:53 +02:00
lovasoa 637f198b57 error handling: improve visual presentation of error messages
- Updated error messages to be more user-friendly and visually appealing in the browser.
- Introduced a new method for retrieving static files from the cache.
- Improved error reporting for invalid UTF-8 encoding in SQL files.
2025-08-30 17:16:13 +02:00
lovasoa a76acd74d0 feat: modals have their own URL
- Allow opening modals with a simple link, enabling triggering from
other components. - Persist modal state across page refreshes using URL
hash.
2025-08-27 17:30:27 +02:00
lovasoa ae30d82917 biome fixes 2025-07-27 00:09:39 +02:00
lovasoa 16ed836782 Chart component: accept numerical values passed as strings in pie
charts.
2025-07-26 23:29:15 +02:00