Updates for the browser title. Wrapping up for the day! July 4th week!

This commit is contained in:
Scott Idem
2024-07-03 18:48:28 -04:00
parent 8f2eb2c27e
commit 1bf90f128f
5 changed files with 22 additions and 3 deletions

View File

@@ -139,6 +139,7 @@ let events_local_data_struct: key_val = {
// show_content__presenter_start: false,
show_content__session_help: true,
show_content__session_search_help: true,
show_content__presenter_page_help: true,
disable_submit__opt_out: true,
submit_status__opt_out: null,

View File

@@ -391,6 +391,7 @@ function to_title_case (text_string) {
// Updated 2024-06-19
// This function behaves weirdly. It needs to be reviewed and updated.
export let shorten_string = function shorten_string(
{
string,
@@ -399,7 +400,7 @@ export let shorten_string = function shorten_string(
end_length=5,
wildcard_length=3
}: {
string: string,
string: undefined|string,
max_length?: number,
begin_length?: number,
end_length?: number,
@@ -410,7 +411,8 @@ export let shorten_string = function shorten_string(
if (!string || typeof string != 'string') {
console.log('Invalid string value passed');
return false;
// return false;
return '';
}
// NOTE: max_length is not the actual end result length. The actual max will be 45 characters.

View File

@@ -380,6 +380,13 @@ async function handle_search__event_session(
</script>
<svelte:head>
<title>
Event: {ae_util.shorten_string({string: $lq__event_obj?.name, max_length: 12})}
({$lq__event_obj?.event_id}) - Pres Mgmt - {$events_loc?.title}
</title>
</svelte:head>
<section
class="

View File

@@ -50,7 +50,10 @@ $events_slct.lq__event_presenter_obj = lq__event_presenter_obj;
</script>
<svelte:head>
<title>Presenter {$lq__event_presenter_obj?.full_name} ({$lq__event_presenter_obj?.event_presenter_id}) - Pres Mgmt - {$events_loc?.title}</title>
<title>
Presenter: {ae_util.shorten_string({ string: $lq__event_presenter_obj?.full_name, max_length: 20, begin_length: 10, end_length: 4 })}
({$lq__event_presenter_obj?.event_presenter_id ?? 'loading...'}) - Pres Mgmt - {$events_loc?.title}
</title>
</svelte:head>

View File

@@ -460,6 +460,12 @@ $: if ($slct_trigger == 'load__event_presenter_obj_li') {
</script>
<svelte:head>
<title>
Session: {ae_util.shorten_string({string: $lq__event_session_obj?.name, max_length: 12})} ({$lq__event_session_obj?.event_session_id}) - Pres Mgmt - {$events_loc?.title}
</title>
</svelte:head>
<section
class="ae_events_pres_mgmt_event_session md:container h-full mx-auto flex flex-col space-y-4 pt-0 pb-8"