mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(planner): road trip mode, the dawarich trail and the route overview follow the account to another browser
The three planner view switches lived in sessionStorage only, so a new tab, another browser or another device opened every trip on the plain view again. They are now kept per trip in one user setting, planner_trip_views, validated against a contract in @trek/shared. The server keeps only switches that are on and only trips the user can still open, so a deleted trip or one the user left drops out on the next write. The tab copy in sessionStorage stays and answers until the settings have loaded. Refs #2639
This commit is contained in:
@@ -413,7 +413,7 @@ export async function createPluginRpcHostParts(
|
||||
// Plan 4 Task 1 constructor-ripple: LlmConfigResolver's addon-row read
|
||||
// moved off DatabaseService onto AddonsRepository.
|
||||
const llmConfig = new LlmConfigResolver(
|
||||
new SettingsService(await createTestUnitOfWork(db), appSettings, await createTestSettingsRepo(db)),
|
||||
new SettingsService(await createTestUnitOfWork(db), appSettings, await createTestSettingsRepo(db), await createTestTripsRepo(db)),
|
||||
(await sharedTestOrm(db)).repo(Addons),
|
||||
addons,
|
||||
);
|
||||
@@ -507,7 +507,7 @@ export async function createPluginRpcHostParts(
|
||||
generalStorage,
|
||||
await createTestUnitOfWork(db),
|
||||
(await sharedTestOrm(db)).em,
|
||||
new SettingsService(await createTestUnitOfWork(db), appSettings, await createTestSettingsRepo(db)),
|
||||
new SettingsService(await createTestUnitOfWork(db), appSettings, await createTestSettingsRepo(db), await createTestTripsRepo(db)),
|
||||
);
|
||||
// Plan 4 Task 4: UserCleanupService's UC1 now goes through a directly-injected
|
||||
// EntityManager (MaintenanceRepository.deletePluginUserData), not DatabaseService.
|
||||
|
||||
Reference in New Issue
Block a user