mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 09:38:54 +00:00
feat(studio): filter photos by entry, upload from Studio, and switch stops off
The content browser gets a filter over the journey's pictures: all of them, the ones no entry holds, or one entry at a time, with the day and the place under each name. An entry card in the Entries tab reaches its own pictures the same way. Pictures can now come in without leaving Studio, into the entry the filter names or into the gallery, from the panel or dropped straight onto the page, and a photo element can fill its page or the whole spread in one press. Stops can be taken out of the arithmetic. A journal entry carries a stats_excluded flag; an entry that has it is off the route, out of the distance, out of the countries and not a step, while staying in the journal. Studio lists every stop in the travel panel with a switch, the entry editor carries the same switch on desktop and phone, and the entry card says when a day is off the route.
This commit is contained in:
@@ -4236,6 +4236,27 @@ function runMigrations(db: Database.Database): void {
|
||||
db.exec("ALTER TABLE plugin_actions ADD COLUMN scope TEXT NOT NULL DEFAULT 'user'");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* A journal entry that is not a stop (discussion #2064).
|
||||
*
|
||||
* Studio draws its route and prints its distance from every entry that
|
||||
* carries coordinates, and that is right until the journal starts at the
|
||||
* home airport: the night before the flight, the stopover, the place the
|
||||
* trip was planned from all become stops, and the distance counts the legs
|
||||
* to and from them. The traveller knows which of those are the journey and
|
||||
* which are the way there, so the switch sits on the entry. The entry stays
|
||||
* in the journal; it is only left out of the arithmetic.
|
||||
*
|
||||
* DEFAULT 0: every existing entry keeps counting, which is what it did.
|
||||
*
|
||||
* Appended LAST: the array is index-addressed against schema_version.
|
||||
*/
|
||||
() => {
|
||||
const cols = db.prepare("SELECT name FROM pragma_table_info('journey_entries')").all() as Array<{ name: string }>;
|
||||
if (!cols.some((c) => c.name === 'stats_excluded')) {
|
||||
db.exec('ALTER TABLE journey_entries ADD COLUMN stats_excluded INTEGER NOT NULL DEFAULT 0');
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
if (currentVersion < migrations.length) {
|
||||
|
||||
Reference in New Issue
Block a user