Enhanced Events Launcher Location loading and instructions.
Implemented explicit 'enabled' and 'hidden' parameter support in the Event data layer ('load_ae_obj_id__event').
Updated the Events Launcher layout and background sync engine to proactively fetch all enabled locations (including hidden ones), ensuring the room select list is complete and stays updated.
Refined 'launcher_file_cont.svelte' to only display native-specific file opening instructions when 'app_mode' is 'native'.
Updated AGENT_TODO.md to reflect task completion and new priorities.
This commit is contained in:
@@ -24,6 +24,8 @@ export async function load_ae_obj_id__event({
|
||||
inc_location_li = false,
|
||||
inc_session_li = false,
|
||||
inc_template_li = false,
|
||||
enabled = 'enabled',
|
||||
hidden = 'not_hidden',
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
@@ -35,6 +37,8 @@ export async function load_ae_obj_id__event({
|
||||
inc_location_li?: boolean;
|
||||
inc_session_li?: boolean;
|
||||
inc_template_li?: boolean;
|
||||
enabled?: 'enabled' | 'all' | 'not_enabled';
|
||||
hidden?: 'hidden' | 'all' | 'not_hidden';
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Event | null> {
|
||||
@@ -53,12 +57,14 @@ export async function load_ae_obj_id__event({
|
||||
_refresh_event_v3_background({
|
||||
api_cfg, event_id, view, try_cache,
|
||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
|
||||
enabled, hidden,
|
||||
log_lvl: 0
|
||||
});
|
||||
|
||||
// Still handle nested loads for the cached version to ensure UI richness
|
||||
return await _handle_nested_loads(cached_event, {
|
||||
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl
|
||||
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
|
||||
enabled, hidden, log_lvl
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -70,6 +76,7 @@ export async function load_ae_obj_id__event({
|
||||
return await _refresh_event_v3_background({
|
||||
api_cfg, event_id, view, try_cache,
|
||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
|
||||
enabled, hidden,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
@@ -80,6 +87,7 @@ export async function load_ae_obj_id__event({
|
||||
async function _refresh_event_v3_background({
|
||||
api_cfg, event_id, view, try_cache,
|
||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
|
||||
enabled, hidden,
|
||||
log_lvl
|
||||
}: any) {
|
||||
// Check if offline
|
||||
@@ -115,7 +123,8 @@ async function _refresh_event_v3_background({
|
||||
}
|
||||
|
||||
return await _handle_nested_loads(processed_obj, {
|
||||
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl
|
||||
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
|
||||
enabled, hidden, log_lvl
|
||||
});
|
||||
}
|
||||
} catch (error: any) {
|
||||
@@ -127,7 +136,7 @@ async function _refresh_event_v3_background({
|
||||
/**
|
||||
* Shared logic for loading nested child collections
|
||||
*/
|
||||
async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl }: any) {
|
||||
async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, enabled, hidden, log_lvl }: any) {
|
||||
if (log_lvl) console.log(`Loading nested collections for event: ${event_obj.event_id} (Devices: ${inc_device_li}, Files: ${inc_file_li}, Locations: ${inc_location_li}, Sessions: ${inc_session_li}, Templates: ${inc_template_li})`);
|
||||
// String-Only ID Vision: the '_id' field IS the string ID
|
||||
const current_event_id = event_obj.id || event_obj.event_id;
|
||||
@@ -158,6 +167,8 @@ async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, in
|
||||
api_cfg,
|
||||
for_obj_type: 'event',
|
||||
for_obj_id: current_event_id,
|
||||
enabled,
|
||||
hidden,
|
||||
log_lvl
|
||||
}).then(res => event_obj.event_location_obj_li = res));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user