Code clean up. Version update.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "osit-aether-app-svelte",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.0",
|
||||
"description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem",
|
||||
"homepage": "https://oneskyit.com/",
|
||||
"private": true,
|
||||
|
||||
@@ -69,8 +69,6 @@ let ae_promises: key_val = $state({});
|
||||
// let ae_trigger: any = null;
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
|
||||
|
||||
let show_menu: boolean = $state(false);
|
||||
|
||||
|
||||
@@ -138,26 +136,6 @@ function not_obj(obj) {
|
||||
}
|
||||
|
||||
$effect(async () => {
|
||||
// if (not_obj(orig_entry_obj) && not_obj(tmp_entry_obj) && $lq__journal_entry_obj && $lq__journal_entry_obj?.journal_entry_id) {
|
||||
// if (updated_obj && JSON.stringify(orig_entry_obj) === JSON.stringify($lq__journal_entry_obj)) {
|
||||
// console.log(`TEST: updated_obj but orig_entry_obj and $lq__journal_entry_obj still the same`, $lq__journal_entry_obj);
|
||||
// // orig_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// // tmp_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// // tmp_entry_obj_changed = false;
|
||||
// // updated_obj = false;
|
||||
// // } else if (not_obj(orig_entry_obj) && $lq__journal_entry_obj) {
|
||||
// // console.log('TEST: orig_entry_obj?', orig_entry_obj);
|
||||
// // console.log('TEST: LQ Journal Entry object available', $lq__journal_entry_obj);
|
||||
// // orig_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// // tmp_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// // tmp_entry_obj_changed = false;
|
||||
// } else
|
||||
|
||||
|
||||
// || (updated_obj && await $lq__journal_entry_obj.updated_on > orig_entry_obj?.updated_on)
|
||||
|
||||
// if (updated_obj && $lq__journal_entry_obj && JSON.stringify(orig_entry_obj) !== JSON.stringify($lq__journal_entry_obj)) {
|
||||
// if (updated_obj && $lq__journal_entry_obj && $lq__journal_entry_obj?.updated_on > orig_entry_obj?.updated_on) {
|
||||
if ($lq__journal_entry_obj && $lq__journal_entry_obj?.updated_on) {
|
||||
console.log(`TEST: Journal Entry updated datetime changed`, $lq__journal_entry_obj);
|
||||
|
||||
@@ -222,36 +200,6 @@ $effect(async () => {
|
||||
// updated_obj = false;
|
||||
updated_idb = false;
|
||||
|
||||
// } else if ((updated_obj && await $lq__journal_entry_obj) || ($lq__journal_entry_obj?.updated_on > orig_entry_obj?.updated_on)) {
|
||||
// // updated_obj = false;
|
||||
// console.log(`TEST: updated_obj and $lq__journal_entry_obj; setting orig_entry_obj and tmp_entry_obj`, $lq__journal_entry_obj);
|
||||
|
||||
// orig_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// tmp_entry_obj = { ...$lq__journal_entry_obj };
|
||||
// if ($journals_loc?.entry?.decrypt_kv[$lq__journal_entry_obj?.journal_entry_id]) {
|
||||
// if (!tmp_entry_obj?.content && tmp_entry_obj?.content_encrypted) {
|
||||
// console.log('TEST: Decrypting the content...');
|
||||
|
||||
// tmp_entry_obj.content = await ae_util.decrypt_wrapper(tmp_entry_obj?.content_encrypted, journal_key);
|
||||
// tmp_entry_obj.content_md_html = handle_marked(tmp_entry_obj?.content);
|
||||
|
||||
// orig_entry_obj.content = await ae_util.decrypt_wrapper(orig_entry_obj?.content_encrypted, journal_key);
|
||||
// orig_entry_obj.content_md_html = handle_marked(orig_entry_obj?.content);
|
||||
// }
|
||||
// if (!tmp_entry_obj?.history && tmp_entry_obj?.history_encrypted) {
|
||||
// console.log('TEST: Decrypting the history...');
|
||||
|
||||
// tmp_entry_obj.history = await ae_util.decrypt_wrapper(tmp_entry_obj?.history_encrypted, journal_key);
|
||||
// tmp_entry_obj.history_md_html = handle_marked(tmp_entry_obj?.history);
|
||||
|
||||
// orig_entry_obj.history = await ae_util.decrypt_wrapper(orig_entry_obj?.history_encrypted, journal_key);
|
||||
// orig_entry_obj.history_md_html = handle_marked(orig_entry_obj?.history);
|
||||
// }
|
||||
// }
|
||||
// console.log('TEST: tmp_entry_obj:', tmp_entry_obj);
|
||||
// tmp_entry_obj_changed = false;
|
||||
// updated_obj = false;
|
||||
// updated_idb = false;
|
||||
} else if (
|
||||
!updated_obj
|
||||
&& JSON.stringify(orig_entry_obj) !== JSON.stringify($lq__journal_entry_obj)
|
||||
@@ -261,19 +209,6 @@ $effect(async () => {
|
||||
// orig_entry_obj = { ...$lq__journal_entry_obj };
|
||||
}
|
||||
|
||||
// } else if (
|
||||
// // !updated_obj
|
||||
// // &&
|
||||
// !not_obj(orig_entry_obj)
|
||||
// && $lq__journal_entry_obj
|
||||
// && JSON.stringify(orig_entry_obj) !== JSON.stringify($lq__journal_entry_obj)
|
||||
// ) {
|
||||
// console.log('TEST: IDB has changed!!!');
|
||||
// orig_entry_obj = { ...$lq__journal_entry_obj };
|
||||
|
||||
// } else {
|
||||
// console.log('TEST: Catch all: LQ Journal Entry object available', orig_entry_obj, tmp_entry_obj, $lq__journal_entry_obj);
|
||||
// }
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
|
||||
Reference in New Issue
Block a user