Lots of general clean up and work for CHOW going live

This commit is contained in:
Scott Idem
2024-03-08 11:27:18 -05:00
parent 5a147a98bb
commit 2ada1419d8
11 changed files with 338 additions and 229 deletions

View File

@@ -11,7 +11,7 @@ let events_local_data_struct: key_val = {
'ver': '2024-03-06_17',
// Shared
'name': 'Aether - Events (SvelteKit 2.x Svelte 4.x)',
'title': `OSIT's Æ Events - Dev SvelteKit`, // Æ
'title': `OSIT's Æ Events`, // - Dev SvelteKit`, // Æ
'ds': {},

View File

@@ -40,7 +40,7 @@ export let ae_app_local_data_struct: key_val = {
'name': 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)',
'theme': 'light',
'iframe': false,
'title': `OSIT's Æ - Dev SvelteKit`, // Æ
'title': `OSIT's Æ`, // - Dev SvelteKit`, // Æ
'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY
'site_domain': null, // https://example.com, https://dev.example.com, etc.

View File

@@ -456,12 +456,12 @@ function create_a_element({account_id, base_url, hosted_file_id, filename=null,
return `<a href="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" class="${class_li}">${text}</a>`;
}
function create_img_element({account_id, base_url, hosted_file_id, filename=null, extension=null, class_li='max-w-64', inc_link=false}) {
function create_img_element({account_id, base_url, hosted_file_id, filename=null, extension=null, class_li='max-w-64', style="", inc_link=false}) {
let img_html = '';
if (filename) {
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" class="${class_li}" />`;
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" class="${class_li}" style="${style}" />`;
} else {
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}" class="${class_li}" />`;
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}" class="${class_li}" style="${style}" />`;
}
if (inc_link) {
@@ -508,6 +508,17 @@ function create_video_element({account_id, base_url, hosted_file_id, filename=nu
// }
// This function will take a long string (sentences or paraghraphs) of text and return an estimated number of words.
function count_words(text: string) {
if (!text && text.length < 1) {
return false;
}
let count = text.trim().split(/\s+/).length;
return count;
}
export let ae_util = {
iso_datetime_formatter: iso_datetime_formatter,
number_w_commas: number_w_commas,
@@ -517,5 +528,6 @@ export let ae_util = {
create_a_element: create_a_element,
create_img_element: create_img_element,
create_video_element: create_video_element,
count_words: count_words,
};
// export default ae_util;

View File

@@ -651,7 +651,9 @@ async function handle_update__data_store({
<button
type="button"
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-75 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-30 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
class:opacity-5={!$ae_loc.administrator_access}
class:hidden={!show_edit_btn || !$ae_loc.trusted_access}
on:click={() => {
trigger = 'load__ds__code';
show_edit = true;