All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 40s
commit 579f0878e5240dc17db69be1e0b0c0f5af7ef9fe
Author: Arno Kaimbacher <arno.kaimbacher@geosphere.at>
Date: Tue Jun 9 09:25:44 2026 +0200
feat: Refactor error handling in Dataset Edit form and improve validation messages
- Updated error handling in the Dataset Edit form to use a centralized formatError function for displaying validation messages.
- Enhanced user feedback by ensuring that error messages are displayed consistently across various fields.
- Modified the validation rule for arrayContainsTypes to provide clearer error messages for missing main and translated titles/abstracts.
- Introduced a new ValidationService to manage manual construction of validation errors.
- Updated Vite configuration to streamline asset loading and improve performance.
- Adjusted Inertia setup to utilize dynamic imports for page-specific assets.
- Cleaned up unnecessary comments and code in various files for better readability.
commit 5efddc2a58c0e164fef585cc7344c06155dbc2c1
Author: Arno Kaimbacher <arno.kaimbacher@geosphere.at>
Date: Mon Jan 12 17:02:47 2026 +0100
feat: add dataset change detection and form submission composables
- Implemented `useDatasetChangeDetection` for tracking unsaved changes in dataset forms, including comparisons for licenses, basic properties, files, coverage, and more.
- Added `useDatasetFormSubmission` for handling dataset form submissions with validation, success/error handling, and auto-save functionality.
130 lines
3.7 KiB
TypeScript
130 lines
3.7 KiB
TypeScript
/**
|
|
* Config source: https://git.io/JeYHp
|
|
*
|
|
* Feel free to let us know via PR, if you find something broken in this config
|
|
* file.
|
|
*/
|
|
|
|
import env from '#start/env';
|
|
// import app from '@adonisjs/core/services/app';
|
|
import { defineConfig, stores } from '@adonisjs/session';
|
|
|
|
const sessionConfig = defineConfig({
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Enable/Disable sessions
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Setting the following property to "false" will disable the session for the
|
|
| entire application
|
|
|
|
|
*/
|
|
enabled: true,
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Driver
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The session driver to use. You can choose between one of the following
|
|
| drivers.
|
|
|
|
|
| - cookie (Uses signed cookies to store session values)
|
|
| - file (Uses filesystem to store session values)
|
|
| - redis (Uses redis. Make sure to install "@adonisjs/redis" as well)
|
|
|
|
|
| Note: Switching drivers will make existing sessions invalid.
|
|
|
|
|
*/
|
|
// driver: env.get('SESSION_DRIVER'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cookie name
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The name of the cookie that will hold the session id.
|
|
|
|
|
*/
|
|
cookieName: 'adonis-session',
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Clear session when browser closes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Whether or not you want to destroy the session when browser closes. Setting
|
|
| this value to `true` will ignore the `age`.
|
|
|
|
|
*/
|
|
clearWithBrowser: false,
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Session age
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The duration for which session stays active after no activity. A new HTTP
|
|
| request to the server is considered as activity.
|
|
|
|
|
| The value can be a number in milliseconds or a string that must be valid
|
|
| as per https://npmjs.org/package/ms package.
|
|
|
|
|
| Example: `2 days`, `2.5 hrs`, `1y`, `5s` and so on.
|
|
|
|
|
*/
|
|
age: '2h',
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cookie values
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The cookie settings are used to setup the session id cookie and also the
|
|
| driver will use the same values.
|
|
|
|
|
*/
|
|
cookie: {
|
|
path: '/',
|
|
httpOnly: true,
|
|
secure: false, //app.inProduction,
|
|
sameSite: false,
|
|
},
|
|
|
|
/**
|
|
* The store to use. Make sure to validate the environment
|
|
* variable in order to infer the store name without any
|
|
* errors.
|
|
*/
|
|
store: 'file', //env.get('SESSION_DRIVER'),
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Configuration for the file driver
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The file driver needs absolute path to the directory in which sessions
|
|
| must be stored.
|
|
|
|
|
*/
|
|
// file: {
|
|
// location: app.tmpPath('sessions'),
|
|
// },
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Redis driver
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The redis connection you want session driver to use. The same connection
|
|
| must be defined inside `config/redis.ts` file as well.
|
|
|
|
|
*/
|
|
// redisConnection: 'local',
|
|
stores: {
|
|
cookie: stores.cookie(),
|
|
file: stores.file({
|
|
location: './tmp/sessions', // Where the data will live
|
|
}),
|
|
},
|
|
});
|
|
export default sessionConfig;
|